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, wgInterwikiMagic
40 # For testing purposes, temporary articles can created:
41 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
42 # where '/' denotes a newline.
44 # This is the standard article assumed to exist.
81 MediaWiki:bad image list
83 * [[File:Bad.jpg]] except [[Nasty page]]
111 Template:echo_with_span
117 Template:echo_with_div
130 Template:table_attribs
133 |</noinclude>style="color:red;"|Foo
137 Template:table_attribs_2
140 |</noinclude>style="color:red;"|Foo
145 Template:table_attribs_3
148 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
152 Template:table_attribs_4
154 | style="background-color:#DC241f;" width="10px" |
158 Template:table_attribs_5
161 |</noinclude>style="color:red;"||Bar
165 Template:table_attribs_6
167 style="background: <nowiki>
174 Template:table_attribs_7
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
181 Template:table_header_cells
183 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
189 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
193 Template:PartialTable
200 Template:image_attribs
203 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
206 ## See T48811 for details
208 Template:mixed_attr_content_template
210 style="color:red;" title="T48811"
216 Template:definition_list
263 Template:EmptyTRWithHTMLAttrTest
266 <tr align="center"></tr>
267 <tr><td>foo</td></tr>
268 <tr align="center"></tr>
269 <tr><td>bar</td></tr>
286 This is a simple paragraph.
288 <p>This is a simple paragraph.
293 Paragraphs with extra newline spacing
316 Paragraphs with newline spacing with comment lines in between
324 <!--foo--><!--More than 1 comment, still stripped-->
328 <!--foo--> <!----> <!-- bar -->
389 Paragraphs with newline spacing with non-empty white-space lines in between
416 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
424 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
463 Extra newlines: More paragraphs with indented comment
478 Extra newlines followed by heading
493 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
494 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
497 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
502 Extra newlines between heading and content are swallowed
510 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
511 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
518 http://fr.wikipedia.org/wiki/🍺
519 <!-- EasterEgg we love beer, better be able be able to link to it -->
521 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
525 # Note that the html+tidy output removes the spaces after the <li>,
526 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
527 # This is an issue for all tests with lists. We intentionally do
528 # *not* add html+tidy clauses for these, as we don't want to
529 # document/test the broken behavior. (Parsoid matches the non-tidy
530 # output in these cases.)
539 <li> Item 2</li></ul>
547 * plain''italic''plain
548 * plain''italic''plain''italic''plain
549 * plain'''bold'''plain
550 * plain'''bold'''plain'''bold'''plain
551 * plain''italic''plain'''bold'''plain
552 * plain'''bold'''plain''italic''plain
553 * plain''italic'''bold-italic'''italic''plain
554 * plain'''bold''bold-italic''bold'''plain
555 * plain'''''bold-italic'''italic''plain
556 * plain'''''bold-italic''bold'''plain
557 * plain''italic'''bold-italic'''''plain
558 * plain'''bold''bold-italic'''''plain
559 * plain l'''italic''plain
560 * plain l''''bold''' plain
563 <li> plain<i>italic</i>plain</li>
564 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
565 <li> plain<b>bold</b>plain</li>
566 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
567 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
568 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
569 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
570 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
571 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
572 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
573 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
574 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
575 <li> plain l'<i>italic</i>plain</li>
576 <li> plain l'<b>bold</b> plain</li></ul>
580 # this example taken from the [[simple:Moon]] article (bug 47326)
582 Italics and possessives (1)
584 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
586 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
590 # this example taken from [[en:Flaming Pie]] (bug 49926)
592 Italics and possessives (2)
594 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
596 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
600 # this example taken from [[en:Dictionary]] (bug 49926)
602 Italics and possessives (3)
604 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
606 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
612 ### 2-quote opening sequence tests
615 Italics and bold: 2-quote opening sequence: (2,2)
624 Italics and bold: 2-quote opening sequence: (2,3)
633 Italics and bold: 2-quote opening sequence: (2,4)
643 # same html as previous, but wikitext adjusted to match parsoid html2wt
645 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
647 ''foo<nowiki>''</nowiki>''
653 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
655 Italics and bold: 2-quote opening sequence: (2,5)
668 # same html as previous, but wikitext adjusted to match parsoid html2wt
670 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
672 ''foo'''''<nowiki/>'''
683 ### 3-quote opening sequence tests
687 Italics and bold: 3-quote opening sequence: (3,2)
696 Italics and bold: 3-quote opening sequence: (3,3)
705 Italics and bold: 3-quote opening sequence: (3,4)
713 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
715 Italics and bold: 3-quote opening sequence: (3,5)
728 # same html as previous, but wikitext adjusted to match parsoid html2wt
730 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
732 '''foo'''''<nowiki/>''
743 ### 4-quote opening sequence tests
747 Italics and bold: 4-quote opening sequence: (4,2)
757 # same html as previous, but wikitext adjusted to match parsoid html2wt
759 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
761 <nowiki>''</nowiki>''foo''
768 Italics and bold: 4-quote opening sequence: (4,3)
777 Italics and bold: 4-quote opening sequence: (4,4)
787 # same html as previous, but wikitext adjusted to match parsoid html2wt
789 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
797 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
799 Italics and bold: 4-quote opening sequence: (4,5)
808 <p>'<b>foo</b><i></i>
812 # same html as previous, but wikitext adjusted to match parsoid html2wt
814 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
816 '<nowiki/>'''foo'''''<nowiki/>''
821 <p>'<b>foo</b><i></i>
827 ### 5-quote opening sequence tests
831 Italics and bold: 5-quote opening sequence: (5,2)
841 # same html as previous, but wikitext adjusted to match parsoid html2wt
843 Italics and bold: 5-quote opening sequence: (5,2+3)
852 Italics and bold: 5-quote opening sequence: (5,3)
862 # same html as previous, but wikitext adjusted to match parsoid html2wt
864 Italics and bold: 5-quote opening sequence: (5,3+2)
873 Italics and bold: 5-quote opening sequence: (5,4)
879 <p><i><b>foo'</b></i>
884 Italics and bold: 5-quote opening sequence: (5,5)
893 Italics and bold: 5-quote opening sequence: (5,6)
897 <p><i><b>foo'</b></i>
902 ### multiple quote sequences in a line
905 Italics and bold: multiple quote sequences: (2,4,2)
911 <p><i>foo'<b>bar</b></i>
916 # same html as previous, but wikitext adjusted to match parsoid html2wt
918 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
920 ''foo'<nowiki/>'''bar'''''
922 <p><i>foo'<b>bar</b></i>
928 Italics and bold: multiple quote sequences: (2,4,3)
934 <p><i>foo'<b>bar</b></i>
939 # same html as previous, but wikitext adjusted to match parsoid html2wt
941 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
943 ''foo'<nowiki/>'''bar'''''
945 <p><i>foo'<b>bar</b></i>
951 Italics and bold: multiple quote sequences: (2,4,4)
957 <p><i>foo'<b>bar'</b></i>
962 # same html as previous, but wikitext adjusted to match parsoid html2wt
964 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
966 ''foo'<nowiki/>'''bar'<nowiki/>'''''
968 <p><i>foo'<b>bar'</b></i>
973 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
975 Italics and bold: multiple quote sequences: (3,4,2)
984 <p><b>foo'</b>bar<i></i>
988 # same html as previous, but wikitext adjusted to match parsoid html2wt
990 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
994 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
999 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1004 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1006 Italics and bold: multiple quote sequences: (3,4,3)
1015 <p><b>foo'</b>bar<b></b>
1019 # same html as previous, but wikitext adjusted to match parsoid html2wt
1021 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1023 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1028 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1033 ### other quote tests
1036 Italics and bold: other quote tests: (2,3,5)
1038 ''this is about '''foo's family'''''
1040 <p><i>this is about <b>foo's family</b></i>
1046 Italics and bold: other quote tests: (2,(3,3),2)
1048 ''this is about '''foo's''' family''
1050 <p><i>this is about <b>foo's</b> family</i>
1056 Italics and bold: other quote tests: (3,2,3,2)
1060 '''this is about ''foo'''s family''
1062 <p><b>this is about <i>foo</i></b><i>s family</i>
1067 # same html as previous, but wikitext adjusted to match parsoid html2wt
1069 Italics and bold: other quote tests: (3,2,3+2+2,2)
1071 '''this is about ''foo'''''<nowiki/>''s family''
1073 <p><b>this is about <i>foo</i></b><i>s family</i>
1079 Italics and bold: other quote tests: (3,2,3,3)
1081 '''this is about ''foo'''s family'''
1083 <p>'<i>this is about </i>foo<b>s family</b>
1089 Italics and bold: other quote tests: (3,(2,2),3)
1091 '''this is about ''foo's'' family'''
1093 <p><b>this is about <i>foo's</i> family</b>
1099 Italicized possessive
1101 The ''[[Main Page]]'''s talk page.
1103 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1106 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1110 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1111 (Requires tidy for PHP parser output to be fixed up)
1113 parsoid=wt2html,wt2wt
1130 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1131 <td><i>a</i></td><td><i>b</i></td></tr>
1140 Non-html5 tags should be accepted
1142 <center>''foo''</center>
1144 <font>''foo''</font>
1145 <strike>''foo''</strike>
1148 <center><i>foo</i></center>
1149 <p><big><i>foo</i></big>
1150 <font><i>foo</i></font>
1151 <strike><i>foo</i></strike>
1157 <wbr> is valid wikitext (bug 52468)
1165 # <strike> is HTML4, <s> is HTML4/5.
1167 <s> or <strike> for strikethrough
1169 <strike>strike</strike>
1173 <p><strike>strike</strike>
1181 Text-level semantic html elements in wikitext
1184 <strong>text</strong>
1200 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1207 <strong>text</strong>
1223 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1231 # test cases taken from
1232 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1234 Ruby markup (W3C-style)
1236 ; Mono-ruby for individual base characters
1237 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1239 : <ruby>今日<rt>きょう</rt></ruby>
1241 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1243 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1245 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1247 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1248 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1249 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1252 <dl><dt> Mono-ruby for individual base characters</dt>
1253 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1254 <dt> Group ruby</dt>
1255 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1256 <dt> Jukugo ruby</dt>
1257 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1258 <dt> Inline ruby</dt>
1259 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1260 <dt> Double-sided ruby</dt>
1261 <dd> <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1263 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1264 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1265 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1270 # The next two test different paths in the sanitizer.
1272 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1274 <blockquote|>a</blockquote>
1276 <b→> doesn't terminate </b→>
1278 <bä> doesn't terminate </bä>
1280 <boo> doesn't terminate </boo>
1282 <s.foo> doesn't terminate </s.foo>
1286 <p><blockquote|>a</blockquote>
1287 </p><p><b→> doesn't terminate </b→>
1288 </p><p><bä> doesn't terminate </bä>
1289 </p><p><boo> doesn't terminate </boo>
1290 </p><p><s.foo> doesn't terminate </s.foo>
1291 </p><p><sub-ID#1>
1295 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1296 # If the non-word-character tag made it through the sanitizer, tidy
1297 # would munge it up.
1299 Non-word characters don't terminate tag names + tidy
1301 <blockquote|>a</blockquote>
1303 <b→> doesn't terminate </b→>
1305 <bä> doesn't terminate </bä>
1307 <boo> doesn't terminate </boo>
1309 <s.foo> doesn't terminate </s.foo>
1313 <p><blockquote|>a</p>
1314 <p><b→> doesn't terminate </b→></p>
1315 <p><bä> doesn't terminate </bä></p>
1316 <p><boo> doesn't terminate </boo></p>
1317 <p><s.foo> doesn't terminate </s.foo></p>
1318 <p><sub-ID#1></p>
1322 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1323 ### This checks that HTML5 tags (with non-word characters in the tag
1324 ### name) make it safely through the parser -- the Sanitizer will
1325 ### munge them later, as it should.
1328 Non-word characters are valid in extension tags (T19663)
1339 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1343 Isolated close tags should be treated as literal text (bug 52760)
1351 <p><s.foo>s</p>
1353 <p><s.foo>s</p>
1357 ### Special characters
1361 Bare pipe character (bug 52363)
1370 Bare pipe character from a template (bug 52363)
1379 ### <nowiki> test cases
1383 <nowiki> unordered list
1385 <nowiki>* This is not an unordered list item.</nowiki>
1387 <p>* This is not an unordered list item.
1390 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1396 <nowiki>Lorem ipsum dolor
1404 <p>Lorem ipsum dolor
1413 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1425 :There is not nowiki.
1426 :There is <nowiki>nowiki</nowiki>.
1428 #There is not nowiki.
1429 #There is <nowiki>nowiki</nowiki>.
1431 *There is not nowiki.
1432 *There is <nowiki>nowiki</nowiki>.
1434 <dl><dd>There is not nowiki.</dd>
1435 <dd>There is nowiki.</dd></dl>
1436 <ol><li>There is not nowiki.</li>
1437 <li>There is nowiki.</li></ol>
1438 <ul><li>There is not nowiki.</li>
1439 <li>There is nowiki.</li></ul>
1442 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1443 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1445 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1446 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1448 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1449 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1453 Entities inside <nowiki>
1455 <nowiki><</nowiki>
1462 Entities inside template parameters
1468 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1472 Properly escape nowiki when combined with other wiki markup
1476 <p>* </nowiki> tag</p>
1478 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1482 T93824: Put escaped HTML tags inside nowiki
1486 <p><h2>foo</h2></p>
1488 <nowiki><h2>foo</h2></nowiki>
1492 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1496 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1497 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1498 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1500 This text: L'[[Foo]]
1501 This text: L<nowiki>''</nowiki>[[Foo]]
1502 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1505 # This test fails because wikitext whitespace is not normalized before comparing.
1507 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1511 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1514 This text : L<nowiki>''</nowiki>[[Foo]]
1517 # This test and the next one are html2wt only as they test that incorrect wikitext
1518 # passed in template arguments gets escaped or wrapped in nowikis where required.
1520 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1524 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1525 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1527 {{echo|foo{{!}}bar}}
1528 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1532 T53961: Output correct nowikis in template arguments
1536 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1537 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1538 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1539 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1540 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1543 {{echo|<nowiki>a }} b</nowiki>}}
1544 {{echo|<nowiki>a [[ b</nowiki>}}
1545 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1546 {{echo|a <nowiki>}</nowiki>}}
1550 Cases where "!!" needs nowiki protection
1555 <tr><th>this needs protection !! here</th></tr>
1559 <tr><th>this does not need
1560 protection !! here</th></tr>
1564 !<nowiki>this needs protection !! here</nowiki>
1577 Comments and Indent-Pre
1579 <!-- comment 1 --> asdf
1581 <!-- comment 1 --> asdf
1584 <!-- comment 1 --> asdf
1585 <!-- comment 2 -->xyz
1587 <!-- comment 1 --> asdf
1588 <!-- comment 2 --> xyz
1644 asdf<!-- comment 1 -->jkl
1654 <!-- foo --> b <!-- bar -->
1668 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1674 Comment semantics and delimiters
1676 <!-- --><!----><!-----><!------>
1680 <!-- --><!----><!-----><!------>
1684 Comment semantics and delimiters, redux
1686 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1687 -- foo -- funky huh? ... -->
1691 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1692 -- foo -- funky huh? ... -->
1696 Comment semantics and delimiters: directors cut
1698 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1699 everything starting with < followed by !-- until the first -- and > we see,
1700 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1706 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1707 everything starting with < followed by !-- until the first -- and > we see,
1708 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1713 Comment semantics: nesting
1715 <!--<!-- no, we're not going to do anything fancy here -->-->
1720 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1723 # Parsoid closes the unclosed comment, even if it means a slight
1726 Comment semantics: unclosed comment at end
1728 parsoid=wt2html,html2html
1730 <!--This comment will run out to the end of the document
1734 <!--This comment will run out to the end of the document-->
1738 Comment semantics: normalize comments to play nice with XML and browsers
1740 <!-- Browsers --!> think this is closed -->
1741 <!--> This would normally be text -->
1742 <!---> As would this -->
1743 <!-- XML doesn't like trailing dashes -------->
1744 <!-- Nor doubled hyphens -- anywhere in the data -->
1745 But this is not a comment.
1747 <p>But this is not a comment.
1750 <!-- Browsers --!> think this is closed -->
1751 <!--> This would normally be text -->
1752 <!---> As would this -->
1753 <!-- XML doesn't like trailing dashes -------->
1754 <!-- Nor doubled hyphens -- anywhere in the data -->
1755 <p>But this is not a comment.</p>
1759 Comment semantics: round-trip even text which contains encoded -->
1761 <!-- hello & goodbye - > --> --&gt; --&xx -->
1763 <!-- hello & goodbye - > --> --&gt; --&xx -->
1767 Comment in template title
1776 Comment on its own line post-expand
1788 Comment on its own line post-expand with non-significant whitespace
1800 Multiple comments should still parse as SOL-transparent
1802 parsoid=wt2html,wt2wt
1805 <!--c2--><!--c3--><!--c4-->*b
1814 <!--c2--><!--c3--><!--c4-->
1821 ### paragraph wrapping tests
1836 Block tag on one line (<div>)
1852 Block tag on one line (<blockquote>)
1854 a <blockquote>foo</blockquote>
1858 a <blockquote>foo</blockquote>
1870 Block tag on both lines (<div>)
1887 Block tag on both lines (<blockquote>)
1889 a <blockquote>foo</blockquote>
1891 b <blockquote>foo</blockquote>
1893 a <blockquote>foo</blockquote>
1894 b <blockquote>foo</blockquote>
1908 Multiple lines without block tags
1932 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1933 # So, we have a separate section for Parsoid. We don't want
1934 # to mimic this stripping behavior in Parsoid. It affects
1935 # editing experience and also requires us to maintain additional
1938 Empty lines between lines with block tags
1976 <div data-parsoid='{"stx":"html"}'></div>
1979 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1982 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1984 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1987 <div data-parsoid='{"stx":"html"}'>e</div>
1990 ## PHP parser emits output which is broken
1992 Unclosed HTML p-tags should be handled properly
2005 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2010 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2011 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2014 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2018 a [[Category:A1]] [[Category:A2]]
2023 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2027 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2033 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2037 ### Preformatted text
2046 And a [[Main Page|link]]
2052 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2057 Tabs don't trigger preformatted text
2061 This is preformatted text.
2067 <pre>This is preformatted text.
2072 preformatted text.</p>
2073 <pre>This is preformatted text.
2078 Space before tab needs nowiki pre protection
2084 <nowiki> </nowiki> a
2088 Ident preformatting with inline content
2099 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2116 Regression with preformatted in <center>
2130 Bug 52763: Preformatted in <blockquote>
2136 indented cell (no pre-wrapping!)
2146 <p> indented cell (no pre-wrapping!)
2154 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2171 Bug 15491: <ins>/<del> in blockquote
2174 Foo <del>bar</del> <ins>baz</ins> quux
2178 <p>Foo <del>bar</del> <ins>baz</ins> quux
2184 # Note that the p-wrapping is newline sensitive, which could be
2185 # considered a bug: tidy will wrap only the 'Foo' in the example
2186 # below in a <p> tag. (see comment 23-25 of bug #6200)
2188 Bug 15491: <ins>/<del> in blockquote (2)
2190 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2193 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2199 <del>bar</del> <ins>baz</ins> quux</blockquote>
2203 <pre> with attributes (bug 3202)
2205 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2207 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2212 <pre> with width attribute (bug 3202)
2214 <pre width="8">Narrow screen goodies</pre>
2216 <pre width="8">Narrow screen goodies</pre>
2221 <pre> with forbidden attribute (bug 3202)
2223 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2225 <pre width="8">Narrow screen goodies</pre>
2230 Entities inside <pre>
2239 <pre> with forbidden attribute values (bug 3202)
2241 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2243 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2248 <nowiki> inside <pre> (bug 13238)
2256 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2264 <pre><nowiki>Foo</nowiki></pre>
2269 <nowiki> inside of #tag:pre
2271 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2273 <pre>Foo →bar</pre>
2276 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"#tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2280 <nowiki> and <pre> preference (first one wins)
2309 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2311 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2314 <p><span typeof="mw:Nowiki">
2323 </pre> inside nowiki
2325 <nowiki></pre></nowiki>
2331 # Parsoid doesn't strip empty tags, like Tidy does.
2333 Empty pre; pre inside other HTML tags (bug 54946)
2335 parsoid=wt2html,wt2wt
2366 HTML pre followed by indent-pre
2376 # Note that tidy removes the empty <p> tags from the start and end.
2377 # Parsoid does not, by design.
2381 <p><pre>foo</pre></p>
2387 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2391 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2399 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2409 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2421 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2442 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2446 {{echo| foo}}{{echo| bar}}
2451 {{echo|<!--cmt--> foo}}
2453 <!--cmt-->{{echo| foo}}
2455 {{echo|{{echo| }}bar}}
2473 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2510 Pres with newline attributes
2515 <pre class="one two">hi</pre>
2519 two" data-parsoid='{"stx":"html"}'>hi</pre>
2523 Things that look like <pre> tags aren't treated as such
2525 Barack Obama <President> of the United States
2526 <President></President>
2528 <p>Barack Obama <President> of the United States
2529 <President></President>
2534 Handle broken pre-like tags (bug 64025)
2538 {{echo|<pre <pre>x</pre>}}
2540 <table><pre </table>
2543 <table><pre </table>
2551 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2560 Parsoid: handle pre with space after attribute
2564 <pre style="width:50%;" >{{echo|foo}}</pre>
2566 <pre style="width:50%;">{{echo|foo}}</pre>
2569 <pre style="width:50%;">{{echo|foo}}</pre>
2572 # TODO / maybe: fix wt2wt for this
2574 Parsoid: Don't paragraph-wrap fosterable content
2600 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2628 #--------------------------------------------------------------------
2629 # Transclusion parameter whitespace stripping tests
2630 # Behavior is different for positional and named parameters
2631 #--------------------------------------------------------------------
2633 Templates: Strip leading and trailing whitespace from named-param values
2637 {{echo|1= {{echo|b}} }}
2650 <ul><li> d</li></ul>
2655 Templates: Don't strip whitespace from positional-param values
2659 {{echo|{{echo|b}} }}
2691 <ul><li> f</li></ul>
2699 Templates: Handle empty comment-and-ws-only lines correctly
2702 <!--should be ignored-->
2703 <!--should be ignored as well-->
2712 Templates: Handle comments in the target
2715 <!-- should be ignored -->
2718 {{echo<!-- should be ignored -->
2721 {{echo<!-- should be ignored -->|foo}}
2723 {{<!-- should be ignored -->echo|foo}}
2725 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2727 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2729 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2731 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2735 Templates: Handle comments in parameter names (bug 67657)
2738 <!-- should be ignored -->
2742 <!-- should be ignored -->
2745 {{echo|1<!-- should be ignored -->=foo}}
2747 {{echo|<!-- should be ignored -->1=foo}}
2749 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2751 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
2753 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2755 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
2759 Templates: Other wikitext in parameter names (bug 67657)
2763 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2769 #--------------------------------------------------------------------
2770 # Transclusion parameter escaping tests
2771 #--------------------------------------------------------------------
2773 Templates: Parsoid parameter escaping test 1
2775 {{echo|[foo]|{{echo|[bar]}}}}
2779 <p about="#mwt1" typeof="mw:Transclusion"
2780 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2784 Parsoid: Pipes in external links in template parameter
2786 {{echo|[{{echo|http://example.com}} link]}}
2788 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2790 <p><a rel="mw:ExtLink" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
2794 Parsoid: pipe in transclusion parameter
2796 {{echo|http://foo.com/a|b}}
2798 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2800 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2801 typeof="mw:Transclusion"
2802 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a|b</a></p>
2806 Parsoid: Pipe in external link target and content in template parameter
2808 parsoid=html2wt,wt2wt
2810 {{echo|[http://foo.com/a|b a|b]}}
2812 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2814 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2815 typeof="mw:Transclusion"
2816 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2817 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2821 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2825 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2827 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main_Page bar]</p>
2831 Templates: Don't escape already nowiki-escaped text in template parameters
2833 parsoid=html2wt,wt2wt
2835 {{echo|foo<nowiki>|</nowiki>bar}}
2836 {{echo|<nowiki><div></nowiki>}}
2837 {{echo|<nowiki></nowiki>}}
2839 <p>foo|bar <div></p>
2841 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
2842 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
2843 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
2849 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2851 parsoid=html2wt,wt2wt
2853 {{echo|{{echo|1=bar}}}}
2857 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
2862 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2868 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
2873 Templates: Preserve blank parameter names
2879 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2883 Templates: Preserve blank parameter names in other positions
2885 {{blank_param|bar|=foo}}
2889 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
2894 ### Parsoid-centric tests for testing RT edge cases for pre
2898 1a. Indent-Pre and Comments
2911 1b. Indent-Pre and Comments
2924 1c. Indent-Pre and Comments
2937 1d. Indent-Pre and Comments
2938 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2951 2a. Indent-Pre and tables
2972 2b. Indent-Pre and tables
2988 2c. Indent-Pre and tables (bug 42252)
3005 2d. Indent-Pre and tables
3022 <tbody><tr><td> b</td></tr>
3027 2e. Indent-Pre and table-line syntax
3040 2f. Indent-pre started by table-line syntax
3059 3a. Indent-Pre and block tags (single-line html)
3063 c <blockquote> foo </blockquote>
3068 c <blockquote> foo </blockquote>
3069 <pre><span> foo </span>
3072 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3073 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3074 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3075 <pre><span> foo </span>
3092 3b. Indent-Pre and block tags (multi-line html)
3097 <pre>a <span>foo</span>
3102 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3103 b <div data-parsoid='{"stx":"html"}'> foo </div>
3113 3c. Indent-Pre and block tags (pre-content on separate line)
3177 4. Indent-Pre and extension tags
3183 a <ul class="gallery mw-gallery-traditional">
3184 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3185 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
3186 <div class="gallerytext">
3193 <ul class="gallery mw-gallery-traditional">
3194 <li class="gallerybox" style="width: 155px">
3195 <div style="width: 155px">
3196 <div class="thumb" style="width: 150px;">
3197 <div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div>
3199 <div class="gallerytext"></div>
3206 Table wikitext syntax outside wiki-tables
3209 ! not a table heading
3212 | class="foo bar" | baz
3219 ! not a table heading
3222 | class="foo bar" | baz
3231 Render paragraphs when indent-pre is suppressed in blocklevels
3248 4. Multiple spaces at start-of-line
3266 ## NOTE: the leading white-space chars on empty line are significant
3268 5a. White-space in indent-pre
3280 ## NOTE: the leading white-space chars on empty line are significant
3282 5b. White-space in indent-pre
3301 5c. White-space in indent-pre
3314 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3337 7a. Indent-pre and category links
3339 parsoid=wt2html,wt2wt
3341 [[Category:foo]] <!-- No pre-wrapping -->
3342 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3345 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3346 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3349 ## We used to, but no longer wt2wt this test since the default serializer
3350 ## will normalize all categories to serialize on their own line.
3351 ## This wikitext usage is going to be fairly uncommon in production and
3352 ## selser will take care of preserving formatting in those scenarios.
3354 7b. Indent-pre and category links
3359 [[Category:foo]] {{echo|b}}
3361 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3362 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
3366 Indent-Pre: Newlines in comments shouldn't affect sol state
3380 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3384 HTML-pre: 1. embedded newlines
3419 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3421 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3425 <pre data-parsoid='{"stx":"html"}'>
3430 <pre data-parsoid='{"stx":"html"}'>
3438 HTML-pre: big spaces
3474 <pre data-parsoid='{"stx":"html"}'>
3493 HTML-pre: 2: indented text
3506 HTML-pre: 3: other wikitext
3525 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3534 ### Definition lists
3541 <dl><dt> name </dt>
3542 <dd> Definition</dd></dl>
3547 Definition list for indentation only
3551 <dl><dd> Indented text</dd></dl>
3556 Definition list with no space
3561 <dd>Definition</dd></dl>
3566 Definition list with URL link
3568 ; http://example.com/ : definition
3570 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3571 <dd> definition</dd></dl>
3576 Definition list with bracketed URL link
3578 ;[http://www.example.com/ Example]:Something about it
3580 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3581 <dd>Something about it</dd></dl>
3586 Definition list with wikilink containing colon
3588 ; [[Help:FAQ]]: The least-read page on Wikipedia
3590 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
3591 <dd> The least-read page on Wikipedia</dd></dl>
3595 # At Brion's and JeLuF's insistence... :)
3597 Definition list with news link containing colon
3599 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3601 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3602 <dd> This isn't even a real newsgroup!</dd></dl>
3605 <dl><dt> <a rel="mw:ExtLink" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'> This isn't even a real newsgroup!</dd></dl>
3609 Malformed definition list with colon
3611 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3613 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
3618 Definition lists: colon in external link text
3620 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3622 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3623 <dd> OK, I made that up</dd></dl>
3628 Definition lists: colon in HTML attribute
3630 ;<b style="display: inline">bold</b>
3632 <dl><dt><b style="display: inline">bold</b></dt></dl>
3637 Definition lists: self-closed tag
3639 ;one<br/>two : two-line fun
3641 <dl><dt>one<br />two </dt>
3642 <dd> two-line fun</dd></dl>
3647 Bug 11748: Literal closing tags
3651 <dd>test test test test test</dd>
3653 <dd>test test test test test</dd>
3658 <dd>test test test test test</dd>
3660 <dd>test test test test test</dd>
3666 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3669 ; term : description
3674 <dl><dt> term </dt>
3675 <dd> description</dd></dl>
3676 <ul><li> unordered</li></ul>
3683 Definition list with empty definition and following paragraph
3695 Nested definition lists using html syntax
3704 Definition Lists: No nesting: Multiple dd's
3717 Definition Lists: Indentation: Regular
3725 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3730 Definition Lists: Indentation: Missing 1st level
3736 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3741 Definition Lists: Indentation: Multi-level indent
3745 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3750 Definition Lists: Hacky use to indent tables
3757 should be left alone
3759 <dl><dd><dl><dd><table>
3764 </td></tr></table></dd></dl></dd></dl>
3766 should be left alone
3771 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3779 should be left alone
3782 <dl><dd><dl><dd><table><tr>
3785 </tr></table><!-- bar --></dd></dl></dd></dl>
3787 should be left alone</p>
3791 Definition Lists: Hacky use to indent tables, with comment before table
3797 <dl><dd><dl><dd><!-- foo --><table><tr>
3799 </tr></table></dd></dl></dd></dl>
3802 # The trailing whitespace in this test is to catch a regression in
3803 # Parsoid after T54473.
3805 Definition Lists: Hacky use to indent tables (WS-insensitive)
3814 </td></tr></table></dd></dl>
3818 <tbody><tr><td>a</td></tr>
3819 </tbody></table> </dd></dl>
3822 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3823 ## as an empty dt item. It also ignores all but the last ";" when followed
3824 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3825 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3828 ## Ex: ";;t2 ::d2" is transformed into:
3840 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3841 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3852 ## All Parsoid only definition list tests have this difference.
3854 ## See also: https://phabricator.wikimedia.org/T8569
3855 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3858 Table / list interaction: indented table with lists in table contents
3873 <ul><li> b</li></ul>
3877 <ul><li> d</li></ul>
3878 </td></tr></table></dd></dl>
3883 Table / list interaction: lists nested in tables nested in indented lists
3906 </td></tr></table></dd></dl>
3913 Definition Lists: Nesting: Multi-level (Parsoid only)
3943 Definition Lists: Nesting: Test 2 (Parsoid only)
3970 Definition Lists: Nesting: Test 3 (Parsoid only)
4013 Definition Lists: Nesting: Test 4
4018 <dl><dd><dl><dd><dl><dt>t3</dt>
4019 <dd>d3</dd></dl></dd></dl></dd></dl>
4024 ## The Parsoid team believes the following three test exposes a
4025 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4026 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4027 ## It also exposes a "misfeature" in tidy, which doesn't like
4028 ## <dl> tags with a single <dt> child; it converts the <dt> into
4029 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4031 Definition Lists: Mixed Lists: Test 1
4037 <dl><dd><dl><dt><ul><li> foo</li>
4038 <li> bar</li></ul></dt></dl>
4039 <dl><dt> baz</dt></dl></dd></dl>
4074 Definition Lists: Mixed Lists: Test 2
4079 <ul><li><dl><dd> d1</dd>
4080 <dd> d2</dd></dl></li></ul>
4086 Definition Lists: Mixed Lists: Test 3
4091 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4092 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4098 Definition Lists: Mixed Lists: Test 4
4103 <ul><li><dl><dt>d1 </dt>
4106 <dd>d4</dd></dl></li></ul>
4112 Definition Lists: Mixed Lists: Test 5
4118 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4124 Definition Lists: Mixed Lists: Test 6
4129 <ol><li><ul><li><dl><dd>d1
4130 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4136 Definition Lists: Mixed Lists: Test 7
4141 <dl><dd><ul><li> d1</li>
4142 <li> d2</li></ul></dd></dl>
4148 Definition Lists: Mixed Lists: Test 8
4153 <dl><dd><ul><li> d1</li></ul>
4154 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4160 Definition Lists: Mixed Lists: Test 9
4164 <ul><li><dl><dt>foo </dt>
4165 <dd>bar</dd></dl></li></ul>
4171 Definition Lists: Mixed Lists: Test 10
4175 <ul><li><ol><li><dl><dt>foo </dt>
4176 <dd>bar</dd></dl></li></ol></li></ul>
4180 # The Parsoid team disagrees with the PHP parser's seemingly-random
4181 # rules regarding dd/dt on the next two tests. Parsoid is more
4182 # consistent, and recognizes the shared nesting and keeps the
4183 # still-open tags around until the nesting is complete.
4184 # (And tidy again converts <dt> to <dd> before 'bar'.)
4187 Definition Lists: Mixed Lists: Test 11
4192 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4193 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4194 <dl><dt>boo </dt>
4195 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4250 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4251 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4255 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4256 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4265 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4267 # * The test is wrong, there are two colons where there should be :;
4268 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4270 Definition Lists: Weird Ones: Test 1
4272 *#;*::;; foo : bar (who uses this?)
4274 <ul><li><ol><li><dl><dt> foo </dt>
4275 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dd></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
4294 <dt>bar (who uses this?)</dt>
4326 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4327 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4339 Definition Lists: colons occurring in tags
4357 <dt><span>a:b</span></dt>
4384 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4386 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4387 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4388 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4389 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4391 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4392 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4393 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4397 Definition Lists: colons and tables 1
4409 </td></tr></table></dd></dl>
4413 </td></tr></table></dd></dl>
4417 # Parsoid's output (as documented below) differs from php's in this case.
4418 # This is probably a bug. If we fixup parsoid to match php's output, the
4419 # above test should pass and the below test case can be removed. It is
4420 # unclear which output is more desirable.
4423 Definition Lists: colons and tables 2
4435 </td></tr></table></dd>
4439 </td></tr></table></dd></dl>
4443 Definition Lists: template interaction
4445 ::{{definition_list}}
4448 ::{{definition_list}}
4453 <dl><dd><dl data-parsoid='{}'><dd about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[":",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}}]}'>one</dd><span about="#mwt1">
4454 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4456 <dl><dd data-parsoid='{}'>one
4457 <dl><dd about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":["::",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}},"\n:::two\n:::three"]}'>one</dd><span about="#mwt2">
4458 </span><dd about="#mwt2">two
4460 <dd>three</dd></dl></dd>
4461 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4469 External links: non-bracketed
4471 Non-bracketed: http://example.com
4473 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4477 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4479 External links: numbered
4481 Numbered: [http://example.com]
4482 Numbered: [http://example.net]
4483 Numbered: [http://example.com]
4485 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4486 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4487 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4490 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4491 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4492 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4496 External links: specified text
4498 Specified text: [http://example.com link]
4500 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4505 External links: trail
4507 Linktrails should not work for external links: [http://example.com link]s
4509 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4514 External links: dollar sign in URL
4516 http://example.com/1$2345
4518 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4522 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4524 External links: dollar sign in URL (autonumber)
4526 [http://example.com/1$2345]
4528 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4531 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4535 External links: open square bracket forbidden in URL (bug 4377)
4537 parsoid=wt2html,wt2wt,html2html
4539 http://example.com/1[2345
4541 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4544 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4548 External links: open square bracket forbidden in URL (named) (bug 4377)
4550 parsoid=wt2html,html2html
4552 [http://example.com/1[2345]
4554 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4557 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4560 # parsoid adds a space before the link name
4562 External links: open square bracket forbidden in URL (named) (bug 4377)
4565 [http://example.com/1 [2345]
4567 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4572 External links: nowiki in URL link text (bug 6230)
4574 [http://example.com/ <nowiki>''example site''</nowiki>]
4576 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4581 External links: newline forbidden in text (bug 6230 regression check)
4583 [http://example.com/ first
4586 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4592 External links: Pipe char between url and text
4594 [http://example.com | link]
4596 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4601 External links: protocol-relative URL in brackets
4603 [//example.com/ Test]
4605 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4609 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4611 External links: protocol-relative URL in brackets without text
4615 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4618 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4622 External links: protocol-relative URL in free text is left alone
4626 <p>//example.com/Foo
4631 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4633 foo//example.com/Foo
4635 <p>foo//example.com/Foo
4640 External links: with no contents
4642 [http://en.wikipedia.org/wiki/Foo]
4644 [[wikipedia:Foo|Bar]]
4646 [[wikipedia:Foo|<span>Bar</span>]]
4648 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4649 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4650 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4653 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4654 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4655 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4659 External links: Free with trailing punctuation
4669 http://example.com/url_with_(brackets)
4670 (http://example.com/url_without_brackets)
4671 http://example.com/url_with_entity&
4672 http://example.com/url_with_entity&
4673 http://example.com/url_with_entity&
4674 http://example.com/url_with_entity
4675 http://example.com/url_with_entity 
4676 http://example.com/url_with_entity 
4677 http://example.com/url_with_entity<
4678 http://example.com/url_with_entity<
4679 http://example.com/url_with_entity<
4681 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4682 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4683 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4684 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4685 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4686 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4687 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4688 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4689 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4690 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4691 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4692 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4693 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4694 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4695 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4696 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4697 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4698 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4699 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4702 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4703 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4704 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4705 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4706 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4707 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4708 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4709 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4710 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4711 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4712 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4713 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4714 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4715 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4716 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
4717 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4718 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4719 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4720 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
4724 External links: tricky Parsoid html2html case
4726 parsoid=wt2html,wt2wt,html2html
4728 http://example.com/url_with_entity&amp;
4730 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4733 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4737 External links: Free with trailing quotes (T113666)
4739 '''News:''' Stuff here
4743 <p><b>News:</b> Stuff here
4744 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4747 <p><b>News:</b> Stuff here</p>
4748 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4752 External links: Lone protocols are never linked (T105697)
4771 External links: No preceding word characters allowed (bug 65278)
4773 NOPEhttp://example.com
4774 N0http://example.com
4775 ok:http://example.com
4776 ok-http://example.com
4778 <p>NOPEhttp://example.com
4779 N0http://example.com
4780 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4781 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4786 External links: nofollow domain exception
4788 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4790 <p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>.
4797 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4799 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4804 External image from https
4806 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4808 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4813 External image (when not allowed)
4815 wgAllowExternalImages=0
4817 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4819 <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>
4824 Link to non-http image, no img tag
4826 Link to non-http image, no img tag: ftp://example.com/test.jpg
4828 <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>
4833 External links: terminating separator
4835 Terminating separator: http://example.com/thing,
4837 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4842 External links: intervening separator
4844 Intervening separator: http://example.com/1,2,3
4846 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4851 External links: old bug with URL in query
4853 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4855 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4860 External links: old URL-in-URL bug, mixed protocols
4862 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4864 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4869 External links: URL in text
4871 URL in text: [http://example.com http://example.com]
4873 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4878 External links: Clickable images
4880 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4882 <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>
4885 <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>
4889 External links: raw ampersand
4891 Old & use: http://x&y
4893 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4898 External links: encoded ampersand
4900 Old & use: http://x&y
4902 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4905 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4909 External links: encoded equals (bug 6102)
4911 http://example.com/?foo=bar
4913 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4916 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4920 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4921 ## does it number them. As discussed in bug 53505, we can identify
4922 ## autonumbered links via CSS.
4926 External links: [raw ampersand]
4928 Old & use: [http://x&y]
4930 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4933 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4936 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4937 # mode will return the [raw ampersand] wikitext
4939 External links: [encoded ampersand]
4941 parsoid=wt2html,wt2wt,html2html
4943 Old & use: [http://x&y]
4945 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4948 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4952 External links: [raw equals]
4954 [http://example.com/?foo=bar]
4956 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4959 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4962 # note that parsoid html is identical to [raw equals] case; so html2wt
4963 # mode will return the [raw equals] wikitext
4965 External links: [encoded equals] (bug 6102)
4967 parsoid=wt2html,wt2wt,html2html
4969 [http://example.com/?foo=bar]
4971 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4974 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4977 # xxx parsoid strips the IDN character, so the round-trip tests will
4978 # obviously fail and are disabled. --cscott
4980 External links: [IDN ignored character reference in hostname; strip it right off]
4982 parsoid=wt2html,wt2wt,html2html
4984 [http://e‌xample.com/]
4986 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4989 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4992 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4993 # Where an external link could easily circumvent the sanitization of the text of
4994 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4995 # test demands a higher standard. That's a bit strange.
4999 # http://example.com -> [http://example.com|http://example.com]
5000 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5002 # The first example is sanitized, but the second is not. Any security benefits
5003 # from this production are trivial to circumvent. Either remove this test and
5004 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5005 # the test accordingly.
5009 # xxx parsoid strips the IDN character, so the round-trip tests will
5010 # obviously fail and are disabled. --cscott
5012 External links: IDN ignored character reference in hostname; strip it right off
5014 parsoid=wt2html,html2html
5016 http://e‌xample.com/
5018 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5021 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5025 External links: www.jpeg.org (bug 554)
5029 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5033 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5035 External links: URL within URL (original bug 2)
5037 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5039 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5042 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5046 BUG 361: URL inside bracketed URL
5048 [http://www.example.com/foo http://www.example.com/bar]
5050 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5055 BUG 361: URL within URL, not bracketed
5057 http://www.example.com/foo?=http://www.example.com/bar
5059 <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>
5064 BUG 289: ">"-token in URL-tail
5066 http://www.example.com/<hello>
5068 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5073 BUG 289: literal ">"-token in URL-tail
5075 http://www.example.com/<b>html</b>
5077 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5080 <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>
5084 BUG 289: ">"-token in bracketed URL
5086 [http://www.example.com/<hello> stuff]
5088 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5093 BUG 289: literal ">"-token in bracketed URL
5095 [http://www.example.com/<b>html</b> stuff]
5097 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5102 BUG 289: literal double quote at end of URL
5104 http://www.example.com/"hello"
5106 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5111 BUG 289: literal double quote in bracketed URL
5113 [http://www.example.com/"hello" stuff]
5115 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5120 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5122 [http://www.example.com test]
5124 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5129 External links: link text with spaces
5131 [http://www.example.com a b c]
5132 [http://www.example.com ''a'' ''b'']
5134 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5135 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5140 External links: wiki links within external link (Bug 3695)
5142 parsoid=wt2html,html2html
5144 [http://example.com [[wikilink]] embedded in ext link]
5146 <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>
5149 <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>
5153 BUG 787: Links with one slash after the url protocol are invalid
5157 [http:/example.com title]
5159 <p>http:/example.com
5160 </p><p>[http:/example.com title]
5165 Bracketed external links with template-generated invalid target
5167 [{{echo|http:/example.com}} title]
5169 <p>[http:/example.com title]
5174 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5176 ''[http://example.com text'']
5177 [http://example.com '''text]'''
5178 ''Something [http://example.com in italic'']
5179 ''Something [http://example.com mixed''''', even bold]'''
5180 '''''Now [http://example.com both''''']
5182 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5183 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5184 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5185 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5186 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5192 Bug 4781: %26 in URL
5194 http://www.example.com/?title=AT%26T
5196 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5199 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5202 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5203 # % is actually legal in HTML5. Any change in output would need testing though.
5205 Bug 4781, 5267: %25 in URL
5207 http://www.example.com/?title=100%25_Bran
5209 <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>
5212 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5216 Bug 4781, 5267: %28, %29 in URL
5218 http://www.example.com/?title=Ben-Hur_%281959_film%29
5220 <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>
5223 <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>
5228 Bug 4781: %26 in autonumber URL
5230 [http://www.example.com/?title=AT%26T]
5232 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5235 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5239 Bug 4781, 5267: %26 in autonumber URL
5241 [http://www.example.com/?title=100%25_Bran]
5243 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5246 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5250 Bug 4781, 5267: %28, %29 in autonumber URL
5252 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5254 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5257 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5262 Bug 4781: %26 in bracketed URL
5264 [http://www.example.com/?title=AT%26T link]
5266 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5269 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5273 Bug 4781, 5267: %25 in bracketed URL
5275 [http://www.example.com/?title=100%25_Bran link]
5277 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5282 Bug 4781, 5267: %28, %29 in bracketed URL
5284 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5286 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5289 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5293 External link containing a period in the anchor. (bug 63947)
5295 [//foo.org/bar#baz. bang]
5297 [//foo.org/bar. bang]
5299 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5300 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5303 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5304 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5308 External link containing a single quote. (bug 63947)
5312 [//foo.org/bar'baz bang]
5314 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5315 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5318 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5319 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5323 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5325 Some [http://example.com/ pretty ''italics'' and stuff]!
5327 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5332 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5334 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5336 <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>
5341 External link containing double-single-quotes with no space separating the url from text in italics
5343 [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]].]
5345 <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>
5348 <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>
5350 <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>
5354 External link with comments in link text
5356 [http://www.google.com Google <!-- comment -->]
5358 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5361 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5365 External link to bare IPv4 address
5367 [http://192.168.0.1 Link]
5369 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5372 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5376 URL-encoding in URL functions (single parameter)
5378 {{localurl:Some page|amp=&}}
5380 <p>/index.php?title=Some_page&amp=&
5385 URL-encoding in URL functions (multiple parameters)
5387 {{localurl:Some page|q=?&=&}}
5389 <p>/index.php?title=Some_page&q=?&amp=&
5396 http://example.com/index.php?foozoid%5B%5D=bar
5398 http://example.com/index.php?foozoid[]=bar
5400 <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>
5401 </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>
5404 <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>
5406 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5410 IPv6 urls, autolink format (T23261)
5412 http://[2404:130:0:1000::187:2]/index.php
5414 Examples from RFC 2373, section 2.2:
5415 * http://[1080::8:800:200C:417A]/unicast
5416 * http://[FF01::101]/multicast
5417 * http://[::1]/loopback
5418 * http://[::]/unspecified
5419 * http://[::13.1.68.3]/ipv4compat
5420 * http://[::FFFF:129.144.52.38]/ipv4compat
5422 Examples from RFC 2732, section 2:
5423 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5424 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5425 * http://[3ffe:2a00:100:7031::1]
5426 * http://[1080::8:800:200C:417A]/foo
5427 * http://[::192.9.5.5]/ipng
5428 * http://[::FFFF:129.144.52.38]:80/index.html
5429 * http://[2010:836B:4179::836B:4179]
5432 <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>
5433 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5435 <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>
5436 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5437 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5438 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5439 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5440 <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>
5441 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5443 <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>
5444 <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>
5445 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5446 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5447 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5448 <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>
5449 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5452 <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>
5454 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5455 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5456 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5457 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5458 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5459 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5460 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5462 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5463 <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>
5464 <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>
5465 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5466 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5467 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5468 <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>
5469 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5473 IPv6 urls, bracketed format (T23261)
5475 [http://[2404:130:0:1000::187:2]/index.php test]
5477 Examples from RFC 2373, section 2.2:
5478 * [http://[1080::8:800:200C:417A] unicast]
5479 * [http://[FF01::101] multicast]
5480 * [http://[::1]/ loopback]
5481 * [http://[::] unspecified]
5482 * [http://[::13.1.68.3] ipv4compat]
5483 * [http://[::FFFF:129.144.52.38] ipv4compat]
5485 Examples from RFC 2732, section 2:
5486 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5487 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5488 * [http://[3ffe:2a00:100:7031::1] 3]
5489 * [http://[1080::8:800:200C:417A]/foo 4]
5490 * [http://[::192.9.5.5]/ipng 5]
5491 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5492 * [http://[2010:836B:4179::836B:4179] 7]
5495 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5496 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5498 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5499 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5500 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5501 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5502 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5503 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5504 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5506 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5507 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5508 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5509 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5510 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5511 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5512 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5515 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5517 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5518 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5519 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5520 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5521 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5522 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5523 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5525 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5526 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5527 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5528 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5529 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5530 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5531 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5532 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5536 Non-extlinks in brackets
5545 [{{echo|foo}} ''bar'']
5546 [{{echo|foo}}l's] errand
5547 [{{echo|foo}}l's errand]
5549 [url=http://example.com]
5550 [http:// bare protocols don't count]
5563 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5564 [http:// bare protocols don't count]
5572 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5573 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5574 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5575 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5576 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5577 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5578 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5579 [http:// bare protocols don't count]</p>
5583 Percent encoding in external links
5585 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5587 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5590 <p><a rel="mw:ExtLink"
5591 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5595 Use url link syntax for links where the content is equal the link target
5599 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5602 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5606 Parenthesis in external links, especially URL links
5610 http://example.com/test)
5612 http://example.com/(test)
5614 http://example.com/((test)
5616 (http://example.com/(test))
5618 (http://example.com/(test)))))
5620 http://example.com/a)b
5622 [http://example.com) foo]
5624 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5625 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5626 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5627 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5628 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5629 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5630 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5631 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5634 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5635 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5636 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5637 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5638 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5639 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5640 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5641 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5645 Parenthesis in external links, w/ transclusion or comment
5647 (http://example.com/{{echo|hi}})
5649 (http://example.com<!-- hi -->)
5651 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5652 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5655 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span>"}]]}'>http://example.com/hi</a>)</p>
5657 <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>
5661 Serialize <a> tags with invalid link targets as plain text
5663 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5665 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5666 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5667 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5668 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5671 <nowiki>*</nowiki>text
5672 <nowiki>[[foo]]</nowiki>
5673 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5677 mw:ExtLink -vs- mw:WikiLink (T94723)
5681 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5682 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5683 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5684 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5686 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5687 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5692 [[wikipedia:Foo|Bar]]
5693 [[wikipedia:Foo|Bar]]
5695 [[wikipedia:European_Robin|European Robin]]
5696 [[wikipedia:European_Robin|European Robin]]
5700 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5704 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5706 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5717 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5719 Normal text. '''''Bold italic text.''''' Normal text.
5721 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5722 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5727 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5728 # parser strips. The wikitext contains just the first half of the bold
5731 Unclosed and unmatched quotes
5733 '''''Bold italic text '''with bold deactivated''' in between.'''''
5735 '''''Bold italic text ''with italic deactivated'' in between.'''''
5739 ..spanning two paragraphs (should not work).'''
5741 '''Bold tag left open
5743 ''Italic tag left open
5747 <!-- Unmatching number of opening, closing tags: -->
5748 '''This year''''s election ''should'' beat '''last year''''s.
5750 ''Tom'''s car is bigger than ''Susan'''s.
5752 Plain ''italic'''s plain
5754 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5755 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5756 </p><p><b>Bold text..</b>
5757 </p><p>..spanning two paragraphs (should not work).
5758 </p><p><b>Bold tag left open</b>
5759 </p><p><i>Italic tag left open</i>
5761 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5762 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5763 </p><p>Plain <i>italic'</i>s plain
5766 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5767 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5768 </p><p><b>Bold text..</b>
5769 </p><p>..spanning two paragraphs (should not work).<b></b>
5770 </p><p><b>Bold tag left open</b>
5771 </p><p><i>Italic tag left open</i>
5774 <!-- Unmatching number of opening, closing tags: -->
5775 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5776 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5777 </p><p>Plain <i>italic'</i>s plain
5784 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5787 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5788 # is the bare minimum required by the spec, see:
5789 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5790 # Parsoid team replies: empty table tags are legal in HTML5
5792 A table with no data.
5805 A table with stray table end tags on start tag line (wt2html)
5809 {|style="color: red;"|}
5811 {|style="color: red;" |}
5815 {|style="color: red;"|} id="foo"
5819 {|style="color: red;" |} id="foo"
5823 <table style="color: red;"></table>
5825 <table style="color: red;">
5831 <table style="color: red;" id="foo">
5837 <table style="color: red;" id="foo">
5846 A table with no data (take 2)
5854 # A table with nothing but a caption is invalid XHTML, we might want to render
5855 # this as <p>caption</p>
5856 # Parsoid team replies: table with only a caption is legal in HTML5
5858 A table with nothing but a caption
5866 </caption><tr><td></td></tr></table>
5869 <table><caption> caption</caption></table>
5873 A table with caption with default-spaced attributes and a table row
5876 |+ style="color: red;" | caption1
5882 <caption style="color: red;"> caption1
5891 A table with captions with non-default spaced attributes and a table row
5894 |+style="color: red;"|caption2
5895 |+ style="color: red;"| caption3
5901 <caption style="color: red;">caption2
5903 <caption style="color: red;"> caption3
5912 Table td-cell syntax variations
5916 | foo bar foo || baz
5917 | style='color:red;' | baz
5918 | style='color:red;' || baz
5925 <td> foo bar foo </td>
5928 <td style="color:red;"> baz
5930 <td> style='color:red;' </td>
5958 Simple table but with multiple dashes for row wikitext
5977 Multiplication table
5979 {| border="1" cellpadding="2"
5980 |+Multiplication table
5982 ! × !! 1 !! 2 !! 3
6000 <table border="1" cellpadding="2">
6001 <caption>Multiplication table
6048 Accept "||" in table headings
6063 Accept "!!" in table data
6077 <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>
6082 Accept "||" in indented table headings
6092 </th></tr></table></dd></dl>
6097 Accept "!!" in templates
6111 <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>
6115 Accept "!!" in table headings after newline
6132 <p>b!!c</p></th></tr>
6137 Accept "!!" in table data of mixed wikitext / html syntax
6141 <tr><td>b!!c</td></tr>
6154 <tbody><tr><th>a</th></tr>
6155 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6160 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6177 Accept "| !" at start of line in tables (ignore !-attribute)
6181 | !style="color:red" | bar
6193 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 +/-
6197 |style='color:red;'|+1
6198 |style='color:blue;'|-1
6210 <td style="color:red;">+1
6212 <td style="color:blue;">-1
6236 |rowspan=2| Cell 2, row 1 (and 2)
6247 <td rowspan="2"> Cell 2, row 1 (and 2)
6265 {| bgcolor=#ABCDEF border=2
6270 |the original table again
6278 <table bgcolor="#ABCDEF" border="2">
6286 <td>the original table again
6292 Invalid attributes in table cell (bug 1830)
6306 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6310 | title="foo<nowiki>|</nowiki>" |bar
6311 | title="foo<nowiki>|</nowiki>" bar
6318 <td title="foo|">bar
6320 <td> title="foo|" bar
6325 <tbody><tr><td title="foo">bar</td>
6326 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6327 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6331 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6332 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6333 # *2wt modes will fail.
6335 Table security: embedded pipes
6337 parsoid=wt2html,html2html
6340 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6344 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6345 <td>]" onmouseover="alert(document.cookie)">test
6353 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6357 Element attributes with double ! should not be broken up by <th>
6360 ! hi <div class="!!">ha</div> ho
6365 <th> hi <div class="!!">ha</div> ho
6370 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6375 ! and || in element attributes should not be parsed as <th>/<td>
6378 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6383 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6388 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6392 # FIXME: The output seems broken. Filed as T110268.
6394 ! and || in td attributes should not be parsed as <th>/<td>
6399 | style="color: red !important;" data-contrived="put this here ||" | foo
6404 <td> style="color: red !important;" data-contrived="put this here </td>
6410 <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>
6415 Break on | in element attribute in template
6417 parsoid=wt2html,html2html
6419 {{echo|1=<div class="hi|ho">ha</div>}}
6421 <p>ho">ha</div>
6424 <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>
6428 Indented table markup mixed with indented pre content (proposed in bug 6200)
6433 Text that should be rendered preformatted
6441 <pre>Text that should be rendered preformatted
6450 1. Template-generated table cell attributes and cell content
6455 || {{table_attribs_5}}
6456 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6457 |align=center {{table_attribs}}
6458 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6463 <td style="color:red;">Foo
6465 <td style="color:red;">Foo
6467 <td> style="color:red;"</td>
6470 <td style="color:red;">Foo
6472 <td align="center" style="color:red;">Foo
6474 <td align="center" style="color:red;">Foo
6480 2. Template-generated table cell attributes and cell content
6483 |{{table_attribs_2}}
6488 <td style="color:red;">Foo
6496 <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>
6497 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6502 3. Template-generated table cell attributes and cell content
6505 !align=center {{table_header_cells}}
6507 |align=center {{table_cells}}
6512 <th align="center" style="color:red;">Foo</th>
6513 <th style="color:red;"><i>Bar</i></th>
6514 <th style="color:brown;"><i>Foo</i> and Baz
6517 <td align="center" style="color:red;">Foo</td>
6518 <td style="color:red;"><i>Bar</i></td>
6519 <td style="color:brown;"><i>Foo</i> and Baz
6524 <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>
6525 <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>
6530 4. Template-generated table cell attributes and cell content inside a templated table
6533 !align=center {{table_header_cells}}
6535 |align=center {{table_cells}}
6540 <th align="center" style="color:red;">Foo</th>
6541 <th style="color:red;"><i>Bar</i></th>
6542 <th style="color:brown;"><i>Foo</i> and Baz
6545 <td align="center" style="color:red;">Foo</td>
6546 <td style="color:red;"><i>Bar</i></td>
6547 <td style="color:brown;"><i>Foo</i> and Baz
6551 <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}}]}'>
6552 <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>
6554 <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>
6558 ## Edge case fix to prevent future regressions
6560 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6563 |{{table_attribs_7}}
6568 <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>
6570 <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>
6574 Table with row followed by newlines and table heading
6576 parsoid=wt2html,html2html
6594 Table with empty line following the start tag
6596 parsoid=wt2html,html2html
6614 Table attributes with empty value
6616 parsoid=wt2html,html2html
6629 <tbody><tr><td style=""> hello</td></tr>
6634 Wikitext table with a lot of comments
6657 Wikitext table comments represented in parsoid dom
6659 {|<!--c1--><!--c2-->
6670 <table><!--c1--><!--c2-->
6671 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6672 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6677 Wikitext table with double-line table cell
6694 Table cell with a single comment
6711 Table-cell after a comment-only-empty-line
6728 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6730 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6736 Build table with {{!}}
6738 {{{!}} class="wikitable"
6741 {{!}}- style="color:red;"
6742 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6745 <table class="wikitable">
6751 <tr style="color:red;">
6753 <td style="color:red;"> second data
6759 Build table with pipe as data
6761 {| class="wikitable"
6764 |- style="color:red;"
6765 | data || style="color:red;" | second data
6767 | style="color:red;" | data with | || style="color:red;" | second data with |
6769 || data with | ||| second data with |
6772 <table class="wikitable">
6778 <tr style="color:red;">
6780 <td style="color:red;"> second data
6783 <td style="color:red;"> data with | </td>
6784 <td style="color:red;"> second data with |
6787 <td> data with | </td>
6788 <td> second data with |
6794 Build table with wikilink
6796 {| class="wikitable"
6797 ! header || second header
6798 |- style="color:red;"
6799 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6801 | data || second data [[Main Page|link|text with pipe]]
6804 <table class="wikitable">
6809 <tr style="color:red;">
6810 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6811 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6815 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6820 # The expected HTML structure in this test is debatable. The PHP parser does
6821 # not parse this kind of table at all. The main focus for Parsoid is on
6822 # round-tripping, so this output is ok for now. TODO: revisit!
6824 Wikitext table with html-syntax row
6834 <td>foo</td></tr></tbody></table>
6837 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6838 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6839 ## PHP parser, which tidy then compounds by fostering the content
6840 ## entirely out of the table. Parsoid recognizes the table context
6841 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6842 ## depends on PHP's treatment of broken table markup!
6844 Implicit <td> after a |-
6846 parsoid=wt2html,html2html
6866 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6868 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6870 parsoid=wt2html,html2html
6903 <tr><td><pre>a</pre></td></tr>
6904 <tr><td> b</td></tr>
6909 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6910 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6912 Lists should be recognized in an implicit <td> context
6914 parsoid=wt2html,html2html
6941 Table cells not properly parsed in an implicit-td context
6945 {{table_attribs_4}} || a || b
6950 <td style="background-color:#DC241f;" width="10px"></td>
6957 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6958 <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>
6963 Parsoid: Round-trip tables directly followed by content (bug 51219)
6965 parsoid=wt2html,wt2wt
6990 Parsoid: Default to a newline after tables in new content (bug 51219)
6995 <tr><td>foo</td></tr></tbody></table> bar
6997 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7002 <nowiki> </nowiki>bar
7010 Parsoid: newline inducing block nodes don't suppress <nowiki>
7022 Parsoid: Row-syntax table headings followed by comment & table cells
7024 parsoid=wt2html,wt2wt
7028 <!-- foo --> || baz || quux
7042 <tbody><tr><th> foo </th><th> bar
7043 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7048 Parsoid: Recover better from broken table attributes
7068 <p>foo</p></td></tr>
7073 Tables: Digest broken attributes on table and tr tag
7089 # T137406: Whitespace in the HTML
7091 1. Generate correct wikitext for tables with thead/tbody/tfoot
7096 <caption>Test</caption>
7137 <caption>Test</caption>
7157 # T137406: No whitespace in the HTML
7159 2. Generate correct wikitext for tables with thead/tbody/tfoot
7163 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7173 Testing serialization after deletion in references
7182 hi <ref><div id="x">ho</div></ref>
7192 Testing serialization after deletion of table cells
7195 "modes": ["wt2wt", "selser"],
7203 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7213 Testing selser after addition of new row before first row (T125419)
7216 "modes": ["wt2wt", "selser"],
7218 [ "tr", "before", "<tr><td>X</td></tr>" ]
7234 Serialize new table rows in a HTML table using HTML tags
7237 "modes": ["wt2wt", "selser"],
7239 [ "tr", "before", "<tr><td>X</td></tr>" ]
7243 <table><tr><td>a</td></tr></table>
7245 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7249 Serialize new table cells in a HTML row using HTML tags
7252 "modes": ["wt2wt", "selser"],
7254 [ "td", "before", "<td>X</td>" ]
7258 <table><tr><td>a</td></tr></table>
7260 <table><tr><td>X</td><td>a</td></tr></table>
7264 Wikitext tables can be nested inside HTML tables
7268 <table data-parsoid='{"stx":"html"}'>
7271 <tr><td>foo</td></tr>
7286 Serialize wikitext list items as HTML list items when embedded in a HTML list
7290 <ul data-parsoid='{"stx": "html"}'>
7291 <li data-parsoid='{}'>a</li>
7301 # SSS FIXME: Is this actually a good thing given the
7302 # odd nested list output that is generated by MW?
7303 # <ul><li>foo<ul>..</ul></li></ul> instead of
7304 # <ul><li>foo</li><ul>..</ul></ul>
7306 Wikitext lists can be nested inside HTML lists
7310 <ul data-parsoid='{"stx": "html"}'>
7311 <li data-parsoid='{"stx": "html"}'>a
7316 <ul data-parsoid='{"stx": "html"}'>
7339 Plain link, capitalized
7343 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7348 Plain link, uncapitalized
7352 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7359 [[Main Page|The Main Page]]
7361 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7366 Piped link with comment in link text
7368 [[Main Page|The Main<!--front--> Page]]
7370 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7375 Piped link with multiple pipe characters in link text
7377 [[Main Page||The|Main|Page|]]
7379 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7382 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7386 Piped link with no link text
7388 [[Thomas Bek (bishop of St David's)|]]
7390 <p>[[Thomas Bek (bishop of St David's)|]]
7393 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7401 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7406 Broken link with fragment
7408 [[Zigzagzogzagzig#zug]]
7410 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7415 Special page link with fragment
7417 [[Special:Version#anchor]]
7419 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7424 Nonexistent special page link with fragment
7426 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7428 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7435 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7437 <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>
7444 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7446 <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>!!!
7457 Bug 43661: Piped links with identical prefixes
7459 [[prefixed article|prefixed articles with spaces]]
7461 [[prefixed article|prefixed articlesaoeu]]
7463 [[Main Page|Main Page test]]
7465 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7466 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7467 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7473 Link with HTML entity in suffix / tail
7475 [[Main Page]]", [[Main Page]]a
7477 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7480 <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>
7484 Link with 3 brackets
7495 Link with 4 brackets
7499 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7504 Piped link with 3 brackets
7506 [[[main page|the main page]]]
7508 <p>[[[main page|the main page]]]
7513 Piped link with extlink-like text
7516 [[Main Page|This is a [bar]]]
7518 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7519 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7522 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7523 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7527 Link with multiple pipes
7529 [[Main Page|The|Main|Page]]
7531 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7535 # Note that parsoid does not munge anchor text; all non-space
7536 # characters are valid in HTML5 ids.
7538 Anchor containing a #. (bug 63430)
7540 [[Main Page#And#Link]]
7542 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7545 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7551 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7553 <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>
7558 Link with space in namespace
7560 [[User talk:Foo bar]]
7562 <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>
7567 MemoryAlpha:AlphaTest
7569 This is an article in the MemoryAlpha namespace
7570 (which shadows the memoryalpha interwiki link).
7574 Namespace takes precedence over interwiki link (bug 51680)
7576 [[MemoryAlpha:AlphaTest]]
7578 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7582 # The previous test doesn't work correctly in html2*, due to not recognizing the
7583 # link as an internal one. This one checks for the correct behavior.
7585 Link to namespace preferred over interwiki with correct rel attribute
7587 parsoid=html2wt,html2html
7589 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7591 [[MemoryAlpha:AlphaTest]]
7595 Piped link to namespace
7597 [[Meta:Disclaimers|The disclaimers]]
7599 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7606 [[Usually caused by a typo (oops}]]
7608 <p>[[Usually caused by a typo (oops}]]
7615 Just a test of an article title containing a percent.
7619 Link containing % (not as a hex sequence)
7623 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7626 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7629 # note that the parsoid HTML is identical to the previous test output,
7630 # so the previous test ensures that the html2wt mode will generate the
7631 # "not as a hex sequence" wikitext.
7633 Link containing % as a single hex sequence interpreted to char
7635 parsoid=wt2wt,wt2html,html2html
7639 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7642 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7646 Link containing % as a double hex sequence interpreted to hex sequence
7650 <p>[[7%2525 Solution]]
7654 # note that parsoid does not munge anchor text; all non-space
7655 # characters are valid in HTML5 anchors.
7657 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7658 Example for such a section: == < ==
7660 [[%23%3c]][[%23%3e]]
7662 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7665 <p><a rel="mw:WikiLink" href="./Main_Page#%3C" title="Main Page">#<</a><a rel="mw:WikiLink" href="./Main_Page#%3E" title="Main Page">#></a></p>
7669 Link containing "<#" and ">#" as a hex sequences
7671 [[%3c%23]][[%3e%23]]
7673 <p>[[%3c%23]][[%3e%23]]
7678 Link containing an equals sign
7680 [[Special:BookSources/isbn=4-00-026157-6]]
7682 <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>
7685 <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>
7691 Just a test of an article title containing a tilde.
7694 # note that links containing signatures, like [[Foo~~~~]], are
7695 # massaged by the pre-save transform (PST) and so the tildes are never
7696 # seen by the parser.
7698 Link containing a tilde
7702 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7705 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7709 Link containing double-single-quotes '' (bug 4598)
7711 [[Lista d''e paise d''o munno]]
7713 <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>
7716 <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>
7720 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7722 Some [[Link|pretty ''italics'' and stuff]]!
7724 <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>!
7727 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7731 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7733 ''Some [[Link|pretty ''italics'' and stuff]]!''
7735 <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>
7740 Link with double quotes in title part (literal) and alternate part (interpreted)
7742 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7746 [[''Pentecoste''|Pentecoste]]
7748 [[''Pentecoste''|''Pentecoste'']]
7750 <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>
7751 </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>
7752 </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>
7753 </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>
7756 <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>
7757 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7758 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7759 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7763 Broken image links with HTML captions (bug 39700)
7765 [[File:Nonexistent|<script></script>]]
7766 [[File:Nonexistent|100x100px|<script></script>]]
7767 [[File:Nonexistent|<]]
7768 [[File:Nonexistent|a<i>b</i>c]]
7770 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7771 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7772 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7773 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7776 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7777 <span typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"100","width":"100"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7778 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[107,111,null,null]}'>&lt;</span>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7779 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"a<i data-parsoid='{\"stx\":\"html\",\"dsr\":[134,142,3,4]}'>b</i>c"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span></p>
7785 [[http://www.example.com]]
7787 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7790 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7794 Plain link to URL with link text
7796 [[http://www.example.com Link text]]
7798 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7803 Plain link to protocol-relative URL
7805 [[//www.example.com]]
7807 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7810 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7814 Plain link to protocol-relative URL with link text
7816 [[//www.example.com Link text]]
7818 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7823 Plain link to page with question mark in title
7829 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7830 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7835 # I'm fairly sure the expected result here is wrong.
7836 # We want these to be URL links, not pseudo-pages with URLs for titles....
7837 # However the current output is also pretty screwy.
7840 # I'm changing it to match the current output--it arguably makes more
7841 # sense in the light of the test above. Old expected result was:
7842 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7844 # But I think this test is bordering on "garbage in, garbage out" anyway.
7849 Piped link to URL: [[http://www.example.com|an example URL]]
7851 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7854 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7858 BUG 2: [[page|http://url/]] should link to page, not http://url/
7860 [[Main Page|http://url/]]
7862 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7865 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7868 # Parsoid does not mark self-links, by design.
7870 BUG 337: Escaped self-links should be bold
7874 [[Bug462]] [[Bug462]]
7876 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7879 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7881 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7885 Self-link to section should not be bold
7889 [[Main Page#section]]
7891 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7902 Self-link to numeric title
7908 <p><strong class="selflink">0</strong>
7913 Link to numeric-equivalent title
7919 <p><a href="/wiki/00" title="00">00</a>
7924 <nowiki> inside a link
7926 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7928 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7933 Non-breaking spaces in title
7935 [[ Main Page ]]
7937 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7942 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7948 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7953 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7959 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7964 Internal link with en linktrail: no apostrophes (bug 27473)
7970 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7975 Internal link with ca linktrail with apostrophes (bug 27473)
7981 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7986 Internal link with kaa linktrail with apostrophes (bug 27473)
7992 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7997 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7999 [[User:Foo/Test/63636:Bar|Test]]
8001 <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>
8004 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8008 Purely hash wikilink
8010 title=[[User:test/123]]
8014 <p><a href="#a">b</a>
8017 <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>
8021 1. Interaction of linktrail and template encapsulation
8027 <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>
8031 2. Interaction of linktrail and template encapsulation
8035 {{echo|Some [[Fool]]}}s
8037 <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>
8041 3. Interaction of linktrail and template encapsulation
8045 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8047 <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>
8057 Internal link with is link prefix
8061 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8063 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8074 Internal link with is link trail and link prefix
8078 [[mótmælendatrú|xxx]]ar
8080 mótmælenda[[söfnuður]]
8081 mótmælenda[[söfnuður|söfnuðir]]
8082 mótmælenda[[söfnuður|söfnuðir]]xxx
8084 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8085 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8086 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8087 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8088 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8093 Parsoid link trail escaping
8095 parsoid=html2wt,html2html
8097 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
8103 Parsoid link prefix escaping
8106 parsoid=html2wt,html2html
8108 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
8110 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8114 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8122 [http://wp.org ''foo'']
8124 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8125 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8126 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8127 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8132 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8136 [[Foo|{{echo|a}} b {{echo|c}}]]
8138 <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>
8142 Link with angle bracket after anchor
8146 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8149 <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>
8153 ### Interwiki links (see maintenance/interwiki.sql)
8157 Inline interwiki link
8159 parsoid=wt2html,wt2wt,html2html
8161 [[MeatBall:SoftSecurity]]
8163 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8166 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8170 Inline interwiki link with empty title (bug 2372)
8172 parsoid=wt2html,wt2wt,html2html
8176 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8179 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8183 Interwiki link encoding conversion (bug 1636)
8185 *[[Wikipedia:ro:Olteniţa]]
8186 *[[Wikipedia:ro:Olteniţa]]
8188 <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>
8189 <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>
8193 <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>
8194 <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>
8199 Interwiki link with fragment (bug 2130)
8201 [[MeatBall:SoftSecurity#foo]]
8203 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8207 # Ideally the wikipedia: prefix here should be proto-relative too
8208 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8209 # define the 'en' prefix, and originally the test used 'wikipedia',
8210 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8213 Different interwiki prefixes mapping to the same URL
8221 [[:wikipedia:Foo|Foo]]
8223 [[wikipedia:en:Foo]]
8225 [[:wikipedia:en:Foo]]
8229 <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>
8231 <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>
8233 <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>
8235 <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>
8237 <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>
8239 <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>
8241 <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>
8245 Interwiki links that cannot be represented in wiki syntax
8248 [[meatball:ok#foo|ok with fragment]]
8249 [[meatball:ok_as_well?|ok ending with ? mark]]
8250 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8251 [http://de.wikipedia.org/wiki/#foo is just fragment]
8254 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8255 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8256 <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>
8257 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8258 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8261 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8262 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8263 <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>
8264 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8265 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8269 Interwiki links: trail
8271 [[wikipedia:Foo|Ba]]r
8273 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8276 <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>
8280 Local interwiki link
8282 parsoid=wt2html,wt2wt,html2html
8284 [[local:Template:Foo]]
8286 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8289 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8292 # Parsoid does not mark self-links, by design.
8294 Local interwiki link: self-link to current page
8297 parsoid=wt2html,wt2wt,html2html
8301 <p><strong class="selflink">local:Main Page</strong>
8304 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8308 Local interwiki link: prefix only (bug 64167)
8310 parsoid=wt2html,wt2wt,html2html
8314 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8317 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8321 Local interwiki link: with additional interwiki prefix (bug 61357)
8323 parsoid=wt2html,wt2wt,html2html
8325 [[local:meatball:Hello]]
8327 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8330 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8334 Multiple local interwiki link prefixes
8336 [[local:local:local:local:mi:local:Foo]]
8338 parsoid=wt2html,wt2wt,html2html
8340 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8343 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8347 ### Interlanguage links
8348 ### Language links (so that searching for '### language' matches..)
8360 <p>Blah blah blah</p>
8361 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8364 ## parsoid html2wt will lose the space variations
8366 Interlanguage link with spacing
8368 parsoid=wt2html,wt2wt,html2html
8376 <p>Blah blah blah</p>
8377 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8381 Double interlanguage link
8390 <p>Blah blah blah</p>
8391 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8392 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8395 ## parsoid html2wt will lose the space variations
8397 Interlanguage link variations
8399 parsoid=wt2html,wt2wt,html2html
8409 <p>Blah blah blah</p>
8410 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8411 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8412 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8415 ## parsoid html2wt will normalize the space to _
8417 Space and question mark encoding in interlanguage links (T95473)
8419 parsoid=wt2html,wt2wt,html2html
8427 <p>Blah blah blah</p>
8428 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8432 Interlanguage link, with prefix links
8442 <p>Blah blah blah</p>
8443 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8447 Double interlanguage link, with prefix links (bug 8897)
8458 <p>Blah blah blah</p>
8459 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8460 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8464 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8472 <p>Blah blah blah</p>
8473 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8476 ## PHP parser tests script needs an update
8477 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8479 Language links render as inline links if $wgInterwikiMagic=false
8481 wgInterwikiMagic=false
8482 parsoid=wt2html,wt2wt,html2html
8487 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8490 ## PHP parser tests script needs an update
8491 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8493 Language links render as inline links in the Talk namespace
8496 parsoid=wt2html,wt2wt,html2html
8501 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8505 Parsoid-specific test: Wikilinks with should RT properly
8511 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8516 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8520 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8521 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8523 He&nbsp;llo [[Foo|He&nbsp;llo]]
8525 He&nbsp;llo [[He&nbsp;llo]]
8529 Parsoid: handle constructor well
8535 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8536 </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>
8539 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8541 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8550 # Note that `ko` isn't a known interlanguage prefix
8552 Parsoid: recognize interlanguage links without a target page
8562 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8564 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8567 # Note that `ko` isn't a known interwiki prefix
8569 Parsoid: recognize interwiki links without a target page
8571 parsoid=wt2html,wt2wt,html2html
8577 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8578 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8581 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8582 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8586 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8590 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8593 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8597 Interlanguage link with preceding local interwiki link (bug 68085)
8599 parsoid=wt2html,wt2wt,html2html
8602 [[local:es:Spanish]]
8605 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8609 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8613 Looks like an interlanguage link, but is actually a local interwiki
8615 parsoid=wt2html,wt2wt,html2html
8621 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8625 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8629 ### Redirects, Parsoid-only
8633 1. Simple redirect to page
8635 #REDIRECT [[Main Page]]
8637 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8641 2. Other redirect variants
8643 #REDIRECT [[Main_Page]]
8645 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8648 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8649 # This tests the Parsoid bail-out code.
8651 3. Other redirect variants
8653 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8655 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8659 4. Redirect to a templated destination
8661 #REDIRECT [[{{echo|Foo}}bar]]
8663 <link about="#mwt2" typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-parsoid='{"a":{"href":"./Foobar"},"sa":{"href":"{{echo|Foo}}bar"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,24,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span>bar"}]]}'/>
8669 parsoid=wt2html,wt2wt
8674 <li>REDIRECT [[]]</li></ol>
8678 Optional colon in #REDIRECT
8680 # the colon is archaic syntax. we support it for wt2html, but we
8681 # don't care that it roundtrips back to the modern syntax.
8682 parsoid=wt2html,html2html
8684 #REDIRECT:[[Main Page]]
8686 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8690 Whitespace in #REDIRECT with optional colon
8692 # the colon and gratuitous whitespace is archaic syntax. we support
8693 # it for wt2html, but we don't care that it roundtrips back to the
8694 # modern syntax (without extra whitespace)
8695 parsoid=wt2html,html2html
8702 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8706 Piped link in #REDIRECT
8708 # content after piped link is ignored. we support this syntax,
8709 # but don't care that the piped link is lost when we roundtrip this.
8712 #REDIRECT [[Main Page|bar]]
8714 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8718 Redirect to category (T104502)
8720 parsoid=wt2html,wt2wt
8722 #REDIRECT [[Category:Foo]]
8724 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8728 Redirect to category with URL encoding (T104502)
8732 #REDIRECT [[Category%3AFoo]]
8734 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8738 Redirect to category page
8740 #REDIRECT [[:Category:Foo]]
8742 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8746 Redirect to image page (1)
8748 #REDIRECT [[File:Wiki.png]]
8750 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8754 Redirect to image page (2)
8756 #REDIRECT [[Image:Wiki.png]]
8758 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8761 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8762 # Next test confirms this.
8764 Redirect to language (1) (T104918)
8766 parsoid=wt2html,wt2wt,html2html
8768 #REDIRECT [[en:File:Wiki.png]]
8770 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8774 Redirect to language (2) (T104918)
8776 #REDIRECT [[:en:File:Wiki.png]]
8778 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8782 Redirect to interwiki (T104918)
8784 #REDIRECT [[meatball:File:Wiki.png]]
8786 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8790 Non-English #REDIRECT
8794 #TILVÍSUN [[Main Page]]
8796 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8800 Redirect syntax under text isn't considered a redirect
8803 #redirect [[Main Page]]
8806 <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>
8809 # FIXME: Should hoist the redirect to the top of the page and ensure there
8816 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8836 Broken br tag sanitization
8844 # TODO: Fix html2html mode (bug 51055)!
8846 Parsoid: Broken br tag recognition
8859 Incorrecly removing closing slashes from correctly formed XHTML
8861 <br style="clear:both;" />
8863 <p><br style="clear:both;" />
8868 Failing to transform badly formed HTML into correct XHTML
8870 <br style="clear: left;">
8871 <br style="clear: right;">
8872 <br style="clear: both;">
8874 <p><br style="clear: left;" />
8875 <br style="clear: right;" />
8876 <br style="clear: both;" />
8880 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8881 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8883 Handling html with a div self-closing tag
8892 <p><div title />
8896 <p><div title=bar />
8897 <div title=bar/>
8899 <div title="bar/"></div>
8903 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8904 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8905 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8906 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8907 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8908 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8912 Handling html with a br self-closing tag
8939 Horizontal ruler (should it add that extra space?)
8954 Horizontal ruler -- 4+ dashes render hr
8963 Horizontal ruler -- eats additional dashes on the same line
8972 Horizontal ruler -- does not collapse dashes on consecutive lines
8983 Horizontal ruler -- <4 dashes render as plain text
8992 Horizontal ruler -- Supports content following dashes on same line
9004 ### Block-level elements
9013 <ul><li>Common list</li>
9015 <li>item 3</li></ul>
9026 <ol><li>Numbered list</li>
9028 <li> item 3</li></ol>
9042 ***#Number on level 4
9044 **#Number on level 3
9045 **#Number on level 3
9049 #** Level 3, but ordered
9052 <ol><li> with numbers</li></ol>
9053 <ul><li> and bullets</li></ul>
9054 <ol><li> and numbers</li></ol></li>
9056 <ul><li>bullet level 2
9057 <ul><li>bullet level 3
9058 <ol><li>Number on level 4</li></ol></li></ul></li>
9060 <ol><li>Number on level 3</li>
9061 <li>Number on level 3</li></ol></li></ul>
9062 <ol><li>number level 2</li></ol></li>
9064 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9065 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9070 1. Nested mixed wikitext and html list
9073 * <ul><li>ho</li></ul>
9078 <li> <ul><li>ho</li></ul></li>
9080 <ul><li> ho</li></ul></li></ul>
9084 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9086 <ul><li> ho</li></ul></li></ul>
9090 2. Nested mixed wikitext and html list (incompatible)
9093 : {{echo|<li>ho</li>}}
9096 <dd> <li>ho</li></dd></dl>
9100 <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>
9110 <ul><li>bar</li></ul></li></ul>
9120 <ul><li><ul><li>foo</li></ul></li>
9126 Nested lists 3 (first element empty)
9132 <ul><li>bar</li></ul></li></ul>
9137 Nested lists 4 (first element empty)
9142 <ul><li><ul><li></li></ul></li>
9148 Nested lists 5 (both elements empty)
9153 <ul><li><ul><li></li></ul></li>
9159 Nested lists 6 (both elements empty)
9165 <ul><li></li></ul></li></ul>
9170 Nested lists 7 (skip initial nesting levels)
9174 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9179 Nested lists 8 (multiple nesting transitions)
9187 <ul><li><ul><li> bar</li></ul></li>
9188 <li> baz</li></ul></li>
9194 Nested lists 9 (extension interaction)
9200 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9204 1. Lists with start-of-line-transparent tokens before bullets: Comments
9217 2. Lists with start-of-line-transparent tokens before bullets: Template close
9222 <ul><li>foo bar</li>
9228 List items are not parsed correctly following a <pre> block (bug 785)
9234 <ul><li> <pre>foo</pre></li>
9235 <li> <pre>bar</pre></li>
9239 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9240 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9245 List items from template
9256 * notSOL{{inner list}}
9259 <ul><li> item 1</li>
9260 <li> item 2</li></ul>
9261 <ul><li> item 0</li>
9263 <li> item 2</li></ul>
9264 <ul><li> item 0</li>
9267 <li> item 2</li></ul>
9272 List interrupted by empty line or heading
9280 <ul><li> foo</li></ul>
9281 <ul><li><ul><li> bar</li></ul></li></ul>
9282 <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>
9283 <ul><li> Another list item</li></ul>
9288 Multiple list tags generated by templates
9309 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9312 <!--This line will NOT split the list-->
9314 <!--This line will NOT split the list either-->
9316 <!--foo--> <!----> <!--This line NOT split the list either-->
9327 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9330 <!--This line will NOT split the list-->
9332 <!--This line will NOT split the list either-->
9334 <!--foo--> <!----> <!--This line NOT split the list
9347 (The PHP parser relies on Tidy for the hack)
9349 parsoid=wt2html,wt2wt
9353 * {{echo|<li>templated li-hack}}
9354 * <!--foo--> <li> unsupported li-hack with preceding comments
9357 <li><li>not a li-hack
9364 <li>templated li-hack</li>
9365 <li>unsupported li-hack with preceding comments</li>
9368 <li>not a li-hack</li>
9373 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9400 Parsoid: Test of whitespace serialization with Templated bullets
9407 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9411 # ------------------------------------------------------------------------
9412 # The next set of tests are about Parsoid's ability to handle badly nested
9413 # tags (parse, minimize scope of fixup, and roundtrip back)
9414 # ------------------------------------------------------------------------
9417 Unbalanced closing block tags break a list
9418 (php parser relies on Tidy to fix up)
9436 # Parsoid fails this test, but it might be tricky to support properly.
9439 Unbalanced closing non-block tags don't break a list
9440 (php parser relies on Tidy to fix up)
9447 <li><span>a</span></li>
9448 <li><span>b</span></li>
9462 Unclosed formatting tags that straddle lists are closed and reopened
9463 (php parser relies on Tidy to fix up)
9465 parsoid=wt2html,wt2wt,html2html
9475 <ol><li> <s> a</s></li>
9476 <li><s> b </s></li></ol>
9481 1. List embedded in a formatting tag
9488 <li><small>foo</small></li>
9498 ## Ugly Parsoid output here
9499 ## Not sure what the right output is.
9501 2. List embedded in a formatting tag
9508 <li><small>a</small></li>
9509 <li><small>b</small></li>
9516 <li><small>b</small></li>
9520 # Ugly Parsoid and PHP parser output here
9521 # Not sure if we want to make this a test!
9524 ## 3. Unclosed formatting tags in list elements
9530 ## <li><small>a</small></li>
9531 ## <li><small><small>b</small></small></li>
9535 ## <li><small>a</small></li>
9537 ## <li><small>b</small></li>
9541 # This is a bug in the PHP parser + tidy combination.
9542 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9543 # and then fostered out of the table by tidy.)
9544 # We believe the Parsoid output to be correct.
9546 Table with missing opening <tr> tag
9548 parsoid=wt2html,wt2wt
9566 # Note that the current date is hard-coded as
9567 # 1970-01-01T00:02:03Z (a Thursday)
9568 # when running parser tests. The timezone is also fixed to GMT, so
9569 # local date will be identical to current date.
9572 Magic Word: {{CURRENTDAY}}
9581 Magic Word: {{CURRENTDAY2}}
9590 Magic Word: {{CURRENTDAYNAME}}
9599 Magic Word: {{CURRENTDOW}}
9608 Magic Word: {{CURRENTMONTH}}
9617 Magic Word: {{CURRENTMONTH1}}
9626 Magic Word: {{CURRENTMONTHABBREV}}
9628 {{CURRENTMONTHABBREV}}
9635 Magic Word: {{CURRENTMONTHNAME}}
9637 {{CURRENTMONTHNAME}}
9644 Magic Word: {{CURRENTMONTHNAMEGEN}}
9646 {{CURRENTMONTHNAMEGEN}}
9653 Magic Word: {{CURRENTTIME}}
9662 Magic Word: {{CURRENTHOUR}}
9671 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9680 Magic Word: {{CURRENTYEAR}}
9689 Magic Word: {{CURRENTTIMESTAMP}}
9691 {{CURRENTTIMESTAMP}}
9698 Magic Words LOCAL (UTC)
9702 * {{LOCALMONTHNAME}}
9703 * {{LOCALMONTHNAMEGEN}}
9704 * {{LOCALMONTHABBREV}}
9713 * {{LOCALTIMESTAMP}}
9728 <li> 19700101000203</li></ul>
9733 Magic Word: {{FULLPAGENAME}}
9735 title=[[User:Ævar Arnfjörð Bjarmason]]
9739 <p>User:Ævar Arnfjörð Bjarmason
9744 Magic Word: {{FULLPAGENAMEE}}
9746 title=[[User:Ævar Arnfjörð Bjarmason]]
9750 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9755 Magic Word: {{TALKSPACE}}
9757 title=[[User:Ævar Arnfjörð Bjarmason]]
9766 Magic Word: {{TALKSPACE}}, same namespace
9768 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9777 Magic Word: {{TALKSPACE}}, main namespace
9779 title=[[Parser Test]]
9788 Magic Word: {{TALKSPACEE}}
9790 title=[[User:Ævar Arnfjörð Bjarmason]]
9799 Magic Word: {{SUBJECTSPACE}}
9801 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9810 Magic Word: {{SUBJECTSPACE}}, same namespace
9812 title=[[User:Ævar Arnfjörð Bjarmason]]
9821 Magic Word: {{SUBJECTSPACE}}, main namespace
9823 title=[[Parser Test]]
9831 Magic Word: {{SUBJECTSPACEE}}
9833 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9842 Magic Word: {{NAMESPACE}}
9844 title=[[User:Ævar Arnfjörð Bjarmason]]
9853 Magic Word: {{NAMESPACEE}}
9855 title=[[User:Ævar Arnfjörð Bjarmason]]
9864 Magic Word: {{NAMESPACENUMBER}}
9866 title=[[User:Ævar Arnfjörð Bjarmason]]
9875 Magic Word: {{SUBPAGENAME}}
9877 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9886 Magic Word: {{SUBPAGENAMEE}}
9888 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9897 Magic Word: {{ROOTPAGENAME}}
9899 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9903 <p>Ævar Arnfjörð Bjarmason
9908 Magic Word: {{ROOTPAGENAMEE}}
9910 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9914 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9919 Magic Word: {{BASEPAGENAME}}
9921 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9925 <p>Ævar Arnfjörð Bjarmason
9930 Magic Word: {{BASEPAGENAMEE}}
9932 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9936 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9941 Magic Word: {{TALKPAGENAME}}
9943 title=[[User:Ævar Arnfjörð Bjarmason]]
9947 <p>User talk:Ævar Arnfjörð Bjarmason
9952 Magic Word: {{TALKPAGENAMEE}}
9954 title=[[User:Ævar Arnfjörð Bjarmason]]
9958 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9963 Magic Word: {{SUBJECTPAGENAME}}
9965 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9969 <p>User:Ævar Arnfjörð Bjarmason
9974 Magic Word: {{SUBJECTPAGENAMEE}}
9976 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9978 {{SUBJECTPAGENAMEE}}
9980 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9985 Magic Word: {{NUMBEROFFILES}}
9994 Magic Word: {{PAGENAME}}
9996 title=[[User:Ævar Arnfjörð Bjarmason]]
10000 <p>Ævar Arnfjörð Bjarmason
10005 Magic Word: {{PAGENAME}} with metacharacters
10007 title=[['foo & bar = baz']]
10011 <p><i>'foo & bar = baz'</i>
10014 <p><i>'foo & bar = baz'</i></p>
10018 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
10020 title=[[*RFC 1234 http://example.com/]]
10024 <p>*RFC 1234 http://example.com/
10027 <p>*RFC 1234 http://example.com/</p>
10031 Magic Word: {{PAGENAMEE}}
10033 title=[[User:Ævar Arnfjörð Bjarmason]]
10037 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10042 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
10044 title=[[*RFC 1234 http://example.com/]]
10048 <p>*RFC_1234_http://example.com/
10051 <p>*RFC_1234_http://example.com/</p>
10055 Magic Word: {{REVISIONID}}
10064 Magic Word: {{SCRIPTPATH}}
10072 Magic Word: {{STYLEPATH}}
10081 Magic Word: {{SERVER}}
10085 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10090 Magic Word: {{SERVERNAME}}
10099 Magic Word: {{SITENAME}}
10108 Case-sensitive magic words, when cased differently, should just be template transclusions
10115 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10116 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10117 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10118 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10123 Case-insensitive magic words should still work with weird casing.
10133 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10137 # From plwiki:PLOS_ONE
10139 Parsoid: Page property magic word with magic word contents
10141 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10143 <meta property="mw:PageProp/displaytitle" content="Main_Page" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Main_Page</span></i>"}]]}'/>
10147 Parsoid: Template-generated DISPLAYTITLE
10149 {{{{echo|DISPLAYTITLE}}:Foo}}
10151 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DISPLAYTITLE}}:Foo"},"params":{},"i":0}}]}'/>
10155 Namespace 1 {{ns:1}}
10164 Namespace 1 {{ns:01}}
10173 Namespace 0 {{ns:0}} (bug 4783)
10181 Namespace 0 {{ns:00}} (bug 4783)
10189 Namespace -1 {{ns:-1}}
10198 Namespace User {{ns:User}}
10207 Namespace User talk {{ns:User_talk}}
10216 Namespace User talk {{ns:uSeR tAlK}}
10225 Namespace File {{ns:File}}
10234 Namespace File {{ns:Image}}
10243 Namespace (lang=de) Benutzer {{ns:User}}
10254 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10260 <p>Benutzer Diskussion
10268 {{urlencode:hi world?!}}
10269 {{urlencode:hi world?!|WIKI}}
10270 {{urlencode:hi world?!|PATH}}
10271 {{urlencode:hi world?!|QUERY}}
10281 Magic Word: prioritize type info over data-parsoid
10285 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10291 Magic Word: serialize on separate line (parsoid)
10293 parsoid=wt2wt,html2wt
10299 foo<meta property="mw:PageProp/notoc"/>bar
10303 Magic Word: rt non-english wikis
10310 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10314 __proto__ is treated as normal wikitext (T105997)
10326 Magic links: internal link to RFC (bug 479)
10330 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10333 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10337 Magic links: RFC (bug 479)
10341 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10344 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10348 Magic links: RFC (bug 65278)
10350 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10352 <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.
10355 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10359 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10361 RFC      822
10365 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10370 <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>
10376 Magic links: ISBN (bug 1937)
10380 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10383 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10387 Magic links: ISBN (bug 65278)
10389 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10391 <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.
10394 <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>
10398 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10400 ISBN      978 0 316 09811 3
10406 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10413 <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>
10421 Magic links: PMID incorrectly converts space to underscore
10425 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10428 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10432 Magic links: PMID (bug 65278)
10434 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10436 <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.
10439 <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>
10443 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10445 PMID      1234
10449 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10454 <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>
10459 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10460 # since these are ExtLinkText, not MagicLinkText
10462 Magic links: use appropriate serialization for "almost" magic links.
10464 X[[Special:BookSources/0978739256|foo]]
10466 X[//tools.ietf.org/html/rfc1234 foo]
10468 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10469 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10472 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10473 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10481 Nonexistent template
10483 {{thistemplatedoesnotexist}}
10485 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10490 Template with invalid target containing tags
10492 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10494 <p>{{a<b>b</b>|foo|a=b|a = b}}
10499 Template with invalid target containing unclosed tag
10501 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10503 <p>{{a<b>|foo|a=b|a = b}}</b>
10508 Template with invalid target containing wikilink
10512 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10515 <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>
10519 Template with just whitespace in it, bug #68421
10523 <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>
10529 This is a test template
10537 <p>This is a test template
10542 Template with explicit namespace
10546 <p>This is a test template
10554 This is a test template with parameter {{{param}}}
10560 {{paramtest|param=foo}}
10562 <p>This is a test template with parameter foo
10567 Template:paramtestnum
10569 [[{{{1}}}|{{{2}}}]]
10573 Template unnamed parameter
10575 {{paramtestnum|Main Page|the main page}}
10577 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10582 Template:templatesimple
10588 Template:templateredirect
10590 #redirect [[Template:templatesimple]]
10594 Template:templateasargtestnum
10600 Template:templateasargtest
10602 {{template{{{templ}}}}}
10606 Template:templateasargtest2
10612 Template with template name as unnamed argument
10614 {{templateasargtestnum|templatesimple}}
10621 Template with template name as argument
10623 {{templateasargtest|templ=simple}}
10630 Template with template name as argument (2)
10632 {{templateasargtest2|templ=templatesimple}}
10639 Template:templateasargtestdefault
10641 {{{{{templ|templatesimple}}}}}
10651 Template with default value
10653 {{templateasargtestdefault}}
10660 Template with default value (value set)
10662 {{templateasargtestdefault|templ=templa}}
10671 {{templateredirect}}
10676 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10680 Template with argument in separate line
10682 {{ templateasargtest |
10690 Template with complex template as argument
10693 param ={{ templateasargtest |
10694 templ = simple }}}}
10696 <p>This is a test template with parameter (test)
10701 Template with thumb image (with link in description)
10703 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10705 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>
10708 <p>This is a test template with parameter</p>
10709 <div class="thumb tright">
10710 <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>
10711 <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>
10715 <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>
10719 Template:complextemplate
10721 {{{1}}} {{paramtest|
10722 param ={{{param}}}}}
10726 Template with complex arguments
10729 param ={{ templateasargtest |
10730 templ = simple }}|[[Template:complextemplate|link]]}}
10732 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10737 BUG 553: link with two variables in a piped link
10740 |[[{{{1}}}|{{{2}}}]]
10745 <td>[[{{{1}}}|{{{2}}}]]
10750 <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>
10755 Abort table cell attribute parsing on wikilink
10758 | testing [[one|two]] | three || four
10759 | testing one two | three || four
10760 | testing="[[one|two]]" | three || four
10765 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10771 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10777 <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>
10778 <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>
10779 <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>
10784 Don't abort table cell attribute parsing if wikilink is found in template arg
10787 | Test {{#tag:ref|One two "[[three]]" four}}
10791 <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>
10796 Magic variable as template parameter
10798 {{paramtest|param={{SITENAME}}}}
10800 <p>This is a test template with parameter MediaWiki
10807 [[{{{param}}}|link]]
10811 Template parameter as link source
10813 {{linktest|param=Main Page}}
10815 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10820 Template:paramtest2
10822 including another template, {{paramtest|param={{{arg}}}}}
10826 Template passing argument to another template
10828 {{paramtest2|arg='hmm'}}
10830 <p>including another template, This is a test template with parameter 'hmm'
10841 Template as link source
10845 [[{{linktest2}}|Main Page]]
10847 [[{{linktest2}}]]Page
10849 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10850 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10851 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10869 Template infinite loop
10873 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10878 Template from main namespace
10897 BUG 529: Template with table, not included at beginning of line
10916 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10936 BUG 41: Template parameters shown as broken links
10945 Template with targets containing wikilinks
10949 {{[[{{echo|foo}}]]}}
10951 {{{{echo|[[foo}}]]}}
10953 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10954 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10966 Templates: Double quotes as template target
10973 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10977 ## This test is about making sure Parsoid's data-mw is well formed in the
10978 ## face of multiple templates with intersecting and overlapping ranges. The
10979 ## wikitext itself is wretched.
10981 Templates with intersecting and overlapping ranges
11006 <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":""}]]}'>
11008 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11010 <tbody><tr><td>hi</td></tr>
11015 Template:MSGNW test
11017 ''None'' of '''this''' should be
11019 but rather passed unmodified
11027 # hmm, fix this or just deprecate msgnw and document its behavior?
11031 {{msgnw:MSGNW test}}
11033 <p>''None'' of '''this''' should be
11035  but rather passed unmodified
11036 {{test}}
11040 <!-- comment -->
11047 {{int:youhavenewmessages|lots of money|not!}}
11049 <p>You have lots of money (not!).
11054 int keyword - non-existing message
11065 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11069 <includeonly> and <noinclude> being included
11080 <onlyinclude>Foo</onlyinclude>bar
11084 <onlyinclude> being included
11096 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11100 <onlyinclude> and <includeonly> being included
11109 <includeonly> and <noinclude> on a page
11111 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11118 Un-closed <noinclude>
11125 <onlyinclude> on a page
11127 <onlyinclude>Foo</onlyinclude>bar
11134 Un-closed <onlyinclude>
11141 Self-closed noinclude, includeonly, onlyinclude tags
11152 Unbalanced includeonly and noinclude tags
11156 |b</noinclude></noinclude>
11157 |c</noinclude></includeonly>
11158 |d</includeonly></includeonly>
11167 <td>c</includeonly>
11169 <td>d</includeonly></includeonly>
11175 Template:Includeonly section
11178 ==Includeonly section==
11184 Bug 6563: Edit link generation for section shown by <includeonly>
11186 {{includeonly section}}
11188 <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>
11189 <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>
11193 # Uses same input as the contents of [[Template:Includeonly section]]
11195 Bug 6563: Section extraction for section shown by <includeonly>
11200 ==Includeonly section==
11208 Bug 6563: Edit link generation for section suppressed by <includeonly>
11211 ==Includeonly section==
11215 <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>
11220 Bug 6563: Section extraction for section suppressed by <includeonly>
11225 ==Includeonly section==
11233 Un-closed <includeonly>
11238 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11241 ## We used to, but no longer wt2wt this test since the default serializer
11242 ## will normalize the include directives to serialize on their own line.
11243 ## Selser will take care of preserving formatting in scenarios where they
11244 ## intermingled with other wikitext.
11246 Includes and comments at SOL
11248 parsoid=wt2html,html2html
11250 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11254 </noinclude>* stuff
11257 <includeonly>can have stuff</includeonly>=== here ===
11260 <h2><span class="mw-headline" id="hu">hu</span></h2>
11263 <ul><li> stuff</li>
11264 <li> here</li></ul>
11265 <h3><span class="mw-headline" id="here">here</span></h3>
11268 <!-- 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>
11270 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11272 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11273 <li> here</li></ul>
11275 <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>
11279 # TODO: test with DOM fragment reuse!
11281 Parsoid: DOM fragment reuse
11283 parsoid=wt2wt,wt2html
11285 a{{echo|b<table></table>c}}d
11297 <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>
11299 <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">
11300 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11301 </span><p about="#mwt2">cd</p>
11303 <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">
11305 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11307 </span><p about="#mwt3">b</p>
11311 Parsoid: Merge double tds (T52603)
11316 |{{echo|{{!}} foo}}
11320 <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>
11325 Parsoid: Merge double tds in nested transclusion content (T52603)
11331 |{{echo|{{!}} foo}}
11335 <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}}]}'>
11337 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11343 ### <includeonly> and <noinclude> in attributes
11346 0. includeonly around the entire attribute
11348 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11350 <p><span id="v2">bar</span>
11355 1. includeonly in html attr key
11357 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11359 <p><span id="foo">bar</span>
11364 2. includeonly in html attr value
11366 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11367 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11369 <p><span id="v1">bar</span>
11370 <span id="v1">bar</span>
11375 3. includeonly in part of an attr value
11377 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11379 <p><span style="color:red;">bar</span>
11384 4. includeonly in table attributes
11408 ### Token Stream Patcher tests
11410 ### These tests won't always pass wt2wt and other modes because
11411 ### on serialization, the table will be output on a new line.
11412 ### For now, we are blacklisting them, and using this to test selser.
11416 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11418 parsoid=wt2html,wt2wt
11420 {{echo|}}{| width = '100%'
11424 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11425 <tbody><tr><td>foo</td></tr>
11429 ## We used to, but no longer wt2wt this test since the default serializer
11430 ## will normalize the include directives to serialize on their own line.
11431 ## Selser will take care of preserving formatting in scenarios where they
11432 ## intermingled with other wikitext.
11434 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11438 <includeonly>a</includeonly>{| {{{b}}}
11442 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"dsr\":[31,38,null,null],\"src\":\"{{{b}}}\"}'>{{{b}}}</span>"},{"html":""}]]}'>
11443 <tbody><tr><td>c</td></tr>
11448 ### Testing parsing of templates where a template arg
11449 ### has the same name as the template itself.
11455 {{{quote|{{{1}}}}}}
11459 Templates: Template Name/Arg clash: 1. Use of positional param
11468 Templates: Template Name/Arg clash: 2. Use of named param
11470 {{quote|quote=foo}}
11477 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11486 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11490 Templates: 1. Simple use
11499 Templates: 2. Inside a block tag
11501 <div>{{echo|Foo}}</div>
11502 <blockquote>{{echo|Foo}}</blockquote>
11505 <blockquote>Foo</blockquote>
11515 Templates: P-wrapping: 1a. Templates on consecutive lines
11526 Templates: P-wrapping: 1b. Templates on consecutive lines
11540 Templates: P-wrapping: 1c. Templates on consecutive lines
11543 {{echo|bar}} <div>baz</div>
11556 Templates: P-wrapping: 1d. Template preceded by comment-only line
11565 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11569 Templates: Inline Text: 1. Multiple template uses
11571 {{echo|Foo}}bar{{echo|baz}}
11578 Templates: Inline Text: 2. Back-to-back template uses
11580 {{echo|Foo}}{{echo|bar}}
11587 Templates: Block Tags: 1. Multiple template uses
11589 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11591 <div>Foo</div><div>bar</div><div>baz</div>
11596 Templates: Block Tags: 2. Back-to-back template uses
11598 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11600 <div>Foo</div><div>bar</div>
11604 # This is an edge case relating to paragraph wrapping.
11606 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11611 <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
11616 Templates: Links: 1. Simple example
11618 {{echo|[[Foo|bar]]}}
11620 <p><a href="/wiki/Foo" title="Foo">bar</a>
11625 Templates: Links: 2. Generation of link href
11627 [[{{echo|Foo}}|bar]]
11629 <p><a href="/wiki/Foo" title="Foo">bar</a>
11634 Templates: Links: 3. Generation of part of a link href
11636 [[Fo{{echo|o}}|bar]]
11638 [[Foo{{echo|bar}}]]
11640 [[Foo{{echo|bar}}baz]]
11642 [[Foo{{echo|bar}}|bar]]
11644 [[:Foo{{echo|bar}}]]
11646 [[:Foo{{echo|bar}}|bar]]
11648 <p><a href="/wiki/Foo" title="Foo">bar</a>
11649 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11650 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11651 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11652 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11653 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11658 Templates: Links: 4. Multiple templates generating link href
11660 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11662 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11667 Templates: Links: 5. Generation of link text
11669 [[Foo|{{echo|bar}}]]
11671 <p><a href="/wiki/Foo" title="Foo">bar</a>
11676 Templates: Links: 5. Nested templates (only outermost template should be marked)
11678 {{echo|[[{{echo|Foo}}|bar]]}}
11680 <p><a href="/wiki/Foo" title="Foo">bar</a>
11685 Templates: HTML Tag: 1. Generation of HTML attr. key
11687 <div {{echo|style}}="color:red;">foo</div>
11689 <div style="color:red;">foo</div>
11694 Templates: HTML Tag: 2. Generation of HTML attr. value
11696 <div style={{echo|'color:red;'}}>foo</div>
11698 <div style="color:red;">foo</div>
11703 Templates: HTML Tag: 3. Generation of HTML attr key and value
11705 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11707 <div style="color:red;">foo</div>
11712 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11714 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11716 <div title="This is a long title with just one piece templated">foo</div>
11721 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11723 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11725 <div title="This is a long title with just one piece templated">foo</div>
11730 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11732 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11734 <div title="This is a long title with just one piece templated">foo</div>
11738 # SSS FIXME: While it is great we added support for all this,
11739 # do we want to make this part of the spec? Maybe we want to
11740 # deprecate this kind of usage in the future?
11742 Templates: HTML Tag: 7. Generation of partial attribute key string
11744 <div st{{echo|yle}}="color:red;">foo</div>
11746 <div style="color:red;">foo</div>
11751 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11753 <div {{echo|1=id="v1"}}>bar</div>
11755 <div id="v1">bar</div>
11760 Templates: HTML Tag: 9. Multiple template-generated attributes
11762 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11764 <div id="v1" title="foo">bar</div>
11769 Templates: Support for templates generating attributes and content
11771 {| {{mixed_attr_content_template}}
11776 <table style="color:red;" title="T48811">
11786 <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|}"]}'>
11795 1. Entities and nowikis inside templated attributes should be handled correctly
11797 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11799 <div style="background:#f9f9f9;">foo</div>
11802 <div style="background:#f9f9f9;" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html"}' data-mw='{"attribs":[[{"txt":"style","html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[5,49,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"style{{=}}\\\"background:&amp;#35;f9f9f9;\\\"\"}},\"i\":0}}]}'>style</span><span typeof=\"mw:Nowiki\" about=\"#mwt1\" data-parsoid=\"{}\">=</span><span about=\"#mwt1\" data-parsoid=\"{}\">\"background:</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#35;\",\"srcContent\":\"#\"}'>#</span><span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"</span>"},{"html":""}]]}'>foo</div>
11806 2. Entities and nowikis inside templated attributes should be handled correctly
11809 |{{table_attribs_3}}
11814 <td style="background:#f9f9f9;">Foo
11819 <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>
11824 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11827 |{{table_attribs_3}}
11832 <td style="background:#f9f9f9;">Foo
11836 <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}}]}'>
11837 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11843 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11846 | {{table_attribs_6}} hi
11851 <td style="background: red;"> hi
11856 <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>
11861 Templates: HTML Tables: 1. Generating start of a HTML table
11863 {{echo|<table><tr><td>foo</td>}}</tr></table>
11865 <table><tr><td>foo</td></tr></table>
11870 Templates: HTML Tables: 2a. Generating middle of a HTML table
11872 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11874 <table><tr><td>foo</td></tr></table>
11879 Templates: HTML Tables: 2b. Generating middle of a HTML table
11881 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11883 <table><tr><td>foo</td></tr></table>
11888 Templates: HTML Tables: 3. Generating end of a HTML table
11890 <table><tr>{{echo|<td>foo</td></tr></table>}}
11892 <table><tr><td>foo</td></tr></table>
11897 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11899 {{echo|<table>}}<tr><td>foo</td></tr></table>
11901 <table><tr><td>foo</td></tr></table>
11906 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11908 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11910 <table><tr><td>foo</td></tr></table>
11915 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11917 <table><tr>{{echo|<td>}}foo</td></tr></table>
11919 <table><tr><td>foo</td></tr></table>
11924 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11926 <table><tr><td>foo{{echo|</td>}}</tr></table>
11928 <table><tr><td>foo</td></tr></table>
11933 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11935 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11937 <table><tr><td>foo</td></tr></table>
11942 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11944 <table><tr><td>foo</td></tr>{{echo|</table>}}
11946 <table><tr><td>foo</td></tr></table>
11951 Templates: HTML Tables: 5. Proper fostering of categories from inside
11953 parsoid=wt2html,wt2wt
11955 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11956 <!--Two categories (Bug 50330)-->
11957 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11959 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11960 <!--Two categories (Bug 50330)-->
11961 <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>
11965 Templates: Wiki Tables: 1a. Fostering of entire template content
11973 <tr><td></td></tr></table>
11985 Templates: Wiki Tables: 1b. Fostering of entire template content
11998 <tr><td></td></tr></table>
12012 Templates: Wiki Tables: 2. Fostering of partial template content
12022 <tr><td></td></tr></table>
12035 Templates: Wiki Tables: 3. td-content via multiple templates
12038 {{echo|{{pipe}}a}}{{echo|b}}
12049 Templates: Wiki Tables: 4. Templated tags, no content
12055 <tr><td></td></tr></table>
12060 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12074 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12087 ## This test case is very specific to Parsoid's internals
12088 ## and is hence only tested for Parsoid's code. Parsoid uses
12089 ## a <meta> marker tag for <ref> tags and they are expanded
12090 ## much later. We are verifying that this <meta> tag usage
12091 ## doesn't prevent foster parenting.
12093 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12095 {{PartialTable}}<ref>foo</ref>
12100 <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">
12104 <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>
12108 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12118 <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{{!}}}"]}'>
12119 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12123 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12128 Templates: Lists: Multi-line list-items via templates
12130 *{{echo|a {{nonexistent|
12132 *{{echo|b {{nonexistent|
12135 <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>
12136 <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>
12141 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12143 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12145 <p><i>ab</i>c<i>d</i>e
12150 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12151 (PHP parser generates misnested html)
12153 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12155 <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>
12159 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12160 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12162 parsoid=wt2html,wt2wt
12164 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12166 <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>
12167 <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>
12168 <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>
12172 Templates: Ugly nesting: 4. Divs opened/closed across templates
12174 a<div>b{{echo|c</div>d}}e
12185 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12191 |{{echo|foo</table>}}
12195 <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|}"]}'>
12199 <td>foo</td></tr></tbody></table><span about="#mwt1">
12200 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12205 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12215 <td>1. {{echo|foo </table>}}</td>
12217 <td>2. {{echo|baz </table>}}</td>
12230 <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>"]}'>
12235 <td>1. foo </td></tr></tbody></table></td>
12237 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12238 </span><span about="#mwt2">
12239 </span><span about="#mwt2">
12240 </span><span about="#mwt2">abc</span><span about="#mwt2">
12241 </span><span about="#mwt2">
12242 </span><span about="#mwt2">
12243 </span><span about="#mwt2">
12244 </span><span about="#mwt2">
12245 </span><span about="#mwt2">
12246 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12247 </span><span about="#mwt2">
12252 Templates: Ugly templates: 3. newline-only template parameter
12261 # This looks like a bug: a single newline triggers p/br for some reason.
12263 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12272 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12273 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12275 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12281 <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
12282 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12286 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12287 # that are "identical" and generate nesting cycles in the algorithm
12289 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12291 {{echo|<table><tr><td><table>}}
12295 <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"}'>
12296 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12297 </table></td></tr></tbody></table>
12301 Templates: Parameters substituted at the top-level
12303 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12305 <p><i>who</i> me? <b>never!</b>
12308 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12312 Parser Functions: 1. Simple example
12321 Parser Functions: 2. Nested use (only outermost should be marked up)
12330 ### Pre-save transform tests
12333 pre-save transform: subst:
12339 This is a test template
12343 pre-save transform: normal template
12353 pre-save transform: nonexistent template
12357 {{thistemplatedoesnotexist}}
12359 {{thistemplatedoesnotexist}}
12363 pre-save transform: subst magic variables
12372 # This is bug 89, which I fixed. -- wtm
12374 pre-save transform: subst: templates with parameters
12378 {{subst:paramtest|param="something else"}}
12380 This is a test template with parameter "something else"
12384 Template:nowikitest
12386 <nowiki>'''not wiki'''</nowiki>
12390 pre-save transform: nowiki in subst (bug 1188)
12394 {{subst:nowikitest}}
12396 <nowiki>'''not wiki'''</nowiki>
12400 Template:commenttest
12402 This template has <!-- a comment --> in it.
12406 pre-save transform: comment in subst (bug 1936)
12410 {{subst:commenttest}}
12412 This template has <!-- a comment --> in it.
12416 pre-save transform: unclosed tag
12420 <nowiki>'''not wiki'''
12422 <nowiki>'''not wiki'''
12426 pre-save transform: mixed tag case
12430 <NOwiki>'''not wiki'''</noWIKI>
12432 <NOwiki>'''not wiki'''</noWIKI>
12436 pre-save transform: unclosed comment in <nowiki>
12440 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12442 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12445 # Leading @ in this template definition works around a limitation
12446 # in parsoid's parserTests which otherwise strips the <span> from the
12447 # result (confusing it for a template wrapper)
12451 @<span onmouseover="alert('crap')">Oh no</span>
12455 (confirming safety of fix for subst bug 1936)
12457 {{Template:dangerous}}
12459 <p>@<span>Oh no</span>
12464 pre-save transform: comment containing gallery (bug 5024)
12468 <!-- <gallery>data</gallery> -->
12470 <!-- <gallery>data</gallery> -->
12474 pre-save transform: comment containing extension
12478 <!-- <tag>data</tag> -->
12480 <!-- <tag>data</tag> -->
12484 pre-save transform: comment containing nowiki
12488 <!-- <nowiki>data</nowiki> -->
12490 <!-- <nowiki>data</nowiki> -->
12494 pre-save transform: <noinclude> in subst (bug 3298)
12504 pre-save transform: <onlyinclude> in subst (bug 3298)
12508 {{subst:Includes2}}
12516 {{<includeonly>subst:</includeonly>Includes}}
12520 Template:SafeSubstTest
12522 {{<includeonly>safesubst:</includeonly>Includes}}
12526 bug 22297: safesubst: works during PST
12530 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12536 bug 22297: safesubst: works during normal parse
12545 subst: does not work during normal parse
12549 <p>{{subst:Includes}}
12554 pre-save transform: context links ("pipe trick")
12558 [[Article (context)|]]
12561 [[Bar:Article (context)|]]
12562 [[:Bar:Article (context)|]]
12564 [[|Article (context)]]
12568 [[Article (context)|Article]]
12569 [[Bar:Article|Article]]
12570 [[:Bar:Article|Article]]
12571 [[Bar:Article (context)|Article]]
12572 [[:Bar:Article (context)|Article]]
12574 [[Article (context)]]
12575 [[Bar:X (Y) Z|X (Y) Z]]
12576 [[:Bar:X (Y) Z|X (Y) Z]]
12580 pre-save transform: context links ("pipe trick") with interwiki prefix
12584 [[interwiki:Article|]]
12585 [[:interwiki:Article|]]
12586 [[interwiki:Bar:Article|]]
12587 [[:interwiki:Bar:Article|]]
12589 [[interwiki:Article|Article]]
12590 [[:interwiki:Article|Article]]
12591 [[interwiki:Bar:Article|Bar:Article]]
12592 [[:interwiki:Bar:Article|Bar:Article]]
12596 pre-save transform: context links ("pipe trick") with parens in title
12598 pst title=[[Somearticle (context)]]
12602 [[Article (context)|Article]]
12606 pre-save transform: context links ("pipe trick") with comma in title
12608 pst title=[[Someplace, Somewhere]]
12611 [[Otherplace, Elsewhere|]]
12612 [[Otherplace, Elsewhere, Anywhere|]]
12614 [[Otherplace, Somewhere|Otherplace]]
12615 [[Otherplace, Elsewhere|Otherplace]]
12616 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12620 pre-save transform: context links ("pipe trick") with parens and comma
12622 pst title=[[Someplace (IGNORED), Somewhere]]
12625 [[Otherplace (place), Elsewhere|]]
12627 [[Otherplace, Somewhere|Otherplace]]
12628 [[Otherplace (place), Elsewhere|Otherplace]]
12632 pre-save transform: context links ("pipe trick") with comma and parens
12634 pst title=[[Who, me? (context)]]
12637 [[Me, Myself, and I (1937 song)|]]
12639 [[Yes, you. (context)|Yes, you.]]
12640 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12644 pre-save transform: context links ("pipe trick") with namespace
12646 pst title=[[Ns:Somearticle]]
12650 [[Ns:Article|Article]]
12654 pre-save transform: context links ("pipe trick") with namespace and parens
12656 pst title=[[Ns:Somearticle (context)]]
12660 [[Ns:Article (context)|Article]]
12664 pre-save transform: context links ("pipe trick") with namespace and comma
12666 pst title=[[Ns:Somearticle, Context, Whatever]]
12670 [[Ns:Article, Context, Whatever|Article]]
12674 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12676 pst title=[[Ns:Somearticle, Context (context)]]
12680 [[Ns:Article (context)|Article]]
12684 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12686 pst title=[[Ns:Somearticle (IGNORED), Context]]
12690 [[Ns:Article, Context|Article]]
12694 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12698 [[Article(context)|]]
12699 [[Bar:Article(context)|]]
12700 [[:Bar:Article(context)|]]
12701 [[|Article(context)]]
12705 [[Article(context)|Article]]
12706 [[Bar:Article(context)|Article]]
12707 [[:Bar:Article(context)|Article]]
12708 [[Article(context)]]
12709 [[Bar:X(Y)Z|X(Y)Z]]
12710 [[:Bar:X(Y)Z|X(Y)Z]]
12714 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12718 [[Article (context)|]]
12719 [[Bar:Article (context)|]]
12720 [[:Bar:Article (context)|]]
12721 [[|Article (context)]]
12725 [[Article (context)|Article]]
12726 [[Bar:Article (context)|Article]]
12727 [[:Bar:Article (context)|Article]]
12728 [[Article (context)]]
12729 [[Bar:X (Y) Z|X (Y) Z]]
12730 [[:Bar:X (Y) Z|X (Y) Z]]
12734 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12738 [[Article(context)|]]
12739 [[Bar:Article(context)|]]
12740 [[:Bar:Article(context)|]]
12741 [[|Article(context)]]
12745 [[Article(context)|Article]]
12746 [[Bar:Article(context)|Article]]
12747 [[:Bar:Article(context)|Article]]
12748 [[Article(context)]]
12749 [[Bar:X(Y)Z|X(Y)Z]]
12750 [[:Bar:X(Y)Z|X(Y)Z]]
12754 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12758 [[Article (context), context|]]
12759 [[Article (context),context|]]
12760 [[Bar:Article (context), context|]]
12761 [[Bar:Article (context),context|]]
12762 [[:Bar:Article (context), context|]]
12763 [[:Bar:Article (context),context|]]
12765 [[Article (context), context|Article]]
12766 [[Article (context),context|Article]]
12767 [[Bar:Article (context), context|Article]]
12768 [[Bar:Article (context),context|Article]]
12769 [[:Bar:Article (context), context|Article]]
12770 [[:Bar:Article (context),context|Article]]
12774 pre-save transform: trim trailing empty lines
12778 Empty lines are trimmed
12784 Empty lines are trimmed
12788 pre-save transform: Signature expansion
12793 * <noinclude>~~~</noinclude>
12794 * <includeonly>~~~</includeonly>
12795 * <onlyinclude>~~~</onlyinclude>
12797 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12798 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12799 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12800 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12805 pre-save transform: Signature expansion in nowiki tags (bug 93)
12811 <nowiki>~~~~</nowiki>
12813 <includeonly><nowiki>~~~~</nowiki></includeonly>
12815 <noinclude><nowiki>~~~~</nowiki></noinclude>
12817 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12819 {{subst:Foo}} shall be converted to FOO
12821 As well as inside noinclude/onlyinclude
12822 <noinclude>{{subst:Foo}}</noinclude>
12823 <onlyinclude>{{subst:Foo}}</onlyinclude>
12825 But not inside includeonly
12826 <includeonly>{{subst:Foo}}</includeonly>
12830 <nowiki>~~~~</nowiki>
12832 <includeonly><nowiki>~~~~</nowiki></includeonly>
12834 <noinclude><nowiki>~~~~</nowiki></noinclude>
12836 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12838 FOO shall be converted to FOO
12840 As well as inside noinclude/onlyinclude
12841 <noinclude>FOO</noinclude>
12842 <onlyinclude>FOO</onlyinclude>
12844 But not inside includeonly
12845 <includeonly>{{subst:Foo}}</includeonly>
12849 Parsoid: Recognize nowiki with trailing space in tags
12853 <nowiki ><div>[[foo]]</nowiki >
12861 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12868 Parsoid: Recognize nowiki with odd capitalization
12872 <noWikI ><div>[[foo]]</Nowiki >
12874 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12879 Parsoid: Escape nowiki with trailing space in tags
12883 <p><nowiki > foo </nowiki ></p>
12884 <p>a<nowiki />b</p>
12885 <p>c<nowiki/ >d</p>
12887 <nowiki > foo </nowiki >
12895 Parsoid: Escape weird noWikI capitalizations
12899 <p><noWikI > foo </NoWikI ></p>
12901 <noWikI > foo </NoWikI >
12905 ### Message transform tests
12908 message transform: magic variables
12918 message transform: should not transform wiki markup
12928 message transform: <noinclude> in transcluded template (bug 4926)
12938 message transform: <onlyinclude> in transcluded template (bug 4926)
12948 {{#special:}} page name, known
12952 {{#special:Recentchanges}}
12954 Special:RecentChanges
12958 {{#special:}} page name with subpage, known
12962 {{#special:Recentchanges/param}}
12964 Special:RecentChanges/param
12968 {{#special:}} page name, unknown
12972 {{#special:foobar nonexistent}}
12974 Special:Foobar nonexistent
12978 {{#speciale:}} page name, known
12982 {{#speciale:Recentchanges}}
12984 Special:RecentChanges
12988 {{#speciale:}} page name with subpage, known
12992 {{#speciale:Recentchanges/param}}
12994 Special:RecentChanges/param
12998 {{#speciale:}} page name, unknown
13002 {{#speciale:foobar nonexistent}}
13004 Special:Foobar_nonexistent
13010 ### For Parsoid-specific tests, see
13011 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13016 parsoid=wt2html,wt2wt,html2html
13018 [[Image:foobar.jpg]]
13020 <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>
13023 <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>
13027 Simple image (using File: namespace, now canonical)
13029 [[File:Foobar.jpg]]
13031 <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>
13034 <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>
13038 Right-aligned image
13040 [[File:Foobar.jpg|right]]
13042 <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>
13045 <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>
13051 [[File:Foobar.jpg|right|Caption text]]
13053 <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>
13056 <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>
13060 Image with caption, bug 53312 #1
13062 [[File:Foobar.jpg|right|Caption page stuff]]
13064 <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>
13067 <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>
13071 Image with caption, bug 53312 #2
13073 [[File:Foobar.jpg|right|Caption page=]]
13075 <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>
13078 <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>
13082 Image with caption, bug 53312 #3
13084 [[File:Foobar.jpg|right|Caption page=stuff]]
13086 <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>
13089 <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>
13093 Allow empty links in image captions (Bug 60753)
13097 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13102 <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>
13105 <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>
13107 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13108 </figcaption></figure>
13112 Titles in unlinked images (T23454)
13114 [[File:Foobar.jpg|link=|stuff]]
13116 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13121 Link with empty target
13130 Image with link trail
13132 Linktrails should not work for images: [[File:Foobar.jpg]]s
13134 <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
13137 <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>
13141 Image with empty attribute
13143 parsoid=wt2html,wt2wt,html2html
13145 [[File:Foobar.jpg|right||Caption text]]
13147 <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>
13150 <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>
13154 1. Block image with individual attributes from templates
13156 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13158 <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>
13161 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,38,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
13165 2. Block Image with individual attributes from templates
13167 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13169 <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>
13172 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"{{echo|thumb}}"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,32,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"thumb\"}},\"i\":0}}]}'>thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[33,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
13176 3. Inline image with individual attributes from templates
13178 [[File:Foobar.jpg|{{echo|50px}}]]
13180 <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>
13183 <p><span typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}' data-mw='{"attribs":[["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"50px\"}},\"i\":0}}]}'>50px</span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13186 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13187 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13189 Image with multiple attributes from the same template
13191 [[File:Foobar.jpg|{{image_attribs}}]]
13193 <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>
13196 <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>
13200 Image with link tails
13204 123[[File:Foobar.jpg]]456
13205 123[[File:Foobar.jpg|right]]456
13206 123[[File:Foobar.jpg|thumb]]456
13208 <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
13210 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
13211 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
13214 <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>
13216 <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>
13218 <div class="thumb tright">
13219 <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>
13220 <div class="thumbcaption">
13221 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13227 <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>
13228 <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>
13229 <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>
13233 Image with multiple captions -- only last one is accepted
13235 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13237 <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>
13240 <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>
13244 Image with multiple widths -- use last
13246 [[File:Foobar.jpg|200px|300px|caption]]
13248 <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>
13251 <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>
13255 Image with multiple alignments -- use first (bug 48664)
13259 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13261 [[File:Foobar.jpg|middle|text-top|caption]]
13263 <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>
13264 <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>
13267 <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>
13268 <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>
13272 Image with width attribute at different positions
13274 [[File:Foobar.jpg|200px|right|Caption]]
13275 [[File:Foobar.jpg|right|200px|Caption]]
13276 [[File:Foobar.jpg|right|Caption|200px]]
13278 <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>
13279 <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>
13280 <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>
13283 <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>
13284 <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>
13285 <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>
13288 # a sad bit of backward-compatibility
13290 Image with size specified with pxpx (bug 13500, 51628)
13292 parsoid=wt2html,wt2wt,html2html
13294 [[File:Foobar.jpg|20pxpx]]
13295 [[File:Foobar.jpg|200x20pxpx]]
13297 <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>
13298 <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>
13301 <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>
13305 Image with link parameter, wiki target
13307 [[File:Foobar.jpg|link=Main Page]]
13309 <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>
13312 <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>
13315 # parsoid bug 49293 (part 1)
13317 Image with link parameter, URL target
13319 [[File:Foobar.jpg|link=http://example.com/]]
13321 <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>
13324 <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>
13327 # parsoid bug 49293 (part 2)
13329 Image with link parameter, protocol-less URL target
13331 [[File:Foobar.jpg|link=//example.com/]]
13333 <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>
13336 <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>
13340 Escaping non-block captions (T107435)
13343 "modes": ["wt2wt"],
13345 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13349 [[Image:Foobar.jpg|caption]]
13351 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13354 # wgExternalLinkTarget not supported by Parsoid
13356 Image with link parameter, wgExternalLinkTarget
13358 [[Image:foobar.jpg|link=http://example.com/]]
13360 wgExternalLinkTarget='foobar'
13362 <p><a href="http://example.com/" target="foobar" rel="nofollow noreferrer noopener"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13367 Image with link parameter, wgNoFollowLinks set to false
13369 [[Image:foobar.jpg|link=http://example.com/]]
13371 wgNoFollowLinks=false
13373 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13378 Image with link parameter, wgNoFollowDomainExceptions
13380 [[Image:foobar.jpg|link=http://example.com/]]
13382 wgNoFollowDomainExceptions='example.com'
13384 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13388 # wgExternalLinkTarget not supported by Parsoid
13390 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13392 [[Image:foobar.jpg|link=http://example.com/|Title]]
13394 wgExternalLinkTarget='foobar'
13396 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow noreferrer noopener"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13401 Image with empty link parameter
13403 [[File:Foobar.jpg|link=]]
13405 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13408 <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>
13412 Image with link parameter (wiki target) and unnamed parameter
13414 [[File:Foobar.jpg|link=Main_Page|Title]]
13416 <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>
13419 <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>
13423 Image with link parameter (URL target) and unnamed parameter
13425 [[File:Foobar.jpg|link=http://example.com/|Title]]
13427 <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>
13430 <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>
13434 Thumbnail image with link parameter
13437 parsoid=wt2html,wt2wt,html2html
13439 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13441 <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>
13444 <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>
13448 Manually-specified thumbnail image
13452 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13454 <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>
13457 <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>
13461 Manually-specified thumbnail image with explicit link to wiki page
13464 parsoid=wt2html,wt2wt,html2html
13466 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13468 <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>
13471 <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>
13475 Manually-specified thumbnail image with explicit link to url
13478 parsoid=wt2html,wt2wt,html2html
13480 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13482 <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>
13485 <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>
13489 Manually-specified thumbnail image with explicit no link
13492 parsoid=wt2html,wt2wt,html2html
13494 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13496 <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>
13499 <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>
13503 Manually-specified thumbnail image with explicit link and alt text
13506 parsoid=wt2html,wt2wt,html2html
13508 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13510 <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>
13513 <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>
13517 Image with frame and link
13519 parsoid=wt2html,wt2wt,html2html
13521 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13523 <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>
13526 <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>
13530 Image with frame and link and explicit alt
13532 parsoid=wt2html,wt2wt,html2html
13534 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13536 <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>
13539 <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>
13543 Image with wiki markup in implicit alt
13545 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13547 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13549 <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>
13550 </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>
13553 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"testing '''bold''' in alt"}]}' data-mw='{"caption":"testing <b data-parsoid='{\"dsr\":[27,37,3,3]}'>bold</b> in alt"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></span></p>
13555 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=testing '''bold''' in alt"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"testing bold in alt","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=testing '''bold''' in alt","resource":"Image:Foobar.jpg"}}'/></a></span></p>
13559 Alt image option should handle most kinds of wikitext without barfing
13561 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13563 <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>
13566 <figure class="mw-default-size" typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"This is the image caption"},{"ck":"alt","ak":"alt=This is a [[link]] and a {{echo|''bold template''}}."}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["alt",{"html":"alt=This is a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[65,73,2,2]}'>link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[80,106,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&#39;&#39;bold template&#39;&#39;\"}},\"i\":0}}]}'>bold template</i>."}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="This is a link and a bold template." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"alt":"This is a link and a bold template.","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=This is a [[link]] and a {{echo|''bold template''}}.","resource":"Image:Foobar.jpg"}}'/></a><figcaption>This is the image caption</figcaption></figure>
13569 ###################
13570 # Conflicting image format options.
13571 # First option specified should 'win'.
13572 # All three cases in each test should be identical.
13575 Image with 'frameless' first.
13577 parsoid=wt2html,wt2wt,html2html
13579 [[File:Foobar.jpg|frameless|caption]]
13581 [[File:Foobar.jpg|frameless|frame|caption]]
13583 [[File:Foobar.jpg|frameless|thumb|caption]]
13585 <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>
13586 </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>
13587 </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>
13590 <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>
13591 <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>
13592 <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>
13596 Image with 'frame' first.
13598 parsoid=wt2html,wt2wt,html2html
13600 [[File:Foobar.jpg|frame|caption]]
13601 [[File:Foobar.jpg|frame|frameless|caption]]
13602 [[File:Foobar.jpg|frame|thumb|caption]]
13604 <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>
13605 <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>
13606 <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>
13609 <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>
13610 <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>
13611 <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>
13615 Image with 'thumb' first.
13617 parsoid=wt2html,wt2wt,html2html
13619 [[File:Foobar.jpg|thumb|caption]]
13620 [[File:Foobar.jpg|thumb|frameless|caption]]
13621 [[File:Foobar.jpg|thumb|frame|caption]]
13623 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
13624 <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>
13625 <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>
13628 <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>
13629 <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>
13630 <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>
13633 ###################
13635 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13636 # and https://phabricator.wikimedia.org/T64258
13637 # Foobar has actual size of 1941x220
13638 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13639 # a scalable format.
13640 # 2. Framed images always ignore size options; always render at default size.
13641 # 3. "Unspecified format" and border are the only types which can be
13645 Image: "unspecified format" and border enlarge
13647 parsoid=wt2html,wt2wt,html2html
13649 [[File:Foobar.jpg|2000px]]
13651 [[File:Foobar.jpg|border|2000px]]
13653 <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>
13654 </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>
13657 <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>
13658 <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>
13662 Image: "unspecified format" and border reduce
13664 parsoid=wt2html,wt2wt,html2html
13666 [[File:Foobar.jpg|1000px]]
13668 [[File:Foobar.jpg|border|1000px]]
13670 <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>
13671 </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>
13674 <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>
13675 <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>
13679 Image: thumbs reduce
13681 parsoid=wt2html,wt2wt,html2html
13683 [[File:Foobar.jpg|thumb|50px]]
13685 <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>
13688 <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>
13692 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13694 parsoid=wt2html,wt2wt,html2html
13696 [[File:Foobar.jpg|thumb|2000px]]
13698 [[File:Foobar.svg|thumb|2000px]]
13700 <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>
13701 <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>
13704 <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>
13705 <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>
13709 Image: frameless can reduce in size
13711 parsoid=wt2html,wt2wt,html2html
13713 [[File:Foobar.jpg|frameless|50px]]
13715 <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>
13718 <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>
13722 Image: bitmap frameless can't be enlarged past original size, but vector can
13724 parsoid=wt2html,wt2wt,html2html
13726 [[File:Foobar.jpg|frameless|2000px]]
13728 [[File:Foobar.svg|frameless|2000px]]
13730 <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>
13731 </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>
13734 <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>
13735 <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>
13739 Image: framed images are always unscaled.
13741 parsoid=wt2html,wt2wt,html2html
13743 [[File:Foobar.jpg|frame]]
13745 [[File:Foobar.jpg|frame|50px]]
13747 [[File:Foobar.jpg|frame|50x50px]]
13749 [[File:Foobar.jpg|frame|2000px]]
13751 <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>
13752 <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>
13753 <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>
13754 <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>
13757 <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>
13758 <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>
13759 <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>
13760 <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>
13763 ###################
13766 Link to image page- image page normally doesn't exists, hence edit link
13767 Add test with existing image page
13768 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13772 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13777 bug 18784 Link to non-existent image page with caption should use caption as link text
13779 [[:Image:test|caption]]
13781 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13786 Frameless image caption with a free URL
13788 [[File:Foobar.jpg|http://example.com]]
13790 <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>
13793 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"http://example.com"}]}' data-mw='{"caption":"<a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid='{\"stx\":\"url\",\"dsr\":[18,36,0,0]}'>http://example.com</a>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13797 Thumbnail image caption with a free URL
13801 [[File:Foobar.jpg|thumb|http://example.com]]
13803 <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>
13806 <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>
13810 Thumbnail image caption with a free URL and explicit alt
13813 parsoid=wt2html,wt2wt,html2html
13815 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13817 <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>
13820 <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>
13824 SVG thumbnails with no language set
13827 [[File:Foobar.svg|thumb|caption]]
13829 <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>
13832 <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>
13836 SVG thumbnails with language de
13838 parsoid=wt2html,wt2wt,html2html
13840 [[File:Foobar.svg|thumb|caption|lang=de]]
13842 <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>
13845 <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>
13849 SVG thumbnails with invalid language code
13851 parsoid=wt2html,wt2wt,html2html
13853 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13855 <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>
13858 <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>
13862 BUG 1887: A ISBN with a thumbnail
13864 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13866 <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>
13869 <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>
13873 BUG 1887: A RFC with a thumbnail
13875 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13877 <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>
13880 <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>
13884 BUG 1887: A mailto link with a thumbnail
13886 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13888 <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>
13891 <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>
13894 # Pending resolution to bug 368
13896 BUG 648: Frameless image caption with a link
13898 [[File:Foobar.jpg|text with a [[link]] in it]]
13900 <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>
13903 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,38,2,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13907 BUG 648: Frameless image caption with a link (suffix)
13909 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13911 <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>
13914 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]]foo in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,41,2,5],\"tail\":\"foo\"}'>linkfoo</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13918 BUG 648: Frameless image caption with an interwiki link
13920 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13922 <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>
13925 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,47,2,2]}'>MeatBall:Link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13929 BUG 648: Frameless image caption with a piped interwiki link
13931 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13933 <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>
13936 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link|link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,52,16,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13940 T107474: Frameless image caption with <nowiki>
13942 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13944 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>"}]}' data-mw='{"caption":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[18,75,8,9]}'>text with a [[MeatBall:Link|link]] in it</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13948 Escape HTML special chars in image alt text
13950 [[File:Foobar.jpg|& < > "]]
13952 <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>
13955 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"& < > \""}]}' data-mw='{"caption":"&amp; &lt; > \""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13959 BUG 499: Alt text should have Ӓ, not &1234;
13961 [[File:Foobar.jpg|♀]]
13963 <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>
13966 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&#9792;"}]}' data-mw='{"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#9792;\",\"srcContent\":\"♀\",\"dsr\":[18,25,null,null]}'>♀</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13970 Broken image caption with link
13972 parsoid=wt2html,wt2wt,html2html
13974 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13976 <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.
13979 <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>
13983 Image caption containing another image
13985 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13987 <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>
13990 <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>
13994 Image: caption containing a newline
13996 [[File:Foobar.jpg|This
13999 <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>
14002 <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>
14006 Image: caption containing leading space
14007 (The leading space should not trigger nowiki escaping in wt2wt mode)
14009 [[File:Foobar.jpg|thumb| bar]]
14011 <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>
14014 <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>
14018 Image: caption containing a table
14020 parsoid=wt2html,wt2wt,html2html
14022 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14028 and some more text.]]
14030 <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>
14033 <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
14036 <tr><th>Foo </th><th>Bar</th></tr>
14039 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14043 Bug 3090: External links other than http: in image captions
14045 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14047 <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>
14050 <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>
14056 parsoid=wt2html,wt2wt,html2html
14058 [[Image:foobar.jpg|a|class=b]]
14060 <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>
14063 <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>
14067 Localized image handling (1).
14069 parsoid=wt2html,wt2wt,html2html
14072 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14074 <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>
14077 <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>
14081 Localized image handling (2).
14084 parsoid=wt2html,wt2wt,html2html
14087 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14089 <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>
14092 <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>
14096 Localized image handling (3).
14101 <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>
14103 [[File:Foobar.jpg|بندانگشتی]]
14107 "border", "frameless" and "class" attributes on an image.
14110 parsoid=wt2html,wt2wt,html2html
14112 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14114 <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>
14117 <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>
14120 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14122 Invalid image attributes (bug 62500)
14125 parsoid=wt2html,wt2wt,html2html
14127 [[File:Foobar.jpg|thumb|float|left|caption]]
14129 [[File:Foobar.jpg|thumb|righ|caption]]
14131 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14133 <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>
14134 <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>
14135 <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>
14138 <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>
14139 <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>
14140 <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>
14146 #REDIRECT [[File:Barfoo.jpg]]
14149 # FIXME: Parsoid should run this test -- but we'd need to teach the
14150 # mockAPI about the redirected Barfoo.jpg image.
14154 [[Image:Barfoo.jpg]]
14156 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14161 Missing image with uploads disabled
14165 [[File:Foobaz.jpg]]
14167 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14170 <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>
14173 # Parsoid-specific testing for images
14174 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14175 # Currently imperfect due to a flaw in the Parsoid testrunner
14177 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14181 Parsoid-specific image handling - simple image with size and middle alignment
14183 [[File:Foobar.jpg|middle|50px]]
14185 <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>
14189 Parsoid-specific image handling - simple image with size, middle alignment,
14190 non-standard namespace alias
14192 parsoid=wt2wt,wt2html,html2html
14194 [[Image:Foobar.jpg|middle|50px]]
14196 <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>
14200 Parsoid-specific image handling - simple image with size and middle alignment
14203 [[File:Foobar.jpg|50px|middle]]
14205 <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>
14209 Parsoid-specific image handling - simple image with size and middle alignment
14210 and non-standard namespace name
14212 parsoid=wt2html,wt2wt,html2html
14214 [[Image:Foobar.jpg|50px|middle]]
14216 <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>
14220 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14222 [[File:Foobar.jpg|500x10px|baseline|caption]]
14224 <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>
14228 Parsoid-specific image handling - simple image with border and size spec
14230 [[File:Foobar.jpg|50px|border|caption]]
14232 <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>
14236 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14238 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14240 <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>
14244 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14247 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14249 <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>
14253 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14255 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14257 <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>
14261 Parsoid-specific image handling - thumbnail with specific size, halign,
14262 valign, and caption (existing content)
14264 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14266 <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>
14270 Parsoid-specific image handling - framed image with specific size and caption
14273 parsoid=wt2html,wt2wt,html2html
14275 [[File:Foobar.jpg|frame|500x50px|caption]]
14277 <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>
14281 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14284 parsoid=wt2html,wt2wt,html2html
14286 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14288 <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>
14292 Parsoid-specific image handling - frameless image with specific size, border, and caption
14294 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14296 <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>
14300 Parsoid-specific image handling - simple image with a formatted caption
14302 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14304 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>"}]}' data-mw='{"caption":"<table data-parsoid='{\"stx\":\"html\",\"dsr\":[18,81,7,8]}'><tbody data-parsoid='{\"dsr\":[25,73,0,0]}'><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[25,54,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[29,39,4,5]}'>a</td><td data-parsoid='{\"stx\":\"html\",\"dsr\":[39,49,4,5]}'>b</td></tr><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[54,73,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[58,68,4,5]}'>c</td></tr></tbody></table>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14308 Parsoid-specific image handling - caption with a template in it
14310 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14312 <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>
14316 Parsoid-specific image handling - caption with unbalanced tags in it
14318 parsoid=wt2html,wt2wt,html2html
14321 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14325 <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>
14330 Parsoid-specific image handling - empty caption (1)
14332 parsoid=wt2html,wt2wt
14334 [[File:Foobar.jpg|thumb|]]
14336 <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>
14339 # empty captions don't get serialized unless we're in the "round trip" case
14341 Parsoid-specific image handling - empty caption (2)
14345 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14346 <a href="./File:Foobar.jpg">
14347 <img resource="./File:Foobar.jpg"
14348 src="//example.com/images/3/3a/Foobar.jpg"
14349 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14350 height="25" width="220"/>
14352 <figcaption></figcaption>
14355 [[File:Foobar.jpg|thumb]]
14359 Parsoid-specific image handling - whitespace caption
14361 [[File:Foobar.jpg|thumb| ]]
14363 <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>
14367 Parsoid-specific image handling - lang option
14370 [[File:Foobar.svg|lang=de|caption]]
14374 <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>
14378 ## Edge case bugs in Parsoid from T93580
14380 T93580: 1. Templated <ref> inside block images
14382 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14386 <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>
14388 <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>
14392 T93580: 2. <ref> inside inline images
14394 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14398 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,78,5,6]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14400 <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>
14404 T93580: 3. Templated <ref> inside inline images
14406 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14410 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Transclusion mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14412 <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>
14419 Subpage test/subpage
14427 subpage title=[[Subpage test]]
14431 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14436 Subpage noslash link
14438 subpage title=[[Subpage test]]
14442 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14447 Subpage test/1/2/subpage
14453 Relative subpage noslash link
14455 parsoid=wt2wt,wt2html,html2html
14456 subpage title=[[Subpage test/1/2/3/4]]
14462 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14463 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14466 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14467 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14471 Parsoid: dot-slash prefixed wikilinks
14481 </p><p>[[././baz/]]
14486 </p><p>[[././baz/]]
14491 Render invalid page names as plain text (bug 51090)
14504 [[{{echo|./../foo}}|bar]]
14505 [[{{echo|foo/.}}|bar]]
14506 [[{{echo|foo/..}}|bar]]
14507 [[{{echo|foo~~~~bar}}]]
14508 [[{{echo|foo>bar}}]]
14509 [[{{echo|foo././bar}}]]
14510 [[{{echo|foo{bar}}]]
14511 [[{{echo|foo}bar}}]]
14512 [[{{echo|foo[bar}}]]
14513 [[{{echo|foo]bar}}]]
14514 [[{{echo|foo<bar}}]]
14516 <p>[[./../foo|bar]]
14526 </p><p>[[./../foo|bar]]
14539 <p>[[./../foo|bar]]
14550 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14551 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14552 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14553 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14554 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14555 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14556 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14557 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14558 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14559 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14560 [[<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>
14568 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14573 BUG 561: {{/Subpage}}
14575 subpage title=[[Page]]
14579 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14587 Category:MediaWiki User's Guide
14595 [[:Category:MediaWiki User's Guide]]
14597 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14606 [[Category:MediaWiki User's Guide]]
14608 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14612 PAGESINCATEGORY invalid title fatal (r33546 fix)
14614 {{PAGESINCATEGORY:<bogus>}}
14621 Category with different sort key
14625 [[Category:MediaWiki User's Guide|Foo]]
14627 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14631 Category with identical sort key
14635 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14637 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14641 Category with empty sort key
14646 [[Category:MediaWiki User's Guide|]]
14648 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14652 Category with empty sort key and parentheses
14657 [[Category:Foo (bar)|]]
14659 [[Category:Foo (bar)|Foo]]
14662 ## We used to, but no longer wt2wt this test since the default serializer
14663 ## will normalize all categories to serialize on their own line.
14664 ## This wikitext usage is going to be fairly uncommon in production and
14665 ## selser will take care of preserving formatting in those scenarios.
14667 Category with link tail
14673 123[[Category:Foo]]456
14675 123[[Category:Foo]]456
14677 <p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
14681 Category with template
14686 [[Category:{{echo|Foo}}]]
14688 [[Category:{{echo|Foo}}]]
14692 Category with template in sort key
14697 [[Category:Foo|{{echo|Bar}}]]
14699 [[Category:Foo|{{echo|Bar}}]]
14703 Category with template in sort key and title
14708 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14710 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14713 ## We used to, but no longer wt2wt this test since the default serializer
14714 ## will normalize all categories to serialize on their own line.
14715 ## This wikitext usage is going to be fairly uncommon in production and
14716 ## selser will take care of preserving formatting in those scenarios.
14718 Category / paragraph interactions
14722 Foo [[Category:Baz]] Bar
14724 Foo [[Category:Baz]]
14732 [[Category:Baz]] Bar
14745 {{echo|[[Category:Baz]]}}
14758 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14759 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14760 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14761 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14762 <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>
14763 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14766 ## We used to, but no longer wt2wt this test since the default serializer
14767 ## will normalize all categories to serialize on their own line.
14768 ## This wikitext usage is going to be fairly uncommon in production and
14769 ## selser will take care of preserving formatting in those scenarios.
14771 ## The whitespace on the empty line is part of the test. Please do not delete
14773 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14779 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14781 {{echo|[[Category:Foo]] and so should this!}}
14783 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14788 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14790 <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>
14793 ## Parsoid will not try to wt2wt this while preserving newlines because
14794 ## it suppresses excess newlines within list items -- and we don't want to
14795 ## introduce a special case just for categories, which is, in reality somewhat
14796 ## odd behavior -- categories are unlikely to be used in list items like this
14797 ## in top-level pages and are only likely to show up in template-generated
14798 ## list items where this RT-ing is a non-issue.
14800 ## The whitespace on the empty line is part of the test. Please do not delete
14802 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14808 [[Category:Foo]] and this should be part of the same list item
14811 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14813 <ul><li>This and this should be part of the same list item</li>
14814 <li>So should this and this should be part of the same list item</li></ul>
14817 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14818 <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>
14822 ## Newlines and categories that follow the last item of a list
14823 ## are treated differently because this (list followed by categories)
14824 ## is an extremely common pattern on wikis.
14826 3. Categories and newlines: newline suppression for last list item should RT properly
14839 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14841 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14842 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14846 4. Categories and newlines: newline suppression for last list item should RT properly
14854 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14856 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14859 ## only wt2html for this to make sure the algo only applies to the rightmost path
14861 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14874 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14876 <ul><li> d</li></ul></li></ul>
14877 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14880 ## We used to, but no longer wt2wt this test since the default serializer
14881 ## will normalize all categories to serialize on their own line.
14882 ## This wikitext usage is going to be fairly uncommon in production and
14883 ## selser will take care of preserving formatting in those scenarios.
14885 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14889 * a [[Category:Foo]]
14891 <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>
14894 # This test also demonstrates because of newline+category tunneling
14895 # through the list hander, template wrapping doesn't expand to the
14896 # containing list when the list item swallows the category.
14898 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14903 <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
14904 </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>
14908 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14912 {{echo|[[Category:Foo]]
14916 <ul><li> a</li></ul>
14918 <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">
14919 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14920 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14924 Parsoid: Serialize link to category page with colon escape
14930 [[:Category:Foo|Bar]]
14933 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14934 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14938 # We used to, but no longer wt2wt this test since the default serializer
14939 # will normalize all categories to serialize on their own line.
14940 # This wikitext usage is going to be fairly uncommon in production and
14941 # selser will take care of preventing whitespace insertion if this
14942 # occurs in an article.
14944 # html2html disabled for the same reason (whitespace insertion between
14947 # html2wt disabled because it localizes the "Category" namespace.
14949 Link prefix/suffixes aren't applied to category links
14959 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14963 Parsoid: Serialize link to file page with colon escape
14969 [[:File:Foo.png|Bar]]
14972 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14973 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14978 Parsoid: Serialize a genuine category link without colon escape
14983 [[Category:Foo|Bar]]
14985 <link rel="mw:PageProp/Category" href="./Category:Foo">
14986 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14990 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14994 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14996 [[Category:Toxine bactérienne]]
15000 Parsoid: Defaultsort
15002 {{DEFAULTSORT:Foo}}
15004 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15008 Parsoid: Defaultsort (template-generated)
15010 {{{{echo|DEFAULTSORT}}:Foo}}
15012 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DEFAULTSORT}}:Foo"},"params":{},"i":0}}]}'/>
15016 ### Inter-language links
15019 Interlanguage links
15027 es:Alimento fr:Nourriture zh:食品
15029 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15030 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15031 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15035 Duplicate interlanguage links (bug 24502)
15046 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15047 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15048 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15049 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15056 Basic section headings
15063 ===Smaller headline===
15066 <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>
15069 <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>
15072 <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>
15078 Section headings with TOC
15081 === Subheadline 1 ===
15082 ===== Skipping a level =====
15083 ====== Skipping a level ======
15087 ===Another headline===
15089 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15091 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15093 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15095 <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>
15097 <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>
15104 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15106 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15112 <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>
15113 <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>
15114 <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>
15115 <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>
15116 <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>
15119 <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>
15124 TOC anchors don't collide
15132 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15134 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15135 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15136 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15137 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15141 <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>
15142 <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>
15143 <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>
15144 <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>
15148 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15150 Handling of sections up to level 6 and beyond
15153 == Level 2 Heading==
15154 === Level 3 Heading===
15155 ==== Level 4 Heading====
15156 ===== Level 5 Heading=====
15157 ====== Level 6 Heading======
15158 ======= Level 7 Heading=======
15159 ======== Level 8 Heading========
15160 ========= Level 9 Heading=========
15161 ========== Level 10 Heading==========
15163 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15165 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15167 <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>
15169 <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>
15171 <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>
15173 <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>
15175 <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>
15176 <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>
15177 <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>
15178 <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>
15179 <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>
15193 <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>
15194 <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>
15195 <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>
15196 <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>
15197 <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>
15198 <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>
15199 <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>
15200 <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>
15201 <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>
15202 <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>
15207 TOC regression (T11764)
15211 ==== title 1.1.1 ====
15216 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15218 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15220 <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>
15222 <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>
15225 <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>
15228 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15230 <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>
15236 <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>
15237 <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>
15238 <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>
15239 <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>
15240 <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>
15241 <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>
15246 TOC for heading containing <span id="..."></span> (T96153)
15249 ==<span id="old-anchor"></span>New title==
15251 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15253 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15257 <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>
15262 TOC with wgMaxTocLevel=3 (bug 6204)
15268 ==== title 1.1.1 ====
15273 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15275 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15277 <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>
15278 <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>
15281 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15283 <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>
15289 <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>
15290 <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>
15291 <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>
15292 <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>
15293 <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>
15294 <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>
15299 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15305 ====Section 1.1.1====
15306 ====Section 1.1.1.1====
15309 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15311 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15313 <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>
15316 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15320 <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>
15321 <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>
15322 <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>
15323 <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>
15324 <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>
15330 Resolving duplicate section names
15335 <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>
15336 <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>
15341 Resolving duplicate section names with differing case (bug 10721)
15346 <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>
15347 <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>
15359 Template with sections, __NOTOC__
15366 <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>
15367 <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>
15368 <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>
15369 <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>
15374 __NOEDITSECTION__ keyword
15380 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15381 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15386 Link inside a section heading
15388 ==Section with a [[Main Page|link]] in it==
15390 <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>
15395 TOC regression (T14077)
15402 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15404 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15406 <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>
15409 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15413 <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>
15414 <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>
15415 <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>
15420 BUG 1219 URL next to image (good)
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 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15434 The line above must have a trailing space!
15437 But just in case it doesn't...
15439 <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>
15440 <p>The line above must have a trailing space!
15442 <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>
15443 <p>But just in case it doesn't...
15448 Header with special characters (bug 25462)
15450 The tooltips shall not show entities to the user (ie. be double escaped)
15467 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15469 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15471 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15472 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15473 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15474 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15475 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15479 <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>
15482 <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>
15485 <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>
15488 <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>
15491 <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>
15497 Header with space, plus and underscore as entity
15499 Id should not contain + for spaces
15501 == Space between Text ==
15504 == Space-Entity between Text ==
15507 == Plus+between+Text ==
15510 == Plus-Entity+between+Text ==
15513 == Underscore_between_Text ==
15516 == Underscore-Entity_between_Text ==
15519 [[#Space between Text]]
15520 [[#Space-Entity between Text]]
15521 [[#Plus+between+Text]]
15522 [[#Plus-Entity+between+Text]]
15523 [[#Underscore_between_Text]]
15524 [[#Underscore-Entity_between_Text]]
15526 <p>Id should not contain + for spaces
15528 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15530 <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>
15531 <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>
15532 <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>
15533 <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>
15534 <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>
15535 <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>
15539 <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>
15542 <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>
15545 <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>
15548 <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>
15551 <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>
15554 <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>
15556 </p><p><a href="#Space_between_Text">#Space between Text</a>
15557 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15558 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15559 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15560 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15561 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15566 Headers with excess '=' characters
15567 (Are similar tests necessary beyond the 1st level?)
15571 =''italic'' heading==
15572 ==''italic'' heading=
15574 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15576 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15577 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15578 <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>
15579 <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>
15583 <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>
15584 <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>
15585 <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>
15586 <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>
15591 HTML headers vs TOC (bug 23393)
15592 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15604 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15606 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15608 <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>
15609 <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>
15612 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15614 <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>
15615 <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>
15621 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15622 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15623 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15624 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15625 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15626 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15631 Single-line or multiline-comments can follow headings
15633 parsoid=wt2html,wt2wt
15641 <h2><span class="mw-headline" id="foo">foo</span></h2>
15642 <h2><span class="mw-headline" id="bar">bar</span></h2>
15643 <h2><span class="mw-headline" id="baz">baz</span></h2>
15648 BUG 1219 URL next to image (broken)
15650 http://example.com[[File:Foobar.jpg]]
15652 <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>
15655 <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>
15659 Bug 1186 news: in the middle of text
15661 http://en.wikinews.org/wiki/Wikinews:Workplace
15663 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15669 Namespaced link must have a title
15678 Namespaced link must have a title (bad fragment version)
15680 [[Project:#fragment]]
15682 <p>[[Project:#fragment]]
15688 ### HTML tags and HTML attributes
15692 div with no attributes
15694 <div>HTML rocks</div>
15696 <div>HTML rocks</div>
15701 div with double-quoted attribute
15703 <div id="rock">HTML rocks</div>
15705 <div id="rock">HTML rocks</div>
15710 div with single-quoted attribute
15712 <div id='rock'>HTML rocks</div>
15714 <div id="rock">HTML rocks</div>
15719 div with unquoted attribute
15721 <div id=rock>HTML rocks</div>
15723 <div id="rock">HTML rocks</div>
15728 div with illegal double attributes
15730 <div id="a" id="b">HTML rocks</div>
15732 <div id="b">HTML rocks</div>
15737 div with empty attribute value, space before equals
15739 parsoid=wt2html,html2html
15741 <div class =>HTML rocks</div>
15743 <div class="">HTML rocks</div>
15746 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15750 div with multiple empty attribute values
15752 parsoid=wt2html,html2html
15754 <div id= title=>HTML rocks</div>
15756 <div id="title.3D">HTML rocks</div>
15759 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15763 table with multiple empty attribute values
15765 parsoid=wt2html,html2html
15771 <table title="id=">
15777 <table title="id=">
15778 <tbody><tr><td> hi</td></tr>
15783 div with braces in attribute value
15785 <div title="{}">Foo</div>
15787 <div title="{}">Foo</div>
15790 <div title="{}">Foo</div>
15794 div with empty attribute value, no space before equals
15796 parsoid=wt2html,html2html
15798 <div class=>HTML rocks</div>
15800 <div class="">HTML rocks</div>
15803 <div class="">HTML rocks</div>
15807 HTML multiple attributes correction
15809 <p class="error" class="awesome">Awesome!</p>
15811 <p class="awesome">Awesome!</p>
15816 Table multiple attributes correction
15819 !+ class="error" class="awesome"| status
15824 <th class="awesome"> status
15832 <DIV ID="x">HTML ROCKS</DIV>
15834 <div id="x">HTML ROCKS</div>
15839 Non-ASCII pseudo-tags are rendered as text
15848 Pseudo-tag with URL 'name' renders as url link
15850 <http://example.com/>
15852 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15857 text with amp in the middle of nowhere
15861 <p>Remember AT&T?
15866 text with character entity: eacute
15868 I always thought é was a cute letter.
15870 <p>I always thought é was a cute letter.
15873 <p>I always thought é was a cute letter.</p>
15877 text with entity-escaped character entity-like string: eacute
15879 I always thought &eacute; was a cute letter.
15881 <p>I always thought &eacute; was a cute letter.
15886 text with undefined character entity: xacute
15888 I always thought &xacute; was a cute letter.
15890 <p>I always thought &xacute; was a cute letter.
15897 <data value="5">five</data>
15898 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15899 <mark>This highlighted text</mark>
15901 <p><data value="5">five</data>
15902 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15903 <mark>This highlighted text</mark>
15908 HTML tag with leading space is parsed as text
15912 <p>< div>foo< /div>
15917 ### Nesting tests (see bug 41545, 50604, 51081)
15920 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15921 # Note that html2wt is considerably more difficult if we use <b> in
15922 # the test case, instead of <big>
15924 Ensure that HTML adoption agency algorithm is properly implemented.
15926 <big>X<big>Y</big>Z</big>
15928 <p><big>X<big>Y</big>Z</big>
15932 # This was bug 41545 in the PHP parser.
15933 # Note that tidy doesn't handle this correctly.
15937 <kbd>X<kbd>Y</kbd>Z</kbd>
15939 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15943 # The following cases were bug 51081 in the PHP parser.
15944 # Note that there are some other nestable tags (b, i, etc) which are
15945 # not covered; see bug 51081 for discussion.
15947 # Note that tidy doesn't handle this correctly.
15951 <em>X<em>Y</em>Z</em>
15953 <p><em>X<em>Y</em>Z</em>
15957 # Note that tidy doesn't handle this correctly.
15959 Nesting of <strong>
15961 <strong>X<strong>Y</strong>Z</strong>
15963 <p><strong>X<strong>Y</strong>Z</strong>
15972 <p><q>X<q>Y</q>Z</q></p>
15975 # Note that tidy doesn't handle this correctly.
15979 <ruby>X<ruby>Y</ruby>Z</ruby>
15981 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15985 # Note that tidy doesn't handle this correctly.
15989 <bdo>X<bdo>Y</bdo>Z</bdo>
15991 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16003 [[Media:Foobar.jpg]]
16005 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16010 Media link with text
16012 [[Media:Foobar.jpg|A neat file to look at]]
16014 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16018 # FIXME: this is still bad HTML tag nesting
16019 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16021 Media link with nasty text
16023 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16025 <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>
16028 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16029 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16033 Media link to nonexistent file (bug 1702)
16035 [[Media:No such.jpg]]
16037 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16042 Image link to nonexistent file (bug 1850 - good)
16044 [[File:No_such.jpg]]
16046 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16049 <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>
16053 :Image link to nonexistent file (bug 1850 - bad)
16055 [[:Image:No such.jpg]]
16057 <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>
16060 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16066 Character reference normalization in link text (bug 1938)
16068 [[Main Page|this&that]]
16070 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16077 Test for unicode normalization
16079 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16083 (bug 19451) Links should refer to the normalized form.
16091 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16092 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16093 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16094 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16095 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16100 Empty attribute crash test (bug 2067)
16102 <font color="">foo</font>
16104 <p><font color="">foo</font>
16109 Empty attribute crash test single-quotes (bug 2067)
16111 <font color=''>foo</font>
16113 <p><font color="">foo</font>
16118 Attribute test: equals, then nothing
16120 parsoid=wt2html,html2html
16122 <font color=>foo</font>
16124 <p><font color="">foo</font>
16127 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16131 Attribute test: unquoted value
16133 parsoid=wt2html,html2html
16135 <font color=x>foo</font>
16137 <p><font color="x">foo</font>
16140 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16144 Attribute test: unquoted but illegal value (hash)
16146 <font color=#x>foo</font>
16148 <p><font color="#x">foo</font>
16152 # Parsoid does not serialize to empty attribute syntax,
16153 # so wt2wt and html2wt cases are skipped
16155 Attribute test: no value (T54330)
16157 parsoid=wt2html,html2html
16159 <font color>foo</font>
16161 <p><font color="">foo</font>
16164 <p><font color="">foo</font></p>
16168 Bug 2095: link with three closing brackets
16172 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16175 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16179 Bug 2095: link with pipe and three closing brackets
16181 [[Main Page|link]]]
16183 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16186 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16190 Bug 2095: link with pipe and three closing brackets, version 2
16192 [[Main Page|[http://example.com/]]]
16194 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16197 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16206 Template:Dangerous attribute
16208 " onmouseover="alert(document.cookie)
16212 Template:Dangerous style attribute
16214 border-size: expression(alert(document.cookie))
16220 <div style="float: right; {{{1}}}">Magic div</div>
16224 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16226 <div title="{{test}}"></div>
16228 <div title="This is a test template"></div>
16232 # Parsoid has enough context to handle this case
16234 Bug 2304: HTML attribute safety (dangerous template; 2309)
16236 <div title="{{dangerous attribute}}"></div>
16238 <div title=""></div>
16241 <div title='" onmouseover="alert(document.cookie)' about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"\" onmouseover=\"alert(document.cookie)"},"sa":{"title":"{{dangerous attribute}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,35,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous attribute\",\"href\":\"./Template:Dangerous_attribute\"},\"params\":{},\"i\":0}}]}'>\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
16245 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16247 <div style="{{dangerous style attribute}}"></div>
16249 <div style="/* insecure input */"></div>
16254 Bug 2304: HTML attribute safety (safe parameter; 2309)
16256 {{div style|width: 200px}}
16258 <div style="float: right; width: 200px">Magic div</div>
16263 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16265 {{div style|width: expression(alert(document.cookie))}}
16267 <div style="/* insecure input */">Magic div</div>
16272 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16274 {{div style|"><script>alert(document.cookie)</script>}}
16276 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16281 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16283 {{div style|" ><script>alert(document.cookie)</script>}}
16285 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16290 Bug 2304: HTML attribute safety (link)
16292 <div title="[[Main Page]]"></div>
16294 <div title="[[Main Page]]"></div>
16299 Bug 2304: HTML attribute safety (italics)
16301 <div title="''foobar''"></div>
16303 <div title="''foobar''"></div>
16308 Bug 2304: HTML attribute safety (bold)
16310 <div title="'''foobar'''"></div>
16312 <div title="'''foobar'''"></div>
16318 Bug 2304: HTML attribute safety (ISBN)
16320 <div title="ISBN 1234567890"></div>
16322 <div title="ISBN 1234567890"></div>
16327 Bug 2304: HTML attribute safety (RFC)
16329 <div title="RFC 1234"></div>
16331 <div title="RFC 1234"></div>
16336 Bug 2304: HTML attribute safety (PMID)
16338 <div title="PMID 1234567890"></div>
16340 <div title="PMID 1234567890"></div>
16345 Bug 2304: HTML attribute safety (web link)
16347 <div title="http://example.com/"></div>
16349 <div title="http://example.com/"></div>
16354 Bug 2304: HTML attribute safety (named web link)
16356 <div title="[http://example.com/ link]"></div>
16358 <div title="[http://example.com/ link]"></div>
16363 Bug 3244: HTML attribute safety (extension; safe)
16365 <div style="<nowiki>background:blue</nowiki>"></div>
16367 <div style="background:blue"></div>
16372 Bug 3244: HTML attribute safety (extension; unsafe)
16374 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16376 <div style="/* insecure input */"></div>
16380 # More MSIE fun discovered by Tom Gilder
16383 MSIE CSS safety test: spurious slash
16385 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16387 <div style="/* insecure input */">evil</div>
16392 MSIE CSS safety test: hex code
16394 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16396 <div style="/* insecure input */">evil</div>
16401 MSIE CSS safety test: comment in url
16403 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16405 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16410 MSIE CSS safety test: comment in expression
16412 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16414 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16419 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16421 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16423 <p style="/* invalid control char */">A</p>
16428 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16430 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16431 <div style="top:EXPRESSION(alert())">B</div>
16433 <p style="/* insecure input */">A</p>
16434 <div style="/* insecure input */">B</div>
16439 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16441 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16442 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16444 <div style="/* insecure input */">A</div>
16445 <p style="/* insecure input */">B</p>
16450 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16452 <div style="background-image:url⁽javascript:alert())">A</div>
16453 <div style="background-image:url₍javascript:alert())">B</div>
16454 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16456 <div style="/* insecure input */">A</div>
16457 <div style="/* insecure input */">B</div>
16458 <p style="/* insecure input */">C</p>
16462 # FIXME: Parsoid fails to sanitize this! See T58846.
16467 title="data:text/html,<img src=1 onerror=alert(1)>"
16468 style="-o-link:attr(title);-o-link-source:current">X</div>
16470 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16475 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16477 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16478 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16479 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16480 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16481 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16482 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16483 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16485 <p style="/* insecure input */">A</p>
16486 <p style="/* insecure input */">B</p>
16487 <p style="/* insecure input */">C</p>
16488 <p style="/* insecure input */">D</p>
16489 <p style="/* insecure input */">E</p>
16490 <p style="/* insecure input */">F</p>
16491 <p style="/* insecure input */">G</p>
16496 Table attribute legitimate extension
16499 !+ style="<nowiki>color:blue</nowiki>"| status
16504 <th style="color:blue"> status
16510 Table attribute safety
16513 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16518 <th style="/* insecure input */"> status
16524 CSS line continuation 1
16526 <div style="background-image: u\ rl(test.jpg);"></div>
16528 <div style="/* insecure input */"></div>
16533 CSS line continuation 2
16535 <div style="background-image: u\ rl(test.jpg); "></div>
16537 <div style="/* invalid control char */"></div>
16548 Expansion of multi-line templates in attribute values (bug 6255)
16550 <div style="background: {{identity|#00FF00}}">-</div>
16552 <div style="background: #00FF00">-</div>
16558 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16560 <div style="background:
16563 <div style="background: #00FF00">-</div>
16566 <div style="background:
16571 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16573 <div style="background: #00FF00">-</div>
16575 <div style="background: #00FF00">-</div>
16580 evil <math>-wiki-tags without Extension:Math enabled
16582 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16584 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16588 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16591 Parser hook: empty input
16602 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16605 ## Don't expect parsoid to rt this form.
16607 Parser hook: empty input using terminated empty elements
16609 parsoid=wt2html,html2html
16620 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16624 Parser hook: empty input using terminated empty elements (space before)
16635 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16639 Parser hook: basic input
16650 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16653 ## Don't expect parsoid to rt this form.
16655 Parser hook: case insensitive
16657 parsoid=wt2html,html2html
16668 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16671 ## Don't expect parsoid to rt this form.
16673 Parser hook: case insensitive, redux
16675 parsoid=wt2html,html2html
16686 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16690 Parser hook: nested tags
16692 <tag><tag></tag></tag>
16701 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16705 Parser hook: basic arguments
16707 <tag width="200" height="100" depth="50" square=""></tag>
16720 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16723 ## Don't expect parsoid to rt this form.
16725 Parser hook: basic arguments, variations
16727 parsoid=wt2html,html2html
16729 <tag width=200 height = "100" depth = '50' square></tag>
16742 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16746 Parser hook: argument containing a forward slash (bug 5344)
16748 <tag filename="/tmp/bla"></tag>
16753 'filename' => '/tmp/bla',
16758 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16761 ## Don't expect parsoid to rt this form.
16763 Parser hook: empty input using terminated empty elements (bug 2374)
16765 parsoid=wt2html,html2html
16777 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16780 ## </tag> should be output literally since there is no matching tag that begins it
16781 ## Don't expect parsoid to rt this form.
16783 Parser hook: basic arguments using terminated empty elements (bug 2374)
16787 <tag width=200 height = "100" depth = '50' square/>
16804 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":null}' about="#mwt2"></pre><p>other stuff
16808 ## Don't expect parsoid to rt this form.
16810 Parser hook: Don't allow unclosed extension tags
16816 this is a '''test'''
16818 <p>test <tag>123
16819 </p><p>this is a <b>test</b>
16822 <p>test <tag>123</p>
16824 <p>this is a <b>test</b></p>
16828 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16832 Parser hook: static parser hook not inside a comment
16834 <statictag>hello, world</statictag>
16836 <statictag action="flush" />
16842 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16843 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
16847 Parser hook: static parser hook inside a comment
16849 <!-- <statictag>hello, world</statictag> -->
16850 <statictag action="flush" />
16855 <!-- <statictag>hello, world</statictag> -->
16856 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
16859 # Nested template calls; this case was broken by Parser.php rev 1.506,
16863 Template:One-parameter
16865 (My parameter is: {{{1}}})
16869 Template:Map-one-parameter
16871 {{{{{1}}}|{{{2}}}}}
16875 Nested template calls
16877 {{Map-one-parameter|One-parameter|param}}
16879 <p>(My parameter is: param)
16888 # HTML+Tidy effectively strips out the empty tags completely
16889 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16890 # which Tidy would have done for the PHP parser had there been content inside it.
16892 Sanitizer: Closing of open tags
16894 <s></s><table></table>
16896 <s></s><table></table>
16899 <p><s></s></p><table></table>
16903 Sanitizer: Closing of open but not closed tags
16912 Sanitizer: Closing of closed but not open tags
16922 Sanitizer: Closing of closed but not open table tags
16926 Table not started</td></tr></table>
16928 <p>Table not started</p>
16930 <p>Table not started</p>
16934 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16936 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16938 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16942 # In HTML5, the restrictions are that id must contain at least one character,
16943 # and must not contain any space characters.
16945 Sanitizer: Validating the contents of the id attribute (bug 4515)
16949 <br id="" /><br id="a space" />
16954 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16956 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16960 <br id="foo" /><br id="foo" />
16962 Something need to be done. foo-2 ?
16966 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16969 <meta itemprop="hello" content="world">
16970 <meta http-equiv="refresh" content="5">
16971 <meta itemprop="hello" http-equiv="refresh" content="5">
16972 <link itemprop="hello" href="{{SERVER}}">
16973 <link rel="stylesheet" href="{{SERVER}}">
16974 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16978 <p> <meta itemprop="hello" content="world" />
16979 <meta http-equiv="refresh" content="5">
16980 <meta itemprop="hello" content="5" />
16982 <link itemprop="hello" href="http://example.org" />
16983 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16984 <link itemprop="hello" href="http://example.org" />
16990 Language converter: output gets cut off unexpectedly (bug 5757)
16994 this bit is safe: }-
16996 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16998 then we get cut off here: }-
17000 all additional text is vanished
17002 <p>this bit is safe: }-
17003 </p><p>but if we add a conversion instance: xxx
17004 </p><p>then we get cut off here: }-
17005 </p><p>all additional text is vanished
17010 Self closed html pairs (bug 5487)
17013 <center><font id="bug" />Centered text</center>
17014 <div><font id="bug2" />In div text</div>
17016 <center><font id="bug" />Centered text</center>
17017 <div><font id="bug2" />In div text</div>
17026 Punctuation: nbsp before exclamation
17030 <p>C'est grave !
17035 Punctuation: CSS !important (bug 11874)
17037 <div style="width:50% !important">important</div>
17039 <div style="width:50% !important">important</div>
17044 Punctuation: CSS ! important (bug 11874; with space after)
17046 <div style="width:50% ! important">important</div>
17048 <div style="width:50% ! important">important</div>
17053 HTML bullet list, closed tags (bug 5497)
17066 <ul data-parsoid='{"stx":"html"}'>
17067 <li data-parsoid='{"stx":"html"}'>One</li>
17068 <li data-parsoid='{"stx":"html"}'>Two</li>
17074 HTML bullet list, unclosed tags (bug 5497)
17086 <ul data-parsoid='{"stx":"html"}'>
17087 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17088 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17094 HTML ordered list, closed tags (bug 5497)
17107 <ol data-parsoid='{"stx":"html"}'>
17108 <li data-parsoid='{"stx":"html"}'>One</li>
17109 <li data-parsoid='{"stx":"html"}'>Two</li>
17115 HTML ordered list, unclosed tags (bug 5497)
17128 <ol data-parsoid='{"stx":"html"}'>
17129 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17130 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17136 HTML nested bullet list, closed tags (bug 5497)
17159 <ul data-parsoid='{"stx":"html"}'>
17160 <li data-parsoid='{"stx":"html"}'>One</li>
17161 <li data-parsoid='{"stx":"html"}'>Two:
17162 <ul data-parsoid='{"stx":"html"}'>
17163 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17164 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17171 HTML nested bullet list, open tags (bug 5497)
17208 HTML nested ordered list, closed tags (bug 5497)
17233 HTML nested ordered list, open tags (bug 5497)
17270 HTML ordered list item with parameters oddity
17272 <ol><li id="fragment">One</li>
17275 <ol><li id="fragment">One</li>
17280 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17282 bug 5918: autonumbering
17284 [http://first/] [http://second] [ftp://ftp]
17288 [mailto:enclosed@mail.tld With target]
17290 [mailto:enclosed@mail.tld]
17292 mailto:inline@mail.tld
17294 <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>
17295 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17296 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17297 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17298 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17301 <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>
17302 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17303 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17304 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17305 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17310 # Security and HTML correctness
17311 # From Nick Jenkins' fuzz testing
17315 Fuzz testing: Parser13
17330 Fuzz testing: Parser14
17335 <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>
17336 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17338 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17344 <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>
17346 <div id="toc" class="toc">
17347 <div id="toctitle">
17351 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17358 Fuzz testing: Parser14-table
17360 parsoid=wt2html,html2html
17365 <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>
17366 <table style="__TOC__">
17371 <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>
17372 <table style="__TOC__">
17379 <table style="__TOC__"></table>
17382 # Known to produce bogus xml (extra </td>)
17384 Fuzz testing: Parser16
17411 Fuzz testing: Parser21
17414 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17419 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17429 Fuzz testing: Parser22
17431 http://===r:::https://b
17435 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17443 # Known to produce bad XML for now
17445 Fuzz testing: Parser24
17450 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17451 <br style="onmouseover='alert(document.cookie);' " />
17453 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17458 <u class="|">}}}} >
17459 <br style="onmouseover='alert(document.cookie);'" />
17461 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17470 # Note: the current result listed for this is not what the original one was,
17471 # but the original bug was JavaScript injection, which is fixed in any case.
17472 # It's not clear that the original result listed was any more correct than the
17473 # current one. Original result:
17476 # <li class="||">
17477 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17479 Fuzz testing: Parser25 (bug 6055)
17485 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17487 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17492 Fuzz testing: URL adjacent extension (with space, clean)
17494 http://example.com <nowiki>junk</nowiki>
17496 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17499 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17503 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17505 http://example.com<nowiki>junk</nowiki>
17507 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17510 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17514 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17516 http://example.com<pre>junk</pre>
17518 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17521 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17526 <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>
17530 Fuzz testing: image with bogus manual thumbnail
17532 [[Image:foobar.jpg|thumbnail= ]]
17534 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17537 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' data-mw='{"errors":[{"key":"missing-thumbnail","message":"This thumbnail does not exist.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
17541 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17543 <pre dir=" "></pre>
17545 <pre dir=" "></pre>
17550 Parsing optional HTML elements (Bug 6171)
17555 <td> Some tabular data</td>
17556 <td> More tabular data ...
17557 <td> And yet som tabular data</td>
17563 <td> Some tabular data</td>
17564 <td> More tabular data ...
17565 </td><td> And yet som tabular data</td>
17572 Correct handling of <td>, <tr> (Bug 6171)
17577 <td> Some tabular data</td>
17578 <td> More tabular data ...</td>
17579 <td> And yet som tabular data</td>
17585 <td> Some tabular data</td>
17586 <td> More tabular data ...</td>
17587 <td> And yet som tabular data</td>
17595 Parsing crashing regression (fr:JavaScript)
17599 <p></body></x>
17604 Inline wiki vs wiki block nesting
17610 <p><b>Bold paragraph</b>
17611 </p><p>New wiki paragraph
17615 # FIXME: The current php output is documented
17616 # and desired output is the parsoid target.
17618 Inline HTML vs wiki block nesting
17624 <p><b>Bold paragraph
17625 </p><p>New wiki paragraph</b>
17628 <p><b>Bold paragraph</b>
17629 </p><p>New wiki paragraph
17633 # Original result was this:
17634 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17636 # While that might be marginally more intuitive, maybe, the six-apostrophe
17637 # construct is clearly pathological and the result stated here (which is what
17638 # the parser actually does) is about as reasonable as anything.
17640 Mixing markup for italics and bold
17643 '''bold''''''bold''bolditalics'''''
17645 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17653 Article for special page transclusion test
17657 Special page transclusion
17660 {{Special:Prefixindex/Xyzzyx}}
17662 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17668 Special page transclusion twice (bug 5021)
17671 {{Special:Prefixindex/Xyzzyx}}
17672 {{Special:Prefixindex/Xyzzyx}}
17674 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17676 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17682 Transclusion of default MediaWiki message
17684 {{MediaWiki:Mainpage}}
17691 Transclusion of nonexistent MediaWiki message
17693 {{MediaWiki:Mainpagexxx}}
17695 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17700 Transclusion of MediaWiki message with underscore
17702 {{MediaWiki:history_short}}
17709 Transclusion of MediaWiki message with space
17711 {{MediaWiki:history short}}
17718 Invalid header with following text
17728 Section extraction test (section 0)
17748 Section extraction test (section 1)
17770 Section extraction test (section 2)
17791 Section extraction test (section 3)
17811 Section extraction test (section 4)
17835 Section extraction test (section 5)
17855 Section extraction test (section 6)
17876 Section extraction test (section 7)
17896 Section extraction test (section 8)
17916 Section extraction test (section 9)
17937 Section extraction test (section 10)
17957 Section extraction test (nonexistent section 11)
17976 Section extraction test with bogus heading (section 1)
17981 ==bogus== not a legal section
17985 ==bogus== not a legal section
17989 Section extraction test with bogus heading (section 2)
17994 ==bogus== not a legal section
18001 Section extraction test with comment after heading (section 1)
18013 Section extraction test with comment after heading (section 2)
18025 Section extraction test with bogus <nowiki> heading (section 1)
18030 ==bogus== <nowiki>not a legal section</nowiki>
18034 ==bogus== <nowiki>not a legal section</nowiki>
18038 Section extraction test with bogus <nowiki> heading (section 2)
18043 ==bogus== <nowiki>not a legal section</nowiki>
18049 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
18050 # instead of respecting commented sections
18052 Section extraction prefixed by comment (section 1)
18063 Section extraction prefixed by comment (section 2)
18073 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
18074 # instead of respecting HTML-style headings
18076 Section extraction, mixed wiki and html (section 1)
18092 Section extraction, mixed wiki and html (section 2)
18108 # Formerly testing for bug 3342
18110 Section extraction, heading surrounded by <noinclude>
18114 <noinclude>==unmarked==</noinclude>
18120 # Test behavior of bug 19910
18122 Sectiion with all-equals
18127 The line above must have a trailing space
18130 But just in case it doesn't...
18134 But just in case it doesn't...
18138 Section replacement test (section 0)
18169 Section replacement test (section 1)
18198 Section replacement test (section 2)
18228 Section replacement test (section 3)
18259 Section replacement test (section 4)
18286 Section replacement test (section 5)
18317 Section replacement test (section 6)
18347 Section replacement test (section 7)
18378 Section replacement test (section 8)
18409 Section replacement test (section 9)
18438 Section replacement test (section 10)
18468 Section replacement test with initial whitespace (bug 13728)
18472 Preformatted initial line
18476 Preformatted initial line
18483 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18495 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18508 Section extraction, <pre> around bogus header (bug 10309)
18525 Section replacement, <pre> around bogus header (bug 10309)
18547 Handling of 
 in URLs
18551 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18554 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18556 a</a></li></ul></li></ul>
18560 Handling of %0A in URLs
18564 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18567 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18571 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18573 5 quotes, code coverage +1 line
18580 <p><b><i></i></b></p>
18583 # same html as previous, but wikitext adjusted to match parsoid html2wt
18584 # note that wt2html and html2html will put the <i> before the <b>
18586 5 quotes, code coverage +1 line w/ nowiki (1)
18588 parsoid=wt2wt,html2wt
18590 '''''<nowiki/>'''''
18595 <p><b><i></i></b></p>
18598 # same as previous, just swapping the <i> and <b>
18600 5 quotes, code coverage +1 line w/ nowiki (2)
18602 '''''<nowiki/>'''''
18607 <p><i><b></b></i></p>
18611 Special:Search page linking.
18615 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18620 {{!}} is a magic word
18622 {{!}} is a magic word there and {{!}} is still a magic word here
18623 | is not a magic word here but {{!}} is still a magic word here
18625 <p>| is a magic word there and | is still a magic word here
18626 | is not a magic word here but | is still a magic word here
18629 <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
18630 | 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>
18637 title=[[Parser test]]
18642 * {{FULLPAGENAMEE}}
18644 * {{BASEPAGENAMEE}}
18648 * {{ROOTPAGENAMEE}}
18650 * {{TALKPAGENAMEE}}
18651 * {{SUBJECTPAGENAME}}
18652 * {{SUBJECTPAGENAMEE}}
18655 * {{NAMESPACENUMBER}}
18659 * {{SUBJECTSPACEE}}
18660 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18662 <ul><li> Parser test</li>
18663 <li> Parser_test</li>
18664 <li> Parser test</li>
18665 <li> Parser_test</li>
18666 <li> Parser test</li>
18667 <li> Parser_test</li>
18668 <li> Parser test</li>
18669 <li> Parser_test</li>
18670 <li> Parser test</li>
18671 <li> Parser_test</li>
18672 <li> Talk:Parser test</li>
18673 <li> Talk:Parser_test</li>
18674 <li> Parser test</li>
18675 <li> Parser_test</li>
18683 <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>
18686 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18696 image4 |300px| centre
18697 image5.svg| http://///////
18702 <ul class="gallery mw-gallery-traditional">
18703 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18704 <div class="thumb" style="height: 150px;">Image1.png</div>
18705 <div class="gallerytext">
18708 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18709 <div class="thumb" style="height: 150px;">Image2.gif</div>
18710 <div class="gallerytext">
18713 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18714 <div class="thumb" style="height: 150px;">Image3</div>
18715 <div class="gallerytext">
18718 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18719 <div class="thumb" style="height: 150px;">Image4</div>
18720 <div class="gallerytext">
18725 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18726 <div class="thumb" style="height: 150px;">Image5.svg</div>
18727 <div class="gallerytext">
18728 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18732 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18733 <div class="thumb" style="height: 150px;">* image6</div>
18734 <div class="gallerytext">
18742 Gallery (with options)
18744 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18745 File:Nonexistent.jpg|caption
18746 File:Nonexistent.jpg
18747 image:foobar.jpg|some '''caption''' [[Main Page]]
18749 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18752 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18753 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18754 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18755 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18756 <div class="gallerytext">
18761 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18762 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18763 <div class="gallerytext">
18766 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18767 <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>
18768 <div class="gallerytext">
18769 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18773 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18774 <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>
18775 <div class="gallerytext">
18778 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18779 <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>
18780 <div class="gallerytext">
18790 Gallery with link that has fragment
18793 image:foobar.jpg|link=Main_Page
18794 image:foobar.jpg|link=Main_Page#section
18795 image:foobar.jpg|link=Main Page#section|caption
18798 <ul class="gallery mw-gallery-traditional">
18799 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18800 <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>
18801 <div class="gallerytext">
18804 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18805 <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>
18806 <div class="gallerytext">
18809 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18810 <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>
18811 <div class="gallerytext">
18821 Gallery with wikitext inside caption
18824 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18825 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18828 <ul class="gallery mw-gallery-traditional">
18829 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18830 <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>
18831 <div class="gallerytext">
18832 <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>
18836 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18837 <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>
18838 <div class="gallerytext">
18839 <p>This is a test template
18848 gallery (with showfilename option)
18850 <gallery showfilename>
18851 File:Nonexistent.jpg|caption
18852 File:Nonexistent.jpg
18853 image:foobar.jpg|some '''caption''' [[Main Page]]
18857 <ul class="gallery mw-gallery-traditional">
18858 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18859 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18860 <div class="gallerytext">
18861 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
18866 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18867 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18868 <div class="gallerytext">
18869 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
18873 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18874 <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>
18875 <div class="gallerytext">
18876 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
18877 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18881 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18882 <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>
18883 <div class="gallerytext">
18884 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
18893 Gallery (with namespace-less filenames)
18896 File:Nonexistent.jpg
18902 <ul class="gallery mw-gallery-traditional">
18903 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18904 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18905 <div class="gallerytext">
18908 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18909 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18910 <div class="gallerytext">
18913 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18914 <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>
18915 <div class="gallerytext">
18918 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18919 <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>
18920 <div class="gallerytext">
18928 HTML Hex character encoding (spells the word "JavaScript")
18930 parsoid=wt2html,wt2wt,html2html
18932 JavaScript
18934 <p>JavaScript
18939 <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>
18943 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18947 <p>&#xsee;&#XSEE;
18950 <p>&#xsee;&#XSEE;</p>
18954 HTML Hex character encoding mixed case
18956 parsoid=wt2html,wt2wt,html2html
18965 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18968 # See: http://www.w3.org/TR/html5/syntax.html#character-references
18969 # Note that U+000C (form feed) is not a valid XML character, so
18970 # it is banned even though allowed in HTML5.
18972 Illegal character references (T106578)
18977 ; Control (low): 
18978 ; Control (high):  Ÿ
18979 ; Surrogate: ��
18980 ; This is an okay astral character: 💩
18989 <dt>Control (low)</dt>
18991 <dt>Control (high)</dt>
18992 <dd>&#x7F; &#x9F;</dd>
18994 <dd>&#xD83D;&#xDCA9;</dd>
18995 <dt>This is an okay astral character</dt>
19001 __FORCETOC__ override
19013 ISBN 978-0-1234-56 789
19015 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19018 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19020 <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>
19024 ISBN followed by 5 spaces
19035 ISBN ISBN 1234567890
19037 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19040 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19043 # Uppercase X and lowercase x as well
19054 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19055 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19056 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19057 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19058 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19059 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19062 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19063 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19064 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19065 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19066 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19067 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19071 ISBN with empty prefix (parsoid test)
19075 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19078 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19082 Bug 22905: <abbr> followed by ISBN followed by </a>
19084 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19086 <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>
19089 <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>
19097 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19102 Double RFC with a wiki link
19106 <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>
19115 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19118 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19122 Centre-aligned image
19124 [[Image:foobar.jpg|centre]]
19126 <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>
19133 [[Image:foobar.jpg|none]]
19135 <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>
19140 Width + Height sized image (using px) (height is ignored)
19142 [[Image:foobar.jpg|640x480px]]
19144 <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>
19149 Width-sized image (using px, no following whitespace)
19151 [[Image:foobar.jpg|640px]]
19153 <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>
19158 Width-sized image (using px, with following whitespace - test regression from r39467)
19160 [[Image:foobar.jpg|640px ]]
19162 <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>
19167 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19169 [[Image:foobar.jpg| 640px]]
19171 <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>
19176 Image with page parameter
19180 [[File:LoremIpsum.djvu|page=2]]
19182 <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>
19185 <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>
19189 Another italics / bold test
19197 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19203 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19206 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19211 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19213 Images with the "|" character in the comment
19215 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19217 <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>
19220 <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>
19224 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19226 <html><script>alert(1);</script></html>
19228 <p><html><script>alert(1);</script></html>
19233 HTML with raw HTML ($wgRawHtml==true)
19237 <html><script>alert(1);</script></html>
19239 <p><script>alert(1);</script>
19244 Parents of subpages, one level up
19246 subpage title=[[Subpage test/L1/L2/L3]]
19250 <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>
19256 Parents of subpages, one level up, not named
19258 subpage title=[[Subpage test/L1/L2/L3]]
19262 <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>
19269 Parents of subpages, two levels up
19271 subpage title=[[Subpage test/L1/L2/L3]]
19277 <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
19278 </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>
19283 Parents of subpages, two levels up, without trailing slash or name.
19285 subpage title=[[Subpage test/L1/L2/L3]]
19294 Parents of subpages, two levels up, with lots of extra trailing slashes.
19296 subpage title=[[Subpage test/L1/L2/L3]]
19300 <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>
19305 Subpage test/L1/L2/L3Sibling
19311 Transclusion of a sibling page (one level up)
19313 subpage title=[[Subpage test/L1/L2/L3]]
19322 Transclusion of a child page
19324 subpage title=[[Subpage test/L1/L2]]
19333 Non-transclusion because of too many up levels
19335 subpage title=[[Subpage test/L1/L2/L3]]
19337 {{../../../../More than parent}}
19339 <p>{{../../../../More than parent}}
19344 Definition list code coverage
19350 <dl><dt> title  </dt>
19352 <dt> title </dt>
19358 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19359 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19360 <dt>title</dt><dd> def</dd></dl>
19364 Don't fall for the self-closing div
19366 <div>hello world</div/>
19368 <div>hello world</div>
19377 <p>[[:Template:Msg]]
19386 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19390 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19392 Always escape literal '>' in output, not just after '<'
19406 <p>This is a test template
19407 This is a test template
19419 Inclusion of !userCanEdit() content
19423 <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>
19429 Out-of-order TOC heading levels
19438 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19440 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19442 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19443 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19446 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19448 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19449 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19455 <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>
19456 <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>
19457 <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>
19458 <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>
19459 <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>
19460 <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>
19466 ISBN with a dummy number
19476 ISBN with space-delimited number
19480 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19486 ISBN with multiple spaces, no number
19505 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19506 </p><p>ISBN 12345678901
19512 ISBN with trailing year (bug 8110)
19514 ISBN 1-234-56789-0 - 2006
19516 ISBN 1 234 56789 0 - 2006
19518 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19519 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19527 {{anchorencode:foo bar©#%n}}
19529 <p>foo_bar.C2.A9.23.25n
19534 anchorencode trims spaces
19536 {{anchorencode: __pretty__please__}}
19543 anchorencode deals with links
19545 {{anchorencode: [[hello|world]] [[hi]]}}
19552 anchorencode deals with templates
19554 {{anchorencode: {{Foo}} }}
19561 anchorencode encodes like the TOC generator: (bug 18431)
19563 === _ +:.3A%3A&&]] ===
19564 {{anchorencode: _ +:.3A%3A&&]] }}
19567 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19568 <p>.2B:.3A.253A.26.26.5D.5D
19573 Bug 6200: blockquotes and paragraph formatting
19594 Bug 8293: Use of center tag ruins paragraph formatting
19615 Parsing of overlapping (improperly nested) inline html tags
19617 <span><s>x</span></s>
19619 <p><span><s>x</span></s></span>
19622 <p><span><s>x</s></span>
19627 ### Language variants related tests
19630 Self-link in language variants
19632 title=[[Dunav]] language=sr
19634 Both [[Dunav]] and [[Дунав]] are names for this river.
19636 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19647 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19649 title=[[Duna]] language=sr
19651 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19653 <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.
19658 Link to a section of a variant of this title shouldn't be parsed as self-link
19660 title=[[Duna]] language=sr
19662 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19664 <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.
19669 Link to pages in language variants
19673 Main Page can be written as [[Маин Паге]]
19675 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19681 Multiple links to pages in language variants
19685 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19687 <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>.
19693 Simple template in language variants
19699 <p>This is a test template
19705 Template with explicit namespace in language variants
19711 <p>This is a test template
19717 Basic test for template parameter in language variants
19721 {{парамтест|param=foo}}
19723 <p>This is a test template with parameter foo
19729 Simple category in language variants
19733 [[Category:МедиаWики Усер'с Гуиде]]
19735 <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>
19751 ## We used to, but no longer wt2wt this test since the default serializer
19752 ## will normalize all categories to serialize on their own line.
19753 ## This wikitext usage is going to be fairly uncommon in production and
19754 ## selser will take care of preserving formatting in those scenarios.
19756 Don't convert blue categorylinks to another variant (bug 33210)
19762 [[A]][[Category:分类]]
19764 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
19766 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19767 <link rel="mw:PageProp/Category" href="Category:分类"/>
19771 Stripping -{}- tags (language variants)
19775 Latin proverb: -{Ne nuntium necare}-
19777 <p>Latin proverb: Ne nuntium necare
19783 Prevent conversion with -{}- tags (language variants)
19785 language=sr variant=sr-ec
19787 Latinski: -{Ne nuntium necare}-
19789 <p>Латински: Ne nuntium necare
19795 Prevent conversion of text with -{}- tags (language variants)
19797 language=sr variant=sr-ec
19799 Latinski: -{Ne nuntium necare}-
19801 <p>Латински: Ne nuntium necare
19807 Prevent conversion of links with -{}- tags (language variants)
19809 language=sr variant=sr-ec
19813 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19819 -{}- tags within headlines (within html for parserConvert())
19821 language=sr variant=sr-ec
19825 <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>
19831 Explicit definition of language variant alternatives
19833 language=zh variant=zh-tw
19835 -{zh:China;zh-tw:Taiwan}-, not China
19837 <p>Taiwan, not China
19843 Conversion around HTML tags
19845 language=sr variant=sr-ec
19847 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19848 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19851 <span title="ЛаCтин">ски</span>
19857 Explicit session-wise language variant mapping (A flag and - flag)
19859 language=zh variant=zh-tw
19861 Taiwan is not China.
19862 But -{A|zh:China;zh-tw:Taiwan}- is China,
19863 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19864 and -{China}- is China.
19866 <p>Taiwan is not China.
19867 But Taiwan is Taiwan,
19868 (This should be stripped!)
19869 and China is China.
19874 Explicit session-wise language variant mapping (H flag for hide)
19876 language=zh variant=zh-tw
19878 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19881 <p>(This should be stripped!)
19887 Adding explicit conversion rule for title (T flag)
19889 language=zh variant=zh-tw showtitle
19891 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19894 <p>Should be stripped!
19899 Testing that changing the language variant here in the tests actually works
19901 language=zh variant=zh showtitle
19903 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19906 <p>Should be stripped!
19911 Recursive conversion of alt and title attrs shouldn't clear converter state
19913 language=zh variant=zh-cn showtitle
19915 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19916 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19920 Should be stripped<span title="Exclamation">!</span>
19925 Bug 24072: more test on conversion rule for title
19927 language=zh variant=zh-tw showtitle
19929 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19930 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19933 <p>This should be stripped!
19934 This won't take interferes with the title rule.
19939 Partly disable title conversion if variant == main language code
19941 language=zh variant=zh title=[[ZH]] showtitle
19943 -{T|zh-cn:CN;zh-tw:TW}-
19951 Partly disable title conversion if variant == main language code, more
19953 language=zh variant=zh title=[[ZH]] showtitle
19963 Raw output of variant escape tags (R flag)
19965 language=zh variant=zh-tw
19967 Raw: -{R|zh:China;zh-tw:Taiwan}-
19969 <p>Raw: zh:China;zh-tw:Taiwan
19974 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19976 language=zh variant=zh-cn
19978 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19985 Conversion rules from [numeric-only string] to [something else] (T48634)
19987 language=zh variant=zh-cn
19989 -{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
19996 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19998 language=zh variant=zh-cn
20000 -{H|zh-cn:foo;zh-tw:;}-foobar
20007 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20009 language=zh variant=zh-cn
20011 -{H|=>zh-cn:foo;}-foobar
20018 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20020 language=zh variant=zh-cn
20029 Nested using of manual convert syntax
20031 language=zh variant=zh-hk
20033 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20035 <p>Nested: Hello Hong Kong!
20040 Proper conversion of text in external links
20042 language=sr variant=sr-ec
20044 http://www.google.com
20045 gopher://www.google.com
20046 [http://www.google.com http://www.google.com]
20047 [gopher://www.google.com gopher://www.google.com]
20048 [https://www.google.com irc://www.google.com]
20049 [ftp://www.google.com www.google.com/ftp://dir]
20050 [//www.google.com www.google.com]
20052 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20053 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20054 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20055 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20056 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20057 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20058 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20063 Do not convert roman numbers to language variants
20065 language=sr variant=sr-ec
20069 <p>Фридрих IV је цар.
20074 Unclosed language converter markup "-{"
20085 Don't convert raw rule "-{R|=>}-" to "=>"
20096 Don't break link parsing if language converter markup is in the caption.
20098 language=sr variant=sr-ec
20100 [[Main Page|-{R|main page}-]]
20102 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20106 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20108 Don't break image parsing if language converter markup is in the caption.
20112 [[File:Foobar.jpg|-{R|caption}-]]
20114 <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>
20118 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20120 Don't break list handling if language converter markup is in the item.
20122 language=zh variant=zh-cn
20124 ;-{zh-cn:AAA;zh-tw:BBB}-
20126 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
20133 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20135 Don't break table handling if language converter markup is in the cell.
20137 language=sr variant=sr-ec
20160 Bug 529: Uncovered bullet
20169 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20170 # Templates in Wikipedia rely on this behavior, as tidy has always been
20171 # enabled there. These tests are normally run *without* tidy, so specify the
20172 # full output here.
20173 # To test realistic parsing behavior, apply a tidy-like transformation to both
20174 # the expected output and your parser's output.
20176 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
20178 ******* Foo {{bullet}}
20180 <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>
20186 Bug 529: Uncovered table already at line-start
20209 Bug 529: Uncovered bullet in parser function result
20211 * Foo {{lc:{{bullet}} }}
20219 Bug 5678: Double-parsed template argument
20221 {{lc:{{{1}}}|hello}}
20228 Bug 5678: Double-parsed template invocation
20230 {{lc:{{paramtest {{!}} param = hello }} }}
20232 <p>{{paramtest | param = hello }}
20237 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20240 title=[[Main Page]]
20242 {{PRVNÍVELKÉ:ěščř}}
20243 {{prvnívelké:ěščř}}
20263 Morwen/13: Unclosed link followed by heading
20270 <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>
20275 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20282 <h1><span class="mw-headline" id="heading">heading</span></h1>
20287 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20294 <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>
20309 Paragraphs inside divs (no extra line breaks)
20321 Paragraphs inside divs (extra line break on open)
20336 Paragraphs inside divs (extra line break on close)
20351 Paragraphs inside divs (extra line break on open and close)
20368 Nesting tags, paragraphs on lines which begin with <div>
20370 <div></div><strong>A
20373 <p><strong>A</strong></p>
20374 <p><strong>B</strong></p>
20382 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20384 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20386 <blockquote>Line one
20388 Line two</blockquote>
20390 <blockquote>Line one
20391 Line two</blockquote>
20395 <p>Line one Line two</p>
20400 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20405 Line two</blockquote>
20410 Line two</blockquote>
20415 Line two</blockquote>
20419 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20421 <blockquote>Line one
20426 <blockquote>Line one
20439 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20461 Paragraphs inside blockquotes/divs (no extra line breaks)
20463 <blockquote><div>Line one
20465 Line two</div></blockquote>
20467 <blockquote><div>Line one
20468 Line two</div></blockquote>
20473 Paragraphs inside blockquotes/divs (extra line break on open)
20478 Line two</div></blockquote>
20483 Line two</div></blockquote>
20488 Paragraphs inside blockquotes/divs (extra line break on close)
20490 <blockquote><div>Line one
20493 </div></blockquote>
20495 <blockquote><div>Line one
20498 </div></blockquote>
20503 Paragraphs inside blockquotes/divs (extra line break on open and close)
20509 </div></blockquote>
20515 </div></blockquote>
20520 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20522 wgLinkHolderBatchSize=0
20528 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20529 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20530 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20535 Free external link invading image caption
20537 [[Image:Foobar.jpg|thumb|http://x|hello]]
20539 <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>
20544 Bug 15196: localised external link numbers
20548 [http://en.wikipedia.org/]
20550 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20553 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20557 Multibyte character in padleft
20559 {{padleft:-Hello|7|Æ}}
20566 Multibyte character in padright
20568 {{padright:Hello-|7|Æ}}
20575 formatdate parser function
20577 {{#formatdate:2009-03-24}}
20579 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20584 formatdate parser function, with default format
20586 {{#formatdate:2009-03-24|mdy}}
20588 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20593 Spacing of numbers in formatted dates
20595 {{#formatdate:January 15}}
20597 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20602 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
20604 language=nl title=[[MediaWiki:Common.css]]
20606 {{#formatdate:2009-03-24|dmy}}
20608 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20621 Edit comment with link
20625 I like the [[Main Page]] a lot
20627 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20631 Edit comment with link and link text
20635 I like the [[Main Page|best pages]] a lot
20637 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20641 Edit comment with link and link text with suffix
20645 I like the [[Main Page|best page]]s a lot
20647 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20651 Edit comment with section link (non-local, eg in history list)
20653 comment title=[[Main Page]]
20655 /* External links */ removed bogus entries
20657 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20661 Edit comment with section link and text before it (non-local, eg in history list)
20663 comment title=[[Main Page]]
20665 pre-comment text /* External links */ removed bogus entries
20667 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>
20671 Edit comment with section link (local, eg in diff view)
20673 comment local title=[[Main Page]]
20675 /* External links */ removed bogus entries
20677 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20681 Edit comment with subpage link (bug 14080)
20685 title=[[Subpage test]]
20687 Poked at a [[/subpage]] here...
20689 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20693 Edit comment with subpage link and link text (bug 14080)
20697 title=[[Subpage test]]
20699 Poked at a [[/subpage|neat little page]] here...
20701 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20705 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20708 title=[[Subpage test]]
20710 Poked at a [[/subpage]] here...
20712 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20716 Edit comment with bare anchor link (local, as on diff)
20720 title=[[Main Page]]
20724 <a href="#section">#section</a>
20728 Edit comment with bare anchor link (non-local, as on history)
20731 title=[[Main Page]]
20735 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20739 Anchor starting with underscore
20745 <p><a href="#_ref">One</a>
20748 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20752 Id starting with underscore
20754 <div id="_ref"></div>
20756 <div id="_ref"></div>
20761 Space normalisation on autocomment (bug 22784)
20764 title=[[Main Page]]
20766 /* __hello__world__ */
20768 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20772 percent-encoding and + signs in comments (Bug 26410)
20776 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20778 <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>
20781 # Parsoid doesn't support this yet: see bug 73581
20782 # but it *should* omit the 'src' attribute if the image is bad.
20783 # PHP side of tests was disabled in
20784 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20785 # because of issues in the PHP parserTests infrastructure
20786 # (but the output below is indeed what the PHP side emits)
20788 Bad images - basic functionality
20791 !! DISABLED/html/php
20793 <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>
20797 Bad images - bug 16039: text after bad image disappears
20802 !! DISABLED/html/php
20808 <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>
20813 Verify that displaytitle works (bug #22501) no displaytitle
20817 wgAllowDisplayTitle=true
20818 wgRestrictDisplayTitle=false
20820 this is not the the title
20823 <p>this is not the the title
20828 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20833 wgAllowDisplayTitle=true
20834 wgRestrictDisplayTitle=false
20836 this is not the the title
20837 {{DISPLAYTITLE:whatever}}
20840 <p>this is not the the title
20845 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20850 wgAllowDisplayTitle=true
20851 wgRestrictDisplayTitle=true
20853 this is not the the title
20854 {{DISPLAYTITLE:whatever}}
20857 <p>this is not the the title
20862 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20867 wgAllowDisplayTitle=true
20868 wgRestrictDisplayTitle=true
20870 this is not the the title
20871 {{DISPLAYTITLE:screen}}
20874 <p>this is not the the title
20879 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20884 wgAllowDisplayTitle=false
20886 this is not the the title
20887 {{DISPLAYTITLE:screen}}
20890 <p>this is not the the title
20891 <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>
20896 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20901 wgAllowDisplayTitle=false
20903 this is not the the title
20906 <p>this is not the the title
20911 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20916 wgAllowDisplayTitle=true
20917 wgRestrictDisplayTitle=true
20919 this is not the the title
20920 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20922 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20923 <p>this is not the the title
20928 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20933 wgAllowDisplayTitle=true
20934 wgRestrictDisplayTitle=true
20936 this is not the the title
20937 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20939 <span style="color: red;">s</span>creen
20940 <p>this is not the the title
20945 Page status indicators: Empty name is invalid
20949 <indicator name=" "></indicator>
20950 <indicator></indicator>
20952 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20953 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20958 Page status indicators: Weird syntaxes that are okay
20962 <indicator name="empty" />
20963 <indicator name="name"></indicator>
20972 Page status indicators: Torture test
20976 <indicator name="01">hello world</indicator>
20977 <indicator name="02">[[Main Page]]</indicator>
20978 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20979 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20980 <indicator name="05">* foo
20982 <indicator name="06"><nowiki>foo</nowiki></indicator>
20983 <indicator name="07"> Preformatted</indicator>
20984 <indicator name="08"><div>Broken tag</indicator>
20985 <indicator name="09">{| class=wikitable
20988 <indicator name="10">Two
20990 paragraphs</indicator>
20993 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20994 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" />
20995 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>
20996 05=<ul><li> foo</li>
21000 07=<pre>Preformatted
21002 08=<div>Broken tag</div>
21004 09=<table class="wikitable">
21021 preload: check <noinclude> and <includeonly>
21025 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21031 preload: check <onlyinclude>
21035 Goodbye <onlyinclude>Hello world</onlyinclude>
21041 preload: can pass tags through if we want to
21045 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21047 <includeonly>Hello world</includeonly>
21051 preload: check that it doesn't try to do tricks
21055 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21057 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21061 Play a bit with r67090 and bug 3158
21063 <div style="width:50% !important"> </div>
21064 <div style="width:50% !important"> </div>
21065 <div style="width:50% !important"> </div>
21066 <div style="border : solid;"> </div>
21068 <div style="width:50% !important"> </div>
21069 <div style="width:50% !important"> </div>
21070 <div style="width:50% !important"> </div>
21071 <div style="border : solid;"> </div>
21074 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21075 <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>
21076 <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>
21077 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21082 HTML5 data attributes
21084 <span data-foo="bar">Baz</span>
21085 <p data-abc-def_hij="">Quuz</p>
21087 <p><span data-foo="bar">Baz</span>
21089 <p data-abc-def_hij="">Quuz</p>
21092 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21093 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21097 Strip reserved data attributes
21099 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21101 <div data-ok="fred">d</div>
21104 <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>
21108 percent-encoding and + signs in internal links (Bug 26410)
21110 [[User:+%]] [[Page+title%]]
21111 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21112 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21113 [[%33%45]] [[%33%45+]]
21115 <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>
21116 <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>
21117 <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>
21118 <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>
21121 <p><a rel="mw:WikiLink" href="./User:+%25" title="User:+%" data-parsoid='{"stx":"simple","a":{"href":"./User:+%25"},"sa":{"href":"User:+%"}}'>User:+%</a> <a rel="mw:WikiLink" href="./Page+title%25" title="Page+title%" data-parsoid='{"stx":"simple","a":{"href":"./Page+title%25"},"sa":{"href":"Page+title%"}}'>Page+title%</a>
21122 <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%+</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"piped","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%20</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+ "}}'>%+ </a> <a rel="mw:WikiLink" href="./%25+r" title="%+r" data-parsoid='{"stx":"simple","a":{"href":"./%25+r"},"sa":{"href":"%+r"}}'>%+r</a>
21123 <a rel="mw:WikiLink" href="./%25" title="%" data-parsoid='{"stx":"simple","a":{"href":"./%25"},"sa":{"href":"%"}}'>%</a> <a rel="mw:WikiLink" href="./+" title="+" data-parsoid='{"stx":"simple","a":{"href":"./+"},"sa":{"href":"+"}}'>+</a> <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./Bar\" title=\"Bar\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Bar\"},\"sa\":{\"href\":\"bar\"},\"dsr\":[94,101,2,2]}'>bar</a>"}'><a href="./File:%25+abc9" data-parsoid='{"a":{"href":"./File:%25+abc9"},"sa":{}}'><img resource="./File:%25+abc9" src="./Special:FilePath/%25+abc9" height="220" width="220" data-parsoid='{"a":{"resource":"./File:%25+abc9","height":"220","width":"220"},"sa":{"resource":"File:%+abc%39"}}'/></a></span>
21124 <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>
21128 Special characters in embedded file links (bug 27679)
21130 [[File:Contains & ampersand.jpg]]
21131 [[File:Does not exist.jpg|Title with & ampersand]]
21133 <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>
21134 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21137 <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>
21138 <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>
21142 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21144 Text's been normalized?
21146 <p>Text's been normalized?
21151 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21153 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
21155 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
21160 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
21162 [http://www.example.org/ ideograms]
21164 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
21169 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
21171 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
21173 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21197 Bug 31098 Template which includes system messages which includes the template
21201 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21202 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21207 Bug31490 Turkish: ucfirst 'blah'
21218 Bug31490 Turkish: ucfirst 'ix'
21229 Bug31490 Turkish: lcfirst 'BLAH'
21240 Bug31490 Turkish: ucfırst (with a dotless i)
21246 <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>
21251 Bug31490 ucfırst (with a dotless i) with English language
21257 <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>
21262 Bug 26375: TOC with italics
21264 title=[[Main Page]]
21267 == ''Lost'' episodes ==
21269 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21271 <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>
21275 <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>
21280 Bug 26375: TOC with bold
21282 title=[[Main Page]]
21285 == '''should be bold''' then normal text ==
21287 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21289 <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>
21293 <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>
21298 Bug 33845: Headings become cursive in TOC when they contain an image
21300 title=[[Main Page]]
21303 == Image [[Image:foobar.jpg]] ==
21305 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21307 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21311 <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>
21316 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21318 title=[[Main Page]]
21321 == <blockquote>Quote</blockquote> ==
21323 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21325 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21329 <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>
21333 <div id="toc" class="toc">
21334 <div id="toctitle">
21338 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21342 <h2><span class="mw-headline" id="Quote"></span></h2>
21344 <p><span class="mw-headline" id="Quote">Quote</span></p>
21346 <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>
21350 Unclosed tags in TOC
21352 title=[[Main Page]]
21356 <small>Hanc marginis exiguitas non caperet.</small>
21359 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21361 <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>
21365 <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>
21366 <p><small>Hanc marginis exiguitas non caperet.</small>
21372 Multiple tags in TOC
21375 == <i>Foo</i> <b>Bar</b> ==
21377 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21379 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21381 <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>
21382 <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>
21386 <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>
21387 <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>
21391 <div id="toc" class="toc">
21392 <div id="toctitle">
21396 <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>
21397 <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>
21401 <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>
21402 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21404 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21406 <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>
21409 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21410 # html5 tag parsing.
21412 Tags with parameters in TOC
21417 == <sup class="in-h2">Hello</sup> ==
21419 == <sup class="a > b">Evilbye</sup> ==
21421 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21423 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21424 <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>
21428 <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>
21429 <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>
21432 <meta property="mw:PageProp/toc" />
21433 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21435 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21439 span tags with directionality in TOC
21442 == <span dir="ltr">C++</span> ==
21444 == <span dir="rtl">זבנג!</span> ==
21446 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21448 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21450 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21452 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21454 <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>
21455 <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>
21456 <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>
21457 <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>
21458 <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>
21462 <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>
21463 <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>
21464 <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>
21465 <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>
21466 <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>
21471 Bug 72884: bdi element in ToC
21474 == <bdi>test</bdi> ==
21476 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21478 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21482 <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>
21486 # Note that the html output does not have the <p></p>, but the
21487 # html+tidy output *does*. This is because the empty <p></p> is
21488 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21490 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21495 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21497 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21501 <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>
21505 <div id="toc" class="toc">
21506 <div id="toctitle">
21510 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21514 <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>
21520 == {{int:headline_sample}} ==
21524 Bug 32057: Title needed when expanding <h> nodes.
21526 title=[[Main Page]]
21530 <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>
21535 Strip marker in urlencode
21537 {{urlencode:x<nowiki/>y}}
21538 {{urlencode:x<nowiki/>y|wiki}}
21539 {{urlencode:x<nowiki/>y|path}}
21540 {{urlencode:x<pre id="one">two</pre>y}}
21568 Strip marker in formatNum
21570 {{formatnum:1<nowiki/>2}}
21571 {{formatnum:1<nowiki/>2|R}}
21579 Check noCommafy in formatNum
21583 {{formatnum:123456.78}}
21584 {{formatnum:123456.78|NOSEP}}
21592 Wrong option for formatNum (bug 56199)
21594 {{formatnum:1,234.56|Random}}
21595 {{formatnum:1,234.56|EVERYTHING}}
21596 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21605 Strip marker in grammar
21609 {{grammar:elative|foo<nowiki/>bar}}
21616 Strip marker in padleft
21618 {{padleft:|2|x<nowiki/>y}}
21625 Strip marker in padright
21627 {{padright:|2|x<nowiki/>y}}
21634 Strip marker in anchorencode
21636 {{anchorencode:x<nowiki/>y}}
21643 nowiki inside link inside heading (bug 18295)
21645 ==[[foo|x<nowiki>y</nowiki>z]]==
21647 <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>
21652 new support for bdi element (bug 31817)
21654 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21656 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21661 Ignore pipe between table row attributes
21665 |- id=foo | style='color: red'
21673 <tr id="foo" style="color: red">
21680 Gallery override link with WikiLink (bug 34852)
21683 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21686 <ul class="gallery mw-gallery-traditional">
21687 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21688 <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>
21689 <div class="gallerytext">
21699 Gallery override link with absolute external link (bug 34852)
21702 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21705 <ul class="gallery mw-gallery-traditional">
21706 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21707 <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>
21708 <div class="gallerytext">
21718 Gallery override link with malicious javascript (bug 34852)
21721 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21724 <ul class="gallery mw-gallery-traditional">
21725 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21726 <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>
21727 <div class="gallerytext">
21737 Gallery with invalid title as link (bug 43964)
21740 File:foobar.jpg|link=<
21743 <ul class="gallery mw-gallery-traditional">
21744 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21745 <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>
21746 <div class="gallerytext">
21754 Language parser function
21763 Padleft and padright as substr
21765 {{padleft:|3|abcde}}
21766 {{padright:|3|abcde}}
21774 Special parser function
21776 {{#special:RandomPage}}
21777 {{#special:BaDtItLe}}
21778 {{#special:Foobar}}
21787 Bug 34939 - Case insensitive link parsing ([HttP://])
21789 [HttP://MediaWiki.Org/]
21791 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21794 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21798 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21800 [HttP://MediaWiki.Org/ MediaWiki]
21802 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21807 Bug 34939 - Case insensitive link parsing (HttP://)
21809 HttP://MediaWiki.Org/
21811 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21814 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21832 <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>
21833 <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>
21834 <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>
21835 <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>
21836 <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>
21842 ### Parsoid-specific tests
21843 ### Parsoid-PHP parser incompatibilities
21846 1. SOL-sensitive wikitext tokens as template-args
21848 parsoid=wt2html,wt2wt
21854 <span about="#mwt1" typeof="mw:Transclusion">
21855 </span><ul about="#mwt1"><li>a</li>
21857 <span about="#mwt2" typeof="mw:Transclusion">
21858 </span><ol about="#mwt2"><li>a</li>
21860 <span about="#mwt3" typeof="mw:Transclusion">
21861 </span><dl about="#mwt3"><dd>a</dd>
21865 #### -----------------------------------------------------------------
21866 #### Parsoid-specific functionality tests
21867 #### -----------------------------------------------------------------
21869 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21870 # We know wt2wt will fail, but we expect selser to pass.
21871 # Due to the nature of our testing, wt2wt and selser tests will enter the
21872 # blacklist and we'll catch selser regressions based on changes to the
21873 # blacklist entries for selser tests.
21875 1. Bad treebuilder fixup of formatting elt is cleaned up
21877 parsoid=wt2html,wt2wt
21882 [[Image:Foobar.jpg|right|Test]]
21889 <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>
21896 2. Bad treebuilder fixup of formatting elt is cleaned up
21898 parsoid=wt2html,wt2wt
21900 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21902 <small>[[Image:Foobar.jpg|right|300px]]</small>
21906 <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>
21908 <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>
21912 3. Bad treebuilder fixup of formatting elt is cleaned up
21914 parsoid=wt2html,wt2wt
21916 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21918 <p><small><b>foo</b></small></p>
21919 <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>
21920 <p><small><b>bar</b></small></p>
21924 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21926 parsoid=wt2html,wt2wt
21928 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21930 <p><b><small></small></b></p>
21931 <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>
21935 #### ----------------------------------------------------------------
21936 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
21937 #### tags. Parsoid's output for these tags differs from that of the
21939 #### ----------------------------------------------------------------
21942 Ref: 1. ref-location should be replaced with an index span
21945 B <ref name="x">foo</ref>
21949 <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>
21950 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>
21951 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>
21952 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21953 <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>
21954 <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>
21955 <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>
21960 Ref: 2. ref-tags with identical names should all get the same index
21962 A <ref name="x">foo</ref>
21966 <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>
21967 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>
21968 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21969 <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>
21974 Ref: 3. spaces in ref-names should be ignored
21976 A <ref name="x">foo</ref>
21977 B <ref name=" x " />
21981 <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>
21982 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>
21983 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>
21984 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21985 <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>
21989 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21991 Ref: 4. 'constructor' should be accepted as a valid ref-name
21993 A <ref name="constructor">foo</ref>
21996 <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>
21997 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21998 <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>
22003 Ref: 5. body should accept generic wikitext
22006 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
22011 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22013 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22014 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">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>
22020 Ref: 6. indent-pres should not be output in ref-body
22030 <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>
22032 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22033 <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
22041 Ref: 7. No p-wrapping in ref-body
22058 <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>
22060 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22061 <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
22076 Ref: 8. transclusion wikitext has lower precedence
22078 A <ref> foo {{echo|</ref> B C}}
22082 <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>
22083 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22084 <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>
22089 Ref: 9. unclosed comments should not leak out of ref-body
22091 A <ref> foo <!--</ref> B C
22094 <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>
22095 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22096 <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>
22101 Ref: 10. Unclosed HTML tags should not leak out of ref-body
22103 A <ref> <b> foo </ref> B C
22107 <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>
22110 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22111 <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>
22116 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22122 <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
22123 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>
22124 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22125 <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>
22126 <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>
22131 Ref: 12. ref-tags act as trailing newline migration barrier
22133 <!--the newline at the end of this line moves out of the p tag-->a
22135 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22141 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22144 <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>
22145 <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>
22148 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22149 <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>
22150 <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>
22154 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22161 <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
22162 <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>
22163 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22164 <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>
22165 <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
22171 Ref: 14. A nested ref-tag should be emitted as plain text
22173 <ref>foo <ref>bar</ref> baz</ref>
22177 <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>
22179 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22180 <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>
22185 Ref: 15. ref-tags with identical names should get identical indexes
22187 A1 <ref name="a">foo</ref> A2 <ref name="a" />
22188 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
22192 <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>
22193 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>
22195 <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>
22199 ## We don't bother wt2wt-ing non-standard whitespace
22201 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22209 <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>
22210 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22211 <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>
22215 Ref: 17. Generate valid HTML5 id/about attributes
22217 <ref name="a b">foo</ref>
22221 <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>
22224 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22225 <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>
22230 Ref: 18. T58916: Extension attributes should be parsed as plain text
22232 <ref name="{{echo|a}}">foo</ref>
22236 <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>
22239 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22240 <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>
22245 Ref: 19. ref-tags with identical name encodings should get identical indexes
22247 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22251 <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>
22253 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22254 <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>
22259 Ref: 20. ref-tags with identical names but different content should keep it
22261 A <ref name="foo">Foo one</ref>
22262 B <ref name="foo">Foo two</ref>
22263 C <ref name="foo" />
22267 <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>
22268 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>
22269 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>
22271 <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>
22276 References: 1. references tag without any refs should be handled properly
22280 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22284 References: 2. references tag with group only outputs references from that group
22286 A <ref group="a">foo</ref>
22287 B <ref group="b">bar</ref>
22290 <references group="a" />
22292 <references group="b" />
22294 <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>
22295 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>
22296 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>
22298 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22299 <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>
22301 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22302 <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>
22304 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22305 <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>
22310 References: 3. ref list should be cleared after processing references
22320 <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>
22322 <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>
22325 <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>
22327 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22328 <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>
22333 References: 4. only referenced group should be cleared after processing references
22335 A <ref group="a">afoo</ref>
22338 <references group="a" />
22344 <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>
22345 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>
22347 <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>
22350 <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>
22352 <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>
22356 ## Don't expect this to rt since we're dropping content
22358 References: 5. ref tags in references should be processed while ignoring all other content
22360 parsoid=wt2html,html2html
22363 B <ref name="b">bar</ref>
22366 <ref name="a">foo</ref>
22367 This should just get lost.
22370 <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>
22371 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>
22374 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{},"body":{"html":"\n<span about=\"#mwt8\" class=\"mw-ref\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[59,82,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-a-1\"},\"attrs\":{\"name\":\"a\"}}'><a href=\"#cite_note-a-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span>\n"}}'><li about="#cite_note-a-1" id="cite_note-a-1"><a href="#cite_ref-a_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-a-1" class="mw-reference-text">foo</span></li><li about="#cite_note-b-2" id="cite_note-b-2"><a href="#cite_ref-b_2-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
22379 References: 6. <references /> from a transclusion
22381 <ref>Foo</ref> {{echo|<references />}}
22383 <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>
22388 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22390 A <ref>foo bar for a</ref>
22391 B <ref group="X" name="b" />
22395 <references group="X">
22396 <ref name="b">foo</ref>
22399 <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>
22400 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>
22403 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22404 <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>
22407 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="X" data-mw='{"name":"references","attrs":{"group":"X"},"body":{"html":"\n<span about=\"#mwt10\" class=\"mw-ref\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[96,119,14,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-b-2\"},\"attrs\":{\"name\":\"b\"}}'><a href=\"#cite_note-b-2\" style=\"counter-reset: mw-Ref 1;\" data-mw-group=\"X\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[X 1]</span></a></span>\n"}}'>
22408 <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>
22413 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22415 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22418 <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>
22419 <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>
22423 # This test only works in wt2html now as the <references /> are always generated
22424 # unless selser is active. Once T72722 is fixed, we should add a changes test
22425 # here to ensure that unrelated changes don't add the new <references />
22426 # when selser is active.
22428 References: 9. Generate missing references list at the end
22431 B <ref group="inexistent">bar</ref>
22433 <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>
22434 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
22435 <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>
22437 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
22438 <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>
22443 References: 10. New <references/> shouldn't be added for unrelated edits.
22446 "modes": ["selser"],
22447 "changes": [["#x", "remove"]],
22451 Unrelated text<span id="x"> that's going to disappear</span>.
22459 Entities in ref name
22461 <ref name="test & me">hi</ref>
22464 <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>
22465 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22466 <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>
22470 ## The output here may look funny, but it's what the php parser will do. The
22471 ## unclosed references tag becomes escaped text, and then a new references
22472 ## tag is auto-generated. The test is wt2html only because it roundtrips with
22473 ## nowiki tags, and the auto-generated references tag is only dropped in
22476 Generate references for unclosed references tag
22484 <p>a<span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
22486 <p><references></p>
22487 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'><li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
22491 New reference serializes on its own line
22493 parsoid=wt2wt,html2wt
22498 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22501 #### ----------------------------------------------------------------
22502 #### Parsoid-only testing of Parsoid's impl of LST
22503 #### Not implemented yet, see
22504 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22505 #### ----------------------------------------------------------------
22508 LST Sections: 1. Simple section start and end
22510 parsoid={ "suppressErrors": true }
22512 <section begin="2011-05-16" />
22513 <section end="2014-04-10 (MW 1.23wmf22)" />
22515 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22516 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22519 #--------- Test stripping of empty nodes in template content ----------
22521 Empty LI and TR nodes should be stripped from template content
22526 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22530 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22543 Empty LI and TR nodes should not be stripped from top-level content
22570 Empty TR nodes should not be stripped if they have any attributes set
22572 {{EmptyTRWithHTMLAttrTest}}
22574 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22575 <tr align="center"></tr>
22576 <tr><td>foo</td></tr>
22577 <tr align="center"></tr>
22578 <tr><td>bar</td></tr>
22582 #### ----------------------------------------------------------------
22583 #### The following section of tests are primarily to test
22584 #### wikitext escaping capabilities of Parsoid. Given that
22585 #### escaping can be done any number of ways, the wikitext (input)
22586 #### is always adjusted to reflect how Parsoid adds nowiki
22589 #### We are marking several tests as parsoid-only since the
22590 #### HTML in the result section is different from what the
22591 #### PHP parser generates for it.
22592 #### ----------------------------------------------------------------
22595 #### --------------- Headings ---------------
22597 #### 1. Nested inside html <h1>=foo=</h1>
22598 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22599 #### 3. Nested inside html with wikitext split by html tags
22600 #### 4. No escape needed
22601 #### 5. Empty headings <h1></h1>
22602 #### 6. Heading chars in SOL context
22603 #### ----------------------------------------
22605 Headings: 0. Unnested
22615 <p>=foo<i>a</i>=</p>
22617 <nowiki>=foo=</nowiki>
22619 <nowiki> </nowiki>=foo=
22621 <nowiki>=foo=</nowiki>
22623 =foo''a''<nowiki>=</nowiki>
22626 # New headings and existing headings are handled differently
22628 Headings: 1. Nested inside html
22636 <h1 data-parsoid=''>=foo=</h1>
22637 <h2 data-parsoid=''>=foo=</h2>
22638 <h3 data-parsoid=''>=foo=</h3>
22639 <h4 data-parsoid=''>=foo=</h4>
22640 <h5 data-parsoid=''>=foo=</h5>
22641 <h6 data-parsoid=''>=foo=</h6>
22649 =<nowiki>=foo=</nowiki>=
22650 ==<nowiki>=foo=</nowiki>==
22651 ===<nowiki>=foo=</nowiki>===
22652 ====<nowiki>=foo=</nowiki>====
22653 =====<nowiki>=foo=</nowiki>=====
22654 ======<nowiki>=foo=</nowiki>======
22659 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22668 <nowiki>*</nowiki>bar
22674 <nowiki>=bar=</nowiki>
22678 Headings: 3. Nested inside html with wikitext split by html tags
22682 <h1>=<b>bold</b>foo=</h1>
22684 = ='''bold'''foo= =
22688 Headings: 4a. No escaping needed (testing just h1 and h2)
22699 <h1><i>=</i>foo=</h1>
22719 Headings: 4b. No escaping needed (inside p-tags)
22734 Headings: 5. Empty headings
22738 <h1 data-parsoid='{}'></h1>
22740 <h2 data-parsoid='{}'></h2>
22742 <h3 data-parsoid='{}'></h3>
22744 <h4 data-parsoid='{}'></h4>
22746 <h5 data-parsoid='{}'></h5>
22748 <h6 data-parsoid='{}'></h6>
22758 =====<nowiki/>=====
22760 ======<nowiki/>======
22764 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22774 <nowiki>=a=</nowiki>
22776 <nowiki>=a=</nowiki>
22778 <nowiki>=a=</nowiki>
22782 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22795 <nowiki>=a=</nowiki>
22798 <nowiki>=a=</nowiki>
22801 <nowiki>=a=</nowiki>
22806 Headings: 6c. Heading chars in SOL context (leading newline break)
22814 <nowiki>=b=</nowiki>
22818 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22822 <!--c0--><p>=a=</p>
22824 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22826 <!--c0--><nowiki>=a=</nowiki>
22828 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22832 Headings: 6d. Heading chars in SOL context (No escaping needed)
22842 Headings: 7. Insert a newline between new content and headings
22848 <h2 data-parsoid='{}'>A</h2>
22849 <p data-parsoid='{}'>a</p>
22859 #### --------------- Lists ---------------
22860 #### 0. Outside nests (*foo, etc.)
22861 #### 1. Nested inside html <ul><li>*foo</li></ul>
22862 #### 2. Inside definition lists
22863 #### 3. Only bullets at start should be escaped
22864 #### 4. No escapes needed
22865 #### 5. No unnecessary escapes
22866 #### 6. Escape bullets in SOL position
22867 #### 7. Escape bullets in a multi-line context
22868 #### ----------------------------------------
22871 Lists: 0. Outside nests
22881 <nowiki>*</nowiki>foo
22883 <nowiki>#</nowiki>foo
22885 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
22888 ## Making these next 3 tests Parsoid-only since they are html2wt tests
22889 ## to test wikitext escaping, and insignificant whitespace diffs
22890 ## cause PHP parser tests to barf
22892 Lists: 1. Nested inside html (No unnecessary escapes)
22901 <li data-parsoid='{}'>*foo</li>
22902 <li data-parsoid='{}'>#foo</li>
22903 <li data-parsoid='{}'>:foo</li>
22904 <li data-parsoid='{}'>;foo</li>
22912 <li data-parsoid='{}'>*foo</li>
22913 <li data-parsoid='{}'>#foo</li>
22914 <li data-parsoid='{}'>:foo</li>
22915 <li data-parsoid='{}'>;foo</li>
22922 *<nowiki>*foo</nowiki>
22923 *<nowiki>#foo</nowiki>
22924 *<nowiki>:foo</nowiki>
22925 *<nowiki>;foo</nowiki>
22931 #<nowiki>*foo</nowiki>
22932 #<nowiki>#foo</nowiki>
22933 #<nowiki>:foo</nowiki>
22934 #<nowiki>;foo</nowiki>
22938 Lists: 2. Inside definition lists
22942 <dl><dt>;foo</dt></dl>
22943 <dl><dt>:foo</dt></dl>
22946 <dl><dd>:foo</dd></dl>
22950 ; <nowiki>:foo</nowiki>
22952 ; <nowiki>:foo</nowiki>
22959 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
22965 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
22969 *<nowiki>*foo</nowiki>''it''*bar
22973 Lists: 4. No escapes needed
22986 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22990 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23004 Lists: 5. No unnecessary escapes
23008 <ul><li> bar <span>[[foo]]</span></li></ul>
23009 <ul><li> =bar <span>[[foo]]</span></li></ul>
23010 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23011 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23012 <ul><li> =bar <span>foo]]</span>=</li></ul>
23013 <ul><li> <s></s>: a</li></ul>
23014 <ul><li> <i>* foo</i></li></ul>
23017 * bar <span><nowiki>[[foo]]</nowiki></span>
23019 * =bar <span><nowiki>[[foo]]</nowiki></span>
23021 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23023 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23025 * =bar <span>foo]]</span>=
23033 Lists: 6. Escape bullets in SOL position
23037 <p><!--cmt-->*foo</p>
23039 <!--cmt--><nowiki>*</nowiki>foo
23043 Lists: 7. Escape bullets in a multi-line context
23052 <nowiki>*</nowiki>b
23056 Lists: 8. Escape colons only if not present in tags
23060 <dl><dt>a:b<i>c:d</i></dt></dl>
23062 ; <nowiki>a:b</nowiki>''c:d''
23065 #### --------------- HRs ---------------
23066 #### 1. Single line
23067 #### -----------------------------------
23070 HRs: 1. Single line
23078 ----<nowiki>----</nowiki>
23083 #### --------------- Tables ---------------
23084 #### 1a. Simple example
23085 #### 1b. No escaping needed (!foo)
23086 #### 1c. No escaping needed (|foo)
23087 #### 1d. No escaping needed (|}foo)
23089 #### 2a. Nested in td (<td>foo|bar</td>)
23090 #### 2b. Nested in td (<td>foo||bar</td>)
23091 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23093 #### 3a. Nested in th (<th>foo!bar</th>)
23094 #### 3b. Nested in th (<th>foo!!bar</th>)
23095 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23099 #### 4c. No escaping needed
23100 #### --------------------------------------
23103 Tables: 1a. Simple example
23111 <nowiki>{|</nowiki>
23116 Tables: 1b. No escaping needed
23127 Tables: 1c. No escaping needed
23138 Tables: 1d. No escaping needed
23149 Tables: 2a. Nested in td
23154 <td>foo|bar</td></tr>
23155 <tr><td>x<div>a|b</div></td>
23159 |<nowiki>foo|bar</nowiki>
23161 |x<div><nowiki>a|b</nowiki></div>
23177 Tables: 2b. Nested in td
23183 <td>a<i>b||c</i></td>
23184 <td>a<i><div>b||c</div></i></td>
23185 </tr></tbody></table>
23188 |<nowiki>foo||bar</nowiki>
23189 |a''<nowiki>b||c</nowiki>''
23190 |a''<div><nowiki>b||c</nowiki></div>''
23199 <td>a<i><div>b||c</div></i>
23205 Tables: 2c. Nested in td -- no escaping needed
23221 Tables: 3a. Nested in th
23237 Tables: 3b. Nested in th
23242 <tr><th>foo!!bar</th>
23243 <th><i>foo|bar</i></th>
23244 <th><i>foo!!bar</i></th>
23245 <th><i><span>foo!!bar</span></i></th>
23246 </tr></tbody></table>
23249 !<nowiki>foo!!bar</nowiki>
23250 !''<nowiki>foo|bar</nowiki>''
23251 !''<nowiki>foo!!bar</nowiki>''
23252 !''<span><nowiki>foo!!bar</nowiki></span>''
23261 <th><i>foo!!bar</i>
23263 <th><i><span>foo!!bar</span></i>
23269 Tables: 3c. Nested in th
23274 <tr><th>foo||bar</th>
23275 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23276 </tr></tbody></table>
23279 !<nowiki>foo||bar</nowiki>
23280 !<nowiki>foo||bar</nowiki>
23293 Tables: 4a. Escape -
23309 |<nowiki>-bar</nowiki>
23314 Tables: 4b. Escape +
23330 |<nowiki>+bar</nowiki>
23335 Tables: 4c. No escaping needed
23340 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23341 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23347 <div>a|b</div></td>
23392 Tables: 4d. No escaping needed
23397 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23398 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23399 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23410 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23420 T97430: Don't emit empty nowiki pairs around marker meta tags
23424 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23425 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23427 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23428 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23432 Unclosed xmlish element in table line shouldn't eat end delimiters
23437 <tbody><tr><td> <foo</td>
23438 <td> bar></td></tr>
23455 #### --------------- Links ----------------
23456 #### 1. Quote marks in link text
23457 #### 2. Wikilinks: Escapes needed
23458 #### 3. Wikilinks: No escapes needed
23459 #### 4. Extlinks: Escapes needed
23460 #### 5. Extlinks: No escapes needed
23461 #### --------------------------------------
23463 Links 1. WikiLinks: No escapes needed
23467 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23468 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23469 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23473 [[Foo|x [Foobar] x]]
23475 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23476 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23477 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23482 Links 2. WikiLinks: Escapes needed
23486 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23487 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23488 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23489 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23490 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23491 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23492 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23493 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23494 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23495 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23497 [[Foo|<nowiki>Foobar]</nowiki>]]
23498 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23499 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23500 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23501 [[Foo|<nowiki>|Bar</nowiki>]]
23502 [[Foo|<nowiki>]]bar</nowiki>]]
23503 [[Foo|<nowiki>[[bar</nowiki>]]
23504 [[Foo|<nowiki>x [[ y</nowiki>]]
23505 [[Foo|<nowiki>x ]] y</nowiki>]]
23506 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23508 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23509 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23510 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23511 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23512 <a href="/wiki/Foo" title="Foo">|Bar</a>
23513 <a href="/wiki/Foo" title="Foo">]]bar</a>
23514 <a href="/wiki/Foo" title="Foo">[[bar</a>
23515 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23516 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23517 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23522 Links 3. WikiLinks: No escapes needed
23526 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23527 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23532 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23533 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23538 Links 4. ExtLinks: Escapes needed
23542 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23543 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23544 <p>[http://google.com]</p>
23545 <p>[http://google.com google]</p>
23546 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23547 <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>
23549 [http://google.com <nowiki>[google]</nowiki>]
23550 [http://google.com <nowiki>google]</nowiki>]
23552 <nowiki>[http://google.com]</nowiki>
23554 <nowiki>[http://google.com google]</nowiki>
23556 [http://google.com<nowiki>]</nowiki>
23558 [{{echo|http://google.com}}<nowiki>]</nowiki>
23560 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23561 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23562 </p><p>[http://google.com]
23563 </p><p>[http://google.com google]
23564 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23565 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23570 Links 5. ExtLinks: No escapes needed
23574 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23575 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23577 [http://google.com [google]
23579 [[http://google.com]]
23581 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23582 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23587 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23591 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23592 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23593 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23594 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23595 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23596 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23597 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23598 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23599 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23600 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23601 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23602 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23603 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23606 x<nowiki/>http://example.com<nowiki/>y
23607 http://example.com<nowiki/>?x
23608 http://example.com<nowiki/>&x
23609 http://example.com<nowiki/>'x
23610 http://example.com<nowiki/>,x
23611 http://example.com<nowiki/>.x
23612 http://example.com<nowiki/>;x
23613 http://example.com<nowiki/>:x
23614 http://example.com<nowiki/>;x
23615 http://example.com<nowiki/>!x
23616 http://example.com<nowiki/>=x
23617 http://example.com<nowiki/>(x)
23618 http://example.com(x<nowiki/>)
23622 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23627 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23629 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23630 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23631 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23632 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23633 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23639 "http://example.com"
23640 (http://example.com)
23641 (http://example.com) foo
23642 http://example.com,
23643 http://example.com, foo
23646 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23648 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23649 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23650 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23651 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23652 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23657 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23661 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23662 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23664 http://example.com.,;:!?\
23665 -http://example.com:
23667 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23668 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23673 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23677 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23678 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23679 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23683 X<nowiki/>RFC 123<nowiki/>y
23687 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23691 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23692 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23693 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23700 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23701 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23702 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23707 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23711 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23712 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23713 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23717 X<nowiki/>PMID 123<nowiki/>y
23721 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23725 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23726 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23727 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23734 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23735 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23736 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23741 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23745 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23746 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23747 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23750 ISBN 1234567890<nowiki/>1
23751 ISBN 1234567890<nowiki/>x
23752 a<nowiki/>ISBN 1234567890<nowiki/>b
23756 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23760 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23764 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23769 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23773 <p>this is not a link: http://example.com
23776 this is not a link: <nowiki>http://example.com</nowiki>
23780 Links 15. Link trails can't become link prefixes.
23785 <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>
23787 [[Söfnuður]]-[[00]]
23789 <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>
23793 #### --------------- Quotes ---------------
23794 #### 1. Quotes inside <b> and <i>
23795 #### 2. Link fragments separated by <i> and <b> tags
23796 #### 3. Link fragments inside <i> and <b>
23797 #### 4. No escaping needed
23798 #### --------------------------------------
23800 1a. Quotes inside <b> and <i>
23811 <b>foo'<i>bar'</i>baz</b>
23820 <i>fools'<span> errand</span></i>
23821 <i><span>fool</span>'s errand</i>
23822 '<i>foo</i> bar '<i>baz</i>
23823 a|!*#-:;+-~[]{}b'<i>x</i>
23827 ''<nowiki>''foo''</nowiki>''
23828 ''<nowiki>'''foo'''</nowiki>''
23830 '''<nowiki/>'foo''''
23831 '''<nowiki>''foo''</nowiki>'''
23832 '''<nowiki>'''foo'''</nowiki>'''
23833 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23834 '''foo'''<nowiki/>'s
23840 '''foo'''<nowiki/>'
23841 ''''foo'''<nowiki/>'
23842 ''fools'<span> errand</span>''
23843 ''<span>fool</span>'s errand''
23844 '<nowiki/>''foo'' bar '''baz''
23845 a|!*#-:;+-~[]{}b'''x''
23849 1b. Quotes inside <b> and <i> with other tags on same line
23853 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23854 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23855 <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>
23856 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23857 '<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>
23858 '<i>foo</i> <div title="name">test</div>
23859 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23860 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23861 <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>
23864 '''a'' foo ''[[bar]]''
23865 ''a''' foo ''[[bar]]''
23866 ''a''' foo '''{{echo|[[bar]]}}'''
23867 [[foo]] x'''[[bar]]''
23868 '''foo'' <ref>test</ref>
23869 '''foo'' <div title="name">test</div>
23870 '''foo'' and <br> bar
23875 2. Link fragments separated by <i> and <b> tags
23879 <p>[[<i>foo</i>hello]]</p>
23880 <p>[[<b>foo</b>hello]]</p>
23882 [[''foo''<nowiki>hello]]</nowiki>
23884 [['''foo'''<nowiki>hello]]</nowiki>
23887 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23888 # this is one of the shortcomings of this format
23890 3. Link fragments inside <i> and <b>
23894 <p><i>[[foo</i>]]</p>
23895 <p><b>[[foo</b>]]</p>
23897 ''[[foo''<nowiki>]]</nowiki>
23899 '''[[foo'''<nowiki>]]</nowiki>
23903 4. No escaping needed
23907 <p>'<span><i>bar</i></span>'
23908 '<span><b>bar</b></span>'
23912 '<span>''bar''</span>'
23913 '<span>'''bar'''</span>'
23917 #### ----------- Paragraphs ---------------
23918 #### 1. No unnecessary escapes
23919 #### --------------------------------------
23922 1. No unnecessary escapes
23926 <p>bar <span>[[foo]]</span>
23927 </p><p>=bar <span>[[foo]]</span>
23928 </p><p>[[bar <span>[[foo]]</span>
23929 </p><p>]]bar <span>[[foo]]</span>
23930 </p><p>=bar <span>foo]]</span>=
23933 bar <span><nowiki>[[foo]]</nowiki></span>
23935 =bar <span><nowiki>[[foo]]</nowiki></span>
23937 [[bar <span><nowiki>[[foo]]</nowiki></span>
23939 ]]bar <span><nowiki>[[foo]]</nowiki></span>
23941 =bar <span>foo]]</span><nowiki>=</nowiki>
23944 #### ----------------------- PRE --------------------------
23945 #### 1. Leading whitespace in SOL context should be escaped
23946 #### ------------------------------------------------------
23948 1. Leading whitespace in SOL context should be escaped
23971 <nowiki> </nowiki>a
23973 <nowiki> </nowiki> a
23977 <nowiki> </nowiki> a
23979 <nowiki> </nowiki>a
23982 <nowiki> </nowiki>b
24005 2. Leading whitespace in non-indent-pre contexts should not be escaped
24009 <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>
24010 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24011 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><i>a</i>
24021 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24040 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24044 <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>
24046 [[File:Foobar.jpg|thumb|caption]]
24050 5. Nowiki escaping should account for indent-pres
24060 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24073 #### --------------- Behavior Switches --------------------
24076 1. Valid behavior switches should be escaped
24083 <nowiki>__TOC__</nowiki>
24084 ''<nowiki>__TOC__</nowiki>''
24088 2. Invalid behavior switches should not be escaped
24099 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24101 Behavior switches should be SOL-transparent
24105 <meta property="mw:PageProp/toc" />
24107 <!-- this one's bogus -->
24110 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24112 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24116 <!-- this one's bogus -->
24125 #### --------------- HTML tags ---------------
24128 #### 3. multi-line html tag
24129 #### 4. extension tags
24130 #### -----------------------------------------
24136 <a href="http://google.com">google</a>
24138 <a href="http://google.com">google</a>
24146 <ul><li> <div>foo</div></li>
24147 <li> <div style="color:red">foo</div></li>
24148 <li> <td></li></ul>
24151 * <nowiki><div>foo</div></nowiki>
24152 * <nowiki><div style="color:red">foo</div></nowiki>
24153 * <nowiki><td></nowiki>
24157 3. multi-line html tag
24176 <p><ref>foo</ref>
24177 </p><p><ref>bar
24178 </p><p>baz</ref>
24181 <nowiki><ref>foo</ref></nowiki>
24183 <nowiki><ref>bar</nowiki>
24185 baz<nowiki></ref></nowiki>
24188 #### --------------- Others ---------------
24194 <p><nowiki>foo</nowiki>
24197 <nowiki>foo</nowiki>
24200 ## The quote-char in the input is necessary for triggering the bug
24202 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24211 #----------- End of wikitext escaping tests --------------
24215 Tag-like HTML structures are passed through as text
24237 </p><p>1<d e>f
24242 HTML tag with necessary entities in attributes
24244 <span title="&amp;">foo</span>
24246 <p><span title="&amp;">foo</span>
24251 HTML tag with 'unnecessary' entity encoding in attributes
24253 <span title="&">foo</span>
24255 <p><span title="&">foo</span>
24260 HTML tag with broken attribute value quoting
24262 parsoid=wt2html,html2html
24264 <span title="Hello world>Foo</span>
24266 <p><span title="Hello world">Foo</span>
24269 <p><span title="Hello world">Foo</span></p>
24273 Self-closed tag with broken attribute value quoting
24275 parsoid=wt2html,html2html
24277 <div title="Hello world />Foo
24279 <div title="Hello world"></div>
24282 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24286 Table with broken attribute value quoting
24288 parsoid=wt2html,html2html
24291 | title="Hello world|Foo
24296 <td title="Hello world">Foo
24302 <td title="Hello world">Foo
24308 Table with broken attribute value quoting on consecutive lines
24310 parsoid=wt2html,html2html
24313 | title="Hello world|Foo
24314 | style="color:red|Bar
24319 <td title="Hello world">Foo
24321 <td style="color:red">Bar
24327 <td title="Hello world">Foo
24328 </td><td style="color: red">Bar
24329 </td></tr></tbody></table>
24334 Accept empty td cell attribute
24337 | align="center" | foo || |
24342 <td align="center"> foo </td>
24349 Non-empty attributes in th-cells
24352 ! Foo !! style="color: red" | Bar
24358 <th style="color: red"> Bar
24364 Accept empty attributes in th-cells
24379 Empty table rows go away
24400 ### Parsoid-centric tests for testing RTing of inter-element separators
24401 ### Edge cases not tested by existing parser tests and specific to
24402 ### Parsoid-specific serialization strategies.
24406 RT-ed inter-element separators should be valid separators
24418 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24422 # Parsoid-only since PHP parser relies on Tidy for correct output
24424 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24438 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24439 <p>bar</p></small></td></tr>
24443 <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>
24447 # Note that the "style" attribute is really a template parameter here.
24448 # The = would have to be {{=}} if you wanted the literal.
24450 Empty TD followed by TD with tpl-generated attribute
24455 |{{echo|style='color:red'}}|foo
24469 Indented table with an empty td
24487 ## We have some newline diffs RT-ing this edge case
24488 ## and it is not important enough -- we seem to be emitting
24489 ## at most 2 newlines after a </tr> and this is unrelated to
24490 ## the issue from T85627 that this is testing.
24492 Indented table with blank lines in between (T85627)
24511 Indented block & table
24525 <div data-parsoid='{"stx":"html"}'>foo</div>
24527 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24532 Indent and comment before table row
24547 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24548 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24552 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24554 Empty TR followed by a template-generated TR
24560 {{echo|<tr><td>foo</td></tr>}}
24566 <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}}]}'>
24571 ## PHP and parsoid output differ for this, and since this is primarily
24572 ## for testing Parsoid's serializer, marking this Parsoid only
24574 Empty TR followed by mixed-ws-comment line should RT correctly
24590 <!--c--> </tr><!--d-->
24596 Multi-line image caption generated by templates with/without trailing newlines
24598 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24599 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24601 <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>
24602 <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>
24606 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24610 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24612 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24614 <includeonly>foo</includeonly>
24622 ## PHP emits broken html for this, and since this is primarily
24623 ## a Parsoid serializer test, marking this Parsoid only
24625 Improperly nested inline or quotes tags with whitespace in between
24627 <span> <s>x</span> </s>
24630 <p><span> <s>x</s></span><s> </s>
24631 <b> <i>x</i></b><i> </i>
24636 Encapsulate protected attributes from wt
24638 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24640 <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>
24644 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24645 ## Having nested or stray pre tags results in the attempt to add duplicates,
24646 ## causing an assertion fail. This test tries to prevent that situation.
24648 Ensure ParagraphWrapper can deal with stray closing pre tags
24658 1. Ensure fostered text content is wrapped in element nodes
24662 <table>hi</table><table>ho</table>
24671 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24673 parsoid=wt2html,wt2wt
24682 <tbody><tr><td> a</td></tr>
24687 Encapsulation properly handles null DSR information from foster box
24689 parsoid=wt2html,wt2wt
24691 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24693 <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>
24697 1. Encapsulate foster-parented transclusion content
24699 parsoid=wt2wt,wt2html
24701 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24703 <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>
24713 2. Encapsulate foster-parented transclusion content
24715 parsoid=wt2wt,wt2html
24717 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24719 <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>
24730 3. Encapsulate foster-parented transclusion content
24732 parsoid=wt2wt,wt2html
24734 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24736 <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>"]}">
24749 4. Encapsulate foster-parented transclusion content
24751 parsoid=wt2wt,wt2html
24753 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24755 <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>"]}">
24768 5. Encapsulate foster-parented transclusion content
24770 parsoid=wt2wt,wt2html
24772 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24774 <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>
24789 6. Encapsulate foster-parented transclusion content
24791 parsoid=wt2wt,wt2html
24793 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24795 <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>
24811 7. Encapsulate foster-parented transclusion content
24813 parsoid=wt2wt,wt2html
24815 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24817 <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>
24827 # Note that the wt is broken on purpose: the = should be {{=}} if you
24828 # don't want it to be a template parameter key.
24830 8. Encapsulate foster-parented transclusion content
24832 parsoid=wt2wt,wt2html
24835 }}{|{{echo|style='color:red'}}
24840 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24842 <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>
24853 9. Encapsulate foster-parented transclusion content
24855 parsoid=wt2wt,wt2html
24857 <table>{{echo|hi</table>hello}}
24859 <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>
24863 Table in fosterable position
24874 <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">
24876 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24882 # Parsoid only for bug 64747
24884 Properly encapsulate empty-content transclusions in fosterable positions
24892 <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"}]]}'>
24898 Always encapsulate foster box when template range is expanded to table
24911 T115289: Unclosed table
24913 {{echo|<table>}}<!--c-->[[Category:Two]]
24915 <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>
24919 T115289: Don't migrate newlines out of tables with fostered content
24921 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
24923 <link rel="mw:PageProp/Category" href="./Category:One" about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:One"},"sa":{"href":"Category:One"},"fostered":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><td></td>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr>[[Category:One]]"}},"i":0}},"<!--c-->[[Category:Two]]"]}'/><link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt2"/><table about="#mwt2" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr><td></td></tr><tr><!--c--></tr></tbody></table>
24927 T73074: More fostering fun
24929 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
24931 <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>
24935 Support <object> element with .data attribute
24939 <object data="test.swf"></object>
24941 <object data="test.swf"></object>
24945 Don't block XML namespace declaration
24947 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24949 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24952 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
24955 # -----------------------------------------------------------------
24956 # The following section of tests are primarily to spec requirements
24957 # around serialization of new/edited content.
24959 # All these tests are marked Parsoid html2wt and html2html only
24960 # ----------------------------------------------------------------
24962 # 'mi' is a localinterwiki prefix as well as a language
24964 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
24968 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
24975 New wikilinks should be serialized properly
24979 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
24980 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
24987 New wiki links (href variations)
24991 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24992 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
24993 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
24994 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
24999 [[Toxine bactérienne]]
25003 New wiki links (content string variations)
25007 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25008 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25009 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25013 [[Foo_bar|./Foo_bar]]
25017 New category links (href variations)
25021 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25022 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25023 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25025 [[Category:Toxine bactérienne]]
25026 [[Category:Toxine bactérienne]]
25027 [[Category:Toxine bactérienne]]
25031 New sol transparent links don't need indent-pre nowiki protection
25036 <link rel="mw:PageProp/redirect" href="./Main_Page">
25037 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25038 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25040 #WEITERLEITUNG [[Main Page]]
25041 <!-- this is good --> [[Category:Good]]
25042 <!-- this is great --> [[Kategorie:Great]]
25046 New interlanguage links (href variations)
25050 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25051 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25052 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25054 [[es:Toxine bactérienne]]
25055 [[es:Toxine_bactérienne]]
25056 [[es:Toxine_bactérienne]]
25060 Image: Modifying size of an image (1)
25063 "modes": ["wt2wt"],
25065 ["img[height]", "attr", "height", "22"],
25066 ["img[width]", "attr", "width", "200"]
25070 [[Image:Foobar.jpg|230x230px]]
25072 [[Image:Foobar.jpg|200x200px]]
25076 Image: Modifying size of an image (2)
25079 "modes": ["wt2wt"],
25081 ["img[height]", "attr", "height", "100"],
25082 ["img[width]", "attr", "width", "500"]
25086 [[Image:Foobar.jpg|230x230px]]
25088 [[Image:Foobar.jpg|500x500px]]
25091 # Change in size is ignored so long as class='mw-default-size'
25093 Image: Modifying size of an image (3)
25096 "modes": ["wt2wt"],
25098 ["figure[class]", "removeClass", "mw-default-size"],
25099 ["figure img", "attr", "height", "19"],
25100 ["figure img", "attr", "width", "170"]
25104 [[Image:Foobar.jpg|thumb]]
25106 [[Image:Foobar.jpg|thumb|170x170px]]
25110 Image: Modifying alignment of an image (bug 48665)
25113 "modes": ["wt2wt"],
25115 ["figure[class]", "removeClass", "mw-halign-right"],
25116 ["figure[class]", "addClass", "mw-halign-left"]
25120 [[Image:Foobar.jpg|thumb|caption|right]]
25122 [[Image:Foobar.jpg|thumb|caption|left]]
25126 Image: Modifying mw-default-size of an frameless image (bug 62805)
25129 "modes": ["wt2wt"],
25131 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25135 [[Image:Foobar.jpg|frameless|right]]
25137 [[Image:Foobar.jpg|frameless|right|220x220px]]
25141 Image: Modifying valign of an image (bug 49221)
25144 "modes": ["wt2wt"],
25146 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25147 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25151 [[File:Foobar.jpg|20px|middle]]
25153 [[File:Foobar.jpg|20px|text-top]]
25157 Image: Modifying alt attribute of an image (bug 56400)
25160 "modes": ["wt2wt"],
25162 ["img[alt]", "attr", "alt", "some alternate edited text"]
25166 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25168 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25172 Image: Modifying caption of an image
25175 "modes": ["wt2wt"],
25177 ["figcaption", "text", "new caption"]
25181 [[Image:Foobar.jpg|thumb|original caption]]
25183 [[Image:Foobar.jpg|thumb|new caption]]
25187 Image: empty alt attribute (bug 48924)
25191 [[File:Foobar.jpg|thumb|alt=|bar]]
25193 <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>
25197 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25203 <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>
25205 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25209 Image: Block level image should have \n before and after
25212 [[File:Foobar.jpg|right|thumb|150x150px]]
25216 <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>
25221 Image: New block level image should have \n before and after (existing content)
25224 [[File:Foobar.jpg|right|thumb|150x150px]]
25228 <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>
25233 Image: upright option (parsoid)
25235 [[File:Foobar.jpg|thumb|upright|caption]]
25236 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25237 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25239 <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>
25240 <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>
25241 <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>
25245 Image: upright option is ignored on inline and frame images (parsoid)
25247 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25249 <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>
25253 Image: from basic HTML (1)
25257 <span typeof="mw:Image">
25258 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25261 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25265 Image: from basic HTML (2)
25269 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25271 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25275 Image: from basic HTML (3)
25279 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25281 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25285 Image: from basic HTML (4)
25289 <img src="./File:Foobar.jpg">
25291 [[File:Foobar.jpg|link=]]
25295 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25300 <li><p>foo</p></li>
25307 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25311 <ul> <li>foo</li></ul>
25317 Don't strip leading whitespace when handling indent-pre suppressing tags
25322 <tr><td> indented row</td></tr>
25325 <b>This is very bold of you!</b>
25328 indented cell (no pre-wrapping!)
25338 '''This is very bold of you!'''
25342 indented cell (no pre-wrapping!)
25350 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25372 <nowiki> </nowiki></span>bar2
25375 <nowiki> </nowiki><span>bar</span>
25378 <nowiki> </nowiki><span>foo</span>
25383 Lists: Dont insert newlines in a serialized list item.
25387 <ul><li>a<br>b</li><li>c</li></ul>
25394 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25397 "modes": ["html2wt"],
25398 "scrubWikitext": false
25401 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25402 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25404 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25405 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25407 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25409 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25411 == hello there [[Category:A1]] ==
25413 == [[Category:A2]] hi pal ==
25415 == <!--foo--> [[Category:A3]] how goes it ==
25417 == it goes well [[Category:A4]] <!--bar--> ==
25419 ==howdy [[Category:A5]]==
25425 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25428 "modes": ["html2wt"],
25429 "scrubWikitext": true
25432 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25433 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25435 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25436 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25438 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25446 <!--foo--> [[Category:A3]]
25451 [[Category:A4]] <!--bar-->
25459 Headings: Don't hoist metas that come from templates
25462 "modes": ["html2wt"],
25463 "scrubWikitext": true
25466 <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>
25468 == {{echo|foo [[Category:Foo]]}} ==
25472 Headings: Category in ref isn't hoisted
25475 "modes": ["html2wt"],
25476 "scrubWikitext": true
25479 <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>
25481 <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>
25484 [[Category:Baz]] </ref> ==
25490 Parsoid: Serialize positional parameters with = in them as named parameter
25494 <p about="#mwt1" typeof="mw:Transclusion"
25495 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25497 <p about="#mwt1" typeof="mw:Transclusion"
25498 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25500 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25501 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25502 <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>
25506 {{echo|1=f=oo|2=bar}}
25508 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25509 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25510 {{echo|<nowiki>f=oo</nowiki>|bar}}
25514 Parsoid: Serialize positional parameters with = in extlink as named parameter
25518 <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>
25520 {{echo|1=http://stuff?is=ok}}
25524 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25528 <div>a<p>b</p></div>
25549 Substrings resembling wikitext in hrefs should not get nowiki escapes
25553 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25559 Enforce single-line context in the serializer
25566 <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">
25567 </span><span about="#mwt1">you</span> </h2>
25569 <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>
25571 <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
25572 there</span></li></ol>
25584 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25591 </tbody></table></dd></dl>
25595 == hi {{bogus|there
25606 * foo '''bar''' baz
25618 Serialize new placeholder space without spans
25622 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25624 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25626 <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>
25632 <ref>foo : bar</ref>ok
25636 #-----------------------
25637 # Tag minimization tests
25638 #-----------------------
25641 1. I/B quote minimization: wikitext-only tags should be combined
25645 <p><i>A</i><i>B</i></p>
25646 <p><b>A</b><b>B</b></p>
25647 <p><i>A</i><b><i>B</i></b></p>
25648 <p><b>A</b><i><b>B</b></i></p>
25649 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25650 <p><i><b>A</b></i><i><b>B</b></i></p>
25651 <p><i><b>A</b></i><b><i>B</i></b></p>
25652 <p><b><i>A</i></b><i><b>B</b></i></p>
25672 2. I/B quote minimization: wikitext and html tags should not be combined
25676 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25677 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25681 ''A''<nowiki/>'''<i>B</i>'''
25685 3. I/B quote minimization: templated content stops minimization
25689 <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>
25690 <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>
25692 ''A''{{echo|''B''}}
25694 ''A''{{echo|'''''B'''''}}
25698 4. I/B quote minimization: new content should be mimimized with adjacent old content
25702 <p><i>A</i><i>B</i></p>
25703 <p><b>A</b><b>B</b></p>
25704 <p><i>A</i><b><i>B</i></b></p>
25714 5a. Merge adjacent quote nodes if they've been edited
25717 "modes": ["wt2wt", "selser"],
25719 ["p", "contents", "remove", ":contains('b')"]
25729 5b. Merge adjacent quote nodes if they've been edited
25732 "modes": ["wt2wt", "selser"],
25738 ''a''<span id="x">b</span>''c''
25744 1. Merge adjacent link nodes as long as at least one element is new
25747 "modes": ["html2wt"],
25748 "scrubWikitext": true
25751 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25752 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25753 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25757 [[Football|Foot]][[Football|ball]]
25761 2. Merge adjacent link nodes and enable additional normalizations
25764 "modes": ["html2wt"],
25765 "scrubWikitext": true
25768 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25770 [[Football|''Football'']]
25774 3. Don't merge adjacent link nodes if scrubWikitext is false
25777 "modes": ["html2wt"],
25778 "scrubWikitext": false
25781 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25783 [[Football|Foot]][[Football|ball]]
25786 #------------------------------
25787 # End of tag minimization tests
25788 #------------------------------
25791 Bug 54262: New entities
25795 <span typeof="mw:Entity"> </span>
25800 ## Note that there is no wikitext output for 'unknownproperty' ##
25801 ## Unknown magic words are silently dropped ##
25808 <meta property='mw:PageProp/toc' />
25809 <meta property='mw:PageProp/notoc' />
25810 <meta property='mw:PageProp/forcetoc' />
25811 <meta property='mw:PageProp/index' />
25812 <meta property='mw:PageProp/noindex' />
25813 <meta property='mw:PageProp/nogallery' />
25814 <meta property='mw:PageProp/noeditsection' />
25815 <meta property='mw:PageProp/notitleconvert' />
25816 <meta property='mw:PageProp/nocontentconvert' />
25817 <meta property='mw:PageProp/unknownproperty' />
25827 __NOCONTENTCONVERT__
25831 Consecutive <pre>s should not get merged
25833 parsoid=html2wt,html2html
25835 <pre>a</pre><pre>b</pre>
25863 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
25867 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
25869 [[Special:BookSources/1234567890|ISBN 1234567895]]
25873 Edited RFC links not serializable as RFC links should serialize as extlinks
25877 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
25879 [//tools.ietf.org/html/rfc123 New RFC]
25883 Edited PMID links not serializable as PMID links should serialize as extlinks
25887 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
25889 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
25893 WTS of autolinks with trailing/surrounding context
25897 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25898 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25899 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25900 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25901 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25902 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
25904 http://cscott.net'''foo'''
25906 http://cscott.net<b>foo</b>
25908 '''http://cscott.net'''
25910 '''http://cscott.net '''
25912 '''http://cscott.net<nowiki/>x'''
25914 http://cscott.net<nowiki/>x
25918 WTS of autolinks with nowikis (round-trip)
25920 x<nowiki/>http://cscott.net<nowiki/>x
25922 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
25925 # this is the "easy" test because it leaves in place all the
25926 # data-parsoid information indicating this is an autolink
25928 WTS of autolinks with escapes (editing)
25931 "modes": ["wt2wt"],
25933 [ "meta", "remove" ]
25937 x<nowiki/>http://cscott.net<nowiki/>x
25939 x<nowiki/>http://cscott.net<nowiki/>x
25943 WTS of edited autolink-like text (T103364)
25946 "modes": ["wt2wt"],
25948 [ "span[typeof]", "removeAttr", "typeof" ]
25952 Not a link: <nowiki>http://example.com</nowiki>.
25954 Not a link: <span><nowiki>http://example.com</nowiki></span>.
25958 WTS of newly-authored autolink-like text (T103364)
25962 <p>http://example.com is not a link.</p>
25964 <nowiki>http://example.com</nowiki> is not a link.
25968 WTS of autolink-like text after an autolink (T108563)
25972 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
25974 http://example.com <nowiki>http://example.com</nowiki> is not a link.
25978 Magic links inside links (not autolinked)
25980 [[Foo|http://example.com]]
25983 [[Foo|ISBN 123456789x]]
25985 [http://foo.com http://example.com]
25986 [http://foo.com RFC 1234]
25987 [http://foo.com PMID 1234]
25988 [http://foo.com ISBN 123456789x]
25990 <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>
25991 <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>
25993 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
25994 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
25995 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
25996 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
25998 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
25999 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26000 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26001 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26005 Magic links inside image captions (autolinked)
26007 [[File:Foobar.jpg|thumb|http://example.com]]
26008 [[File:Foobar.jpg|thumb|RFC 1234]]
26009 [[File:Foobar.jpg|thumb|PMID 1234]]
26010 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26012 <div class="thumb tright">
26013 <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>
26014 <div class="thumbcaption">
26015 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26016 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26019 <div class="thumb tright">
26020 <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>
26021 <div class="thumbcaption">
26022 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26023 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26026 <div class="thumb tright">
26027 <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>
26028 <div class="thumbcaption">
26029 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26030 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26033 <div class="thumb tright">
26034 <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>
26035 <div class="thumbcaption">
26036 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26037 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26041 <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>
26042 <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>
26043 <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>
26044 <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>
26048 WTS of magic word text (T109371)
26053 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26054 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26056 <nowiki>RFC 1234</nowiki>
26058 [http://foo.com RFC 1234]
26064 Edited Redirect link should emit a non-piped wikitext link
26068 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26074 T75121: Infer extension name from typeOf if data-mw is not present
26076 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26078 <div typeOf="mw:Extension/foo"></div>
26083 # Note that the <p> wrapping isn't present in PHP parser output
26084 # The important thing for this test is that P-wrapping doesn't
26085 # interfere with the <nowiki> protection for leading - in <td>
26086 # (which isn't necessary for <th>).
26088 T88318: p-wrapped dash in table.
26090 parsoid=html2wt,wt2wt
26093 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26094 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26095 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26102 |<nowiki>-</nowiki>
26103 |<nowiki>- </nowiki>
26122 <td><small>-</small></td>
26134 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26139 <td id='mwAc'>foo</td>
26140 <td id='serialize-this'>bar</td>
26145 | id="serialize-this" |bar
26150 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26154 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26156 <div id="hello">ok</div>
26163 "modes": ["wt2wt"],
26165 [ "#xyz", "before", "<b>before</b> stuff " ],
26166 [ "#xyz", "after", " stuff <i>after</i>" ],
26167 [ "#xyz", "html", "x <b>y</b> z" ]
26171 <span id="xyz">hello</span>
26173 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26177 Never serialize a-tag as html, regardless of what data-parsoid has to say
26179 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26181 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26186 ## SSS FIXME: This is broken output nevertheless.
26187 ## What might be a reasonable non-broken output for this?
26188 ## This is an edge case unlikely to be seen in production
26189 ## that I am not wasting more time on this right now.
26191 Never serialize a-tag as html, no matter what attributes it has
26193 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26195 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26197 [http://boo.org http://boohoo.org]
26200 # Misnested is an indication that selser can reuse the source but these have
26201 # shown to sneak through on occasion. See T101768.
26202 # The original wikitext here is: [http://test.com [[one]] two three]
26204 Strip span tags added to mark misnested links
26208 <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>
26210 [http://test.com][[one]] two three
26214 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26218 <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|}"]}'>
26230 ## This test verifies the presence and computation of this attribute indirectly
26231 ## by making an edit and ensuring that the serialization is correct (which it would be
26232 ## only if firstWikitextNode is properly set).
26234 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26237 "modes": ["wt2wt"],
26239 [ "div#x", "remove" ],
26240 [ "div", "before", "<div>new</div>" ]
26244 <div id="x">foo</div>
26246 {{echo|<div>boo</div>
26254 {{echo|<div>boo</div>
26260 # --------------------------------------------
26261 # Tests spec'ing wikitext serialization norms |
26262 # --------------------------------------------
26265 1. Categories should always be serialized on their own line
26269 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26277 2. Categories that are part of templates should not introduce a line break
26279 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26281 <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>
26284 # Careful while editing these next 2 tests. There are \u200f characters
26285 # before and after the <link> tags in the HTML and following some
26286 # of the categories in wikitext
26287 # Do not remove these characters in edits.
26289 # As part of the serialization, these bidi characters will get stripped.
26291 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26294 "modes": ["html2wt"],
26295 "scrubWikitext": true
26298 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26299 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26302 [[קטגוריה: שיטות משפט]]
26306 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26309 "modes": ["html2wt"],
26310 "scrubWikitext": true
26313 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26320 Lists: Add space after bullets
26327 <li><span> baz</span></li>
26332 * <span> baz</span>
26336 1. Headings: Add space before/after == (T53744)
26343 <h2><span> baz</span></h2>
26351 == <span> baz</span> ==
26355 2. Headings: Add space before/after == even after hoisted content
26358 "modes": ["html2wt"],
26359 "scrubWikitext": true
26362 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26370 1. Headings: suppress newly created empty headings
26373 "modes": ["html2wt"],
26374 "scrubWikitext": true
26382 2. Headings: don't suppress empty headings if scrubWikitext is false
26392 3. Headings: suppress empty headings on edits
26395 "modes": ["selser"],
26396 "scrubWikitext": true,
26402 ==<span id="x">foo</span>==
26407 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26410 "modes": ["html2wt"],
26411 "scrubWikitext": true
26414 <h2>foo<br/>bar</h2>
26415 <h2>foo <span><br/>bar</span> baz</h2>
26419 == foo <span> bar</span> baz ==
26423 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26426 "modes": ["html2wt"],
26427 "scrubWikitext": false
26430 <h2>foo<br/>bar</h2>
26436 1. WT Quote Tags: suppress newly created empty style tags
26439 "modes": ["html2wt"],
26440 "scrubWikitext": true
26448 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26454 ''<nowiki/>'''''<nowiki/>'''
26458 3. WT Quote Tags: suppress empty style tags on edits
26461 "modes": ["selser"],
26462 "scrubWikitext": true,
26468 '''<span id="x">foo</span>'''
26473 1. Anchors: suppress newly created empty anchors
26476 "modes": ["html2wt"],
26477 "scrubWikitext": true
26480 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26485 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26488 "modes": ["html2wt"],
26489 "scrubWikitext": false
26492 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26498 3. Anchors: suppress empty anchors on edits
26501 "modes": ["selser"],
26502 "scrubWikitext": true,
26508 [[Test|<span id="x">foo</span>]]
26513 3a. Anchors: do not suppress numbered extlinks
26516 "modes": ["wt2wt"],
26517 "scrubWikitext": true
26522 <a rel="mw:ExtLink" href="http://foo.com"></a>
26526 3b. Anchors: do not suppress numbered extlinks
26529 "modes": ["wt2wt"],
26530 "scrubWikitext": true,
26536 [http://foo.com <span id="x">foo</span>]
26542 Normalizations should be restricted to edited content
26545 "modes": ["selser"],
26546 "scrubWikitext": true,
26548 [ "h1", "before", "<i></i>"]
26562 1. Multiple normalizations (html2wt)
26565 "modes": ["html2wt"],
26566 "scrubWikitext": true
26570 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26571 </a><b><i></i></b>x</p>
26580 2. Multiple normalizations (selser)
26583 "modes": ["selser"],
26584 "scrubWikitext": true,
26586 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26590 <span id="x">foo</span>
26592 <span id="x">foo</span>
26598 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26601 "modes": ["html2wt"],
26602 "scrubWikitext": true
26614 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26621 <nowiki> </nowiki>hi
26623 <nowiki> </nowiki> hello
26627 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26630 "modes": ["html2wt"],
26631 "scrubWikitext": true
26640 baz bang</td></tr></table>
26646 bar<span>boo</span></p>
26662 bar<span>boo</span>
26666 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26669 "modes": ["selser"],
26670 "scrubWikitext": true,
26672 [ "p", "html", " a\n b" ]
26683 1. New links that end in spaces
26686 "modes": ["html2wt"],
26687 "scrubWikitext": false
26690 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26691 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26692 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26694 [[Berlin ]]<nowiki/>is the capital of Germany.
26698 [[Boston ]] is a city.
26702 2. New links that end in spaces
26705 "modes": ["html2wt"],
26706 "scrubWikitext": true
26709 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26710 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26711 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26713 [[Berlin]] is the capital of Germany.
26717 [[Boston]] is a city.
26721 1. Table cells with escapable prefixes
26724 "modes": ["html2wt"],
26725 "scrubWikitext": false
26729 <tr><td>a</td></tr>
26730 <tr><td>-</td></tr>
26731 <tr><td>+</td></tr>
26737 |<nowiki>-</nowiki>
26739 |<nowiki>+</nowiki>
26744 2. Table cells with escapable prefixes
26747 "modes": ["html2wt"],
26748 "scrubWikitext": true
26752 <tr><td>a</td></tr>
26753 <tr><td>-</td></tr>
26754 <tr><td>+</td></tr>
26767 3a. Table cells with escapable prefixes after edits
26770 "modes": ["selser"],
26771 "scrubWikitext": true,
26773 [ "table tbody tr:first-child td:first-child", "remove"]
26787 3b. Table cells with escapable prefixes after edits
26790 "modes": ["selser"],
26791 "scrubWikitext": true,
26793 [ "table tbody tr:first-child td:first-child", "html", "-" ],
26800 |<span id="x">foo</span>+
26809 # FIXME: This test will fail because
26810 # normalization doesn't realize that the id attribute
26811 # will eliminate the escapable scenario
26813 4a. Table cells without escapable prefixes after edits
26816 "modes": ["selser"],
26817 "scrubWikitext": true,
26819 [ "#x", "html", "-" ]
26832 ## This tests normalizer's ability to discriminate between
26833 ## cells having identical content.
26835 4b. Table cells without escapable prefixes after edits
26838 "modes": ["selser"],
26839 "scrubWikitext": true,
26841 [ "td", "html", "-" ]
26854 ## This tests normalizer's ability to not be tripped by
26855 ## comments (and whitespace)
26857 4c. Table cells without escapable prefixes after edits
26860 "modes": ["selser"],
26861 "scrubWikitext": true,
26863 [ "table tbody tr td:first-child", "remove" ]
26878 ## This tests normalizer's ability to handle HTML cells
26880 4d. Table cells without escapable prefixes after edits
26883 "modes": ["selser"],
26884 "scrubWikitext": true,
26886 [ "td", "html", "-" ]
26891 <tr><td>a</td></tr>
26895 <tr><td>-</td></tr>
26899 ## T111151 Remove font elements without attributes
26901 5a. font tags without attributes should be dropped in scrubWikitext mode
26904 "modes": ["html2wt"],
26905 "scrubWikitext": true
26909 <font><font>bar</font></font>
26910 <font class="x">boo</font>
26914 <font class="x">boo</font>
26918 5b. font tags should not be dropped without scrubWikitext being enabled
26921 "modes": ["html2wt"],
26922 "scrubWikitext": false
26931 Escape nowiki DOM elements
26935 <nowiki><i>foo</i></nowiki>
26937 <nowiki>''foo''</nowiki>
26940 # This is meant to be an interim fix while we go about figuring out
26941 # how to not introduce these trailing <nowiki/>s in the first place.
26943 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
26947 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
26949 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
26950 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
26963 # ---------------------------------------------------
26964 # End of tests spec'ing wikitext serialization norms |
26965 # ---------------------------------------------------
26969 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
26977 <td><b>c</b><p>d</p></td>
26995 # -----------------------------------------------------------------
26996 # End of section for Parsoid-only html2wt tests for serialization
26998 # -----------------------------------------------------------------
27000 # -----------------------------------------------------------------
27001 # The following section of tests are primarily to spec behavior of
27002 # the selective serializer. All these tests have manual selser
27003 # changes. The automated selser changes for all tests handle the
27004 # wide variation of changes, but these tests here capture specs
27005 # deterministically.
27006 # ----------------------------------------------------------------
27010 Selser: New comments should not be lost
27013 "modes": ["selser"],
27015 [ "#a", "after", "<!--c1-->" ],
27016 [ "#b", "before", "<!--c2-->" ]
27020 <span id="a">a</span>
27022 <span id="b">b</span>
27024 <span id="a">a</span><!--c1-->
27026 <!--c2--><span id="b">b</span>
27031 Selser: Check for validity of DSR before using it
27034 "modes": ["selser"],
27036 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27040 <span id="a">a</span>
27042 {{DISPLAYTITLE:foo}}
27043 <span id="a">a</span>
27047 1. DOMDiff: Changes to <ref> content should be looked up using id
27050 "modes": ["selser"],
27052 ["#X", "after", "bar"],
27053 ["#Y", "after", "baz"]
27057 X <ref><span id="X">foo</span></ref>
27060 <ref name="a"><span id="Y">foo</span></ref>
27063 X <ref><span id="X">foo</span>bar</ref>
27066 <ref name="a"><span id="Y">foo</span>baz</ref>
27071 2. DOMDiff: Changes to <ref> content should be looked up using id
27074 "modes": ["selser"],
27076 ["#Z", "after", "bar"]
27080 A <ref>foo bar for a</ref>
27081 B <ref group="X" name="b" />
27085 <references group="X">
27086 <ref name="b"><span id="Z">foo</span></ref>
27089 A <ref>foo bar for a</ref>
27090 B <ref group="X" name="b" />
27094 <references group="X">
27095 <ref name="b"><span id="Z">foo</span>bar</ref>
27100 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27103 "modes": ["selser"],
27105 [ "div:first-child", "text", "bar" ]
27109 <div style="{{1x|color:red;}}%">foo</div>
27111 <div style="{{1x|color:red;}}%">bar</div>
27124 <li class="mw-empty-elt"></li>
27125 <li class="mw-empty-elt"></li>
27133 [[File:Thumb.png|thumb]]
27135 <div class="thumb tright">
27136 <div class="thumbinner" style="width:137px;"><a href="/wiki/File:Thumb.png" class="image"><img alt="Thumb.png" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a>
27137 <div class="thumbcaption">
27138 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>