1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
36 # You can also set the following parser properties via test options:
37 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
38 # wgLinkHolderBatchSize, wgRawHtml
40 # For testing purposes, temporary articles can created:
41 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
42 # where '/' denotes a newline.
44 # This is the standard article assumed to exist.
81 MediaWiki:bad image list
83 * [[File:Bad.jpg]] except [[Nasty page]]
111 Template:echo_with_span
117 Template:echo_with_div
130 Template:table_attribs
133 |</noinclude>style="color:red;"|Foo
137 Template:table_attribs_2
140 |</noinclude>style="color:red;"|Foo
145 Template:table_attribs_3
148 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
152 Template:table_attribs_4
154 | style="background-color:#DC241f;" width="10px" |
158 Template:table_attribs_5
161 |</noinclude>style="color:red;"||Bar
165 Template:table_attribs_6
167 style="background: <nowiki>
174 Template:table_attribs_7
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
181 Template:table_header_cells
183 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
189 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
193 Template:PartialTable
200 Template:image_attribs
203 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
206 ## See T48811 for details
208 Template:mixed_attr_content_template
210 style="color:red;" title="T48811"
216 Template:definition_list
263 Template:EmptyTRWithHTMLAttrTest
266 <tr align="center"></tr>
267 <tr><td>foo</td></tr>
268 <tr align="center"></tr>
269 <tr><td>bar</td></tr>
286 This is a simple paragraph.
288 <p>This is a simple paragraph.
293 Paragraphs with extra newline spacing
316 Paragraphs with newline spacing with comment lines in between
324 <!--foo--><!--More than 1 comment, still stripped-->
328 <!--foo--> <!----> <!-- bar -->
389 Paragraphs with newline spacing with non-empty white-space lines in between
416 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
424 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
463 Extra newlines: More paragraphs with indented comment
478 Extra newlines followed by heading
493 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
494 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
497 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
502 Extra newlines between heading and content are swallowed
510 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
511 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
518 http://fr.wikipedia.org/wiki/🍺
519 <!-- EasterEgg we love beer, better be able be able to link to it -->
521 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
525 # Note that the html+tidy output removes the spaces after the <li>,
526 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
527 # This is an issue for all tests with lists. We intentionally do
528 # *not* add html+tidy clauses for these, as we don't want to
529 # document/test the broken behavior. (Parsoid matches the non-tidy
530 # output in these cases.)
539 <li> Item 2</li></ul>
547 * plain''italic''plain
548 * plain''italic''plain''italic''plain
549 * plain'''bold'''plain
550 * plain'''bold'''plain'''bold'''plain
551 * plain''italic''plain'''bold'''plain
552 * plain'''bold'''plain''italic''plain
553 * plain''italic'''bold-italic'''italic''plain
554 * plain'''bold''bold-italic''bold'''plain
555 * plain'''''bold-italic'''italic''plain
556 * plain'''''bold-italic''bold'''plain
557 * plain''italic'''bold-italic'''''plain
558 * plain'''bold''bold-italic'''''plain
559 * plain l'''italic''plain
560 * plain l''''bold''' plain
563 <li> plain<i>italic</i>plain</li>
564 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
565 <li> plain<b>bold</b>plain</li>
566 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
567 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
568 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
569 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
570 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
571 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
572 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
573 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
574 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
575 <li> plain l'<i>italic</i>plain</li>
576 <li> plain l'<b>bold</b> plain</li></ul>
580 # this example taken from the [[simple:Moon]] article (bug 47326)
582 Italics and possessives (1)
584 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
586 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
590 # this example taken from [[en:Flaming Pie]] (bug 49926)
592 Italics and possessives (2)
594 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
596 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
600 # this example taken from [[en:Dictionary]] (bug 49926)
602 Italics and possessives (3)
604 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
606 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
612 ### 2-quote opening sequence tests
615 Italics and bold: 2-quote opening sequence: (2,2)
624 Italics and bold: 2-quote opening sequence: (2,3)
633 Italics and bold: 2-quote opening sequence: (2,4)
643 # same html as previous, but wikitext adjusted to match parsoid html2wt
645 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
647 ''foo<nowiki>''</nowiki>''
653 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
655 Italics and bold: 2-quote opening sequence: (2,5)
668 # same html as previous, but wikitext adjusted to match parsoid html2wt
670 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
672 ''foo'''''<nowiki/>'''
683 ### 3-quote opening sequence tests
687 Italics and bold: 3-quote opening sequence: (3,2)
696 Italics and bold: 3-quote opening sequence: (3,3)
705 Italics and bold: 3-quote opening sequence: (3,4)
713 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
715 Italics and bold: 3-quote opening sequence: (3,5)
728 # same html as previous, but wikitext adjusted to match parsoid html2wt
730 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
732 '''foo'''''<nowiki/>''
743 ### 4-quote opening sequence tests
747 Italics and bold: 4-quote opening sequence: (4,2)
757 # same html as previous, but wikitext adjusted to match parsoid html2wt
759 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
761 <nowiki>''</nowiki>''foo''
768 Italics and bold: 4-quote opening sequence: (4,3)
777 Italics and bold: 4-quote opening sequence: (4,4)
787 # same html as previous, but wikitext adjusted to match parsoid html2wt
789 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
797 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
799 Italics and bold: 4-quote opening sequence: (4,5)
808 <p>'<b>foo</b><i></i>
812 # same html as previous, but wikitext adjusted to match parsoid html2wt
814 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
816 '<nowiki/>'''foo'''''<nowiki/>''
821 <p>'<b>foo</b><i></i>
827 ### 5-quote opening sequence tests
831 Italics and bold: 5-quote opening sequence: (5,2)
841 # same html as previous, but wikitext adjusted to match parsoid html2wt
843 Italics and bold: 5-quote opening sequence: (5,2+3)
852 Italics and bold: 5-quote opening sequence: (5,3)
862 # same html as previous, but wikitext adjusted to match parsoid html2wt
864 Italics and bold: 5-quote opening sequence: (5,3+2)
873 Italics and bold: 5-quote opening sequence: (5,4)
879 <p><i><b>foo'</b></i>
884 Italics and bold: 5-quote opening sequence: (5,5)
893 Italics and bold: 5-quote opening sequence: (5,6)
897 <p><i><b>foo'</b></i>
902 ### multiple quote sequences in a line
905 Italics and bold: multiple quote sequences: (2,4,2)
911 <p><i>foo'<b>bar</b></i>
916 # same html as previous, but wikitext adjusted to match parsoid html2wt
918 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
920 ''foo'<nowiki/>'''bar'''''
922 <p><i>foo'<b>bar</b></i>
928 Italics and bold: multiple quote sequences: (2,4,3)
934 <p><i>foo'<b>bar</b></i>
939 # same html as previous, but wikitext adjusted to match parsoid html2wt
941 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
943 ''foo'<nowiki/>'''bar'''''
945 <p><i>foo'<b>bar</b></i>
951 Italics and bold: multiple quote sequences: (2,4,4)
957 <p><i>foo'<b>bar'</b></i>
962 # same html as previous, but wikitext adjusted to match parsoid html2wt
964 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
966 ''foo'<nowiki/>'''bar'<nowiki/>'''''
968 <p><i>foo'<b>bar'</b></i>
973 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
975 Italics and bold: multiple quote sequences: (3,4,2)
984 <p><b>foo'</b>bar<i></i>
988 # same html as previous, but wikitext adjusted to match parsoid html2wt
990 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
994 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
999 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1004 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1006 Italics and bold: multiple quote sequences: (3,4,3)
1015 <p><b>foo'</b>bar<b></b>
1019 # same html as previous, but wikitext adjusted to match parsoid html2wt
1021 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1023 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1028 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1033 ### other quote tests
1036 Italics and bold: other quote tests: (2,3,5)
1038 ''this is about '''foo's family'''''
1040 <p><i>this is about <b>foo's family</b></i>
1046 Italics and bold: other quote tests: (2,(3,3),2)
1048 ''this is about '''foo's''' family''
1050 <p><i>this is about <b>foo's</b> family</i>
1056 Italics and bold: other quote tests: (3,2,3,2)
1060 '''this is about ''foo'''s family''
1062 <p><b>this is about <i>foo</i></b><i>s family</i>
1067 # same html as previous, but wikitext adjusted to match parsoid html2wt
1069 Italics and bold: other quote tests: (3,2,3+2+2,2)
1071 '''this is about ''foo'''''<nowiki/>''s family''
1073 <p><b>this is about <i>foo</i></b><i>s family</i>
1079 Italics and bold: other quote tests: (3,2,3,3)
1081 '''this is about ''foo'''s family'''
1083 <p>'<i>this is about </i>foo<b>s family</b>
1089 Italics and bold: other quote tests: (3,(2,2),3)
1091 '''this is about ''foo's'' family'''
1093 <p><b>this is about <i>foo's</i> family</b>
1099 Italicized possessive
1101 The ''[[Main Page]]'''s talk page.
1103 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1106 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1110 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1111 (Requires tidy for PHP parser output to be fixed up)
1113 parsoid=wt2html,wt2wt
1130 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1131 <td><i>a</i></td><td><i>b</i></td></tr>
1140 Non-html5 tags should be accepted
1142 <center>''foo''</center>
1144 <font>''foo''</font>
1145 <strike>''foo''</strike>
1148 <center><i>foo</i></center>
1149 <p><big><i>foo</i></big>
1150 <font><i>foo</i></font>
1151 <strike><i>foo</i></strike>
1157 <wbr> is valid wikitext (bug 52468)
1165 # <strike> is HTML4, <s> is HTML4/5.
1167 <s> or <strike> for strikethrough
1169 <strike>strike</strike>
1173 <p><strike>strike</strike>
1181 Text-level semantic html elements in wikitext
1184 <strong>text</strong>
1200 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1207 <strong>text</strong>
1223 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1231 # test cases taken from
1232 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1234 Ruby markup (W3C-style)
1236 ; Mono-ruby for individual base characters
1237 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1239 : <ruby>今日<rt>きょう</rt></ruby>
1241 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1243 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1245 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1247 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1248 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1249 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1252 <dl><dt> Mono-ruby for individual base characters</dt>
1253 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1254 <dt> Group ruby</dt>
1255 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1256 <dt> Jukugo ruby</dt>
1257 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1258 <dt> Inline ruby</dt>
1259 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1260 <dt> Double-sided ruby</dt>
1261 <dd> <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1263 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1264 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1265 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1270 # The next two test different paths in the sanitizer.
1272 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1274 <blockquote|>a</blockquote>
1276 <b→> doesn't terminate </b→>
1278 <bä> doesn't terminate </bä>
1280 <boo> doesn't terminate </boo>
1282 <s.foo> doesn't terminate </s.foo>
1286 <p><blockquote|>a</blockquote>
1287 </p><p><b→> doesn't terminate </b→>
1288 </p><p><bä> doesn't terminate </bä>
1289 </p><p><boo> doesn't terminate </boo>
1290 </p><p><s.foo> doesn't terminate </s.foo>
1291 </p><p><sub-ID#1>
1295 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1296 # If the non-word-character tag made it through the sanitizer, tidy
1297 # would munge it up.
1299 Non-word characters don't terminate tag names + tidy
1301 <blockquote|>a</blockquote>
1303 <b→> doesn't terminate </b→>
1305 <bä> doesn't terminate </bä>
1307 <boo> doesn't terminate </boo>
1309 <s.foo> doesn't terminate </s.foo>
1313 <p><blockquote|>a</p>
1314 <p><b→> doesn't terminate </b→></p>
1315 <p><bä> doesn't terminate </bä></p>
1316 <p><boo> doesn't terminate </boo></p>
1317 <p><s.foo> doesn't terminate </s.foo></p>
1318 <p><sub-ID#1></p>
1322 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1323 ### This checks that HTML5 tags (with non-word characters in the tag
1324 ### name) make it safely through the parser -- the Sanitizer will
1325 ### munge them later, as it should.
1328 Non-word characters are valid in extension tags (T19663)
1339 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1343 Isolated close tags should be treated as literal text (bug 52760)
1351 <p><s.foo>s</p>
1353 <p><s.foo>s</p>
1357 ### Special characters
1361 Bare pipe character (bug 52363)
1370 Bare pipe character from a template (bug 52363)
1379 ### <nowiki> test cases
1383 <nowiki> unordered list
1385 <nowiki>* This is not an unordered list item.</nowiki>
1387 <p>* This is not an unordered list item.
1390 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1396 <nowiki>Lorem ipsum dolor
1404 <p>Lorem ipsum dolor
1413 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1425 :There is not nowiki.
1426 :There is <nowiki>nowiki</nowiki>.
1428 #There is not nowiki.
1429 #There is <nowiki>nowiki</nowiki>.
1431 *There is not nowiki.
1432 *There is <nowiki>nowiki</nowiki>.
1434 <dl><dd>There is not nowiki.</dd>
1435 <dd>There is nowiki.</dd></dl>
1436 <ol><li>There is not nowiki.</li>
1437 <li>There is nowiki.</li></ol>
1438 <ul><li>There is not nowiki.</li>
1439 <li>There is nowiki.</li></ul>
1442 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1443 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1445 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1446 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1448 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1449 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1453 Entities inside <nowiki>
1455 <nowiki><</nowiki>
1462 Entities inside template parameters
1468 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1472 Properly escape nowiki when combined with other wiki markup
1476 <p>* </nowiki> tag</p>
1478 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1482 T93824: Put escaped HTML tags inside nowiki
1486 <p><h2>foo</h2></p>
1488 <nowiki><h2>foo</h2></nowiki>
1492 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1496 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1497 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1498 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1500 This text: L'[[Foo]]
1501 This text: L<nowiki>''</nowiki>[[Foo]]
1502 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1505 # This test fails because wikitext whitespace is not normalized before comparing.
1507 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1511 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1514 This text : L<nowiki>''</nowiki>[[Foo]]
1517 # This test and the next one are html2wt only as they test that incorrect wikitext
1518 # passed in template arguments gets escaped or wrapped in nowikis where required.
1520 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1524 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1525 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1527 {{echo|foo{{!}}bar}}
1528 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1532 T53961: Output correct nowikis in template arguments
1536 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1537 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1538 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1539 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1540 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1543 {{echo|<nowiki>a }} b</nowiki>}}
1544 {{echo|<nowiki>a [[ b</nowiki>}}
1545 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1546 {{echo|a <nowiki>}</nowiki>}}
1550 Cases where "!!" needs nowiki protection
1555 <tr><th>this needs protection !! here</th></tr>
1559 <tr><th>this does not need
1560 protection !! here</th></tr>
1564 !<nowiki>this needs protection !! here</nowiki>
1577 Comments and Indent-Pre
1579 <!-- comment 1 --> asdf
1581 <!-- comment 1 --> asdf
1584 <!-- comment 1 --> asdf
1585 <!-- comment 2 -->xyz
1587 <!-- comment 1 --> asdf
1588 <!-- comment 2 --> xyz
1644 asdf<!-- comment 1 -->jkl
1654 <!-- foo --> b <!-- bar -->
1668 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1674 Comment semantics and delimiters
1676 <!-- --><!----><!-----><!------>
1680 <!-- --><!----><!-----><!------>
1684 Comment semantics and delimiters, redux
1686 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1687 -- foo -- funky huh? ... -->
1691 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1692 -- foo -- funky huh? ... -->
1696 Comment semantics and delimiters: directors cut
1698 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1699 everything starting with < followed by !-- until the first -- and > we see,
1700 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1706 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1707 everything starting with < followed by !-- until the first -- and > we see,
1708 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1713 Comment semantics: nesting
1715 <!--<!-- no, we're not going to do anything fancy here -->-->
1720 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1723 # Parsoid closes the unclosed comment, even if it means a slight
1726 Comment semantics: unclosed comment at end
1728 parsoid=wt2html,html2html
1730 <!--This comment will run out to the end of the document
1734 <!--This comment will run out to the end of the document-->
1738 Comment semantics: normalize comments to play nice with XML and browsers
1740 <!-- Browsers --!> think this is closed -->
1741 <!--> This would normally be text -->
1742 <!---> As would this -->
1743 <!-- XML doesn't like trailing dashes -------->
1744 <!-- Nor doubled hyphens -- anywhere in the data -->
1745 But this is not a comment.
1747 <p>But this is not a comment.
1750 <!-- Browsers --!> think this is closed -->
1751 <!--> This would normally be text -->
1752 <!---> As would this -->
1753 <!-- XML doesn't like trailing dashes -------->
1754 <!-- Nor doubled hyphens -- anywhere in the data -->
1755 <p>But this is not a comment.</p>
1759 Comment semantics: round-trip even text which contains encoded -->
1761 <!-- hello & goodbye - > --> --&gt; --&xx -->
1763 <!-- hello & goodbye - > --> --&gt; --&xx -->
1767 Comment in template title
1776 Comment on its own line post-expand
1788 Comment on its own line post-expand with non-significant whitespace
1800 Multiple comments should still parse as SOL-transparent
1802 parsoid=wt2html,wt2wt
1805 <!--c2--><!--c3--><!--c4-->*b
1814 <!--c2--><!--c3--><!--c4-->
1821 ### paragraph wrapping tests
1836 Block tag on one line (<div>)
1852 Block tag on one line (<blockquote>)
1854 a <blockquote>foo</blockquote>
1858 a <blockquote>foo</blockquote>
1870 Block tag on both lines (<div>)
1887 Block tag on both lines (<blockquote>)
1889 a <blockquote>foo</blockquote>
1891 b <blockquote>foo</blockquote>
1893 a <blockquote>foo</blockquote>
1894 b <blockquote>foo</blockquote>
1908 Multiple lines without block tags
1932 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1933 # So, we have a separate section for Parsoid. We don't want
1934 # to mimic this stripping behavior in Parsoid. It affects
1935 # editing experience and also requires us to maintain additional
1938 Empty lines between lines with block tags
1976 <div data-parsoid='{"stx":"html"}'></div>
1979 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1982 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1984 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1987 <div data-parsoid='{"stx":"html"}'>e</div>
1990 ## PHP parser emits output which is broken
1992 Unclosed HTML p-tags should be handled properly
2005 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2010 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2011 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2014 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2018 a [[Category:A1]] [[Category:A2]]
2023 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2027 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2033 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2037 ### Preformatted text
2046 And a [[Main Page|link]]
2052 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2057 Tabs don't trigger preformatted text
2061 This is preformatted text.
2067 <pre>This is preformatted text.
2072 preformatted text.</p>
2073 <pre>This is preformatted text.
2078 Space before tab needs nowiki pre protection
2084 <nowiki> </nowiki> a
2088 Ident preformatting with inline content
2099 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2116 Regression with preformatted in <center>
2130 Bug 52763: Preformatted in <blockquote>
2136 indented cell (no pre-wrapping!)
2146 <p> indented cell (no pre-wrapping!)
2154 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2171 Bug 15491: <ins>/<del> in blockquote
2174 Foo <del>bar</del> <ins>baz</ins> quux
2178 <p>Foo <del>bar</del> <ins>baz</ins> quux
2184 # Note that the p-wrapping is newline sensitive, which could be
2185 # considered a bug: tidy will wrap only the 'Foo' in the example
2186 # below in a <p> tag. (see comment 23-25 of bug #6200)
2188 Bug 15491: <ins>/<del> in blockquote (2)
2190 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2193 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2199 <del>bar</del> <ins>baz</ins> quux</blockquote>
2203 <pre> with attributes (bug 3202)
2205 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2207 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2212 <pre> with width attribute (bug 3202)
2214 <pre width="8">Narrow screen goodies</pre>
2216 <pre width="8">Narrow screen goodies</pre>
2221 <pre> with forbidden attribute (bug 3202)
2223 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2225 <pre width="8">Narrow screen goodies</pre>
2230 Entities inside <pre>
2239 <pre> with forbidden attribute values (bug 3202)
2241 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2243 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2248 <nowiki> inside <pre> (bug 13238)
2256 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2264 <pre><nowiki>Foo</nowiki></pre>
2269 <nowiki> inside of #tag:pre
2271 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2273 <pre>Foo →bar</pre>
2276 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"#tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2280 <nowiki> and <pre> preference (first one wins)
2309 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2311 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2314 <p><span typeof="mw:Nowiki">
2323 </pre> inside nowiki
2325 <nowiki></pre></nowiki>
2331 # Parsoid doesn't strip empty tags, like Tidy does.
2333 Empty pre; pre inside other HTML tags (bug 54946)
2335 parsoid=wt2html,wt2wt
2366 HTML pre followed by indent-pre
2376 # Note that tidy removes the empty <p> tags from the start and end.
2377 # Parsoid does not, by design.
2381 <p><pre>foo</pre></p>
2387 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2391 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2399 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2409 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2421 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2442 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2446 {{echo| foo}}{{echo| bar}}
2451 {{echo|<!--cmt--> foo}}
2453 <!--cmt-->{{echo| foo}}
2455 {{echo|{{echo| }}bar}}
2473 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2510 Pres with newline attributes
2515 <pre class="one two">hi</pre>
2519 two" data-parsoid='{"stx":"html"}'>hi</pre>
2523 Things that look like <pre> tags aren't treated as such
2525 Barack Obama <President> of the United States
2526 <President></President>
2528 <p>Barack Obama <President> of the United States
2529 <President></President>
2534 Handle broken pre-like tags (bug 64025)
2538 {{echo|<pre <pre>x</pre>}}
2540 <table><pre </table>
2543 <table><pre </table>
2551 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2560 Parsoid: handle pre with space after attribute
2564 <pre style="width:50%;" >{{echo|foo}}</pre>
2566 <pre style="width:50%;">{{echo|foo}}</pre>
2569 <pre style="width:50%;">{{echo|foo}}</pre>
2572 # TODO / maybe: fix wt2wt for this
2574 Parsoid: Don't paragraph-wrap fosterable content
2600 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2628 #--------------------------------------------------------------------
2629 # Transclusion parameter whitespace stripping tests
2630 # Behavior is different for positional and named parameters
2631 #--------------------------------------------------------------------
2633 Templates: Strip leading and trailing whitespace from named-param values
2637 {{echo|1= {{echo|b}} }}
2650 <ul><li> d</li></ul>
2655 Templates: Don't strip whitespace from positional-param values
2659 {{echo|{{echo|b}} }}
2691 <ul><li> f</li></ul>
2699 Templates: Handle empty comment-and-ws-only lines correctly
2702 <!--should be ignored-->
2703 <!--should be ignored as well-->
2712 Templates: Handle comments in the target
2715 <!-- should be ignored -->
2718 {{echo<!-- should be ignored -->
2721 {{echo<!-- should be ignored -->|foo}}
2723 {{<!-- should be ignored -->echo|foo}}
2725 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2727 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2729 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2731 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2735 Templates: Handle comments in parameter names (bug 67657)
2738 <!-- should be ignored -->
2742 <!-- should be ignored -->
2745 {{echo|1<!-- should be ignored -->=foo}}
2747 {{echo|<!-- should be ignored -->1=foo}}
2749 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2751 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
2753 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2755 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
2759 Templates: Other wikitext in parameter names (bug 67657)
2763 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2769 #--------------------------------------------------------------------
2770 # Transclusion parameter escaping tests
2771 #--------------------------------------------------------------------
2773 Templates: Parsoid parameter escaping test 1
2775 {{echo|[foo]|{{echo|[bar]}}}}
2779 <p about="#mwt1" typeof="mw:Transclusion"
2780 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2784 Parsoid: Pipes in external links in template parameter
2786 {{echo|[{{echo|http://example.com}} link]}}
2788 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2790 <p><a rel="mw:ExtLink" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
2794 Parsoid: pipe in transclusion parameter
2796 {{echo|http://foo.com/a|b}}
2798 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2800 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2801 typeof="mw:Transclusion"
2802 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a|b</a></p>
2806 Parsoid: Pipe in external link target and content in template parameter
2808 parsoid=html2wt,wt2wt
2810 {{echo|[http://foo.com/a|b a|b]}}
2812 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2814 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2815 typeof="mw:Transclusion"
2816 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2817 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2821 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2825 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2827 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main_Page bar]</p>
2831 Templates: Don't escape already nowiki-escaped text in template parameters
2833 parsoid=html2wt,wt2wt
2835 {{echo|foo<nowiki>|</nowiki>bar}}
2836 {{echo|<nowiki><div></nowiki>}}
2837 {{echo|<nowiki></nowiki>}}
2839 <p>foo|bar <div></p>
2841 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
2842 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
2843 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
2849 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2851 parsoid=html2wt,wt2wt
2853 {{echo|{{echo|1=bar}}}}
2857 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
2862 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2868 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
2873 Templates: Preserve blank parameter names
2879 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2883 Templates: Preserve blank parameter names in other positions
2885 {{blank_param|bar|=foo}}
2889 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
2894 ### Parsoid-centric tests for testing RT edge cases for pre
2898 1a. Indent-Pre and Comments
2911 1b. Indent-Pre and Comments
2924 1c. Indent-Pre and Comments
2937 1d. Indent-Pre and Comments
2938 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2951 2a. Indent-Pre and tables
2972 2b. Indent-Pre and tables
2988 2c. Indent-Pre and tables (bug 42252)
3005 2d. Indent-Pre and tables
3022 <tbody><tr><td> b</td></tr>
3027 2e. Indent-Pre and table-line syntax
3040 2f. Indent-pre started by table-line syntax
3059 3a. Indent-Pre and block tags (single-line html)
3063 c <blockquote> foo </blockquote>
3068 c <blockquote> foo </blockquote>
3069 <pre><span> foo </span>
3072 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3073 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3074 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3075 <pre><span> foo </span>
3092 3b. Indent-Pre and block tags (multi-line html)
3097 <pre>a <span>foo</span>
3102 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3103 b <div data-parsoid='{"stx":"html"}'> foo </div>
3113 3c. Indent-Pre and block tags (pre-content on separate line)
3177 4. Indent-Pre and extension tags
3183 a <ul class="gallery mw-gallery-traditional">
3184 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3185 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
3186 <div class="gallerytext">
3193 <ul class="gallery mw-gallery-traditional">
3194 <li class="gallerybox" style="width: 155px">
3195 <div style="width: 155px">
3196 <div class="thumb" style="width: 150px;">
3197 <div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div>
3199 <div class="gallerytext"></div>
3206 Table wikitext syntax outside wiki-tables
3209 ! not a table heading
3212 | class="foo bar" | baz
3219 ! not a table heading
3222 | class="foo bar" | baz
3231 Render paragraphs when indent-pre is suppressed in blocklevels
3248 4. Multiple spaces at start-of-line
3266 ## NOTE: the leading white-space chars on empty line are significant
3268 5a. White-space in indent-pre
3280 ## NOTE: the leading white-space chars on empty line are significant
3282 5b. White-space in indent-pre
3301 5c. White-space in indent-pre
3314 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3337 7a. Indent-pre and category links
3339 parsoid=wt2html,wt2wt
3341 [[Category:foo]] <!-- No pre-wrapping -->
3342 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3345 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3346 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3349 ## We used to, but no longer wt2wt this test since the default serializer
3350 ## will normalize all categories to serialize on their own line.
3351 ## This wikitext usage is going to be fairly uncommon in production and
3352 ## selser will take care of preserving formatting in those scenarios.
3354 7b. Indent-pre and category links
3359 [[Category:foo]] {{echo|b}}
3361 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3362 <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
3366 Indent-Pre: Newlines in comments shouldn't affect sol state
3380 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3384 HTML-pre: 1. embedded newlines
3419 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3421 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3425 <pre data-parsoid='{"stx":"html"}'>
3430 <pre data-parsoid='{"stx":"html"}'>
3438 HTML-pre: big spaces
3474 <pre data-parsoid='{"stx":"html"}'>
3493 HTML-pre: 2: indented text
3506 HTML-pre: 3: other wikitext
3525 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3534 ### Definition lists
3541 <dl><dt> name </dt>
3542 <dd> Definition</dd></dl>
3547 Definition list for indentation only
3551 <dl><dd> Indented text</dd></dl>
3556 Definition list with no space
3561 <dd>Definition</dd></dl>
3566 Definition list with URL link
3568 ; http://example.com/ : definition
3570 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3571 <dd> definition</dd></dl>
3576 Definition list with bracketed URL link
3578 ;[http://www.example.com/ Example]:Something about it
3580 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3581 <dd>Something about it</dd></dl>
3586 Definition list with wikilink containing colon
3588 ; [[Help:FAQ]]: The least-read page on Wikipedia
3590 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
3591 <dd> The least-read page on Wikipedia</dd></dl>
3595 # At Brion's and JeLuF's insistence... :)
3597 Definition list with news link containing colon
3599 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3601 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3602 <dd> This isn't even a real newsgroup!</dd></dl>
3605 <dl><dt> <a rel="mw:ExtLink" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'> This isn't even a real newsgroup!</dd></dl>
3609 Malformed definition list with colon
3611 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3613 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
3618 Definition lists: colon in external link text
3620 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3622 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3623 <dd> OK, I made that up</dd></dl>
3628 Definition lists: colon in HTML attribute
3630 ;<b style="display: inline">bold</b>
3632 <dl><dt><b style="display: inline">bold</b></dt></dl>
3637 Definition lists: self-closed tag
3639 ;one<br/>two : two-line fun
3641 <dl><dt>one<br />two </dt>
3642 <dd> two-line fun</dd></dl>
3647 Bug 11748: Literal closing tags
3651 <dd>test test test test test</dd>
3653 <dd>test test test test test</dd>
3658 <dd>test test test test test</dd>
3660 <dd>test test test test test</dd>
3666 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3669 ; term : description
3674 <dl><dt> term </dt>
3675 <dd> description</dd></dl>
3676 <ul><li> unordered</li></ul>
3683 Definition list with empty definition and following paragraph
3695 Nested definition lists using html syntax
3704 Definition Lists: No nesting: Multiple dd's
3717 Definition Lists: Indentation: Regular
3725 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3730 Definition Lists: Indentation: Missing 1st level
3736 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3741 Definition Lists: Indentation: Multi-level indent
3745 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3750 Definition Lists: Hacky use to indent tables
3757 should be left alone
3759 <dl><dd><dl><dd><table>
3764 </td></tr></table></dd></dl></dd></dl>
3766 should be left alone
3771 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3779 should be left alone
3782 <dl><dd><dl><dd><table><tr>
3785 </tr></table><!-- bar --></dd></dl></dd></dl>
3787 should be left alone</p>
3791 Definition Lists: Hacky use to indent tables, with comment before table
3797 <dl><dd><dl><dd><!-- foo --><table><tr>
3799 </tr></table></dd></dl></dd></dl>
3802 # The trailing whitespace in this test is to catch a regression in
3803 # Parsoid after T54473.
3805 Definition Lists: Hacky use to indent tables (WS-insensitive)
3814 </td></tr></table></dd></dl>
3818 <tbody><tr><td>a</td></tr>
3819 </tbody></table> </dd></dl>
3822 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3823 ## as an empty dt item. It also ignores all but the last ";" when followed
3824 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3825 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3828 ## Ex: ";;t2 ::d2" is transformed into:
3840 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3841 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3852 ## All Parsoid only definition list tests have this difference.
3854 ## See also: https://phabricator.wikimedia.org/T8569
3855 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3858 Table / list interaction: indented table with lists in table contents
3873 <ul><li> b</li></ul>
3877 <ul><li> d</li></ul>
3878 </td></tr></table></dd></dl>
3883 Table / list interaction: lists nested in tables nested in indented lists
3906 </td></tr></table></dd></dl>
3913 Definition Lists: Nesting: Multi-level (Parsoid only)
3943 Definition Lists: Nesting: Test 2 (Parsoid only)
3970 Definition Lists: Nesting: Test 3 (Parsoid only)
4013 Definition Lists: Nesting: Test 4
4018 <dl><dd><dl><dd><dl><dt>t3</dt>
4019 <dd>d3</dd></dl></dd></dl></dd></dl>
4024 ## The Parsoid team believes the following three test exposes a
4025 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4026 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4027 ## It also exposes a "misfeature" in tidy, which doesn't like
4028 ## <dl> tags with a single <dt> child; it converts the <dt> into
4029 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4031 Definition Lists: Mixed Lists: Test 1
4037 <dl><dd><dl><dt><ul><li> foo</li>
4038 <li> bar</li></ul></dt></dl>
4039 <dl><dt> baz</dt></dl></dd></dl>
4074 Definition Lists: Mixed Lists: Test 2
4079 <ul><li><dl><dd> d1</dd>
4080 <dd> d2</dd></dl></li></ul>
4086 Definition Lists: Mixed Lists: Test 3
4091 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4092 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4098 Definition Lists: Mixed Lists: Test 4
4103 <ul><li><dl><dt>d1 </dt>
4106 <dd>d4</dd></dl></li></ul>
4112 Definition Lists: Mixed Lists: Test 5
4118 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4124 Definition Lists: Mixed Lists: Test 6
4129 <ol><li><ul><li><dl><dd>d1
4130 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4136 Definition Lists: Mixed Lists: Test 7
4141 <dl><dd><ul><li> d1</li>
4142 <li> d2</li></ul></dd></dl>
4148 Definition Lists: Mixed Lists: Test 8
4153 <dl><dd><ul><li> d1</li></ul>
4154 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4160 Definition Lists: Mixed Lists: Test 9
4164 <ul><li><dl><dt>foo </dt>
4165 <dd>bar</dd></dl></li></ul>
4171 Definition Lists: Mixed Lists: Test 10
4175 <ul><li><ol><li><dl><dt>foo </dt>
4176 <dd>bar</dd></dl></li></ol></li></ul>
4180 # The Parsoid team disagrees with the PHP parser's seemingly-random
4181 # rules regarding dd/dt on the next two tests. Parsoid is more
4182 # consistent, and recognizes the shared nesting and keeps the
4183 # still-open tags around until the nesting is complete.
4184 # (And tidy again converts <dt> to <dd> before 'bar'.)
4187 Definition Lists: Mixed Lists: Test 11
4192 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4193 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4194 <dl><dt>boo </dt>
4195 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4250 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4251 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4255 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4256 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4265 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4267 # * The test is wrong, there are two colons where there should be :;
4268 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4270 Definition Lists: Weird Ones: Test 1
4272 *#;*::;; foo : bar (who uses this?)
4274 <ul><li><ol><li><dl><dt> foo </dt>
4275 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)</dt></dl></dd></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
4294 <dt>bar (who uses this?)</dt>
4326 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4327 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4339 Definition Lists: colons occurring in tags
4357 <dt><span>a:b</span></dt>
4384 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4386 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4387 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4388 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4389 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4391 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4392 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4393 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4397 Definition Lists: colons and tables 1
4409 </td></tr></table></dd></dl>
4413 </td></tr></table></dd></dl>
4417 # Parsoid's output (as documented below) differs from php's in this case.
4418 # This is probably a bug. If we fixup parsoid to match php's output, the
4419 # above test should pass and the below test case can be removed. It is
4420 # unclear which output is more desirable.
4423 Definition Lists: colons and tables 2
4435 </td></tr></table></dd>
4439 </td></tr></table></dd></dl>
4443 Definition Lists: template interaction
4445 ::{{definition_list}}
4448 ::{{definition_list}}
4453 <dl><dd><dl data-parsoid='{}'><dd about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[":",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}}]}'>one</dd><span about="#mwt1">
4454 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4456 <dl><dd data-parsoid='{}'>one
4457 <dl><dd about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":["::",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}},"\n:::two\n:::three"]}'>one</dd><span about="#mwt2">
4458 </span><dd about="#mwt2">two
4460 <dd>three</dd></dl></dd>
4461 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4469 External links: non-bracketed
4471 Non-bracketed: http://example.com
4473 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4477 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4479 External links: numbered
4481 Numbered: [http://example.com]
4482 Numbered: [http://example.net]
4483 Numbered: [http://example.com]
4485 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4486 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4487 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4490 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4491 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4492 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4496 External links: specified text
4498 Specified text: [http://example.com link]
4500 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4505 External links: trail
4507 Linktrails should not work for external links: [http://example.com link]s
4509 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4514 External links: dollar sign in URL
4516 http://example.com/1$2345
4518 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4522 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4524 External links: dollar sign in URL (autonumber)
4526 [http://example.com/1$2345]
4528 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4531 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4535 External links: open square bracket forbidden in URL (bug 4377)
4537 parsoid=wt2html,wt2wt,html2html
4539 http://example.com/1[2345
4541 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4544 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4548 External links: open square bracket forbidden in URL (named) (bug 4377)
4550 parsoid=wt2html,html2html
4552 [http://example.com/1[2345]
4554 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4557 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4560 # parsoid adds a space before the link name
4562 External links: open square bracket forbidden in URL (named) (bug 4377)
4565 [http://example.com/1 [2345]
4567 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4572 External links: nowiki in URL link text (bug 6230)
4574 [http://example.com/ <nowiki>''example site''</nowiki>]
4576 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4581 External links: newline forbidden in text (bug 6230 regression check)
4583 [http://example.com/ first
4586 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4592 External links: Pipe char between url and text
4594 [http://example.com | link]
4596 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4601 External links: protocol-relative URL in brackets
4603 [//example.com/ Test]
4605 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4609 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4611 External links: protocol-relative URL in brackets without text
4615 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4618 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4622 External links: protocol-relative URL in free text is left alone
4626 <p>//example.com/Foo
4631 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4633 foo//example.com/Foo
4635 <p>foo//example.com/Foo
4640 External links: with no contents
4642 [http://en.wikipedia.org/wiki/Foo]
4644 [[wikipedia:Foo|Bar]]
4646 [[wikipedia:Foo|<span>Bar</span>]]
4648 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4649 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4650 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4653 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4654 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4655 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4659 External links: Free with trailing punctuation
4669 http://example.com/url_with_(brackets)
4670 (http://example.com/url_without_brackets)
4671 http://example.com/url_with_entity&
4672 http://example.com/url_with_entity&
4673 http://example.com/url_with_entity&
4674 http://example.com/url_with_entity
4675 http://example.com/url_with_entity 
4676 http://example.com/url_with_entity 
4677 http://example.com/url_with_entity<
4678 http://example.com/url_with_entity<
4679 http://example.com/url_with_entity<
4681 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4682 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4683 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4684 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4685 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4686 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4687 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4688 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4689 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4690 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4691 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4692 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4693 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4694 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4695 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4696 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4697 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4698 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4699 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4702 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4703 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4704 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4705 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4706 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4707 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4708 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4709 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4710 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4711 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4712 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4713 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4714 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4715 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4716 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
4717 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4718 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4719 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4720 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
4724 External links: tricky Parsoid html2html case
4726 parsoid=wt2html,wt2wt,html2html
4728 http://example.com/url_with_entity&amp;
4730 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4733 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4737 External links: Free with trailing quotes (T113666)
4739 '''News:''' Stuff here
4743 <p><b>News:</b> Stuff here
4744 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4747 <p><b>News:</b> Stuff here</p>
4748 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4752 External links: Lone protocols are never linked (T105697)
4771 External links: No preceding word characters allowed (bug 65278)
4773 NOPEhttp://example.com
4774 N0http://example.com
4775 ok:http://example.com
4776 ok-http://example.com
4778 <p>NOPEhttp://example.com
4779 N0http://example.com
4780 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4781 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
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
6592 Table with empty line following the start tag
6610 Table attributes with empty value
6612 parsoid=wt2html,html2html
6625 <tbody><tr><td style=""> hello</td></tr>
6630 Wikitext table with a lot of comments
6653 Wikitext table comments represented in parsoid dom
6655 {|<!--c1--><!--c2-->
6666 <table><!--c1--><!--c2-->
6667 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6668 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6673 Wikitext table with double-line table cell
6690 Table cell with a single comment
6707 Table-cell after a comment-only-empty-line
6724 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6726 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6732 Build table with {{!}}
6734 {{{!}} class="wikitable"
6737 {{!}}- style="color:red;"
6738 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6741 <table class="wikitable">
6747 <tr style="color:red;">
6749 <td style="color:red;"> second data
6755 Build table with pipe as data
6757 {| class="wikitable"
6760 |- style="color:red;"
6761 | data || style="color:red;" | second data
6763 | style="color:red;" | data with | || style="color:red;" | second data with |
6765 || data with | ||| second data with |
6768 <table class="wikitable">
6774 <tr style="color:red;">
6776 <td style="color:red;"> second data
6779 <td style="color:red;"> data with | </td>
6780 <td style="color:red;"> second data with |
6783 <td> data with | </td>
6784 <td> second data with |
6790 Build table with wikilink
6792 {| class="wikitable"
6793 ! header || second header
6794 |- style="color:red;"
6795 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6797 | data || second data [[Main Page|link|text with pipe]]
6800 <table class="wikitable">
6805 <tr style="color:red;">
6806 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6807 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6811 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6816 # The expected HTML structure in this test is debatable. The PHP parser does
6817 # not parse this kind of table at all. The main focus for Parsoid is on
6818 # round-tripping, so this output is ok for now. TODO: revisit!
6820 Wikitext table with html-syntax row
6830 <td>foo</td></tr></tbody></table>
6833 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6834 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6835 ## PHP parser, which tidy then compounds by fostering the content
6836 ## entirely out of the table. Parsoid recognizes the table context
6837 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6838 ## depends on PHP's treatment of broken table markup!
6840 Implicit <td> after a |-
6842 parsoid=wt2html,html2html
6862 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6864 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6866 parsoid=wt2html,html2html
6899 <tr><td><pre>a</pre></td></tr>
6900 <tr><td> b</td></tr>
6905 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6906 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6908 Lists should be recognized in an implicit <td> context
6910 parsoid=wt2html,html2html
6937 Table cells not properly parsed in an implicit-td context
6941 {{table_attribs_4}} || a || b
6946 <td style="background-color:#DC241f;" width="10px"></td>
6953 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6954 <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>
6959 Parsoid: Round-trip tables directly followed by content (bug 51219)
6961 parsoid=wt2html,wt2wt
6986 Parsoid: Default to a newline after tables in new content (bug 51219)
6991 <tr><td>foo</td></tr></tbody></table> bar
6993 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6998 <nowiki> </nowiki>bar
7006 Parsoid: newline inducing block nodes don't suppress <nowiki>
7018 Parsoid: Row-syntax table headings followed by comment & table cells
7020 parsoid=wt2html,wt2wt
7024 <!-- foo --> || baz || quux
7038 <tbody><tr><th> foo </th><th> bar
7039 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7044 Parsoid: Recover better from broken table attributes
7064 <p>foo</p></td></tr>
7069 Tables: Digest broken attributes on table and tr tag
7086 Strip unsupported table tags
7134 Testing serialization after deletion in references
7143 hi <ref><div id="x">ho</div></ref>
7153 Testing serialization after deletion of table cells
7156 "modes": ["wt2wt", "selser"],
7164 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7174 Testing selser after addition of new row before first row (T125419)
7177 "modes": ["wt2wt", "selser"],
7179 [ "tr", "before", "<tr><td>X</td></tr>" ]
7195 Serialize new table rows in a HTML table using HTML tags
7198 "modes": ["wt2wt", "selser"],
7200 [ "tr", "before", "<tr><td>X</td></tr>" ]
7204 <table><tr><td>a</td></tr></table>
7206 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7210 Serialize new table cells in a HTML row using HTML tags
7213 "modes": ["wt2wt", "selser"],
7215 [ "td", "before", "<td>X</td>" ]
7219 <table><tr><td>a</td></tr></table>
7221 <table><tr><td>X</td><td>a</td></tr></table>
7225 Wikitext tables can be nested inside HTML tables
7229 <table data-parsoid='{"stx":"html"}'>
7232 <tr><td>foo</td></tr>
7250 Plain link, capitalized
7254 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7259 Plain link, uncapitalized
7263 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7270 [[Main Page|The Main Page]]
7272 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7277 Piped link with comment in link text
7279 [[Main Page|The Main<!--front--> Page]]
7281 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7286 Piped link with multiple pipe characters in link text
7288 [[Main Page||The|Main|Page|]]
7290 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7293 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7297 Piped link with no link text
7299 [[Thomas Bek (bishop of St David's)|]]
7301 <p>[[Thomas Bek (bishop of St David's)|]]
7304 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7312 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7317 Broken link with fragment
7319 [[Zigzagzogzagzig#zug]]
7321 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7326 Special page link with fragment
7328 [[Special:Version#anchor]]
7330 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7335 Nonexistent special page link with fragment
7337 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7339 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7346 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7348 <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>
7355 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7357 <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>!!!
7368 Bug 43661: Piped links with identical prefixes
7370 [[prefixed article|prefixed articles with spaces]]
7372 [[prefixed article|prefixed articlesaoeu]]
7374 [[Main Page|Main Page test]]
7376 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7377 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7378 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7384 Link with HTML entity in suffix / tail
7386 [[Main Page]]", [[Main Page]]a
7388 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7391 <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>
7395 Link with 3 brackets
7406 Link with 4 brackets
7410 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7415 Piped link with 3 brackets
7417 [[[main page|the main page]]]
7419 <p>[[[main page|the main page]]]
7424 Piped link with extlink-like text
7427 [[Main Page|This is a [bar]]]
7429 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7430 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7433 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7434 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7438 Link with multiple pipes
7440 [[Main Page|The|Main|Page]]
7442 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7446 # Note that parsoid does not munge anchor text; all non-space
7447 # characters are valid in HTML5 ids.
7449 Anchor containing a #. (bug 63430)
7451 [[Main Page#And#Link]]
7453 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7456 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7462 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7464 <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>
7469 Link with space in namespace
7471 [[User talk:Foo bar]]
7473 <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>
7478 MemoryAlpha:AlphaTest
7480 This is an article in the MemoryAlpha namespace
7481 (which shadows the memoryalpha interwiki link).
7485 Namespace takes precedence over interwiki link (bug 51680)
7487 [[MemoryAlpha:AlphaTest]]
7489 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7493 # The previous test doesn't work correctly in html2*, due to not recognizing the
7494 # link as an internal one. This one checks for the correct behavior.
7496 Link to namespace preferred over interwiki with correct rel attribute
7498 parsoid=html2wt,html2html
7500 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7502 [[MemoryAlpha:AlphaTest]]
7506 Piped link to namespace
7508 [[Meta:Disclaimers|The disclaimers]]
7510 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7517 [[Usually caused by a typo (oops}]]
7519 <p>[[Usually caused by a typo (oops}]]
7526 Just a test of an article title containing a percent.
7530 Link containing % (not as a hex sequence)
7534 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7537 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7540 # note that the parsoid HTML is identical to the previous test output,
7541 # so the previous test ensures that the html2wt mode will generate the
7542 # "not as a hex sequence" wikitext.
7544 Link containing % as a single hex sequence interpreted to char
7546 parsoid=wt2wt,wt2html,html2html
7550 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7553 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7557 Link containing % as a double hex sequence interpreted to hex sequence
7561 <p>[[7%2525 Solution]]
7565 # note that parsoid does not munge anchor text; all non-space
7566 # characters are valid in HTML5 anchors.
7568 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7569 Example for such a section: == < ==
7571 [[%23%3c]][[%23%3e]]
7573 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7576 <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>
7580 Link containing "<#" and ">#" as a hex sequences
7582 [[%3c%23]][[%3e%23]]
7584 <p>[[%3c%23]][[%3e%23]]
7589 Link containing an equals sign
7591 [[Special:BookSources/isbn=4-00-026157-6]]
7593 <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>
7596 <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>
7602 Just a test of an article title containing a tilde.
7605 # note that links containing signatures, like [[Foo~~~~]], are
7606 # massaged by the pre-save transform (PST) and so the tildes are never
7607 # seen by the parser.
7609 Link containing a tilde
7613 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7616 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7620 Link containing double-single-quotes '' (bug 4598)
7622 [[Lista d''e paise d''o munno]]
7624 <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>
7627 <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>
7631 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7633 Some [[Link|pretty ''italics'' and stuff]]!
7635 <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>!
7638 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7642 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7644 ''Some [[Link|pretty ''italics'' and stuff]]!''
7646 <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>
7651 Link with double quotes in title part (literal) and alternate part (interpreted)
7653 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7657 [[''Pentecoste''|Pentecoste]]
7659 [[''Pentecoste''|''Pentecoste'']]
7661 <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>
7662 </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>
7663 </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>
7664 </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>
7667 <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>
7668 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7669 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7670 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7674 Broken image links with HTML captions (bug 39700)
7676 [[File:Nonexistent|<script></script>]]
7677 [[File:Nonexistent|100x100px|<script></script>]]
7678 [[File:Nonexistent|<]]
7679 [[File:Nonexistent|a<i>b</i>c]]
7681 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7682 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7683 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7684 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7687 <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>
7688 <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>
7689 <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>
7690 <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>
7696 [[http://www.example.com]]
7698 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7701 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7705 Plain link to URL with link text
7707 [[http://www.example.com Link text]]
7709 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7714 Plain link to protocol-relative URL
7716 [[//www.example.com]]
7718 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7721 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7725 Plain link to protocol-relative URL with link text
7727 [[//www.example.com Link text]]
7729 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7734 Plain link to page with question mark in title
7740 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7741 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7746 # I'm fairly sure the expected result here is wrong.
7747 # We want these to be URL links, not pseudo-pages with URLs for titles....
7748 # However the current output is also pretty screwy.
7751 # I'm changing it to match the current output--it arguably makes more
7752 # sense in the light of the test above. Old expected result was:
7753 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7755 # But I think this test is bordering on "garbage in, garbage out" anyway.
7760 Piped link to URL: [[http://www.example.com|an example URL]]
7762 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7765 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7769 BUG 2: [[page|http://url/]] should link to page, not http://url/
7771 [[Main Page|http://url/]]
7773 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7776 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7779 # Parsoid does not mark self-links, by design.
7781 BUG 337: Escaped self-links should be bold
7785 [[Bug462]] [[Bug462]]
7787 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7790 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7792 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7796 Self-link to section should not be bold
7800 [[Main Page#section]]
7802 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7813 Self-link to numeric title
7819 <p><strong class="selflink">0</strong>
7824 Link to numeric-equivalent title
7830 <p><a href="/wiki/00" title="00">00</a>
7835 <nowiki> inside a link
7837 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7839 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7844 Non-breaking spaces in title
7846 [[ Main Page ]]
7848 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7853 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7859 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7864 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7870 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7875 Internal link with en linktrail: no apostrophes (bug 27473)
7881 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7886 Internal link with ca linktrail with apostrophes (bug 27473)
7892 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7897 Internal link with kaa linktrail with apostrophes (bug 27473)
7903 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7908 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7910 [[User:Foo/Test/63636:Bar|Test]]
7912 <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>
7915 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7919 Purely hash wikilink
7921 title=[[User:test/123]]
7925 <p><a href="#a">b</a>
7928 <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>
7932 1. Interaction of linktrail and template encapsulation
7938 <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>
7942 2. Interaction of linktrail and template encapsulation
7946 {{echo|Some [[Fool]]}}s
7948 <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>
7952 3. Interaction of linktrail and template encapsulation
7956 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7958 <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>
7968 Internal link with is link prefix
7972 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7974 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7985 Internal link with is link trail and link prefix
7989 [[mótmælendatrú|xxx]]ar
7991 mótmælenda[[söfnuður]]
7992 mótmælenda[[söfnuður|söfnuðir]]
7993 mótmælenda[[söfnuður|söfnuðir]]xxx
7995 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7996 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7997 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7998 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7999 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8004 Parsoid link trail escaping
8006 parsoid=html2wt,html2html
8008 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
8014 Parsoid link prefix escaping
8017 parsoid=html2wt,html2html
8019 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
8021 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8025 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8033 [http://wp.org ''foo'']
8035 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8036 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8037 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8038 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8043 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8047 [[Foo|{{echo|a}} b {{echo|c}}]]
8049 <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>
8053 Link with angle bracket after anchor
8057 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8060 <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>
8064 ### Interwiki links (see maintenance/interwiki.sql)
8068 Inline interwiki link
8070 parsoid=wt2html,wt2wt,html2html
8072 [[MeatBall:SoftSecurity]]
8074 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8077 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8081 Inline interwiki link with empty title (bug 2372)
8083 parsoid=wt2html,wt2wt,html2html
8087 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8090 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8094 Interwiki link encoding conversion (bug 1636)
8096 *[[Wikipedia:ro:Olteniţa]]
8097 *[[Wikipedia:ro:Olteniţa]]
8099 <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>
8100 <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>
8104 <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>
8105 <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>
8110 Interwiki link with fragment (bug 2130)
8112 [[MeatBall:SoftSecurity#foo]]
8114 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8118 # Ideally the wikipedia: prefix here should be proto-relative too
8119 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8120 # define the 'en' prefix, and originally the test used 'wikipedia',
8121 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8124 Different interwiki prefixes mapping to the same URL
8132 [[:wikipedia:Foo|Foo]]
8134 [[wikipedia:en:Foo]]
8136 [[:wikipedia:en:Foo]]
8140 <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>
8142 <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>
8144 <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>
8146 <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>
8148 <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>
8150 <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>
8152 <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>
8156 Interwiki links that cannot be represented in wiki syntax
8159 [[meatball:ok#foo|ok with fragment]]
8160 [[meatball:ok_as_well?|ok ending with ? mark]]
8161 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8162 [http://de.wikipedia.org/wiki/#foo is just fragment]
8165 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8166 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8167 <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>
8168 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8169 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8172 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8173 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8174 <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>
8175 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8176 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8180 Interwiki links: trail
8182 [[wikipedia:Foo|Ba]]r
8184 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8187 <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>
8191 Local interwiki link
8193 parsoid=wt2html,wt2wt,html2html
8195 [[local:Template:Foo]]
8197 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8200 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8203 # Parsoid does not mark self-links, by design.
8205 Local interwiki link: self-link to current page
8208 parsoid=wt2html,wt2wt,html2html
8212 <p><strong class="selflink">local:Main Page</strong>
8215 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8219 Local interwiki link: prefix only (bug 64167)
8221 parsoid=wt2html,wt2wt,html2html
8225 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8228 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8232 Local interwiki link: with additional interwiki prefix (bug 61357)
8234 parsoid=wt2html,wt2wt,html2html
8236 [[local:meatball:Hello]]
8238 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8241 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8245 Multiple local interwiki link prefixes
8247 [[local:local:local:local:mi:local:Foo]]
8249 parsoid=wt2html,wt2wt,html2html
8251 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8254 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8258 ### Interlanguage links
8259 ### Language links (so that searching for '### language' matches..)
8265 parsoid=wt2html,wt2wt,html2html
8273 <p>Blah blah blah</p>
8274 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8278 Interlanguage link with spacing
8280 parsoid=wt2html,wt2wt,html2html
8288 <p>Blah blah blah</p>
8289 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8293 Double interlanguage link
8295 parsoid=wt2html,wt2wt,html2html
8304 <p>Blah blah blah</p>
8305 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8306 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8310 Interlanguage link variations
8312 parsoid=wt2html,wt2wt,html2html
8322 <p>Blah blah blah</p>
8323 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8324 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8325 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8329 Space and question mark encoding in interlanguage links (T95473)
8331 parsoid=wt2html,wt2wt,html2html
8339 <p>Blah blah blah</p>
8340 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8344 Interlanguage link, with prefix links
8354 <p>Blah blah blah</p>
8355 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8359 Double interlanguage link, with prefix links (bug 8897)
8370 <p>Blah blah blah</p>
8371 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8372 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8376 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8384 <p>Blah blah blah</p>
8385 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8389 Parsoid-specific test: Wikilinks with should RT properly
8395 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8400 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8404 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8405 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8407 He&nbsp;llo [[Foo|He&nbsp;llo]]
8409 He&nbsp;llo [[He&nbsp;llo]]
8413 Parsoid: handle constructor well
8419 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8420 </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>
8423 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8425 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8434 # Note that `ko` isn't a known interlanguage prefix
8436 Parsoid: recognize interlanguage links without a target page
8446 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8448 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8451 # Note that `ko` isn't a known interwiki prefix
8453 Parsoid: recognize interwiki links without a target page
8455 parsoid=wt2html,wt2wt,html2html
8461 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8462 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8465 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8466 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8470 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8474 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8477 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8481 Interlanguage link with preceding local interwiki link (bug 68085)
8483 parsoid=wt2html,wt2wt,html2html
8486 [[local:es:Spanish]]
8489 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8493 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8497 Looks like an interlanguage link, but is actually a local interwiki
8499 parsoid=wt2html,wt2wt,html2html
8505 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8509 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8513 ### Redirects, Parsoid-only
8517 1. Simple redirect to page
8519 #REDIRECT [[Main Page]]
8521 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8525 2. Other redirect variants
8527 #REDIRECT [[Main_Page]]
8529 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8532 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8533 # This tests the Parsoid bail-out code.
8535 3. Other redirect variants
8537 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8539 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8543 4. Redirect to a templated destination
8545 #REDIRECT [[{{echo|Foo}}bar]]
8547 <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"}]]}'/>
8553 parsoid=wt2html,wt2wt
8558 <li>REDIRECT [[]]</li></ol>
8562 Optional colon in #REDIRECT
8564 # the colon is archaic syntax. we support it for wt2html, but we
8565 # don't care that it roundtrips back to the modern syntax.
8566 parsoid=wt2html,html2html
8568 #REDIRECT:[[Main Page]]
8570 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8574 Whitespace in #REDIRECT with optional colon
8576 # the colon and gratuitous whitespace is archaic syntax. we support
8577 # it for wt2html, but we don't care that it roundtrips back to the
8578 # modern syntax (without extra whitespace)
8579 parsoid=wt2html,html2html
8586 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8590 Piped link in #REDIRECT
8592 # content after piped link is ignored. we support this syntax,
8593 # but don't care that the piped link is lost when we roundtrip this.
8596 #REDIRECT [[Main Page|bar]]
8598 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8602 Redirect to category (T104502)
8604 parsoid=wt2html,wt2wt
8606 #REDIRECT [[Category:Foo]]
8608 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8612 Redirect to category with URL encoding (T104502)
8616 #REDIRECT [[Category%3AFoo]]
8618 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8622 Redirect to category page
8624 #REDIRECT [[:Category:Foo]]
8626 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8630 Redirect to image page (1)
8632 #REDIRECT [[File:Wiki.png]]
8634 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8638 Redirect to image page (2)
8640 #REDIRECT [[Image:Wiki.png]]
8642 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8645 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8646 # Next test confirms this.
8648 Redirect to language (1) (T104918)
8650 parsoid=wt2html,wt2wt,html2html
8652 #REDIRECT [[en:File:Wiki.png]]
8654 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8658 Redirect to language (2) (T104918)
8660 #REDIRECT [[:en:File:Wiki.png]]
8662 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8666 Redirect to interwiki (T104918)
8668 #REDIRECT [[meatball:File:Wiki.png]]
8670 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8674 Non-English #REDIRECT
8678 #TILVÍSUN [[Main Page]]
8680 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8684 Redirect syntax under text isn't considered a redirect
8687 #redirect [[Main Page]]
8690 <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>
8693 # FIXME: Should hoist the redirect to the top of the page and ensure there
8700 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8720 Broken br tag sanitization
8728 # TODO: Fix html2html mode (bug 51055)!
8730 Parsoid: Broken br tag recognition
8743 Incorrecly removing closing slashes from correctly formed XHTML
8745 <br style="clear:both;" />
8747 <p><br style="clear:both;" />
8752 Failing to transform badly formed HTML into correct XHTML
8754 <br style="clear: left;">
8755 <br style="clear: right;">
8756 <br style="clear: both;">
8758 <p><br style="clear: left;" />
8759 <br style="clear: right;" />
8760 <br style="clear: both;" />
8764 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8765 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8767 Handling html with a div self-closing tag
8776 <p><div title />
8780 <p><div title=bar />
8781 <div title=bar/>
8783 <div title="bar/"></div>
8787 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8788 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8789 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8790 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8791 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8792 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8796 Handling html with a br self-closing tag
8823 Horizontal ruler (should it add that extra space?)
8838 Horizontal ruler -- 4+ dashes render hr
8847 Horizontal ruler -- eats additional dashes on the same line
8856 Horizontal ruler -- does not collapse dashes on consecutive lines
8867 Horizontal ruler -- <4 dashes render as plain text
8876 Horizontal ruler -- Supports content following dashes on same line
8888 ### Block-level elements
8897 <ul><li>Common list</li>
8899 <li>item 3</li></ul>
8910 <ol><li>Numbered list</li>
8912 <li> item 3</li></ol>
8926 ***#Number on level 4
8928 **#Number on level 3
8929 **#Number on level 3
8933 #** Level 3, but ordered
8936 <ol><li> with numbers</li></ol>
8937 <ul><li> and bullets</li></ul>
8938 <ol><li> and numbers</li></ol></li>
8940 <ul><li>bullet level 2
8941 <ul><li>bullet level 3
8942 <ol><li>Number on level 4</li></ol></li></ul></li>
8944 <ol><li>Number on level 3</li>
8945 <li>Number on level 3</li></ol></li></ul>
8946 <ol><li>number level 2</li></ol></li>
8948 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8949 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8954 1. Nested mixed wikitext and html list
8957 * <ul><li>ho</li></ul>
8962 <li> <ul><li>ho</li></ul></li>
8964 <ul><li> ho</li></ul></li></ul>
8968 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
8970 <ul><li> ho</li></ul></li></ul>
8974 2. Nested mixed wikitext and html list (incompatible)
8977 : {{echo|<li>ho</li>}}
8980 <dd> <li>ho</li></dd></dl>
8984 <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>
8994 <ul><li>bar</li></ul></li></ul>
9004 <ul><li><ul><li>foo</li></ul></li>
9010 Nested lists 3 (first element empty)
9016 <ul><li>bar</li></ul></li></ul>
9021 Nested lists 4 (first element empty)
9026 <ul><li><ul><li></li></ul></li>
9032 Nested lists 5 (both elements empty)
9037 <ul><li><ul><li></li></ul></li>
9043 Nested lists 6 (both elements empty)
9049 <ul><li></li></ul></li></ul>
9054 Nested lists 7 (skip initial nesting levels)
9058 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9063 Nested lists 8 (multiple nesting transitions)
9071 <ul><li><ul><li> bar</li></ul></li>
9072 <li> baz</li></ul></li>
9078 Nested lists 9 (extension interaction)
9084 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9088 1. Lists with start-of-line-transparent tokens before bullets: Comments
9101 2. Lists with start-of-line-transparent tokens before bullets: Template close
9106 <ul><li>foo bar</li>
9112 List items are not parsed correctly following a <pre> block (bug 785)
9118 <ul><li> <pre>foo</pre></li>
9119 <li> <pre>bar</pre></li>
9123 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9124 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9129 List items from template
9140 * notSOL{{inner list}}
9143 <ul><li> item 1</li>
9144 <li> item 2</li></ul>
9145 <ul><li> item 0</li>
9147 <li> item 2</li></ul>
9148 <ul><li> item 0</li>
9151 <li> item 2</li></ul>
9156 List interrupted by empty line or heading
9164 <ul><li> foo</li></ul>
9165 <ul><li><ul><li> bar</li></ul></li></ul>
9166 <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>
9167 <ul><li> Another list item</li></ul>
9172 Multiple list tags generated by templates
9193 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9196 <!--This line will NOT split the list-->
9198 <!--This line will NOT split the list either-->
9200 <!--foo--> <!----> <!--This line NOT split the list either-->
9211 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9214 <!--This line will NOT split the list-->
9216 <!--This line will NOT split the list either-->
9218 <!--foo--> <!----> <!--This line NOT split the list
9231 (The PHP parser relies on Tidy for the hack)
9233 parsoid=wt2html,wt2wt
9237 * {{echo|<li>templated li-hack}}
9238 * <!--foo--> <li> unsupported li-hack with preceding comments
9241 <li><li>not a li-hack
9248 <li>templated li-hack</li>
9249 <li>unsupported li-hack with preceding comments</li>
9252 <li>not a li-hack</li>
9257 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9284 Parsoid: Test of whitespace serialization with Templated bullets
9291 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9295 # ------------------------------------------------------------------------
9296 # The next set of tests are about Parsoid's ability to handle badly nested
9297 # tags (parse, minimize scope of fixup, and roundtrip back)
9298 # ------------------------------------------------------------------------
9301 Unbalanced closing block tags break a list
9302 (php parser relies on Tidy to fix up)
9320 # Parsoid fails this test, but it might be tricky to support properly.
9323 Unbalanced closing non-block tags don't break a list
9324 (php parser relies on Tidy to fix up)
9331 <li><span>a</span></li>
9332 <li><span>b</span></li>
9346 Unclosed formatting tags that straddle lists are closed and reopened
9347 (php parser relies on Tidy to fix up)
9349 parsoid=wt2html,wt2wt,html2html
9359 <ol><li> <s> a</s></li>
9360 <li><s> b </s></li></ol>
9365 1. List embedded in a formatting tag
9372 <li><small>foo</small></li>
9382 ## Ugly Parsoid output here
9383 ## Not sure what the right output is.
9385 2. List embedded in a formatting tag
9392 <li><small>a</small></li>
9393 <li><small>b</small></li>
9400 <li><small>b</small></li>
9404 # Ugly Parsoid and PHP parser output here
9405 # Not sure if we want to make this a test!
9408 ## 3. Unclosed formatting tags in list elements
9414 ## <li><small>a</small></li>
9415 ## <li><small><small>b</small></small></li>
9419 ## <li><small>a</small></li>
9421 ## <li><small>b</small></li>
9425 # This is a bug in the PHP parser + tidy combination.
9426 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9427 # and then fostered out of the table by tidy.)
9428 # We believe the Parsoid output to be correct.
9430 Table with missing opening <tr> tag
9432 parsoid=wt2html,wt2wt
9450 # Note that the current date is hard-coded as
9451 # 1970-01-01T00:02:03Z (a Thursday)
9452 # when running parser tests. The timezone is also fixed to GMT, so
9453 # local date will be identical to current date.
9456 Magic Word: {{CURRENTDAY}}
9465 Magic Word: {{CURRENTDAY2}}
9474 Magic Word: {{CURRENTDAYNAME}}
9483 Magic Word: {{CURRENTDOW}}
9492 Magic Word: {{CURRENTMONTH}}
9501 Magic Word: {{CURRENTMONTH1}}
9510 Magic Word: {{CURRENTMONTHABBREV}}
9512 {{CURRENTMONTHABBREV}}
9519 Magic Word: {{CURRENTMONTHNAME}}
9521 {{CURRENTMONTHNAME}}
9528 Magic Word: {{CURRENTMONTHNAMEGEN}}
9530 {{CURRENTMONTHNAMEGEN}}
9537 Magic Word: {{CURRENTTIME}}
9546 Magic Word: {{CURRENTHOUR}}
9555 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9564 Magic Word: {{CURRENTYEAR}}
9573 Magic Word: {{CURRENTTIMESTAMP}}
9575 {{CURRENTTIMESTAMP}}
9582 Magic Words LOCAL (UTC)
9586 * {{LOCALMONTHNAME}}
9587 * {{LOCALMONTHNAMEGEN}}
9588 * {{LOCALMONTHABBREV}}
9597 * {{LOCALTIMESTAMP}}
9612 <li> 19700101000203</li></ul>
9617 Magic Word: {{FULLPAGENAME}}
9619 title=[[User:Ævar Arnfjörð Bjarmason]]
9623 <p>User:Ævar Arnfjörð Bjarmason
9628 Magic Word: {{FULLPAGENAMEE}}
9630 title=[[User:Ævar Arnfjörð Bjarmason]]
9634 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9639 Magic Word: {{TALKSPACE}}
9641 title=[[User:Ævar Arnfjörð Bjarmason]]
9650 Magic Word: {{TALKSPACE}}, same namespace
9652 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9661 Magic Word: {{TALKSPACE}}, main namespace
9663 title=[[Parser Test]]
9672 Magic Word: {{TALKSPACEE}}
9674 title=[[User:Ævar Arnfjörð Bjarmason]]
9683 Magic Word: {{SUBJECTSPACE}}
9685 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9694 Magic Word: {{SUBJECTSPACE}}, same namespace
9696 title=[[User:Ævar Arnfjörð Bjarmason]]
9705 Magic Word: {{SUBJECTSPACE}}, main namespace
9707 title=[[Parser Test]]
9715 Magic Word: {{SUBJECTSPACEE}}
9717 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9726 Magic Word: {{NAMESPACE}}
9728 title=[[User:Ævar Arnfjörð Bjarmason]]
9737 Magic Word: {{NAMESPACEE}}
9739 title=[[User:Ævar Arnfjörð Bjarmason]]
9748 Magic Word: {{NAMESPACENUMBER}}
9750 title=[[User:Ævar Arnfjörð Bjarmason]]
9759 Magic Word: {{SUBPAGENAME}}
9761 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9770 Magic Word: {{SUBPAGENAMEE}}
9772 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9781 Magic Word: {{ROOTPAGENAME}}
9783 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9787 <p>Ævar Arnfjörð Bjarmason
9792 Magic Word: {{ROOTPAGENAMEE}}
9794 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9798 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9803 Magic Word: {{BASEPAGENAME}}
9805 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9809 <p>Ævar Arnfjörð Bjarmason
9814 Magic Word: {{BASEPAGENAMEE}}
9816 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9820 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9825 Magic Word: {{TALKPAGENAME}}
9827 title=[[User:Ævar Arnfjörð Bjarmason]]
9831 <p>User talk:Ævar Arnfjörð Bjarmason
9836 Magic Word: {{TALKPAGENAMEE}}
9838 title=[[User:Ævar Arnfjörð Bjarmason]]
9842 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9847 Magic Word: {{SUBJECTPAGENAME}}
9849 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9853 <p>User:Ævar Arnfjörð Bjarmason
9858 Magic Word: {{SUBJECTPAGENAMEE}}
9860 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9862 {{SUBJECTPAGENAMEE}}
9864 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9869 Magic Word: {{NUMBEROFFILES}}
9878 Magic Word: {{PAGENAME}}
9880 title=[[User:Ævar Arnfjörð Bjarmason]]
9884 <p>Ævar Arnfjörð Bjarmason
9889 Magic Word: {{PAGENAME}} with metacharacters
9891 title=[['foo & bar = baz']]
9895 <p><i>'foo & bar = baz'</i>
9898 <p><i>'foo & bar = baz'</i></p>
9902 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9904 title=[[*RFC 1234 http://example.com/]]
9908 <p>*RFC 1234 http://example.com/
9911 <p>*RFC 1234 http://example.com/</p>
9915 Magic Word: {{PAGENAMEE}}
9917 title=[[User:Ævar Arnfjörð Bjarmason]]
9921 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9926 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9928 title=[[*RFC 1234 http://example.com/]]
9932 <p>*RFC_1234_http://example.com/
9935 <p>*RFC_1234_http://example.com/</p>
9939 Magic Word: {{REVISIONID}}
9948 Magic Word: {{SCRIPTPATH}}
9956 Magic Word: {{STYLEPATH}}
9965 Magic Word: {{SERVER}}
9969 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9974 Magic Word: {{SERVERNAME}}
9983 Magic Word: {{SITENAME}}
9992 Case-sensitive magic words, when cased differently, should just be template transclusions
9999 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10000 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10001 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10002 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10007 Case-insensitive magic words should still work with weird casing.
10017 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10021 # From plwiki:PLOS_ONE
10023 Parsoid: Page property magic word with magic word contents
10025 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10027 <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>"}]]}'/>
10031 Parsoid: Template-generated DISPLAYTITLE
10033 {{{{echo|DISPLAYTITLE}}:Foo}}
10035 <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}}]}'/>
10039 Namespace 1 {{ns:1}}
10048 Namespace 1 {{ns:01}}
10057 Namespace 0 {{ns:0}} (bug 4783)
10065 Namespace 0 {{ns:00}} (bug 4783)
10073 Namespace -1 {{ns:-1}}
10082 Namespace User {{ns:User}}
10091 Namespace User talk {{ns:User_talk}}
10100 Namespace User talk {{ns:uSeR tAlK}}
10109 Namespace File {{ns:File}}
10118 Namespace File {{ns:Image}}
10127 Namespace (lang=de) Benutzer {{ns:User}}
10138 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10144 <p>Benutzer Diskussion
10152 {{urlencode:hi world?!}}
10153 {{urlencode:hi world?!|WIKI}}
10154 {{urlencode:hi world?!|PATH}}
10155 {{urlencode:hi world?!|QUERY}}
10165 Magic Word: prioritize type info over data-parsoid
10169 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10175 Magic Word: serialize on separate line (parsoid)
10177 parsoid=wt2wt,html2wt
10183 foo<meta property="mw:PageProp/notoc"/>bar
10187 Magic Word: rt non-english wikis
10194 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10198 __proto__ is treated as normal wikitext (T105997)
10210 Magic links: internal link to RFC (bug 479)
10214 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10217 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10221 Magic links: RFC (bug 479)
10225 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10228 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10232 Magic links: RFC (bug 65278)
10234 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10236 <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.
10239 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10243 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10245 RFC      822
10249 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10254 <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>
10260 Magic links: ISBN (bug 1937)
10264 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10267 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10271 Magic links: ISBN (bug 65278)
10273 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10275 <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.
10278 <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>
10282 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10284 ISBN      978 0 316 09811 3
10290 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10297 <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>
10305 Magic links: PMID incorrectly converts space to underscore
10309 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10312 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10316 Magic links: PMID (bug 65278)
10318 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10320 <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.
10323 <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>
10327 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10329 PMID      1234
10333 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10338 <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>
10343 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10344 # since these are ExtLinkText, not MagicLinkText
10346 Magic links: use appropriate serialization for "almost" magic links.
10348 X[[Special:BookSources/0978739256|foo]]
10350 X[//tools.ietf.org/html/rfc1234 foo]
10352 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10353 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10356 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10357 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10365 Nonexistent template
10367 {{thistemplatedoesnotexist}}
10369 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10374 Template with invalid target containing tags
10376 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10378 <p>{{a<b>b</b>|foo|a=b|a = b}}
10383 Template with invalid target containing unclosed tag
10385 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10387 <p>{{a<b>|foo|a=b|a = b}}</b>
10392 Template with invalid target containing wikilink
10396 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10399 <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>
10403 Template with just whitespace in it, bug #68421
10407 <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>
10413 This is a test template
10421 <p>This is a test template
10426 Template with explicit namespace
10430 <p>This is a test template
10438 This is a test template with parameter {{{param}}}
10444 {{paramtest|param=foo}}
10446 <p>This is a test template with parameter foo
10451 Template:paramtestnum
10453 [[{{{1}}}|{{{2}}}]]
10457 Template unnamed parameter
10459 {{paramtestnum|Main Page|the main page}}
10461 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10466 Template:templatesimple
10472 Template:templateredirect
10474 #redirect [[Template:templatesimple]]
10478 Template:templateasargtestnum
10484 Template:templateasargtest
10486 {{template{{{templ}}}}}
10490 Template:templateasargtest2
10496 Template with template name as unnamed argument
10498 {{templateasargtestnum|templatesimple}}
10505 Template with template name as argument
10507 {{templateasargtest|templ=simple}}
10514 Template with template name as argument (2)
10516 {{templateasargtest2|templ=templatesimple}}
10523 Template:templateasargtestdefault
10525 {{{{{templ|templatesimple}}}}}
10535 Template with default value
10537 {{templateasargtestdefault}}
10544 Template with default value (value set)
10546 {{templateasargtestdefault|templ=templa}}
10555 {{templateredirect}}
10560 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10564 Template with argument in separate line
10566 {{ templateasargtest |
10574 Template with complex template as argument
10577 param ={{ templateasargtest |
10578 templ = simple }}}}
10580 <p>This is a test template with parameter (test)
10585 Template with thumb image (with link in description)
10587 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10589 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>
10592 <p>This is a test template with parameter</p>
10593 <div class="thumb tright">
10594 <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>
10595 <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>
10599 <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>
10603 Template:complextemplate
10605 {{{1}}} {{paramtest|
10606 param ={{{param}}}}}
10610 Template with complex arguments
10613 param ={{ templateasargtest |
10614 templ = simple }}|[[Template:complextemplate|link]]}}
10616 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10621 BUG 553: link with two variables in a piped link
10624 |[[{{{1}}}|{{{2}}}]]
10629 <td>[[{{{1}}}|{{{2}}}]]
10634 <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>
10639 Abort table cell attribute parsing on wikilink
10642 | testing [[one|two]] | three || four
10643 | testing one two | three || four
10644 | testing="[[one|two]]" | three || four
10649 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10655 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10661 <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>
10662 <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>
10663 <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>
10668 Don't abort table cell attribute parsing if wikilink is found in template arg
10671 | Test {{#tag:ref|One two "[[three]]" four}}
10675 <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>
10680 Magic variable as template parameter
10682 {{paramtest|param={{SITENAME}}}}
10684 <p>This is a test template with parameter MediaWiki
10691 [[{{{param}}}|link]]
10695 Template parameter as link source
10697 {{linktest|param=Main Page}}
10699 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10704 Template:paramtest2
10706 including another template, {{paramtest|param={{{arg}}}}}
10710 Template passing argument to another template
10712 {{paramtest2|arg='hmm'}}
10714 <p>including another template, This is a test template with parameter 'hmm'
10725 Template as link source
10729 [[{{linktest2}}|Main Page]]
10731 [[{{linktest2}}]]Page
10733 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10734 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10735 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10753 Template infinite loop
10757 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10762 Template from main namespace
10781 BUG 529: Template with table, not included at beginning of line
10800 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10820 BUG 41: Template parameters shown as broken links
10829 Template with targets containing wikilinks
10833 {{[[{{echo|foo}}]]}}
10835 {{{{echo|[[foo}}]]}}
10837 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10838 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10850 Templates: Double quotes as template target
10857 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10861 ## This test is about making sure Parsoid's data-mw is well formed in the
10862 ## face of multiple templates with intersecting and overlapping ranges. The
10863 ## wikitext itself is wretched.
10865 Templates with intersecting and overlapping ranges
10890 <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":""}]]}'>
10892 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
10894 <tbody><tr><td>hi</td></tr>
10899 Template:MSGNW test
10901 ''None'' of '''this''' should be
10903 but rather passed unmodified
10911 # hmm, fix this or just deprecate msgnw and document its behavior?
10915 {{msgnw:MSGNW test}}
10917 <p>''None'' of '''this''' should be
10919  but rather passed unmodified
10920 {{test}}
10924 <!-- comment -->
10931 {{int:youhavenewmessages|lots of money|not!}}
10933 <p>You have lots of money (not!).
10938 int keyword - non-existing message
10949 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10953 <includeonly> and <noinclude> being included
10964 <onlyinclude>Foo</onlyinclude>bar
10968 <onlyinclude> being included
10980 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10984 <onlyinclude> and <includeonly> being included
10993 <includeonly> and <noinclude> on a page
10995 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11002 Un-closed <noinclude>
11009 <onlyinclude> on a page
11011 <onlyinclude>Foo</onlyinclude>bar
11018 Un-closed <onlyinclude>
11025 Self-closed noinclude, includeonly, onlyinclude tags
11036 Unbalanced includeonly and noinclude tags
11040 |b</noinclude></noinclude>
11041 |c</noinclude></includeonly>
11042 |d</includeonly></includeonly>
11051 <td>c</includeonly>
11053 <td>d</includeonly></includeonly>
11059 Template:Includeonly section
11062 ==Includeonly section==
11068 Bug 6563: Edit link generation for section shown by <includeonly>
11070 {{includeonly section}}
11072 <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>
11073 <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>
11077 # Uses same input as the contents of [[Template:Includeonly section]]
11079 Bug 6563: Section extraction for section shown by <includeonly>
11084 ==Includeonly section==
11092 Bug 6563: Edit link generation for section suppressed by <includeonly>
11095 ==Includeonly section==
11099 <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>
11104 Bug 6563: Section extraction for section suppressed by <includeonly>
11109 ==Includeonly section==
11117 Un-closed <includeonly>
11122 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11125 ## We used to, but no longer wt2wt this test since the default serializer
11126 ## will normalize the include directives to serialize on their own line.
11127 ## Selser will take care of preserving formatting in scenarios where they
11128 ## intermingled with other wikitext.
11130 Includes and comments at SOL
11132 parsoid=wt2html,html2html
11134 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11138 </noinclude>* stuff
11141 <includeonly>can have stuff</includeonly>=== here ===
11144 <h2><span class="mw-headline" id="hu">hu</span></h2>
11147 <ul><li> stuff</li>
11148 <li> here</li></ul>
11149 <h3><span class="mw-headline" id="here">here</span></h3>
11152 <!-- 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>
11154 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11156 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11157 <li> here</li></ul>
11159 <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>
11163 # TODO: test with DOM fragment reuse!
11165 Parsoid: DOM fragment reuse
11167 parsoid=wt2wt,wt2html
11169 a{{echo|b<table></table>c}}d
11181 <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>
11183 <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">
11184 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11185 </span><p about="#mwt2">cd</p>
11187 <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">
11189 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11191 </span><p about="#mwt3">b</p>
11195 Parsoid: Merge double tds (T52603)
11200 |{{echo|{{!}} foo}}
11204 <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>
11209 Parsoid: Merge double tds in nested transclusion content (T52603)
11215 |{{echo|{{!}} foo}}
11219 <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}}]}'>
11221 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11227 ### <includeonly> and <noinclude> in attributes
11230 0. includeonly around the entire attribute
11232 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11234 <p><span id="v2">bar</span>
11239 1. includeonly in html attr key
11241 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11243 <p><span id="foo">bar</span>
11248 2. includeonly in html attr value
11250 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11251 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11253 <p><span id="v1">bar</span>
11254 <span id="v1">bar</span>
11259 3. includeonly in part of an attr value
11261 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11263 <p><span style="color:red;">bar</span>
11268 4. includeonly in table attributes
11292 ### Token Stream Patcher tests
11294 ### These tests won't always pass wt2wt and other modes because
11295 ### on serialization, the table will be output on a new line.
11296 ### For now, we are blacklisting them, and using this to test selser.
11300 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11302 parsoid=wt2html,wt2wt
11304 {{echo|}}{| width = '100%'
11308 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11309 <tbody><tr><td>foo</td></tr>
11313 ## We used to, but no longer wt2wt this test since the default serializer
11314 ## will normalize the include directives to serialize on their own line.
11315 ## Selser will take care of preserving formatting in scenarios where they
11316 ## intermingled with other wikitext.
11318 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11322 <includeonly>a</includeonly>{| {{{b}}}
11326 <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":""}]]}'>
11327 <tbody><tr><td>c</td></tr>
11332 ### Testing parsing of templates where a template arg
11333 ### has the same name as the template itself.
11339 {{{quote|{{{1}}}}}}
11343 Templates: Template Name/Arg clash: 1. Use of positional param
11352 Templates: Template Name/Arg clash: 2. Use of named param
11354 {{quote|quote=foo}}
11361 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11370 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11374 Templates: 1. Simple use
11383 Templates: 2. Inside a block tag
11385 <div>{{echo|Foo}}</div>
11386 <blockquote>{{echo|Foo}}</blockquote>
11389 <blockquote>Foo</blockquote>
11399 Templates: P-wrapping: 1a. Templates on consecutive lines
11410 Templates: P-wrapping: 1b. Templates on consecutive lines
11424 Templates: P-wrapping: 1c. Templates on consecutive lines
11427 {{echo|bar}} <div>baz</div>
11440 Templates: P-wrapping: 1d. Template preceded by comment-only line
11449 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11453 Templates: Inline Text: 1. Multiple template uses
11455 {{echo|Foo}}bar{{echo|baz}}
11462 Templates: Inline Text: 2. Back-to-back template uses
11464 {{echo|Foo}}{{echo|bar}}
11471 Templates: Block Tags: 1. Multiple template uses
11473 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11475 <div>Foo</div><div>bar</div><div>baz</div>
11480 Templates: Block Tags: 2. Back-to-back template uses
11482 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11484 <div>Foo</div><div>bar</div>
11488 # This is an edge case relating to paragraph wrapping.
11490 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11495 <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
11500 Templates: Links: 1. Simple example
11502 {{echo|[[Foo|bar]]}}
11504 <p><a href="/wiki/Foo" title="Foo">bar</a>
11509 Templates: Links: 2. Generation of link href
11511 [[{{echo|Foo}}|bar]]
11513 <p><a href="/wiki/Foo" title="Foo">bar</a>
11518 Templates: Links: 3. Generation of part of a link href
11520 [[Fo{{echo|o}}|bar]]
11522 [[Foo{{echo|bar}}]]
11524 [[Foo{{echo|bar}}baz]]
11526 [[Foo{{echo|bar}}|bar]]
11528 [[:Foo{{echo|bar}}]]
11530 [[:Foo{{echo|bar}}|bar]]
11532 <p><a href="/wiki/Foo" title="Foo">bar</a>
11533 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11534 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11535 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11536 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11537 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11542 Templates: Links: 4. Multiple templates generating link href
11544 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11546 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11551 Templates: Links: 5. Generation of link text
11553 [[Foo|{{echo|bar}}]]
11555 <p><a href="/wiki/Foo" title="Foo">bar</a>
11560 Templates: Links: 5. Nested templates (only outermost template should be marked)
11562 {{echo|[[{{echo|Foo}}|bar]]}}
11564 <p><a href="/wiki/Foo" title="Foo">bar</a>
11569 Templates: HTML Tag: 1. Generation of HTML attr. key
11571 <div {{echo|style}}="color:red;">foo</div>
11573 <div style="color:red;">foo</div>
11578 Templates: HTML Tag: 2. Generation of HTML attr. value
11580 <div style={{echo|'color:red;'}}>foo</div>
11582 <div style="color:red;">foo</div>
11587 Templates: HTML Tag: 3. Generation of HTML attr key and value
11589 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11591 <div style="color:red;">foo</div>
11596 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11598 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11600 <div title="This is a long title with just one piece templated">foo</div>
11605 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11607 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11609 <div title="This is a long title with just one piece templated">foo</div>
11614 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11616 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11618 <div title="This is a long title with just one piece templated">foo</div>
11622 # SSS FIXME: While it is great we added support for all this,
11623 # do we want to make this part of the spec? Maybe we want to
11624 # deprecate this kind of usage in the future?
11626 Templates: HTML Tag: 7. Generation of partial attribute key string
11628 <div st{{echo|yle}}="color:red;">foo</div>
11630 <div style="color:red;">foo</div>
11635 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11637 <div {{echo|1=id="v1"}}>bar</div>
11639 <div id="v1">bar</div>
11644 Templates: HTML Tag: 9. Multiple template-generated attributes
11646 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11648 <div id="v1" title="foo">bar</div>
11653 Templates: Support for templates generating attributes and content
11655 {| {{mixed_attr_content_template}}
11660 <table style="color:red;" title="T48811">
11670 <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|}"]}'>
11679 1. Entities and nowikis inside templated attributes should be handled correctly
11681 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11683 <div style="background:#f9f9f9;">foo</div>
11686 <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>
11690 2. Entities and nowikis inside templated attributes should be handled correctly
11693 |{{table_attribs_3}}
11698 <td style="background:#f9f9f9;">Foo
11703 <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>
11708 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11711 |{{table_attribs_3}}
11716 <td style="background:#f9f9f9;">Foo
11720 <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}}]}'>
11721 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11727 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11730 | {{table_attribs_6}} hi
11735 <td style="background: red;"> hi
11740 <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>
11745 Templates: HTML Tables: 1. Generating start of a HTML table
11747 {{echo|<table><tr><td>foo</td>}}</tr></table>
11749 <table><tr><td>foo</td></tr></table>
11754 Templates: HTML Tables: 2a. Generating middle of a HTML table
11756 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11758 <table><tr><td>foo</td></tr></table>
11763 Templates: HTML Tables: 2b. Generating middle of a HTML table
11765 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11767 <table><tr><td>foo</td></tr></table>
11772 Templates: HTML Tables: 3. Generating end of a HTML table
11774 <table><tr>{{echo|<td>foo</td></tr></table>}}
11776 <table><tr><td>foo</td></tr></table>
11781 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11783 {{echo|<table>}}<tr><td>foo</td></tr></table>
11785 <table><tr><td>foo</td></tr></table>
11790 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11792 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11794 <table><tr><td>foo</td></tr></table>
11799 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11801 <table><tr>{{echo|<td>}}foo</td></tr></table>
11803 <table><tr><td>foo</td></tr></table>
11808 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11810 <table><tr><td>foo{{echo|</td>}}</tr></table>
11812 <table><tr><td>foo</td></tr></table>
11817 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11819 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11821 <table><tr><td>foo</td></tr></table>
11826 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11828 <table><tr><td>foo</td></tr>{{echo|</table>}}
11830 <table><tr><td>foo</td></tr></table>
11835 Templates: HTML Tables: 5. Proper fostering of categories from inside
11837 parsoid=wt2html,wt2wt
11839 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11840 <!--Two categories (Bug 50330)-->
11841 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11843 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11844 <!--Two categories (Bug 50330)-->
11845 <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>
11849 Templates: Wiki Tables: 1a. Fostering of entire template content
11857 <tr><td></td></tr></table>
11869 Templates: Wiki Tables: 1b. Fostering of entire template content
11882 <tr><td></td></tr></table>
11896 Templates: Wiki Tables: 2. Fostering of partial template content
11906 <tr><td></td></tr></table>
11919 Templates: Wiki Tables: 3. td-content via multiple templates
11922 {{echo|{{pipe}}a}}{{echo|b}}
11933 Templates: Wiki Tables: 4. Templated tags, no content
11939 <tr><td></td></tr></table>
11944 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11958 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11971 ## This test case is very specific to Parsoid's internals
11972 ## and is hence only tested for Parsoid's code. Parsoid uses
11973 ## a <meta> marker tag for <ref> tags and they are expanded
11974 ## much later. We are verifying that this <meta> tag usage
11975 ## doesn't prevent foster parenting.
11977 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11979 {{PartialTable}}<ref>foo</ref>
11984 <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">
11988 <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>
11992 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12002 <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{{!}}}"]}'>
12003 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12007 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12012 Templates: Lists: Multi-line list-items via templates
12014 *{{echo|a {{nonexistent|
12016 *{{echo|b {{nonexistent|
12019 <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>
12020 <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>
12025 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12027 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12029 <p><i>ab</i>c<i>d</i>e
12034 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12035 (PHP parser generates misnested html)
12037 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12039 <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>
12043 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12044 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12046 parsoid=wt2html,wt2wt
12048 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12050 <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>
12051 <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>
12052 <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>
12056 Templates: Ugly nesting: 4. Divs opened/closed across templates
12058 a<div>b{{echo|c</div>d}}e
12069 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12075 |{{echo|foo</table>}}
12079 <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|}"]}'>
12083 <td>foo</td></tr></tbody></table><span about="#mwt1">
12084 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12089 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12099 <td>1. {{echo|foo </table>}}</td>
12101 <td>2. {{echo|baz </table>}}</td>
12114 <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>"]}'>
12119 <td>1. foo </td></tr></tbody></table></td>
12121 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12122 </span><span about="#mwt2">
12123 </span><span about="#mwt2">
12124 </span><span about="#mwt2">abc</span><span about="#mwt2">
12125 </span><span about="#mwt2">
12126 </span><span about="#mwt2">
12127 </span><span about="#mwt2">
12128 </span><span about="#mwt2">
12129 </span><span about="#mwt2">
12130 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12131 </span><span about="#mwt2">
12136 Templates: Ugly templates: 3. newline-only template parameter
12145 # This looks like a bug: a single newline triggers p/br for some reason.
12147 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12156 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12157 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12159 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12165 <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
12166 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12170 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12171 # that are "identical" and generate nesting cycles in the algorithm
12173 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12175 {{echo|<table><tr><td><table>}}
12179 <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"}'>
12180 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12181 </table></td></tr></tbody></table>
12185 Templates: Parameters substituted at the top-level
12187 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12189 <p><i>who</i> me? <b>never!</b>
12192 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12196 Parser Functions: 1. Simple example
12205 Parser Functions: 2. Nested use (only outermost should be marked up)
12214 ### Pre-save transform tests
12217 pre-save transform: subst:
12223 This is a test template
12227 pre-save transform: normal template
12237 pre-save transform: nonexistent template
12241 {{thistemplatedoesnotexist}}
12243 {{thistemplatedoesnotexist}}
12247 pre-save transform: subst magic variables
12256 # This is bug 89, which I fixed. -- wtm
12258 pre-save transform: subst: templates with parameters
12262 {{subst:paramtest|param="something else"}}
12264 This is a test template with parameter "something else"
12268 Template:nowikitest
12270 <nowiki>'''not wiki'''</nowiki>
12274 pre-save transform: nowiki in subst (bug 1188)
12278 {{subst:nowikitest}}
12280 <nowiki>'''not wiki'''</nowiki>
12284 Template:commenttest
12286 This template has <!-- a comment --> in it.
12290 pre-save transform: comment in subst (bug 1936)
12294 {{subst:commenttest}}
12296 This template has <!-- a comment --> in it.
12300 pre-save transform: unclosed tag
12304 <nowiki>'''not wiki'''
12306 <nowiki>'''not wiki'''
12310 pre-save transform: mixed tag case
12314 <NOwiki>'''not wiki'''</noWIKI>
12316 <NOwiki>'''not wiki'''</noWIKI>
12320 pre-save transform: unclosed comment in <nowiki>
12324 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12326 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12329 # Leading @ in this template definition works around a limitation
12330 # in parsoid's parserTests which otherwise strips the <span> from the
12331 # result (confusing it for a template wrapper)
12335 @<span onmouseover="alert('crap')">Oh no</span>
12339 (confirming safety of fix for subst bug 1936)
12341 {{Template:dangerous}}
12343 <p>@<span>Oh no</span>
12348 pre-save transform: comment containing gallery (bug 5024)
12352 <!-- <gallery>data</gallery> -->
12354 <!-- <gallery>data</gallery> -->
12358 pre-save transform: comment containing extension
12362 <!-- <tag>data</tag> -->
12364 <!-- <tag>data</tag> -->
12368 pre-save transform: comment containing nowiki
12372 <!-- <nowiki>data</nowiki> -->
12374 <!-- <nowiki>data</nowiki> -->
12378 pre-save transform: <noinclude> in subst (bug 3298)
12388 pre-save transform: <onlyinclude> in subst (bug 3298)
12392 {{subst:Includes2}}
12400 {{<includeonly>subst:</includeonly>Includes}}
12404 Template:SafeSubstTest
12406 {{<includeonly>safesubst:</includeonly>Includes}}
12410 bug 22297: safesubst: works during PST
12414 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12420 bug 22297: safesubst: works during normal parse
12429 subst: does not work during normal parse
12433 <p>{{subst:Includes}}
12438 pre-save transform: context links ("pipe trick")
12442 [[Article (context)|]]
12445 [[Bar:Article (context)|]]
12446 [[:Bar:Article (context)|]]
12448 [[|Article (context)]]
12452 [[Article (context)|Article]]
12453 [[Bar:Article|Article]]
12454 [[:Bar:Article|Article]]
12455 [[Bar:Article (context)|Article]]
12456 [[:Bar:Article (context)|Article]]
12458 [[Article (context)]]
12459 [[Bar:X (Y) Z|X (Y) Z]]
12460 [[:Bar:X (Y) Z|X (Y) Z]]
12464 pre-save transform: context links ("pipe trick") with interwiki prefix
12468 [[interwiki:Article|]]
12469 [[:interwiki:Article|]]
12470 [[interwiki:Bar:Article|]]
12471 [[:interwiki:Bar:Article|]]
12473 [[interwiki:Article|Article]]
12474 [[:interwiki:Article|Article]]
12475 [[interwiki:Bar:Article|Bar:Article]]
12476 [[:interwiki:Bar:Article|Bar:Article]]
12480 pre-save transform: context links ("pipe trick") with parens in title
12482 pst title=[[Somearticle (context)]]
12486 [[Article (context)|Article]]
12490 pre-save transform: context links ("pipe trick") with comma in title
12492 pst title=[[Someplace, Somewhere]]
12495 [[Otherplace, Elsewhere|]]
12496 [[Otherplace, Elsewhere, Anywhere|]]
12498 [[Otherplace, Somewhere|Otherplace]]
12499 [[Otherplace, Elsewhere|Otherplace]]
12500 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12504 pre-save transform: context links ("pipe trick") with parens and comma
12506 pst title=[[Someplace (IGNORED), Somewhere]]
12509 [[Otherplace (place), Elsewhere|]]
12511 [[Otherplace, Somewhere|Otherplace]]
12512 [[Otherplace (place), Elsewhere|Otherplace]]
12516 pre-save transform: context links ("pipe trick") with comma and parens
12518 pst title=[[Who, me? (context)]]
12521 [[Me, Myself, and I (1937 song)|]]
12523 [[Yes, you. (context)|Yes, you.]]
12524 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12528 pre-save transform: context links ("pipe trick") with namespace
12530 pst title=[[Ns:Somearticle]]
12534 [[Ns:Article|Article]]
12538 pre-save transform: context links ("pipe trick") with namespace and parens
12540 pst title=[[Ns:Somearticle (context)]]
12544 [[Ns:Article (context)|Article]]
12548 pre-save transform: context links ("pipe trick") with namespace and comma
12550 pst title=[[Ns:Somearticle, Context, Whatever]]
12554 [[Ns:Article, Context, Whatever|Article]]
12558 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12560 pst title=[[Ns:Somearticle, Context (context)]]
12564 [[Ns:Article (context)|Article]]
12568 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12570 pst title=[[Ns:Somearticle (IGNORED), Context]]
12574 [[Ns:Article, Context|Article]]
12578 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12582 [[Article(context)|]]
12583 [[Bar:Article(context)|]]
12584 [[:Bar:Article(context)|]]
12585 [[|Article(context)]]
12589 [[Article(context)|Article]]
12590 [[Bar:Article(context)|Article]]
12591 [[:Bar:Article(context)|Article]]
12592 [[Article(context)]]
12593 [[Bar:X(Y)Z|X(Y)Z]]
12594 [[:Bar:X(Y)Z|X(Y)Z]]
12598 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12602 [[Article (context)|]]
12603 [[Bar:Article (context)|]]
12604 [[:Bar:Article (context)|]]
12605 [[|Article (context)]]
12609 [[Article (context)|Article]]
12610 [[Bar:Article (context)|Article]]
12611 [[:Bar:Article (context)|Article]]
12612 [[Article (context)]]
12613 [[Bar:X (Y) Z|X (Y) Z]]
12614 [[:Bar:X (Y) Z|X (Y) Z]]
12618 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12622 [[Article(context)|]]
12623 [[Bar:Article(context)|]]
12624 [[:Bar:Article(context)|]]
12625 [[|Article(context)]]
12629 [[Article(context)|Article]]
12630 [[Bar:Article(context)|Article]]
12631 [[:Bar:Article(context)|Article]]
12632 [[Article(context)]]
12633 [[Bar:X(Y)Z|X(Y)Z]]
12634 [[:Bar:X(Y)Z|X(Y)Z]]
12638 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12642 [[Article (context), context|]]
12643 [[Article (context),context|]]
12644 [[Bar:Article (context), context|]]
12645 [[Bar:Article (context),context|]]
12646 [[:Bar:Article (context), context|]]
12647 [[:Bar:Article (context),context|]]
12649 [[Article (context), context|Article]]
12650 [[Article (context),context|Article]]
12651 [[Bar:Article (context), context|Article]]
12652 [[Bar:Article (context),context|Article]]
12653 [[:Bar:Article (context), context|Article]]
12654 [[:Bar:Article (context),context|Article]]
12658 pre-save transform: trim trailing empty lines
12662 Empty lines are trimmed
12668 Empty lines are trimmed
12672 pre-save transform: Signature expansion
12677 * <noinclude>~~~</noinclude>
12678 * <includeonly>~~~</includeonly>
12679 * <onlyinclude>~~~</onlyinclude>
12681 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12682 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12683 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12684 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12689 pre-save transform: Signature expansion in nowiki tags (bug 93)
12695 <nowiki>~~~~</nowiki>
12697 <includeonly><nowiki>~~~~</nowiki></includeonly>
12699 <noinclude><nowiki>~~~~</nowiki></noinclude>
12701 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12703 {{subst:Foo}} shall be converted to FOO
12705 As well as inside noinclude/onlyinclude
12706 <noinclude>{{subst:Foo}}</noinclude>
12707 <onlyinclude>{{subst:Foo}}</onlyinclude>
12709 But not inside includeonly
12710 <includeonly>{{subst:Foo}}</includeonly>
12714 <nowiki>~~~~</nowiki>
12716 <includeonly><nowiki>~~~~</nowiki></includeonly>
12718 <noinclude><nowiki>~~~~</nowiki></noinclude>
12720 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12722 FOO shall be converted to FOO
12724 As well as inside noinclude/onlyinclude
12725 <noinclude>FOO</noinclude>
12726 <onlyinclude>FOO</onlyinclude>
12728 But not inside includeonly
12729 <includeonly>{{subst:Foo}}</includeonly>
12733 Parsoid: Recognize nowiki with trailing space in tags
12737 <nowiki ><div>[[foo]]</nowiki >
12745 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12752 Parsoid: Recognize nowiki with odd capitalization
12756 <noWikI ><div>[[foo]]</Nowiki >
12758 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12763 Parsoid: Escape nowiki with trailing space in tags
12767 <p><nowiki > foo </nowiki ></p>
12768 <p>a<nowiki />b</p>
12769 <p>c<nowiki/ >d</p>
12771 <nowiki > foo </nowiki >
12779 Parsoid: Escape weird noWikI capitalizations
12783 <p><noWikI > foo </NoWikI ></p>
12785 <noWikI > foo </NoWikI >
12789 ### Message transform tests
12792 message transform: magic variables
12802 message transform: should not transform wiki markup
12812 message transform: <noinclude> in transcluded template (bug 4926)
12822 message transform: <onlyinclude> in transcluded template (bug 4926)
12832 {{#special:}} page name, known
12836 {{#special:Recentchanges}}
12838 Special:RecentChanges
12842 {{#special:}} page name with subpage, known
12846 {{#special:Recentchanges/param}}
12848 Special:RecentChanges/param
12852 {{#special:}} page name, unknown
12856 {{#special:foobar nonexistent}}
12858 Special:Foobar nonexistent
12862 {{#speciale:}} page name, known
12866 {{#speciale:Recentchanges}}
12868 Special:RecentChanges
12872 {{#speciale:}} page name with subpage, known
12876 {{#speciale:Recentchanges/param}}
12878 Special:RecentChanges/param
12882 {{#speciale:}} page name, unknown
12886 {{#speciale:foobar nonexistent}}
12888 Special:Foobar_nonexistent
12894 ### For Parsoid-specific tests, see
12895 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12900 parsoid=wt2html,wt2wt,html2html
12902 [[Image:foobar.jpg]]
12904 <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>
12907 <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>
12911 Simple image (using File: namespace, now canonical)
12913 [[File:Foobar.jpg]]
12915 <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>
12918 <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>
12922 Right-aligned image
12924 [[File:Foobar.jpg|right]]
12926 <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>
12929 <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>
12935 [[File:Foobar.jpg|right|Caption text]]
12937 <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>
12940 <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>
12944 Image with caption, bug 53312 #1
12946 [[File:Foobar.jpg|right|Caption page stuff]]
12948 <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>
12951 <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>
12955 Image with caption, bug 53312 #2
12957 [[File:Foobar.jpg|right|Caption page=]]
12959 <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>
12962 <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>
12966 Image with caption, bug 53312 #3
12968 [[File:Foobar.jpg|right|Caption page=stuff]]
12970 <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>
12973 <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>
12977 Allow empty links in image captions (Bug 60753)
12981 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12986 <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>
12989 <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>
12991 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12992 </figcaption></figure>
12996 Titles in unlinked images (T23454)
12998 [[File:Foobar.jpg|link=|stuff]]
13000 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13005 Link with empty target
13014 Image with link trail
13016 Linktrails should not work for images: [[File:Foobar.jpg]]s
13018 <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
13021 <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>
13025 Image with empty attribute
13027 parsoid=wt2html,wt2wt,html2html
13029 [[File:Foobar.jpg|right||Caption text]]
13031 <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>
13034 <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>
13038 1. Block image with individual attributes from templates
13040 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13042 <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>
13045 <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>
13049 2. Block Image with individual attributes from templates
13051 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13053 <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>
13056 <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>
13060 3. Inline image with individual attributes from templates
13062 [[File:Foobar.jpg|{{echo|50px}}]]
13064 <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>
13067 <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>
13070 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13071 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13073 Image with multiple attributes from the same template
13075 [[File:Foobar.jpg|{{image_attribs}}]]
13077 <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>
13080 <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>
13084 Image with link tails
13088 123[[File:Foobar.jpg]]456
13089 123[[File:Foobar.jpg|right]]456
13090 123[[File:Foobar.jpg|thumb]]456
13092 <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
13094 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
13095 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
13098 <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>
13100 <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>
13102 <div class="thumb tright">
13103 <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>
13104 <div class="thumbcaption">
13105 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13111 <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>
13112 <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>
13113 <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>
13117 Image with multiple captions -- only last one is accepted
13119 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13121 <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>
13124 <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>
13128 Image with multiple widths -- use last
13130 [[File:Foobar.jpg|200px|300px|caption]]
13132 <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>
13135 <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>
13139 Image with multiple alignments -- use first (bug 48664)
13143 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13145 [[File:Foobar.jpg|middle|text-top|caption]]
13147 <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>
13148 <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>
13151 <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>
13152 <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>
13156 Image with width attribute at different positions
13158 [[File:Foobar.jpg|200px|right|Caption]]
13159 [[File:Foobar.jpg|right|200px|Caption]]
13160 [[File:Foobar.jpg|right|Caption|200px]]
13162 <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>
13163 <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>
13164 <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>
13167 <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>
13168 <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>
13169 <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>
13172 # a sad bit of backward-compatibility
13174 Image with size specified with pxpx (bug 13500, 51628)
13176 parsoid=wt2html,wt2wt,html2html
13178 [[File:Foobar.jpg|20pxpx]]
13179 [[File:Foobar.jpg|200x20pxpx]]
13181 <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>
13182 <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>
13185 <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>
13189 Image with link parameter, wiki target
13191 [[File:Foobar.jpg|link=Main Page]]
13193 <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>
13196 <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>
13199 # parsoid bug 49293 (part 1)
13201 Image with link parameter, URL target
13203 [[File:Foobar.jpg|link=http://example.com/]]
13205 <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>
13208 <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>
13211 # parsoid bug 49293 (part 2)
13213 Image with link parameter, protocol-less URL target
13215 [[File:Foobar.jpg|link=//example.com/]]
13217 <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>
13220 <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>
13224 Escaping non-block captions (T107435)
13227 "modes": ["wt2wt"],
13229 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13233 [[Image:Foobar.jpg|caption]]
13235 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13238 # wgExternalLinkTarget not supported by Parsoid
13240 Image with link parameter, wgExternalLinkTarget
13242 [[Image:foobar.jpg|link=http://example.com/]]
13244 wgExternalLinkTarget='foobar'
13246 <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>
13251 Image with link parameter, wgNoFollowLinks set to false
13253 [[Image:foobar.jpg|link=http://example.com/]]
13255 wgNoFollowLinks=false
13257 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13262 Image with link parameter, wgNoFollowDomainExceptions
13264 [[Image:foobar.jpg|link=http://example.com/]]
13266 wgNoFollowDomainExceptions='example.com'
13268 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13272 # wgExternalLinkTarget not supported by Parsoid
13274 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13276 [[Image:foobar.jpg|link=http://example.com/|Title]]
13278 wgExternalLinkTarget='foobar'
13280 <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>
13285 Image with empty link parameter
13287 [[File:Foobar.jpg|link=]]
13289 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13292 <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>
13296 Image with link parameter (wiki target) and unnamed parameter
13298 [[File:Foobar.jpg|link=Main_Page|Title]]
13300 <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>
13303 <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>
13307 Image with link parameter (URL target) and unnamed parameter
13309 [[File:Foobar.jpg|link=http://example.com/|Title]]
13311 <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>
13314 <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>
13318 Thumbnail image with link parameter
13321 parsoid=wt2html,wt2wt,html2html
13323 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13325 <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>
13328 <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>
13332 Manually-specified thumbnail image
13336 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13338 <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>
13341 <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>
13345 Manually-specified thumbnail image with explicit link to wiki page
13348 parsoid=wt2html,wt2wt,html2html
13350 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13352 <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>
13355 <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>
13359 Manually-specified thumbnail image with explicit link to url
13362 parsoid=wt2html,wt2wt,html2html
13364 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13366 <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>
13369 <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>
13373 Manually-specified thumbnail image with explicit no link
13376 parsoid=wt2html,wt2wt,html2html
13378 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13380 <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>
13383 <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>
13387 Manually-specified thumbnail image with explicit link and alt text
13390 parsoid=wt2html,wt2wt,html2html
13392 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13394 <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>
13397 <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>
13401 Image with frame and link
13403 parsoid=wt2html,wt2wt,html2html
13405 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13407 <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>
13410 <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>
13414 Image with frame and link and explicit alt
13416 parsoid=wt2html,wt2wt,html2html
13418 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13420 <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>
13423 <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>
13427 Image with wiki markup in implicit alt
13429 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13431 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13433 <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>
13434 </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>
13437 <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>
13439 <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>
13443 Alt image option should handle most kinds of wikitext without barfing
13445 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13447 <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>
13450 <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>
13453 ###################
13454 # Conflicting image format options.
13455 # First option specified should 'win'.
13456 # All three cases in each test should be identical.
13459 Image with 'frameless' first.
13461 parsoid=wt2html,wt2wt,html2html
13463 [[File:Foobar.jpg|frameless|caption]]
13465 [[File:Foobar.jpg|frameless|frame|caption]]
13467 [[File:Foobar.jpg|frameless|thumb|caption]]
13469 <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>
13470 </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>
13471 </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>
13474 <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>
13475 <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>
13476 <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>
13480 Image with 'frame' first.
13482 parsoid=wt2html,wt2wt,html2html
13484 [[File:Foobar.jpg|frame|caption]]
13485 [[File:Foobar.jpg|frame|frameless|caption]]
13486 [[File:Foobar.jpg|frame|thumb|caption]]
13488 <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>
13489 <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>
13490 <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>
13493 <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>
13494 <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>
13495 <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>
13499 Image with 'thumb' first.
13501 parsoid=wt2html,wt2wt,html2html
13503 [[File:Foobar.jpg|thumb|caption]]
13504 [[File:Foobar.jpg|thumb|frameless|caption]]
13505 [[File:Foobar.jpg|thumb|frame|caption]]
13507 <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>
13508 <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>
13509 <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>
13512 <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>
13513 <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>
13514 <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>
13517 ###################
13519 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13520 # and https://phabricator.wikimedia.org/T64258
13521 # Foobar has actual size of 1941x220
13522 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13523 # a scalable format.
13524 # 2. Framed images always ignore size options; always render at default size.
13525 # 3. "Unspecified format" and border are the only types which can be
13529 Image: "unspecified format" and border enlarge
13531 parsoid=wt2html,wt2wt,html2html
13533 [[File:Foobar.jpg|2000px]]
13535 [[File:Foobar.jpg|border|2000px]]
13537 <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>
13538 </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>
13541 <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>
13542 <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>
13546 Image: "unspecified format" and border reduce
13548 parsoid=wt2html,wt2wt,html2html
13550 [[File:Foobar.jpg|1000px]]
13552 [[File:Foobar.jpg|border|1000px]]
13554 <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>
13555 </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>
13558 <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>
13559 <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>
13563 Image: thumbs reduce
13565 parsoid=wt2html,wt2wt,html2html
13567 [[File:Foobar.jpg|thumb|50px]]
13569 <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>
13572 <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>
13576 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13578 parsoid=wt2html,wt2wt,html2html
13580 [[File:Foobar.jpg|thumb|2000px]]
13582 [[File:Foobar.svg|thumb|2000px]]
13584 <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>
13585 <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>
13588 <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>
13589 <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>
13593 Image: frameless can reduce in size
13595 parsoid=wt2html,wt2wt,html2html
13597 [[File:Foobar.jpg|frameless|50px]]
13599 <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>
13602 <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>
13606 Image: bitmap frameless can't be enlarged past original size, but vector can
13608 parsoid=wt2html,wt2wt,html2html
13610 [[File:Foobar.jpg|frameless|2000px]]
13612 [[File:Foobar.svg|frameless|2000px]]
13614 <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>
13615 </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>
13618 <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>
13619 <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>
13623 Image: framed images are always unscaled.
13625 parsoid=wt2html,wt2wt,html2html
13627 [[File:Foobar.jpg|frame]]
13629 [[File:Foobar.jpg|frame|50px]]
13631 [[File:Foobar.jpg|frame|50x50px]]
13633 [[File:Foobar.jpg|frame|2000px]]
13635 <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>
13636 <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>
13637 <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>
13638 <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>
13641 <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>
13642 <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>
13643 <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>
13644 <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>
13647 ###################
13650 Link to image page- image page normally doesn't exists, hence edit link
13651 Add test with existing image page
13652 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13656 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13661 bug 18784 Link to non-existent image page with caption should use caption as link text
13663 [[:Image:test|caption]]
13665 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13670 Frameless image caption with a free URL
13672 [[File:Foobar.jpg|http://example.com]]
13674 <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>
13677 <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>
13681 Thumbnail image caption with a free URL
13685 [[File:Foobar.jpg|thumb|http://example.com]]
13687 <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>
13690 <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>
13694 Thumbnail image caption with a free URL and explicit alt
13697 parsoid=wt2html,wt2wt,html2html
13699 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13701 <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>
13704 <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>
13708 SVG thumbnails with no language set
13711 [[File:Foobar.svg|thumb|caption]]
13713 <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>
13716 <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>
13720 SVG thumbnails with language de
13722 parsoid=wt2html,wt2wt,html2html
13724 [[File:Foobar.svg|thumb|caption|lang=de]]
13726 <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>
13729 <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>
13733 SVG thumbnails with invalid language code
13735 parsoid=wt2html,wt2wt,html2html
13737 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13739 <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>
13742 <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>
13746 BUG 1887: A ISBN with a thumbnail
13748 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13750 <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>
13753 <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>
13757 BUG 1887: A RFC with a thumbnail
13759 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13761 <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>
13764 <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>
13768 BUG 1887: A mailto link with a thumbnail
13770 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13772 <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>
13775 <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>
13778 # Pending resolution to bug 368
13780 BUG 648: Frameless image caption with a link
13782 [[File:Foobar.jpg|text with a [[link]] in it]]
13784 <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>
13787 <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>
13791 BUG 648: Frameless image caption with a link (suffix)
13793 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13795 <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>
13798 <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>
13802 BUG 648: Frameless image caption with an interwiki link
13804 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13806 <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>
13809 <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>
13813 BUG 648: Frameless image caption with a piped interwiki link
13815 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13817 <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>
13820 <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>
13824 T107474: Frameless image caption with <nowiki>
13826 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13828 <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>
13832 Escape HTML special chars in image alt text
13834 [[File:Foobar.jpg|& < > "]]
13836 <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>
13839 <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>
13843 BUG 499: Alt text should have Ӓ, not &1234;
13845 [[File:Foobar.jpg|♀]]
13847 <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>
13850 <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>
13854 Broken image caption with link
13856 parsoid=wt2html,wt2wt,html2html
13858 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13860 <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.
13863 <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>
13867 Image caption containing another image
13869 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13871 <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>
13874 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>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>
13878 Image: caption containing a newline
13880 [[File:Foobar.jpg|This
13883 <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>
13886 <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>
13890 Image: caption containing leading space
13891 (The leading space should not trigger nowiki escaping in wt2wt mode)
13893 [[File:Foobar.jpg|thumb| bar]]
13895 <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>
13898 <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>
13902 Image: caption containing a table
13904 parsoid=wt2html,wt2wt,html2html
13906 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13912 and some more text.]]
13914 <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>
13917 <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
13920 <tr><th>Foo </th><th>Bar</th></tr>
13923 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13927 Bug 3090: External links other than http: in image captions
13929 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13931 <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>
13934 <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>
13940 parsoid=wt2html,wt2wt,html2html
13942 [[Image:foobar.jpg|a|class=b]]
13944 <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>
13947 <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>
13951 Localized image handling (1).
13953 parsoid=wt2html,wt2wt,html2html
13956 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13958 <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>
13961 <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>
13965 Localized image handling (2).
13968 parsoid=wt2html,wt2wt,html2html
13971 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13973 <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>
13976 <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>
13980 Localized image handling (3).
13985 <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>
13987 [[File:Foobar.jpg|بندانگشتی]]
13991 "border", "frameless" and "class" attributes on an image.
13994 parsoid=wt2html,wt2wt,html2html
13996 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13998 <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>
14001 <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>
14004 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14006 Invalid image attributes (bug 62500)
14009 parsoid=wt2html,wt2wt,html2html
14011 [[File:Foobar.jpg|thumb|float|left|caption]]
14013 [[File:Foobar.jpg|thumb|righ|caption]]
14015 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14017 <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>
14018 <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>
14019 <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>
14022 <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>
14023 <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>
14024 <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>
14030 #REDIRECT [[File:Barfoo.jpg]]
14033 # FIXME: Parsoid should run this test -- but we'd need to teach the
14034 # mockAPI about the redirected Barfoo.jpg image.
14038 [[Image:Barfoo.jpg]]
14040 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14045 Missing image with uploads disabled
14049 [[File:Foobaz.jpg]]
14051 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14054 <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>
14057 # Parsoid-specific testing for images
14058 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14059 # Currently imperfect due to a flaw in the Parsoid testrunner
14061 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14065 Parsoid-specific image handling - simple image with size and middle alignment
14067 [[File:Foobar.jpg|middle|50px]]
14069 <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>
14073 Parsoid-specific image handling - simple image with size, middle alignment,
14074 non-standard namespace alias
14076 parsoid=wt2wt,wt2html,html2html
14078 [[Image:Foobar.jpg|middle|50px]]
14080 <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>
14084 Parsoid-specific image handling - simple image with size and middle alignment
14087 [[File:Foobar.jpg|50px|middle]]
14089 <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>
14093 Parsoid-specific image handling - simple image with size and middle alignment
14094 and non-standard namespace name
14096 parsoid=wt2html,wt2wt,html2html
14098 [[Image:Foobar.jpg|50px|middle]]
14100 <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>
14104 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14106 [[File:Foobar.jpg|500x10px|baseline|caption]]
14108 <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>
14112 Parsoid-specific image handling - simple image with border and size spec
14114 [[File:Foobar.jpg|50px|border|caption]]
14116 <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>
14120 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14122 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14124 <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>
14128 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14131 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14133 <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>
14137 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14139 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14141 <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>
14145 Parsoid-specific image handling - thumbnail with specific size, halign,
14146 valign, and caption (existing content)
14148 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14150 <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>
14154 Parsoid-specific image handling - framed image with specific size and caption
14157 parsoid=wt2html,wt2wt,html2html
14159 [[File:Foobar.jpg|frame|500x50px|caption]]
14161 <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>
14165 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14168 parsoid=wt2html,wt2wt,html2html
14170 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14172 <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>
14176 Parsoid-specific image handling - frameless image with specific size, border, and caption
14178 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14180 <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>
14184 Parsoid-specific image handling - simple image with a formatted caption
14186 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14188 <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>
14192 Parsoid-specific image handling - caption with a template in it
14194 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14196 <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>
14200 Parsoid-specific image handling - caption with unbalanced tags in it
14202 parsoid=wt2html,wt2wt,html2html
14205 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14209 <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>
14214 Parsoid-specific image handling - empty caption (1)
14216 parsoid=wt2html,wt2wt
14218 [[File:Foobar.jpg|thumb|]]
14220 <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>
14223 # empty captions don't get serialized unless we're in the "round trip" case
14225 Parsoid-specific image handling - empty caption (2)
14229 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14230 <a href="./File:Foobar.jpg">
14231 <img resource="./File:Foobar.jpg"
14232 src="//example.com/images/3/3a/Foobar.jpg"
14233 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14234 height="25" width="220"/>
14236 <figcaption></figcaption>
14239 [[File:Foobar.jpg|thumb]]
14243 Parsoid-specific image handling - whitespace caption
14245 [[File:Foobar.jpg|thumb| ]]
14247 <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>
14251 Parsoid-specific image handling - lang option
14254 [[File:Foobar.svg|lang=de|caption]]
14258 <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>
14262 ## Edge case bugs in Parsoid from T93580
14264 T93580: 1. Templated <ref> inside block images
14266 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14270 <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>
14272 <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>
14276 T93580: 2. <ref> inside inline images
14278 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14282 <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>
14284 <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>
14288 T93580: 3. Templated <ref> inside inline images
14290 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14294 <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>
14296 <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>
14303 Subpage test/subpage
14311 subpage title=[[Subpage test]]
14315 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14320 Subpage noslash link
14322 subpage title=[[Subpage test]]
14326 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14331 Subpage test/1/2/subpage
14337 Relative subpage noslash link
14339 parsoid=wt2wt,wt2html,html2html
14340 subpage title=[[Subpage test/1/2/3/4]]
14346 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14347 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14350 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14351 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14355 Parsoid: dot-slash prefixed wikilinks
14365 </p><p>[[././baz/]]
14370 </p><p>[[././baz/]]
14375 Render invalid page names as plain text (bug 51090)
14388 [[{{echo|./../foo}}|bar]]
14389 [[{{echo|foo/.}}|bar]]
14390 [[{{echo|foo/..}}|bar]]
14391 [[{{echo|foo~~~~bar}}]]
14392 [[{{echo|foo>bar}}]]
14393 [[{{echo|foo././bar}}]]
14394 [[{{echo|foo{bar}}]]
14395 [[{{echo|foo}bar}}]]
14396 [[{{echo|foo[bar}}]]
14397 [[{{echo|foo]bar}}]]
14398 [[{{echo|foo<bar}}]]
14400 <p>[[./../foo|bar]]
14410 </p><p>[[./../foo|bar]]
14423 <p>[[./../foo|bar]]
14434 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14435 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14436 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14437 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14438 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14439 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14440 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14441 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14442 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14443 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14444 [[<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>
14452 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14457 BUG 561: {{/Subpage}}
14459 subpage title=[[Page]]
14463 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14471 Category:MediaWiki User's Guide
14479 [[:Category:MediaWiki User's Guide]]
14481 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14490 [[Category:MediaWiki User's Guide]]
14492 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14496 PAGESINCATEGORY invalid title fatal (r33546 fix)
14498 {{PAGESINCATEGORY:<bogus>}}
14505 Category with different sort key
14509 [[Category:MediaWiki User's Guide|Foo]]
14511 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14515 Category with identical sort key
14519 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14521 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14525 Category with empty sort key
14530 [[Category:MediaWiki User's Guide|]]
14532 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14536 Category with empty sort key and parentheses
14541 [[Category:Foo (bar)|]]
14543 [[Category:Foo (bar)|Foo]]
14546 ## We used to, but no longer wt2wt this test since the default serializer
14547 ## will normalize all categories to serialize on their own line.
14548 ## This wikitext usage is going to be fairly uncommon in production and
14549 ## selser will take care of preserving formatting in those scenarios.
14551 Category with link tail
14557 123[[Category:Foo]]456
14559 123[[Category:Foo]]456
14561 <p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
14565 Category with template
14570 [[Category:{{echo|Foo}}]]
14572 [[Category:{{echo|Foo}}]]
14576 Category with template in sort key
14581 [[Category:Foo|{{echo|Bar}}]]
14583 [[Category:Foo|{{echo|Bar}}]]
14587 Category with template in sort key and title
14592 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14594 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14597 ## We used to, but no longer wt2wt this test since the default serializer
14598 ## will normalize all categories to serialize on their own line.
14599 ## This wikitext usage is going to be fairly uncommon in production and
14600 ## selser will take care of preserving formatting in those scenarios.
14602 Category / paragraph interactions
14606 Foo [[Category:Baz]] Bar
14608 Foo [[Category:Baz]]
14616 [[Category:Baz]] Bar
14629 {{echo|[[Category:Baz]]}}
14642 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14643 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14644 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14645 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14646 <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>
14647 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14650 ## We used to, but no longer wt2wt this test since the default serializer
14651 ## will normalize all categories to serialize on their own line.
14652 ## This wikitext usage is going to be fairly uncommon in production and
14653 ## selser will take care of preserving formatting in those scenarios.
14655 ## The whitespace on the empty line is part of the test. Please do not delete
14657 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14663 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14665 {{echo|[[Category:Foo]] and so should this!}}
14667 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14672 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14674 <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>
14677 ## Parsoid will not try to wt2wt this while preserving newlines because
14678 ## it suppresses excess newlines within list items -- and we don't want to
14679 ## introduce a special case just for categories, which is, in reality somewhat
14680 ## odd behavior -- categories are unlikely to be used in list items like this
14681 ## in top-level pages and are only likely to show up in template-generated
14682 ## list items where this RT-ing is a non-issue.
14684 ## The whitespace on the empty line is part of the test. Please do not delete
14686 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14692 [[Category:Foo]] and this should be part of the same list item
14695 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14697 <ul><li>This and this should be part of the same list item</li>
14698 <li>So should this and this should be part of the same list item</li></ul>
14701 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14702 <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>
14706 ## Newlines and categories that follow the last item of a list
14707 ## are treated differently because this (list followed by categories)
14708 ## is an extremely common pattern on wikis.
14710 3. Categories and newlines: newline suppression for last list item should RT properly
14723 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14725 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14726 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14730 4. Categories and newlines: newline suppression for last list item should RT properly
14738 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14740 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14743 ## only wt2html for this to make sure the algo only applies to the rightmost path
14745 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14758 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14760 <ul><li> d</li></ul></li></ul>
14761 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14764 ## We used to, but no longer wt2wt this test since the default serializer
14765 ## will normalize all categories to serialize on their own line.
14766 ## This wikitext usage is going to be fairly uncommon in production and
14767 ## selser will take care of preserving formatting in those scenarios.
14769 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14773 * a [[Category:Foo]]
14775 <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>
14778 # This test also demonstrates because of newline+category tunneling
14779 # through the list hander, template wrapping doesn't expand to the
14780 # containing list when the list item swallows the category.
14782 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14787 <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
14788 </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>
14792 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14796 {{echo|[[Category:Foo]]
14800 <ul><li> a</li></ul>
14802 <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">
14803 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14804 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14808 Parsoid: Serialize link to category page with colon escape
14814 [[:Category:Foo|Bar]]
14817 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14818 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14822 # We used to, but no longer wt2wt this test since the default serializer
14823 # will normalize all categories to serialize on their own line.
14824 # This wikitext usage is going to be fairly uncommon in production and
14825 # selser will take care of preventing whitespace insertion if this
14826 # occurs in an article.
14828 # html2html disabled for the same reason (whitespace insertion between
14831 # html2wt disabled because it localizes the "Category" namespace.
14833 Link prefix/suffixes aren't applied to category links
14843 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14847 Parsoid: Serialize link to file page with colon escape
14853 [[:File:Foo.png|Bar]]
14856 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14857 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14862 Parsoid: Serialize a genuine category link without colon escape
14867 [[Category:Foo|Bar]]
14869 <link rel="mw:PageProp/Category" href="./Category:Foo">
14870 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14874 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14878 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14880 [[Category:Toxine bactérienne]]
14884 Parsoid: Defaultsort
14886 {{DEFAULTSORT:Foo}}
14888 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14892 Parsoid: Defaultsort (template-generated)
14894 {{{{echo|DEFAULTSORT}}:Foo}}
14896 <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}}]}'/>
14900 ### Inter-language links
14903 Interlanguage links
14911 es:Alimento fr:Nourriture zh:食品
14913 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14914 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14915 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14919 Duplicate interlanguage links (bug 24502)
14930 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14931 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14932 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14933 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14940 Basic section headings
14947 ===Smaller headline===
14950 <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>
14953 <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>
14956 <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>
14962 Section headings with TOC
14965 === Subheadline 1 ===
14966 ===== Skipping a level =====
14967 ====== Skipping a level ======
14971 ===Another headline===
14973 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14975 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14977 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14979 <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>
14981 <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>
14988 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14990 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14996 <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>
14997 <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>
14998 <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>
14999 <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>
15000 <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>
15003 <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>
15008 TOC anchors don't collide
15016 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15018 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15019 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15020 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15021 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15025 <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>
15026 <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>
15027 <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>
15028 <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>
15032 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15034 Handling of sections up to level 6 and beyond
15037 == Level 2 Heading==
15038 === Level 3 Heading===
15039 ==== Level 4 Heading====
15040 ===== Level 5 Heading=====
15041 ====== Level 6 Heading======
15042 ======= Level 7 Heading=======
15043 ======== Level 8 Heading========
15044 ========= Level 9 Heading=========
15045 ========== Level 10 Heading==========
15047 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15049 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15051 <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>
15053 <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>
15055 <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>
15057 <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>
15059 <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>
15060 <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>
15061 <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>
15062 <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>
15063 <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>
15077 <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>
15078 <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>
15079 <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>
15080 <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>
15081 <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>
15082 <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>
15083 <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>
15084 <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>
15085 <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>
15086 <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>
15091 TOC regression (T11764)
15095 ==== title 1.1.1 ====
15100 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15102 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15104 <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>
15106 <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>
15109 <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>
15112 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15114 <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>
15120 <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>
15121 <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>
15122 <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>
15123 <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>
15124 <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>
15125 <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>
15130 TOC for heading containing <span id="..."></span> (T96153)
15133 ==<span id="old-anchor"></span>New title==
15135 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15137 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15141 <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>
15146 TOC with wgMaxTocLevel=3 (bug 6204)
15152 ==== title 1.1.1 ====
15157 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15159 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15161 <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>
15162 <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>
15165 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15167 <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>
15173 <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>
15174 <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>
15175 <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>
15176 <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>
15177 <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>
15178 <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>
15183 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15189 ====Section 1.1.1====
15190 ====Section 1.1.1.1====
15193 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15195 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15197 <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>
15200 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15204 <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>
15205 <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>
15206 <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>
15207 <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>
15208 <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>
15214 Resolving duplicate section names
15219 <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>
15220 <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>
15225 Resolving duplicate section names with differing case (bug 10721)
15230 <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>
15231 <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>
15243 Template with sections, __NOTOC__
15250 <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>
15251 <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>
15252 <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>
15253 <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>
15258 __NOEDITSECTION__ keyword
15264 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15265 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15270 Link inside a section heading
15272 ==Section with a [[Main Page|link]] in it==
15274 <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>
15279 TOC regression (T14077)
15286 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15288 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15290 <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>
15293 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15297 <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>
15298 <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>
15299 <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>
15304 BUG 1219 URL next to image (good)
15306 http://example.com [[File:Foobar.jpg]]
15308 <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>
15311 <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>
15315 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15318 The line above must have a trailing space!
15321 But just in case it doesn't...
15323 <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>
15324 <p>The line above must have a trailing space!
15326 <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>
15327 <p>But just in case it doesn't...
15332 Header with special characters (bug 25462)
15334 The tooltips shall not show entities to the user (ie. be double escaped)
15351 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15353 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15355 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15356 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15357 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15358 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15359 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15363 <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>
15366 <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>
15369 <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>
15372 <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>
15375 <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>
15381 Header with space, plus and underscore as entity
15383 Id should not contain + for spaces
15385 == Space between Text ==
15388 == Space-Entity between Text ==
15391 == Plus+between+Text ==
15394 == Plus-Entity+between+Text ==
15397 == Underscore_between_Text ==
15400 == Underscore-Entity_between_Text ==
15403 [[#Space between Text]]
15404 [[#Space-Entity between Text]]
15405 [[#Plus+between+Text]]
15406 [[#Plus-Entity+between+Text]]
15407 [[#Underscore_between_Text]]
15408 [[#Underscore-Entity_between_Text]]
15410 <p>Id should not contain + for spaces
15412 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15414 <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>
15415 <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>
15416 <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>
15417 <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>
15418 <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>
15419 <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>
15423 <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>
15426 <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>
15429 <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>
15432 <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>
15435 <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>
15438 <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>
15440 </p><p><a href="#Space_between_Text">#Space between Text</a>
15441 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15442 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15443 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15444 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15445 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15450 Headers with excess '=' characters
15451 (Are similar tests necessary beyond the 1st level?)
15455 =''italic'' heading==
15456 ==''italic'' heading=
15458 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15460 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15461 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15462 <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>
15463 <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>
15467 <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>
15468 <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>
15469 <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>
15470 <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>
15475 HTML headers vs TOC (bug 23393)
15476 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15488 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15490 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15492 <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>
15493 <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>
15496 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15498 <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>
15499 <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>
15505 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15506 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15507 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15508 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15509 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15510 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15515 Single-line or multiline-comments can follow headings
15517 parsoid=wt2html,wt2wt
15525 <h2><span class="mw-headline" id="foo">foo</span></h2>
15526 <h2><span class="mw-headline" id="bar">bar</span></h2>
15527 <h2><span class="mw-headline" id="baz">baz</span></h2>
15532 BUG 1219 URL next to image (broken)
15534 http://example.com[[File:Foobar.jpg]]
15536 <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>
15539 <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>
15543 Bug 1186 news: in the middle of text
15545 http://en.wikinews.org/wiki/Wikinews:Workplace
15547 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15553 Namespaced link must have a title
15562 Namespaced link must have a title (bad fragment version)
15564 [[Project:#fragment]]
15566 <p>[[Project:#fragment]]
15572 ### HTML tags and HTML attributes
15576 div with no attributes
15578 <div>HTML rocks</div>
15580 <div>HTML rocks</div>
15585 div with double-quoted attribute
15587 <div id="rock">HTML rocks</div>
15589 <div id="rock">HTML rocks</div>
15594 div with single-quoted attribute
15596 <div id='rock'>HTML rocks</div>
15598 <div id="rock">HTML rocks</div>
15603 div with unquoted attribute
15605 <div id=rock>HTML rocks</div>
15607 <div id="rock">HTML rocks</div>
15612 div with illegal double attributes
15614 <div id="a" id="b">HTML rocks</div>
15616 <div id="b">HTML rocks</div>
15621 div with empty attribute value, space before equals
15623 parsoid=wt2html,html2html
15625 <div class =>HTML rocks</div>
15627 <div class="">HTML rocks</div>
15630 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15634 div with multiple empty attribute values
15636 parsoid=wt2html,html2html
15638 <div id= title=>HTML rocks</div>
15640 <div id="title.3D">HTML rocks</div>
15643 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15647 table with multiple empty attribute values
15649 parsoid=wt2html,html2html
15655 <table title="id=">
15661 <table title="id=">
15662 <tbody><tr><td> hi</td></tr>
15667 div with braces in attribute value
15669 <div title="{}">Foo</div>
15671 <div title="{}">Foo</div>
15674 <div title="{}">Foo</div>
15678 div with empty attribute value, no space before equals
15680 parsoid=wt2html,html2html
15682 <div class=>HTML rocks</div>
15684 <div class="">HTML rocks</div>
15687 <div class="">HTML rocks</div>
15691 HTML multiple attributes correction
15693 <p class="error" class="awesome">Awesome!</p>
15695 <p class="awesome">Awesome!</p>
15700 Table multiple attributes correction
15703 !+ class="error" class="awesome"| status
15708 <th class="awesome"> status
15716 <DIV ID="x">HTML ROCKS</DIV>
15718 <div id="x">HTML ROCKS</div>
15723 Non-ASCII pseudo-tags are rendered as text
15732 Pseudo-tag with URL 'name' renders as url link
15734 <http://example.com/>
15736 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15741 text with amp in the middle of nowhere
15745 <p>Remember AT&T?
15750 text with character entity: eacute
15752 I always thought é was a cute letter.
15754 <p>I always thought é was a cute letter.
15757 <p>I always thought é was a cute letter.</p>
15761 text with entity-escaped character entity-like string: eacute
15763 I always thought &eacute; was a cute letter.
15765 <p>I always thought &eacute; was a cute letter.
15770 text with undefined character entity: xacute
15772 I always thought &xacute; was a cute letter.
15774 <p>I always thought &xacute; was a cute letter.
15781 <data value="5">five</data>
15782 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15783 <mark>This highlighted text</mark>
15785 <p><data value="5">five</data>
15786 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15787 <mark>This highlighted text</mark>
15792 HTML tag with leading space is parsed as text
15796 <p>< div>foo< /div>
15801 ### Nesting tests (see bug 41545, 50604, 51081)
15804 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15805 # Note that html2wt is considerably more difficult if we use <b> in
15806 # the test case, instead of <big>
15808 Ensure that HTML adoption agency algorithm is properly implemented.
15810 <big>X<big>Y</big>Z</big>
15812 <p><big>X<big>Y</big>Z</big>
15816 # This was bug 41545 in the PHP parser.
15817 # Note that tidy doesn't handle this correctly.
15821 <kbd>X<kbd>Y</kbd>Z</kbd>
15823 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15827 # The following cases were bug 51081 in the PHP parser.
15828 # Note that there are some other nestable tags (b, i, etc) which are
15829 # not covered; see bug 51081 for discussion.
15831 # Note that tidy doesn't handle this correctly.
15835 <em>X<em>Y</em>Z</em>
15837 <p><em>X<em>Y</em>Z</em>
15841 # Note that tidy doesn't handle this correctly.
15843 Nesting of <strong>
15845 <strong>X<strong>Y</strong>Z</strong>
15847 <p><strong>X<strong>Y</strong>Z</strong>
15856 <p><q>X<q>Y</q>Z</q></p>
15859 # Note that tidy doesn't handle this correctly.
15863 <ruby>X<ruby>Y</ruby>Z</ruby>
15865 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15869 # Note that tidy doesn't handle this correctly.
15873 <bdo>X<bdo>Y</bdo>Z</bdo>
15875 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15887 [[Media:Foobar.jpg]]
15889 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15894 Media link with text
15896 [[Media:Foobar.jpg|A neat file to look at]]
15898 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15902 # FIXME: this is still bad HTML tag nesting
15903 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15905 Media link with nasty text
15907 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15909 <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>
15912 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15913 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15917 Media link to nonexistent file (bug 1702)
15919 [[Media:No such.jpg]]
15921 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15926 Image link to nonexistent file (bug 1850 - good)
15928 [[File:No_such.jpg]]
15930 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15933 <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>
15937 :Image link to nonexistent file (bug 1850 - bad)
15939 [[:Image:No such.jpg]]
15941 <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>
15944 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15950 Character reference normalization in link text (bug 1938)
15952 [[Main Page|this&that]]
15954 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15961 Test for unicode normalization
15963 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15967 (bug 19451) Links should refer to the normalized form.
15975 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15976 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15977 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15978 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15979 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15984 Empty attribute crash test (bug 2067)
15986 <font color="">foo</font>
15988 <p><font color="">foo</font>
15993 Empty attribute crash test single-quotes (bug 2067)
15995 <font color=''>foo</font>
15997 <p><font color="">foo</font>
16002 Attribute test: equals, then nothing
16004 parsoid=wt2html,html2html
16006 <font color=>foo</font>
16008 <p><font color="">foo</font>
16011 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16015 Attribute test: unquoted value
16017 parsoid=wt2html,html2html
16019 <font color=x>foo</font>
16021 <p><font color="x">foo</font>
16024 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16028 Attribute test: unquoted but illegal value (hash)
16030 <font color=#x>foo</font>
16032 <p><font color="#x">foo</font>
16036 # Parsoid does not serialize to empty attribute syntax,
16037 # so wt2wt and html2wt cases are skipped
16039 Attribute test: no value (T54330)
16041 parsoid=wt2html,html2html
16043 <font color>foo</font>
16045 <p><font color="">foo</font>
16048 <p><font color="">foo</font></p>
16052 Bug 2095: link with three closing brackets
16056 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16059 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16063 Bug 2095: link with pipe and three closing brackets
16065 [[Main Page|link]]]
16067 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16070 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16074 Bug 2095: link with pipe and three closing brackets, version 2
16076 [[Main Page|[http://example.com/]]]
16078 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16081 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16090 Template:Dangerous attribute
16092 " onmouseover="alert(document.cookie)
16096 Template:Dangerous style attribute
16098 border-size: expression(alert(document.cookie))
16104 <div style="float: right; {{{1}}}">Magic div</div>
16108 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16110 <div title="{{test}}"></div>
16112 <div title="This is a test template"></div>
16116 # Parsoid has enough context to handle this case
16118 Bug 2304: HTML attribute safety (dangerous template; 2309)
16120 <div title="{{dangerous attribute}}"></div>
16122 <div title=""></div>
16125 <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>
16129 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16131 <div style="{{dangerous style attribute}}"></div>
16133 <div style="/* insecure input */"></div>
16138 Bug 2304: HTML attribute safety (safe parameter; 2309)
16140 {{div style|width: 200px}}
16142 <div style="float: right; width: 200px">Magic div</div>
16147 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16149 {{div style|width: expression(alert(document.cookie))}}
16151 <div style="/* insecure input */">Magic div</div>
16156 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16158 {{div style|"><script>alert(document.cookie)</script>}}
16160 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16165 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16167 {{div style|" ><script>alert(document.cookie)</script>}}
16169 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16174 Bug 2304: HTML attribute safety (link)
16176 <div title="[[Main Page]]"></div>
16178 <div title="[[Main Page]]"></div>
16183 Bug 2304: HTML attribute safety (italics)
16185 <div title="''foobar''"></div>
16187 <div title="''foobar''"></div>
16192 Bug 2304: HTML attribute safety (bold)
16194 <div title="'''foobar'''"></div>
16196 <div title="'''foobar'''"></div>
16202 Bug 2304: HTML attribute safety (ISBN)
16204 <div title="ISBN 1234567890"></div>
16206 <div title="ISBN 1234567890"></div>
16211 Bug 2304: HTML attribute safety (RFC)
16213 <div title="RFC 1234"></div>
16215 <div title="RFC 1234"></div>
16220 Bug 2304: HTML attribute safety (PMID)
16222 <div title="PMID 1234567890"></div>
16224 <div title="PMID 1234567890"></div>
16229 Bug 2304: HTML attribute safety (web link)
16231 <div title="http://example.com/"></div>
16233 <div title="http://example.com/"></div>
16238 Bug 2304: HTML attribute safety (named web link)
16240 <div title="[http://example.com/ link]"></div>
16242 <div title="[http://example.com/ link]"></div>
16247 Bug 3244: HTML attribute safety (extension; safe)
16249 <div style="<nowiki>background:blue</nowiki>"></div>
16251 <div style="background:blue"></div>
16256 Bug 3244: HTML attribute safety (extension; unsafe)
16258 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16260 <div style="/* insecure input */"></div>
16264 # More MSIE fun discovered by Tom Gilder
16267 MSIE CSS safety test: spurious slash
16269 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16271 <div style="/* insecure input */">evil</div>
16276 MSIE CSS safety test: hex code
16278 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16280 <div style="/* insecure input */">evil</div>
16285 MSIE CSS safety test: comment in url
16287 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16289 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16294 MSIE CSS safety test: comment in expression
16296 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16298 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16303 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16305 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16307 <p style="/* invalid control char */">A</p>
16312 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16314 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16315 <div style="top:EXPRESSION(alert())">B</div>
16317 <p style="/* insecure input */">A</p>
16318 <div style="/* insecure input */">B</div>
16323 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16325 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16326 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16328 <div style="/* insecure input */">A</div>
16329 <p style="/* insecure input */">B</p>
16334 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16336 <div style="background-image:url⁽javascript:alert())">A</div>
16337 <div style="background-image:url₍javascript:alert())">B</div>
16338 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16340 <div style="/* insecure input */">A</div>
16341 <div style="/* insecure input */">B</div>
16342 <p style="/* insecure input */">C</p>
16346 # FIXME: Parsoid fails to sanitize this! See T58846.
16351 title="data:text/html,<img src=1 onerror=alert(1)>"
16352 style="-o-link:attr(title);-o-link-source:current">X</div>
16354 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16359 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16361 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16362 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16363 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16364 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16365 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16366 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16367 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16369 <p style="/* insecure input */">A</p>
16370 <p style="/* insecure input */">B</p>
16371 <p style="/* insecure input */">C</p>
16372 <p style="/* insecure input */">D</p>
16373 <p style="/* insecure input */">E</p>
16374 <p style="/* insecure input */">F</p>
16375 <p style="/* insecure input */">G</p>
16380 Table attribute legitimate extension
16383 !+ style="<nowiki>color:blue</nowiki>"| status
16388 <th style="color:blue"> status
16394 Table attribute safety
16397 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16402 <th style="/* insecure input */"> status
16408 CSS line continuation 1
16410 <div style="background-image: u\ rl(test.jpg);"></div>
16412 <div style="/* insecure input */"></div>
16417 CSS line continuation 2
16419 <div style="background-image: u\ rl(test.jpg); "></div>
16421 <div style="/* invalid control char */"></div>
16432 Expansion of multi-line templates in attribute values (bug 6255)
16434 <div style="background: {{identity|#00FF00}}">-</div>
16436 <div style="background: #00FF00">-</div>
16442 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16444 <div style="background:
16447 <div style="background: #00FF00">-</div>
16450 <div style="background:
16455 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16457 <div style="background: #00FF00">-</div>
16459 <div style="background: #00FF00">-</div>
16464 evil <math>-wiki-tags without Extension:Math enabled
16466 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16468 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16472 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16475 Parser hook: empty input
16486 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16489 ## Don't expect parsoid to rt this form.
16491 Parser hook: empty input using terminated empty elements
16493 parsoid=wt2html,html2html
16504 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16508 Parser hook: empty input using terminated empty elements (space before)
16519 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16523 Parser hook: basic input
16534 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16537 ## Don't expect parsoid to rt this form.
16539 Parser hook: case insensitive
16541 parsoid=wt2html,html2html
16552 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16555 ## Don't expect parsoid to rt this form.
16557 Parser hook: case insensitive, redux
16559 parsoid=wt2html,html2html
16570 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16574 Parser hook: nested tags
16576 <tag><tag></tag></tag>
16585 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16589 Parser hook: basic arguments
16591 <tag width="200" height="100" depth="50" square=""></tag>
16604 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16607 ## Don't expect parsoid to rt this form.
16609 Parser hook: basic arguments, variations
16611 parsoid=wt2html,html2html
16613 <tag width=200 height = "100" depth = '50' square></tag>
16626 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16630 Parser hook: argument containing a forward slash (bug 5344)
16632 <tag filename="/tmp/bla"></tag>
16637 'filename' => '/tmp/bla',
16642 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16645 ## Don't expect parsoid to rt this form.
16647 Parser hook: empty input using terminated empty elements (bug 2374)
16649 parsoid=wt2html,html2html
16661 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16664 ## </tag> should be output literally since there is no matching tag that begins it
16665 ## Don't expect parsoid to rt this form.
16667 Parser hook: basic arguments using terminated empty elements (bug 2374)
16671 <tag width=200 height = "100" depth = '50' square/>
16688 <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
16692 ## Don't expect parsoid to rt this form.
16694 Parser hook: Don't allow unclosed extension tags
16700 this is a '''test'''
16702 <p>test <tag>123
16703 </p><p>this is a <b>test</b>
16706 <p>test <tag>123</p>
16708 <p>this is a <b>test</b></p>
16712 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16716 Parser hook: static parser hook not inside a comment
16718 <statictag>hello, world</statictag>
16720 <statictag action="flush" />
16726 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16727 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
16731 Parser hook: static parser hook inside a comment
16733 <!-- <statictag>hello, world</statictag> -->
16734 <statictag action="flush" />
16739 <!-- <statictag>hello, world</statictag> -->
16740 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
16743 # Nested template calls; this case was broken by Parser.php rev 1.506,
16747 Template:One-parameter
16749 (My parameter is: {{{1}}})
16753 Template:Map-one-parameter
16755 {{{{{1}}}|{{{2}}}}}
16759 Nested template calls
16761 {{Map-one-parameter|One-parameter|param}}
16763 <p>(My parameter is: param)
16772 # HTML+Tidy effectively strips out the empty tags completely
16773 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16774 # which Tidy would have done for the PHP parser had there been content inside it.
16776 Sanitizer: Closing of open tags
16778 <s></s><table></table>
16780 <s></s><table></table>
16783 <p><s></s></p><table></table>
16787 Sanitizer: Closing of open but not closed tags
16796 Sanitizer: Closing of closed but not open tags
16806 Sanitizer: Closing of closed but not open table tags
16810 Table not started</td></tr></table>
16812 <p>Table not started</p>
16814 <p>Table not started</p>
16818 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16820 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16822 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16826 # In HTML5, the restrictions are that id must contain at least one character,
16827 # and must not contain any space characters.
16829 Sanitizer: Validating the contents of the id attribute (bug 4515)
16833 <br id="" /><br id="a space" />
16838 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16840 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16844 <br id="foo" /><br id="foo" />
16846 Something need to be done. foo-2 ?
16850 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16853 <meta itemprop="hello" content="world">
16854 <meta http-equiv="refresh" content="5">
16855 <meta itemprop="hello" http-equiv="refresh" content="5">
16856 <link itemprop="hello" href="{{SERVER}}">
16857 <link rel="stylesheet" href="{{SERVER}}">
16858 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16862 <p> <meta itemprop="hello" content="world" />
16863 <meta http-equiv="refresh" content="5">
16864 <meta itemprop="hello" content="5" />
16866 <link itemprop="hello" href="http://example.org" />
16867 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16868 <link itemprop="hello" href="http://example.org" />
16874 Language converter: output gets cut off unexpectedly (bug 5757)
16878 this bit is safe: }-
16880 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16882 then we get cut off here: }-
16884 all additional text is vanished
16886 <p>this bit is safe: }-
16887 </p><p>but if we add a conversion instance: xxx
16888 </p><p>then we get cut off here: }-
16889 </p><p>all additional text is vanished
16894 Self closed html pairs (bug 5487)
16897 <center><font id="bug" />Centered text</center>
16898 <div><font id="bug2" />In div text</div>
16900 <center><font id="bug" />Centered text</center>
16901 <div><font id="bug2" />In div text</div>
16910 Punctuation: nbsp before exclamation
16914 <p>C'est grave !
16919 Punctuation: CSS !important (bug 11874)
16921 <div style="width:50% !important">important</div>
16923 <div style="width:50% !important">important</div>
16928 Punctuation: CSS ! important (bug 11874; with space after)
16930 <div style="width:50% ! important">important</div>
16932 <div style="width:50% ! important">important</div>
16937 HTML bullet list, closed tags (bug 5497)
16950 <ul data-parsoid='{"stx":"html"}'>
16951 <li data-parsoid='{"stx":"html"}'>One</li>
16952 <li data-parsoid='{"stx":"html"}'>Two</li>
16958 HTML bullet list, unclosed tags (bug 5497)
16970 <ul data-parsoid='{"stx":"html"}'>
16971 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16972 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16978 HTML ordered list, closed tags (bug 5497)
16991 <ol data-parsoid='{"stx":"html"}'>
16992 <li data-parsoid='{"stx":"html"}'>One</li>
16993 <li data-parsoid='{"stx":"html"}'>Two</li>
16999 HTML ordered list, unclosed tags (bug 5497)
17012 <ol data-parsoid='{"stx":"html"}'>
17013 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17014 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17020 HTML nested bullet list, closed tags (bug 5497)
17043 <ul data-parsoid='{"stx":"html"}'>
17044 <li data-parsoid='{"stx":"html"}'>One</li>
17045 <li data-parsoid='{"stx":"html"}'>Two:
17046 <ul data-parsoid='{"stx":"html"}'>
17047 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17048 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17055 HTML nested bullet list, open tags (bug 5497)
17092 HTML nested ordered list, closed tags (bug 5497)
17117 HTML nested ordered list, open tags (bug 5497)
17154 HTML ordered list item with parameters oddity
17156 <ol><li id="fragment">One</li>
17159 <ol><li id="fragment">One</li>
17164 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17166 bug 5918: autonumbering
17168 [http://first/] [http://second] [ftp://ftp]
17172 [mailto:enclosed@mail.tld With target]
17174 [mailto:enclosed@mail.tld]
17176 mailto:inline@mail.tld
17178 <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>
17179 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17180 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17181 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17182 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17185 <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>
17186 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17187 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17188 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17189 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17194 # Security and HTML correctness
17195 # From Nick Jenkins' fuzz testing
17199 Fuzz testing: Parser13
17214 Fuzz testing: Parser14
17219 <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>
17220 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17222 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17228 <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>
17230 <div id="toc" class="toc">
17231 <div id="toctitle">
17235 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17242 Fuzz testing: Parser14-table
17244 parsoid=wt2html,html2html
17249 <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>
17250 <table style="__TOC__">
17255 <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>
17256 <table style="__TOC__">
17263 <table style="__TOC__"></table>
17266 # Known to produce bogus xml (extra </td>)
17268 Fuzz testing: Parser16
17295 Fuzz testing: Parser21
17298 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17303 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17313 Fuzz testing: Parser22
17315 http://===r:::https://b
17319 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17327 # Known to produce bad XML for now
17329 Fuzz testing: Parser24
17334 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17335 <br style="onmouseover='alert(document.cookie);' " />
17337 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17342 <u class="|">}}}} >
17343 <br style="onmouseover='alert(document.cookie);'" />
17345 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17354 # Note: the current result listed for this is not what the original one was,
17355 # but the original bug was JavaScript injection, which is fixed in any case.
17356 # It's not clear that the original result listed was any more correct than the
17357 # current one. Original result:
17360 # <li class="||">
17361 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17363 Fuzz testing: Parser25 (bug 6055)
17369 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17371 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17376 Fuzz testing: URL adjacent extension (with space, clean)
17378 http://example.com <nowiki>junk</nowiki>
17380 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17383 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17387 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17389 http://example.com<nowiki>junk</nowiki>
17391 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17394 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17398 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17400 http://example.com<pre>junk</pre>
17402 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17405 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17410 <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>
17414 Fuzz testing: image with bogus manual thumbnail
17416 [[Image:foobar.jpg|thumbnail= ]]
17418 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17421 <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>
17425 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17427 <pre dir=" "></pre>
17429 <pre dir=" "></pre>
17434 Parsing optional HTML elements (Bug 6171)
17439 <td> Some tabular data</td>
17440 <td> More tabular data ...
17441 <td> And yet som tabular data</td>
17447 <td> Some tabular data</td>
17448 <td> More tabular data ...
17449 </td><td> And yet som tabular data</td>
17456 Correct handling of <td>, <tr> (Bug 6171)
17461 <td> Some tabular data</td>
17462 <td> More tabular data ...</td>
17463 <td> And yet som tabular data</td>
17469 <td> Some tabular data</td>
17470 <td> More tabular data ...</td>
17471 <td> And yet som tabular data</td>
17479 Parsing crashing regression (fr:JavaScript)
17483 <p></body></x>
17488 Inline wiki vs wiki block nesting
17494 <p><b>Bold paragraph</b>
17495 </p><p>New wiki paragraph
17499 # FIXME: The current php output is documented
17500 # and desired output is the parsoid target.
17502 Inline HTML vs wiki block nesting
17508 <p><b>Bold paragraph
17509 </p><p>New wiki paragraph</b>
17512 <p><b>Bold paragraph</b>
17513 </p><p>New wiki paragraph
17517 # Original result was this:
17518 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17520 # While that might be marginally more intuitive, maybe, the six-apostrophe
17521 # construct is clearly pathological and the result stated here (which is what
17522 # the parser actually does) is about as reasonable as anything.
17524 Mixing markup for italics and bold
17527 '''bold''''''bold''bolditalics'''''
17529 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17537 Article for special page transclusion test
17541 Special page transclusion
17544 {{Special:Prefixindex/Xyzzyx}}
17546 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17552 Special page transclusion twice (bug 5021)
17555 {{Special:Prefixindex/Xyzzyx}}
17556 {{Special:Prefixindex/Xyzzyx}}
17558 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17560 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17566 Transclusion of default MediaWiki message
17568 {{MediaWiki:Mainpage}}
17575 Transclusion of nonexistent MediaWiki message
17577 {{MediaWiki:Mainpagexxx}}
17579 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17584 Transclusion of MediaWiki message with underscore
17586 {{MediaWiki:history_short}}
17593 Transclusion of MediaWiki message with space
17595 {{MediaWiki:history short}}
17602 Invalid header with following text
17612 Section extraction test (section 0)
17632 Section extraction test (section 1)
17654 Section extraction test (section 2)
17675 Section extraction test (section 3)
17695 Section extraction test (section 4)
17719 Section extraction test (section 5)
17739 Section extraction test (section 6)
17760 Section extraction test (section 7)
17780 Section extraction test (section 8)
17800 Section extraction test (section 9)
17821 Section extraction test (section 10)
17841 Section extraction test (nonexistent section 11)
17860 Section extraction test with bogus heading (section 1)
17865 ==bogus== not a legal section
17869 ==bogus== not a legal section
17873 Section extraction test with bogus heading (section 2)
17878 ==bogus== not a legal section
17885 Section extraction test with comment after heading (section 1)
17897 Section extraction test with comment after heading (section 2)
17909 Section extraction test with bogus <nowiki> heading (section 1)
17914 ==bogus== <nowiki>not a legal section</nowiki>
17918 ==bogus== <nowiki>not a legal section</nowiki>
17922 Section extraction test with bogus <nowiki> heading (section 2)
17927 ==bogus== <nowiki>not a legal section</nowiki>
17933 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17934 # instead of respecting commented sections
17936 Section extraction prefixed by comment (section 1)
17947 Section extraction prefixed by comment (section 2)
17957 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17958 # instead of respecting HTML-style headings
17960 Section extraction, mixed wiki and html (section 1)
17976 Section extraction, mixed wiki and html (section 2)
17992 # Formerly testing for bug 3342
17994 Section extraction, heading surrounded by <noinclude>
17998 <noinclude>==unmarked==</noinclude>
18004 # Test behavior of bug 19910
18006 Sectiion with all-equals
18011 The line above must have a trailing space
18014 But just in case it doesn't...
18018 But just in case it doesn't...
18022 Section replacement test (section 0)
18053 Section replacement test (section 1)
18082 Section replacement test (section 2)
18112 Section replacement test (section 3)
18143 Section replacement test (section 4)
18170 Section replacement test (section 5)
18201 Section replacement test (section 6)
18231 Section replacement test (section 7)
18262 Section replacement test (section 8)
18293 Section replacement test (section 9)
18322 Section replacement test (section 10)
18352 Section replacement test with initial whitespace (bug 13728)
18356 Preformatted initial line
18360 Preformatted initial line
18367 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18379 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18392 Section extraction, <pre> around bogus header (bug 10309)
18409 Section replacement, <pre> around bogus header (bug 10309)
18431 Handling of 
 in URLs
18435 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18438 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18440 a</a></li></ul></li></ul>
18444 Handling of %0A in URLs
18448 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18451 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18455 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18457 5 quotes, code coverage +1 line
18464 <p><b><i></i></b></p>
18467 # same html as previous, but wikitext adjusted to match parsoid html2wt
18468 # note that wt2html and html2html will put the <i> before the <b>
18470 5 quotes, code coverage +1 line w/ nowiki (1)
18472 parsoid=wt2wt,html2wt
18474 '''''<nowiki/>'''''
18479 <p><b><i></i></b></p>
18482 # same as previous, just swapping the <i> and <b>
18484 5 quotes, code coverage +1 line w/ nowiki (2)
18486 '''''<nowiki/>'''''
18491 <p><i><b></b></i></p>
18495 Special:Search page linking.
18499 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18504 {{!}} is a magic word
18506 {{!}} is a magic word there and {{!}} is still a magic word here
18507 | is not a magic word here but {{!}} is still a magic word here
18509 <p>| is a magic word there and | is still a magic word here
18510 | is not a magic word here but | is still a magic word here
18513 <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
18514 | 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>
18521 title=[[Parser test]]
18526 * {{FULLPAGENAMEE}}
18528 * {{BASEPAGENAMEE}}
18532 * {{ROOTPAGENAMEE}}
18534 * {{TALKPAGENAMEE}}
18535 * {{SUBJECTPAGENAME}}
18536 * {{SUBJECTPAGENAMEE}}
18539 * {{NAMESPACENUMBER}}
18543 * {{SUBJECTSPACEE}}
18544 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18546 <ul><li> Parser test</li>
18547 <li> Parser_test</li>
18548 <li> Parser test</li>
18549 <li> Parser_test</li>
18550 <li> Parser test</li>
18551 <li> Parser_test</li>
18552 <li> Parser test</li>
18553 <li> Parser_test</li>
18554 <li> Parser test</li>
18555 <li> Parser_test</li>
18556 <li> Talk:Parser test</li>
18557 <li> Talk:Parser_test</li>
18558 <li> Parser test</li>
18559 <li> Parser_test</li>
18567 <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>
18570 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18580 image4 |300px| centre
18581 image5.svg| http://///////
18586 <ul class="gallery mw-gallery-traditional">
18587 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18588 <div class="thumb" style="height: 150px;">Image1.png</div>
18589 <div class="gallerytext">
18592 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18593 <div class="thumb" style="height: 150px;">Image2.gif</div>
18594 <div class="gallerytext">
18597 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18598 <div class="thumb" style="height: 150px;">Image3</div>
18599 <div class="gallerytext">
18602 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18603 <div class="thumb" style="height: 150px;">Image4</div>
18604 <div class="gallerytext">
18609 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18610 <div class="thumb" style="height: 150px;">Image5.svg</div>
18611 <div class="gallerytext">
18612 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18616 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18617 <div class="thumb" style="height: 150px;">* image6</div>
18618 <div class="gallerytext">
18626 Gallery (with options)
18628 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18629 File:Nonexistent.jpg|caption
18630 File:Nonexistent.jpg
18631 image:foobar.jpg|some '''caption''' [[Main Page]]
18633 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18636 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18637 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18638 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18639 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18640 <div class="gallerytext">
18645 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18646 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18647 <div class="gallerytext">
18650 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18651 <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>
18652 <div class="gallerytext">
18653 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18657 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18658 <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>
18659 <div class="gallerytext">
18662 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18663 <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>
18664 <div class="gallerytext">
18674 Gallery with link that has fragment
18677 image:foobar.jpg|link=Main_Page
18678 image:foobar.jpg|link=Main_Page#section
18679 image:foobar.jpg|link=Main Page#section|caption
18682 <ul class="gallery mw-gallery-traditional">
18683 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18684 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
18685 <div class="gallerytext">
18688 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18689 <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>
18690 <div class="gallerytext">
18693 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18694 <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>
18695 <div class="gallerytext">
18705 Gallery with wikitext inside caption
18708 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18709 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18712 <ul class="gallery mw-gallery-traditional">
18713 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18714 <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>
18715 <div class="gallerytext">
18716 <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>
18720 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18721 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="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>
18722 <div class="gallerytext">
18723 <p>This is a test template
18732 gallery (with showfilename option)
18734 <gallery showfilename>
18735 File:Nonexistent.jpg|caption
18736 File:Nonexistent.jpg
18737 image:foobar.jpg|some '''caption''' [[Main Page]]
18741 <ul class="gallery mw-gallery-traditional">
18742 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18743 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18744 <div class="gallerytext">
18745 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18750 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18751 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18752 <div class="gallerytext">
18753 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18757 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18758 <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>
18759 <div class="gallerytext">
18760 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18761 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18765 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18766 <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>
18767 <div class="gallerytext">
18768 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18777 Gallery (with namespace-less filenames)
18780 File:Nonexistent.jpg
18786 <ul class="gallery mw-gallery-traditional">
18787 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18788 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18789 <div class="gallerytext">
18792 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18793 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18794 <div class="gallerytext">
18797 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18798 <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>
18799 <div class="gallerytext">
18802 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18803 <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>
18804 <div class="gallerytext">
18812 HTML Hex character encoding (spells the word "JavaScript")
18814 parsoid=wt2html,wt2wt,html2html
18816 JavaScript
18818 <p>JavaScript
18823 <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>
18827 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18831 <p>&#xsee;&#XSEE;
18834 <p>&#xsee;&#XSEE;</p>
18838 HTML Hex character encoding mixed case
18840 parsoid=wt2html,wt2wt,html2html
18849 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18852 # See: http://www.w3.org/TR/html5/syntax.html#character-references
18853 # Note that U+000C (form feed) is not a valid XML character, so
18854 # it is banned even though allowed in HTML5.
18856 Illegal character references (T106578)
18861 ; Control (low): 
18862 ; Control (high):  Ÿ
18863 ; Surrogate: ��
18864 ; This is an okay astral character: 💩
18873 <dt>Control (low)</dt>
18875 <dt>Control (high)</dt>
18876 <dd>&#x7F; &#x9F;</dd>
18878 <dd>&#xD83D;&#xDCA9;</dd>
18879 <dt>This is an okay astral character</dt>
18885 __FORCETOC__ override
18897 ISBN 978-0-1234-56 789
18899 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18902 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18904 <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>
18908 ISBN followed by 5 spaces
18919 ISBN ISBN 1234567890
18921 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18924 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18927 # Uppercase X and lowercase x as well
18938 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18939 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
18940 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18941 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
18942 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18943 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
18946 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18947 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
18948 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18949 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
18950 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
18951 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
18955 ISBN with empty prefix (parsoid test)
18959 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18962 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
18966 Bug 22905: <abbr> followed by ISBN followed by </a>
18968 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18970 <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>
18973 <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>
18981 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18986 Double RFC with a wiki link
18990 <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>
18999 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19002 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19006 Centre-aligned image
19008 [[Image:foobar.jpg|centre]]
19010 <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>
19017 [[Image:foobar.jpg|none]]
19019 <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>
19024 Width + Height sized image (using px) (height is ignored)
19026 [[Image:foobar.jpg|640x480px]]
19028 <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>
19033 Width-sized image (using px, no following whitespace)
19035 [[Image:foobar.jpg|640px]]
19037 <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>
19042 Width-sized image (using px, with following whitespace - test regression from r39467)
19044 [[Image:foobar.jpg|640px ]]
19046 <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>
19051 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19053 [[Image:foobar.jpg| 640px]]
19055 <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>
19060 Image with page parameter
19064 [[File:LoremIpsum.djvu|page=2]]
19066 <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>
19069 <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>
19073 Another italics / bold test
19081 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19087 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19090 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19095 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19097 Images with the "|" character in the comment
19099 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19101 <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>
19104 <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>
19108 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19110 <html><script>alert(1);</script></html>
19112 <p><html><script>alert(1);</script></html>
19117 HTML with raw HTML ($wgRawHtml==true)
19121 <html><script>alert(1);</script></html>
19123 <p><script>alert(1);</script>
19128 Parents of subpages, one level up
19130 subpage title=[[Subpage test/L1/L2/L3]]
19134 <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>
19140 Parents of subpages, one level up, not named
19142 subpage title=[[Subpage test/L1/L2/L3]]
19146 <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>
19153 Parents of subpages, two levels up
19155 subpage title=[[Subpage test/L1/L2/L3]]
19161 <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
19162 </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>
19167 Parents of subpages, two levels up, without trailing slash or name.
19169 subpage title=[[Subpage test/L1/L2/L3]]
19178 Parents of subpages, two levels up, with lots of extra trailing slashes.
19180 subpage title=[[Subpage test/L1/L2/L3]]
19184 <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>
19189 Subpage test/L1/L2/L3Sibling
19195 Transclusion of a sibling page (one level up)
19197 subpage title=[[Subpage test/L1/L2/L3]]
19206 Transclusion of a child page
19208 subpage title=[[Subpage test/L1/L2]]
19217 Non-transclusion because of too many up levels
19219 subpage title=[[Subpage test/L1/L2/L3]]
19221 {{../../../../More than parent}}
19223 <p>{{../../../../More than parent}}
19228 Definition list code coverage
19234 <dl><dt> title  </dt>
19236 <dt> title </dt>
19242 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19243 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19244 <dt>title</dt><dd> def</dd></dl>
19248 Don't fall for the self-closing div
19250 <div>hello world</div/>
19252 <div>hello world</div>
19261 <p>[[:Template:Msg]]
19270 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19274 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19276 Always escape literal '>' in output, not just after '<'
19290 <p>This is a test template
19291 This is a test template
19303 Inclusion of !userCanEdit() content
19307 <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>
19313 Out-of-order TOC heading levels
19322 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19324 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19326 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19327 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19330 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19332 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19333 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19339 <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>
19340 <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>
19341 <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>
19342 <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>
19343 <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>
19344 <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>
19350 ISBN with a dummy number
19360 ISBN with space-delimited number
19364 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19370 ISBN with multiple spaces, no number
19389 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19390 </p><p>ISBN 12345678901
19396 ISBN with trailing year (bug 8110)
19398 ISBN 1-234-56789-0 - 2006
19400 ISBN 1 234 56789 0 - 2006
19402 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19403 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19411 {{anchorencode:foo bar©#%n}}
19413 <p>foo_bar.C2.A9.23.25n
19418 anchorencode trims spaces
19420 {{anchorencode: __pretty__please__}}
19427 anchorencode deals with links
19429 {{anchorencode: [[hello|world]] [[hi]]}}
19436 anchorencode deals with templates
19438 {{anchorencode: {{Foo}} }}
19445 anchorencode encodes like the TOC generator: (bug 18431)
19447 === _ +:.3A%3A&&]] ===
19448 {{anchorencode: _ +:.3A%3A&&]] }}
19451 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19452 <p>.2B:.3A.253A.26.26.5D.5D
19457 Bug 6200: blockquotes and paragraph formatting
19478 Bug 8293: Use of center tag ruins paragraph formatting
19499 Parsing of overlapping (improperly nested) inline html tags
19501 <span><s>x</span></s>
19503 <p><span><s>x</span></s></span>
19506 <p><span><s>x</s></span>
19511 ### Language variants related tests
19514 Self-link in language variants
19516 title=[[Dunav]] language=sr
19518 Both [[Dunav]] and [[Дунав]] are names for this river.
19520 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19531 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19533 title=[[Duna]] language=sr
19535 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19537 <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.
19542 Link to a section of a variant of this title shouldn't be parsed as self-link
19544 title=[[Duna]] language=sr
19546 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19548 <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.
19553 Link to pages in language variants
19557 Main Page can be written as [[Маин Паге]]
19559 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19565 Multiple links to pages in language variants
19569 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19571 <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>.
19577 Simple template in language variants
19583 <p>This is a test template
19589 Template with explicit namespace in language variants
19595 <p>This is a test template
19601 Basic test for template parameter in language variants
19605 {{парамтест|param=foo}}
19607 <p>This is a test template with parameter foo
19613 Simple category in language variants
19617 [[Category:МедиаWики Усер'с Гуиде]]
19619 <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>
19635 ## We used to, but no longer wt2wt this test since the default serializer
19636 ## will normalize all categories to serialize on their own line.
19637 ## This wikitext usage is going to be fairly uncommon in production and
19638 ## selser will take care of preserving formatting in those scenarios.
19640 Don't convert blue categorylinks to another variant (bug 33210)
19646 [[A]][[Category:分类]]
19648 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
19650 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19651 <link rel="mw:PageProp/Category" href="Category:分类"/>
19655 Stripping -{}- tags (language variants)
19659 Latin proverb: -{Ne nuntium necare}-
19661 <p>Latin proverb: Ne nuntium necare
19667 Prevent conversion with -{}- tags (language variants)
19669 language=sr variant=sr-ec
19671 Latinski: -{Ne nuntium necare}-
19673 <p>Латински: Ne nuntium necare
19679 Prevent conversion of text with -{}- tags (language variants)
19681 language=sr variant=sr-ec
19683 Latinski: -{Ne nuntium necare}-
19685 <p>Латински: Ne nuntium necare
19691 Prevent conversion of links with -{}- tags (language variants)
19693 language=sr variant=sr-ec
19697 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19703 -{}- tags within headlines (within html for parserConvert())
19705 language=sr variant=sr-ec
19709 <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>
19715 Explicit definition of language variant alternatives
19717 language=zh variant=zh-tw
19719 -{zh:China;zh-tw:Taiwan}-, not China
19721 <p>Taiwan, not China
19727 Conversion around HTML tags
19729 language=sr variant=sr-ec
19731 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19732 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19735 <span title="ЛаCтин">ски</span>
19741 Explicit session-wise language variant mapping (A flag and - flag)
19743 language=zh variant=zh-tw
19745 Taiwan is not China.
19746 But -{A|zh:China;zh-tw:Taiwan}- is China,
19747 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19748 and -{China}- is China.
19750 <p>Taiwan is not China.
19751 But Taiwan is Taiwan,
19752 (This should be stripped!)
19753 and China is China.
19758 Explicit session-wise language variant mapping (H flag for hide)
19760 language=zh variant=zh-tw
19762 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19765 <p>(This should be stripped!)
19771 Adding explicit conversion rule for title (T flag)
19773 language=zh variant=zh-tw showtitle
19775 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19778 <p>Should be stripped!
19783 Testing that changing the language variant here in the tests actually works
19785 language=zh variant=zh showtitle
19787 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19790 <p>Should be stripped!
19795 Recursive conversion of alt and title attrs shouldn't clear converter state
19797 language=zh variant=zh-cn showtitle
19799 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19800 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19804 Should be stripped<span title="Exclamation">!</span>
19809 Bug 24072: more test on conversion rule for title
19811 language=zh variant=zh-tw showtitle
19813 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19814 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19817 <p>This should be stripped!
19818 This won't take interferes with the title rule.
19823 Partly disable title conversion if variant == main language code
19825 language=zh variant=zh title=[[ZH]] showtitle
19827 -{T|zh-cn:CN;zh-tw:TW}-
19835 Partly disable title conversion if variant == main language code, more
19837 language=zh variant=zh title=[[ZH]] showtitle
19847 Raw output of variant escape tags (R flag)
19849 language=zh variant=zh-tw
19851 Raw: -{R|zh:China;zh-tw:Taiwan}-
19853 <p>Raw: zh:China;zh-tw:Taiwan
19858 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19860 language=zh variant=zh-cn
19862 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19869 Conversion rules from [numeric-only string] to [something else] (T48634)
19871 language=zh variant=zh-cn
19873 -{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
19880 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19882 language=zh variant=zh-cn
19884 -{H|zh-cn:foo;zh-tw:;}-foobar
19891 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19893 language=zh variant=zh-cn
19895 -{H|=>zh-cn:foo;}-foobar
19902 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19904 language=zh variant=zh-cn
19913 Nested using of manual convert syntax
19915 language=zh variant=zh-hk
19917 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19919 <p>Nested: Hello Hong Kong!
19924 Proper conversion of text in external links
19926 language=sr variant=sr-ec
19928 http://www.google.com
19929 gopher://www.google.com
19930 [http://www.google.com http://www.google.com]
19931 [gopher://www.google.com gopher://www.google.com]
19932 [https://www.google.com irc://www.google.com]
19933 [ftp://www.google.com www.google.com/ftp://dir]
19934 [//www.google.com www.google.com]
19936 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19937 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19938 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19939 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19940 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19941 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19942 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19947 Do not convert roman numbers to language variants
19949 language=sr variant=sr-ec
19953 <p>Фридрих IV је цар.
19958 Unclosed language converter markup "-{"
19969 Don't convert raw rule "-{R|=>}-" to "=>"
19980 Don't break link parsing if language converter markup is in the caption.
19982 language=sr variant=sr-ec
19984 [[Main Page|-{R|main page}-]]
19986 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19990 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19992 Don't break image parsing if language converter markup is in the caption.
19996 [[File:Foobar.jpg|-{R|caption}-]]
19998 <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>
20002 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20004 Don't break list handling if language converter markup is in the item.
20006 language=zh variant=zh-cn
20008 ;-{zh-cn:AAA;zh-tw:BBB}-
20010 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
20017 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20019 Don't break table handling if language converter markup is in the cell.
20021 language=sr variant=sr-ec
20044 Bug 529: Uncovered bullet
20053 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20054 # Templates in Wikipedia rely on this behavior, as tidy has always been
20055 # enabled there. These tests are normally run *without* tidy, so specify the
20056 # full output here.
20057 # To test realistic parsing behavior, apply a tidy-like transformation to both
20058 # the expected output and your parser's output.
20060 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
20062 ******* Foo {{bullet}}
20064 <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>
20070 Bug 529: Uncovered table already at line-start
20093 Bug 529: Uncovered bullet in parser function result
20095 * Foo {{lc:{{bullet}} }}
20103 Bug 5678: Double-parsed template argument
20105 {{lc:{{{1}}}|hello}}
20112 Bug 5678: Double-parsed template invocation
20114 {{lc:{{paramtest {{!}} param = hello }} }}
20116 <p>{{paramtest | param = hello }}
20121 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20124 title=[[Main Page]]
20126 {{PRVNÍVELKÉ:ěščř}}
20127 {{prvnívelké:ěščř}}
20147 Morwen/13: Unclosed link followed by heading
20154 <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>
20159 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20166 <h1><span class="mw-headline" id="heading">heading</span></h1>
20171 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20178 <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>
20193 Paragraphs inside divs (no extra line breaks)
20205 Paragraphs inside divs (extra line break on open)
20220 Paragraphs inside divs (extra line break on close)
20235 Paragraphs inside divs (extra line break on open and close)
20252 Nesting tags, paragraphs on lines which begin with <div>
20254 <div></div><strong>A
20257 <p><strong>A</strong></p>
20258 <p><strong>B</strong></p>
20266 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20268 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20270 <blockquote>Line one
20272 Line two</blockquote>
20274 <blockquote>Line one
20275 Line two</blockquote>
20279 <p>Line one Line two</p>
20284 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20289 Line two</blockquote>
20294 Line two</blockquote>
20299 Line two</blockquote>
20303 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20305 <blockquote>Line one
20310 <blockquote>Line one
20323 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20345 Paragraphs inside blockquotes/divs (no extra line breaks)
20347 <blockquote><div>Line one
20349 Line two</div></blockquote>
20351 <blockquote><div>Line one
20352 Line two</div></blockquote>
20357 Paragraphs inside blockquotes/divs (extra line break on open)
20362 Line two</div></blockquote>
20367 Line two</div></blockquote>
20372 Paragraphs inside blockquotes/divs (extra line break on close)
20374 <blockquote><div>Line one
20377 </div></blockquote>
20379 <blockquote><div>Line one
20382 </div></blockquote>
20387 Paragraphs inside blockquotes/divs (extra line break on open and close)
20393 </div></blockquote>
20399 </div></blockquote>
20404 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20406 wgLinkHolderBatchSize=0
20412 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20413 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20414 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20419 Free external link invading image caption
20421 [[Image:Foobar.jpg|thumb|http://x|hello]]
20423 <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>
20428 Bug 15196: localised external link numbers
20432 [http://en.wikipedia.org/]
20434 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20437 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20441 Multibyte character in padleft
20443 {{padleft:-Hello|7|Æ}}
20450 Multibyte character in padright
20452 {{padright:Hello-|7|Æ}}
20459 formatdate parser function
20461 {{#formatdate:2009-03-24}}
20463 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20468 formatdate parser function, with default format
20470 {{#formatdate:2009-03-24|mdy}}
20472 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20477 Spacing of numbers in formatted dates
20479 {{#formatdate:January 15}}
20481 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20486 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
20488 language=nl title=[[MediaWiki:Common.css]]
20490 {{#formatdate:2009-03-24|dmy}}
20492 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20505 Edit comment with link
20509 I like the [[Main Page]] a lot
20511 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20515 Edit comment with link and link text
20519 I like the [[Main Page|best pages]] a lot
20521 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20525 Edit comment with link and link text with suffix
20529 I like the [[Main Page|best page]]s a lot
20531 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20535 Edit comment with section link (non-local, eg in history list)
20537 comment title=[[Main Page]]
20539 /* External links */ removed bogus entries
20541 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20545 Edit comment with section link and text before it (non-local, eg in history list)
20547 comment title=[[Main Page]]
20549 pre-comment text /* External links */ removed bogus entries
20551 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>
20555 Edit comment with section link (local, eg in diff view)
20557 comment local title=[[Main Page]]
20559 /* External links */ removed bogus entries
20561 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20565 Edit comment with subpage link (bug 14080)
20569 title=[[Subpage test]]
20571 Poked at a [[/subpage]] here...
20573 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20577 Edit comment with subpage link and link text (bug 14080)
20581 title=[[Subpage test]]
20583 Poked at a [[/subpage|neat little page]] here...
20585 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20589 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20592 title=[[Subpage test]]
20594 Poked at a [[/subpage]] here...
20596 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20600 Edit comment with bare anchor link (local, as on diff)
20604 title=[[Main Page]]
20608 <a href="#section">#section</a>
20612 Edit comment with bare anchor link (non-local, as on history)
20615 title=[[Main Page]]
20619 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20623 Anchor starting with underscore
20629 <p><a href="#_ref">One</a>
20632 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20636 Id starting with underscore
20638 <div id="_ref"></div>
20640 <div id="_ref"></div>
20645 Space normalisation on autocomment (bug 22784)
20648 title=[[Main Page]]
20650 /* __hello__world__ */
20652 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20656 percent-encoding and + signs in comments (Bug 26410)
20660 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20662 <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>
20665 # Parsoid doesn't support this yet: see bug 73581
20666 # but it *should* omit the 'src' attribute if the image is bad.
20667 # PHP side of tests was disabled in
20668 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20669 # because of issues in the PHP parserTests infrastructure
20670 # (but the output below is indeed what the PHP side emits)
20672 Bad images - basic functionality
20675 !! DISABLED/html/php
20677 <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>
20681 Bad images - bug 16039: text after bad image disappears
20686 !! DISABLED/html/php
20692 <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>
20697 Verify that displaytitle works (bug #22501) no displaytitle
20701 wgAllowDisplayTitle=true
20702 wgRestrictDisplayTitle=false
20704 this is not the the title
20707 <p>this is not the the title
20712 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20717 wgAllowDisplayTitle=true
20718 wgRestrictDisplayTitle=false
20720 this is not the the title
20721 {{DISPLAYTITLE:whatever}}
20724 <p>this is not the the title
20729 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20734 wgAllowDisplayTitle=true
20735 wgRestrictDisplayTitle=true
20737 this is not the the title
20738 {{DISPLAYTITLE:whatever}}
20741 <p>this is not the the title
20746 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20751 wgAllowDisplayTitle=true
20752 wgRestrictDisplayTitle=true
20754 this is not the the title
20755 {{DISPLAYTITLE:screen}}
20758 <p>this is not the the title
20763 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20768 wgAllowDisplayTitle=false
20770 this is not the the title
20771 {{DISPLAYTITLE:screen}}
20774 <p>this is not the the title
20775 <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>
20780 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20785 wgAllowDisplayTitle=false
20787 this is not the the title
20790 <p>this is not the the title
20795 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20800 wgAllowDisplayTitle=true
20801 wgRestrictDisplayTitle=true
20803 this is not the the title
20804 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20806 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20807 <p>this is not the the title
20812 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20817 wgAllowDisplayTitle=true
20818 wgRestrictDisplayTitle=true
20820 this is not the the title
20821 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20823 <span style="color: red;">s</span>creen
20824 <p>this is not the the title
20829 Page status indicators: Empty name is invalid
20833 <indicator name=" "></indicator>
20834 <indicator></indicator>
20836 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20837 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20842 Page status indicators: Weird syntaxes that are okay
20846 <indicator name="empty" />
20847 <indicator name="name"></indicator>
20856 Page status indicators: Torture test
20860 <indicator name="01">hello world</indicator>
20861 <indicator name="02">[[Main Page]]</indicator>
20862 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20863 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20864 <indicator name="05">* foo
20866 <indicator name="06"><nowiki>foo</nowiki></indicator>
20867 <indicator name="07"> Preformatted</indicator>
20868 <indicator name="08"><div>Broken tag</indicator>
20869 <indicator name="09">{| class=wikitable
20872 <indicator name="10">Two
20874 paragraphs</indicator>
20877 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20878 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" />
20879 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>
20880 05=<ul><li> foo</li>
20884 07=<pre>Preformatted
20886 08=<div>Broken tag</div>
20888 09=<table class="wikitable">
20905 preload: check <noinclude> and <includeonly>
20909 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20915 preload: check <onlyinclude>
20919 Goodbye <onlyinclude>Hello world</onlyinclude>
20925 preload: can pass tags through if we want to
20929 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20931 <includeonly>Hello world</includeonly>
20935 preload: check that it doesn't try to do tricks
20939 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20941 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20945 Play a bit with r67090 and bug 3158
20947 <div style="width:50% !important"> </div>
20948 <div style="width:50% !important"> </div>
20949 <div style="width:50% !important"> </div>
20950 <div style="border : solid;"> </div>
20952 <div style="width:50% !important"> </div>
20953 <div style="width:50% !important"> </div>
20954 <div style="width:50% !important"> </div>
20955 <div style="border : solid;"> </div>
20958 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20959 <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>
20960 <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>
20961 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20966 HTML5 data attributes
20968 <span data-foo="bar">Baz</span>
20969 <p data-abc-def_hij="">Quuz</p>
20971 <p><span data-foo="bar">Baz</span>
20973 <p data-abc-def_hij="">Quuz</p>
20976 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
20977 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
20981 Strip reserved data attributes
20983 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
20985 <div data-ok="fred">d</div>
20988 <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>
20992 percent-encoding and + signs in internal links (Bug 26410)
20994 [[User:+%]] [[Page+title%]]
20995 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20996 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20997 [[%33%45]] [[%33%45+]]
20999 <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>
21000 <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>
21001 <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>
21002 <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>
21005 <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>
21006 <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>
21007 <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>
21008 <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>
21012 Special characters in embedded file links (bug 27679)
21014 [[File:Contains & ampersand.jpg]]
21015 [[File:Does not exist.jpg|Title with & ampersand]]
21017 <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>
21018 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21021 <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>
21022 <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>
21026 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21028 Text's been normalized?
21030 <p>Text's been normalized?
21035 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21037 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
21039 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
21044 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
21046 [http://www.example.org/ ideograms]
21048 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
21053 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
21055 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
21057 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21081 Bug 31098 Template which includes system messages which includes the template
21085 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21086 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21091 Bug31490 Turkish: ucfirst 'blah'
21102 Bug31490 Turkish: ucfirst 'ix'
21113 Bug31490 Turkish: lcfirst 'BLAH'
21124 Bug31490 Turkish: ucfırst (with a dotless i)
21130 <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>
21135 Bug31490 ucfırst (with a dotless i) with English language
21141 <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>
21146 Bug 26375: TOC with italics
21148 title=[[Main Page]]
21151 == ''Lost'' episodes ==
21153 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21155 <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>
21159 <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>
21164 Bug 26375: TOC with bold
21166 title=[[Main Page]]
21169 == '''should be bold''' then normal text ==
21171 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21173 <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>
21177 <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>
21182 Bug 33845: Headings become cursive in TOC when they contain an image
21184 title=[[Main Page]]
21187 == Image [[Image:foobar.jpg]] ==
21189 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21191 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21195 <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>
21200 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21202 title=[[Main Page]]
21205 == <blockquote>Quote</blockquote> ==
21207 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21209 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21213 <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>
21217 <div id="toc" class="toc">
21218 <div id="toctitle">
21222 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21226 <h2><span class="mw-headline" id="Quote"></span></h2>
21228 <p><span class="mw-headline" id="Quote">Quote</span></p>
21230 <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>
21234 Unclosed tags in TOC
21236 title=[[Main Page]]
21240 <small>Hanc marginis exiguitas non caperet.</small>
21243 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21245 <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>
21249 <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>
21250 <p><small>Hanc marginis exiguitas non caperet.</small>
21256 Multiple tags in TOC
21259 == <i>Foo</i> <b>Bar</b> ==
21261 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21263 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21265 <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>
21266 <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>
21270 <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>
21271 <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>
21275 <div id="toc" class="toc">
21276 <div id="toctitle">
21280 <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>
21281 <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>
21285 <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>
21286 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21288 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21290 <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>
21293 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21294 # html5 tag parsing.
21296 Tags with parameters in TOC
21301 == <sup class="in-h2">Hello</sup> ==
21303 == <sup class="a > b">Evilbye</sup> ==
21305 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21307 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21308 <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>
21312 <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>
21313 <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>
21316 <meta property="mw:PageProp/toc" />
21317 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21319 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21323 span tags with directionality in TOC
21326 == <span dir="ltr">C++</span> ==
21328 == <span dir="rtl">זבנג!</span> ==
21330 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21332 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21334 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21336 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21338 <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>
21339 <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>
21340 <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>
21341 <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>
21342 <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>
21346 <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>
21347 <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>
21348 <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>
21349 <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>
21350 <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>
21355 Bug 72884: bdi element in ToC
21358 == <bdi>test</bdi> ==
21360 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21362 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21366 <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>
21370 # Note that the html output does not have the <p></p>, but the
21371 # html+tidy output *does*. This is because the empty <p></p> is
21372 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21374 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21379 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21381 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21385 <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>
21389 <div id="toc" class="toc">
21390 <div id="toctitle">
21394 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21398 <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>
21404 == {{int:headline_sample}} ==
21408 Bug 32057: Title needed when expanding <h> nodes.
21410 title=[[Main Page]]
21414 <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>
21419 Strip marker in urlencode
21421 {{urlencode:x<nowiki/>y}}
21422 {{urlencode:x<nowiki/>y|wiki}}
21423 {{urlencode:x<nowiki/>y|path}}
21424 {{urlencode:x<pre id="one">two</pre>y}}
21452 Strip marker in formatNum
21454 {{formatnum:1<nowiki/>2}}
21455 {{formatnum:1<nowiki/>2|R}}
21463 Check noCommafy in formatNum
21467 {{formatnum:123456.78}}
21468 {{formatnum:123456.78|NOSEP}}
21476 Wrong option for formatNum (bug 56199)
21478 {{formatnum:1,234.56|Random}}
21479 {{formatnum:1,234.56|EVERYTHING}}
21480 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21489 Strip marker in grammar
21493 {{grammar:elative|foo<nowiki/>bar}}
21500 Strip marker in padleft
21502 {{padleft:|2|x<nowiki/>y}}
21509 Strip marker in padright
21511 {{padright:|2|x<nowiki/>y}}
21518 Strip marker in anchorencode
21520 {{anchorencode:x<nowiki/>y}}
21527 nowiki inside link inside heading (bug 18295)
21529 ==[[foo|x<nowiki>y</nowiki>z]]==
21531 <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>
21536 new support for bdi element (bug 31817)
21538 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21540 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21545 Ignore pipe between table row attributes
21549 |- id=foo | style='color: red'
21557 <tr id="foo" style="color: red">
21564 Gallery override link with WikiLink (bug 34852)
21567 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21570 <ul class="gallery mw-gallery-traditional">
21571 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21572 <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>
21573 <div class="gallerytext">
21583 Gallery override link with absolute external link (bug 34852)
21586 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21589 <ul class="gallery mw-gallery-traditional">
21590 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21591 <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>
21592 <div class="gallerytext">
21602 Gallery override link with malicious javascript (bug 34852)
21605 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21608 <ul class="gallery mw-gallery-traditional">
21609 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21610 <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>
21611 <div class="gallerytext">
21621 Gallery with invalid title as link (bug 43964)
21624 File:foobar.jpg|link=<
21627 <ul class="gallery mw-gallery-traditional">
21628 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21629 <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>
21630 <div class="gallerytext">
21638 Language parser function
21647 Padleft and padright as substr
21649 {{padleft:|3|abcde}}
21650 {{padright:|3|abcde}}
21658 Special parser function
21660 {{#special:RandomPage}}
21661 {{#special:BaDtItLe}}
21662 {{#special:Foobar}}
21671 Bug 34939 - Case insensitive link parsing ([HttP://])
21673 [HttP://MediaWiki.Org/]
21675 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21678 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21682 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21684 [HttP://MediaWiki.Org/ MediaWiki]
21686 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21691 Bug 34939 - Case insensitive link parsing (HttP://)
21693 HttP://MediaWiki.Org/
21695 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21698 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21716 <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>
21717 <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>
21718 <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>
21719 <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>
21720 <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>
21726 ### Parsoid-specific tests
21727 ### Parsoid-PHP parser incompatibilities
21730 1. SOL-sensitive wikitext tokens as template-args
21732 parsoid=wt2html,wt2wt
21738 <span about="#mwt1" typeof="mw:Transclusion">
21739 </span><ul about="#mwt1"><li>a</li>
21741 <span about="#mwt2" typeof="mw:Transclusion">
21742 </span><ol about="#mwt2"><li>a</li>
21744 <span about="#mwt3" typeof="mw:Transclusion">
21745 </span><dl about="#mwt3"><dd>a</dd>
21749 #### -----------------------------------------------------------------
21750 #### Parsoid-specific functionality tests
21751 #### -----------------------------------------------------------------
21753 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21754 # We know wt2wt will fail, but we expect selser to pass.
21755 # Due to the nature of our testing, wt2wt and selser tests will enter the
21756 # blacklist and we'll catch selser regressions based on changes to the
21757 # blacklist entries for selser tests.
21759 1. Bad treebuilder fixup of formatting elt is cleaned up
21761 parsoid=wt2html,wt2wt
21766 [[Image:Foobar.jpg|right|Test]]
21773 <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>
21780 2. Bad treebuilder fixup of formatting elt is cleaned up
21782 parsoid=wt2html,wt2wt
21784 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21786 <small>[[Image:Foobar.jpg|right|300px]]</small>
21790 <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>
21792 <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>
21796 3. Bad treebuilder fixup of formatting elt is cleaned up
21798 parsoid=wt2html,wt2wt
21800 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21802 <p><small><b>foo</b></small></p>
21803 <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>
21804 <p><small><b>bar</b></small></p>
21808 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21810 parsoid=wt2html,wt2wt
21812 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21814 <p><b><small></small></b></p>
21815 <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>
21819 #### ----------------------------------------------------------------
21820 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
21821 #### tags. Parsoid's output for these tags differs from that of the
21823 #### ----------------------------------------------------------------
21826 Ref: 1. ref-location should be replaced with an index span
21829 B <ref name="x">foo</ref>
21833 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
21834 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>
21835 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>
21836 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21837 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
21838 <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>
21839 <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>
21844 Ref: 2. ref-tags with identical names should all get the same index
21846 A <ref name="x">foo</ref>
21850 <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>
21851 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>
21852 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21853 <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>
21858 Ref: 3. spaces in ref-names should be ignored
21860 A <ref name="x">foo</ref>
21861 B <ref name=" x " />
21865 <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>
21866 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>
21867 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>
21868 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21869 <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>
21873 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21875 Ref: 4. 'constructor' should be accepted as a valid ref-name
21877 A <ref name="constructor">foo</ref>
21880 <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>
21881 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21882 <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>
21887 Ref: 5. body should accept generic wikitext
21890 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
21895 <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>
21897 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21898 <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>
21904 Ref: 6. indent-pres should not be output in ref-body
21914 <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>
21916 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21917 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo
21925 Ref: 7. No p-wrapping in ref-body
21942 <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>
21944 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21945 <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
21960 Ref: 8. transclusion wikitext has lower precedence
21962 A <ref> foo {{echo|</ref> B C}}
21966 <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>
21967 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21968 <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>
21973 Ref: 9. unclosed comments should not leak out of ref-body
21975 A <ref> foo <!--</ref> B C
21978 <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>
21979 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21980 <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>
21985 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21987 A <ref> <b> foo </ref> B C
21991 <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>
21994 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21995 <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>
22000 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22006 <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
22007 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>
22008 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22009 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22010 <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>
22015 Ref: 12. ref-tags act as trailing newline migration barrier
22017 <!--the newline at the end of this line moves out of the p tag-->a
22019 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22025 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22028 <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>
22029 <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>
22032 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" 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"></span></li>
22034 <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>
22038 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22045 <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
22046 <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>
22047 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22048 <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>
22049 <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
22055 Ref: 14. A nested ref-tag should be emitted as plain text
22057 <ref>foo <ref>bar</ref> baz</ref>
22061 <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>
22063 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22064 <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>
22069 Ref: 15. ref-tags with identical names should get identical indexes
22071 A1 <ref name="a">foo</ref> A2 <ref name="a" />
22072 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
22076 <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>
22077 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>
22079 <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>
22083 ## We don't bother wt2wt-ing non-standard whitespace
22085 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22093 <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>
22094 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22095 <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>
22099 Ref: 17. Generate valid HTML5 id/about attributes
22101 <ref name="a b">foo</ref>
22105 <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>
22108 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22109 <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>
22114 Ref: 18. T58916: Extension attributes should be parsed as plain text
22116 <ref name="{{echo|a}}">foo</ref>
22120 <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>
22123 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22124 <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>
22129 Ref: 19. ref-tags with identical name encodings should get identical indexes
22131 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22135 <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>
22137 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22138 <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>
22143 Ref: 20. ref-tags with identical names but different content should keep it
22145 A <ref name="foo">Foo one</ref>
22146 B <ref name="foo">Foo two</ref>
22147 C <ref name="foo" />
22151 <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>
22152 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>
22153 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>
22155 <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>
22160 References: 1. references tag without any refs should be handled properly
22164 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22168 References: 2. references tag with group only outputs references from that group
22170 A <ref group="a">foo</ref>
22171 B <ref group="b">bar</ref>
22174 <references group="a" />
22176 <references group="b" />
22178 <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>
22179 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>
22180 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>
22182 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22183 <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>
22185 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22186 <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>
22188 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22189 <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>
22194 References: 3. ref list should be cleared after processing references
22204 <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>
22206 <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>
22209 <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>
22211 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22212 <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>
22217 References: 4. only referenced group should be cleared after processing references
22219 A <ref group="a">afoo</ref>
22222 <references group="a" />
22228 <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>
22229 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>
22231 <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>
22234 <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>
22236 <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>
22240 ## Don't expect this to rt since we're dropping content
22242 References: 5. ref tags in references should be processed while ignoring all other content
22244 parsoid=wt2html,html2html
22247 B <ref name="b">bar</ref>
22250 <ref name="a">foo</ref>
22251 This should just get lost.
22254 <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>
22255 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>
22258 <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>
22263 References: 6. <references /> from a transclusion
22265 <ref>Foo</ref> {{echo|<references />}}
22267 <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>
22272 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22274 A <ref>foo bar for a</ref>
22275 B <ref group="X" name="b" />
22279 <references group="X">
22280 <ref name="b">foo</ref>
22283 <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>
22284 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>
22287 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22288 <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>
22291 <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"}}'>
22292 <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>
22297 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22299 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22302 <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>
22303 <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>
22307 # This test only works in wt2html now as the <references /> are always generated
22308 # unless selser is active. Once T72722 is fixed, we should add a changes test
22309 # here to ensure that unrelated changes don't add the new <references />
22310 # when selser is active.
22312 References: 9. Generate missing references list at the end
22315 B <ref group="inexistent">bar</ref>
22317 <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>
22318 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
22319 <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>
22321 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
22322 <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>
22327 References: 10. New <references/> shouldn't be added for unrelated edits.
22330 "modes": ["selser"],
22331 "changes": [["#x", "remove"]],
22335 Unrelated text<span id="x"> that's going to disappear</span>.
22343 Entities in ref name
22345 <ref name="test & me">hi</ref>
22348 <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>
22349 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22350 <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>
22354 ## The output here may look funny, but it's what the php parser will do. The
22355 ## unclosed references tag becomes escaped text, and then a new references
22356 ## tag is auto-generated. The test is wt2html only because it roundtrips with
22357 ## nowiki tags, and the auto-generated references tag is only dropped in
22360 Generate references for unclosed references tag
22368 <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>
22370 <p><references></p>
22371 <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>
22375 New reference serializes on its own line
22377 parsoid=wt2wt,html2wt
22382 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22385 #### ----------------------------------------------------------------
22386 #### Parsoid-only testing of Parsoid's impl of LST
22387 #### Not implemented yet, see
22388 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22389 #### ----------------------------------------------------------------
22392 LST Sections: 1. Simple section start and end
22394 parsoid={ "suppressErrors": true }
22396 <section begin="2011-05-16" />
22397 <section end="2014-04-10 (MW 1.23wmf22)" />
22399 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22400 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22403 #--------- Test stripping of empty nodes in template content ----------
22405 Empty LI and TR nodes should be stripped from template content
22410 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22414 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22427 Empty LI and TR nodes should not be stripped from top-level content
22454 Empty TR nodes should not be stripped if they have any attributes set
22456 {{EmptyTRWithHTMLAttrTest}}
22458 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22459 <tr align="center"></tr>
22460 <tr><td>foo</td></tr>
22461 <tr align="center"></tr>
22462 <tr><td>bar</td></tr>
22466 #### ----------------------------------------------------------------
22467 #### The following section of tests are primarily to test
22468 #### wikitext escaping capabilities of Parsoid. Given that
22469 #### escaping can be done any number of ways, the wikitext (input)
22470 #### is always adjusted to reflect how Parsoid adds nowiki
22473 #### We are marking several tests as parsoid-only since the
22474 #### HTML in the result section is different from what the
22475 #### PHP parser generates for it.
22476 #### ----------------------------------------------------------------
22479 #### --------------- Headings ---------------
22481 #### 1. Nested inside html <h1>=foo=</h1>
22482 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22483 #### 3. Nested inside html with wikitext split by html tags
22484 #### 4. No escape needed
22485 #### 5. Empty headings <h1></h1>
22486 #### 6. Heading chars in SOL context
22487 #### ----------------------------------------
22489 Headings: 0. Unnested
22499 <p>=foo<i>a</i>=</p>
22501 <nowiki>=foo=</nowiki>
22503 <nowiki> </nowiki>=foo=
22505 <nowiki>=foo=</nowiki>
22507 =foo''a''<nowiki>=</nowiki>
22510 # New headings and existing headings are handled differently
22512 Headings: 1. Nested inside html
22520 <h1 data-parsoid=''>=foo=</h1>
22521 <h2 data-parsoid=''>=foo=</h2>
22522 <h3 data-parsoid=''>=foo=</h3>
22523 <h4 data-parsoid=''>=foo=</h4>
22524 <h5 data-parsoid=''>=foo=</h5>
22525 <h6 data-parsoid=''>=foo=</h6>
22533 =<nowiki>=foo=</nowiki>=
22534 ==<nowiki>=foo=</nowiki>==
22535 ===<nowiki>=foo=</nowiki>===
22536 ====<nowiki>=foo=</nowiki>====
22537 =====<nowiki>=foo=</nowiki>=====
22538 ======<nowiki>=foo=</nowiki>======
22543 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22552 <nowiki>*</nowiki>bar
22558 <nowiki>=bar=</nowiki>
22562 Headings: 3. Nested inside html with wikitext split by html tags
22566 <h1>=<b>bold</b>foo=</h1>
22568 = ='''bold'''foo= =
22572 Headings: 4a. No escaping needed (testing just h1 and h2)
22583 <h1><i>=</i>foo=</h1>
22603 Headings: 4b. No escaping needed (inside p-tags)
22618 Headings: 5. Empty headings
22622 <h1 data-parsoid='{}'></h1>
22624 <h2 data-parsoid='{}'></h2>
22626 <h3 data-parsoid='{}'></h3>
22628 <h4 data-parsoid='{}'></h4>
22630 <h5 data-parsoid='{}'></h5>
22632 <h6 data-parsoid='{}'></h6>
22642 =====<nowiki/>=====
22644 ======<nowiki/>======
22648 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22658 <nowiki>=a=</nowiki>
22660 <nowiki>=a=</nowiki>
22662 <nowiki>=a=</nowiki>
22666 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22679 <nowiki>=a=</nowiki>
22682 <nowiki>=a=</nowiki>
22685 <nowiki>=a=</nowiki>
22690 Headings: 6c. Heading chars in SOL context (leading newline break)
22698 <nowiki>=b=</nowiki>
22702 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22706 <!--c0--><p>=a=</p>
22708 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22710 <!--c0--><nowiki>=a=</nowiki>
22712 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22716 Headings: 6d. Heading chars in SOL context (No escaping needed)
22726 Headings: 7. Insert a newline between new content and headings
22732 <h2 data-parsoid='{}'>A</h2>
22733 <p data-parsoid='{}'>a</p>
22743 #### --------------- Lists ---------------
22744 #### 0. Outside nests (*foo, etc.)
22745 #### 1. Nested inside html <ul><li>*foo</li></ul>
22746 #### 2. Inside definition lists
22747 #### 3. Only bullets at start should be escaped
22748 #### 4. No escapes needed
22749 #### 5. No unnecessary escapes
22750 #### 6. Escape bullets in SOL position
22751 #### 7. Escape bullets in a multi-line context
22752 #### ----------------------------------------
22755 Lists: 0. Outside nests
22765 <nowiki>*</nowiki>foo
22767 <nowiki>#</nowiki>foo
22769 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
22772 ## Making these next 3 tests Parsoid-only since they are html2wt tests
22773 ## to test wikitext escaping, and insignificant whitespace diffs
22774 ## cause PHP parser tests to barf
22776 Lists: 1. Nested inside html (No unnecessary escapes)
22785 <li data-parsoid='{}'>*foo</li>
22786 <li data-parsoid='{}'>#foo</li>
22787 <li data-parsoid='{}'>:foo</li>
22788 <li data-parsoid='{}'>;foo</li>
22796 <li data-parsoid='{}'>*foo</li>
22797 <li data-parsoid='{}'>#foo</li>
22798 <li data-parsoid='{}'>:foo</li>
22799 <li data-parsoid='{}'>;foo</li>
22806 *<nowiki>*foo</nowiki>
22807 *<nowiki>#foo</nowiki>
22808 *<nowiki>:foo</nowiki>
22809 *<nowiki>;foo</nowiki>
22815 #<nowiki>*foo</nowiki>
22816 #<nowiki>#foo</nowiki>
22817 #<nowiki>:foo</nowiki>
22818 #<nowiki>;foo</nowiki>
22822 Lists: 2. Inside definition lists
22826 <dl><dt>;foo</dt></dl>
22827 <dl><dt>:foo</dt></dl>
22830 <dl><dd>:foo</dd></dl>
22834 ; <nowiki>:foo</nowiki>
22836 ; <nowiki>:foo</nowiki>
22843 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
22849 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
22853 *<nowiki>*foo</nowiki>''it''*bar
22857 Lists: 4. No escapes needed
22870 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22874 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22888 Lists: 5. No unnecessary escapes
22892 <ul><li> bar <span>[[foo]]</span></li></ul>
22893 <ul><li> =bar <span>[[foo]]</span></li></ul>
22894 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22895 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22896 <ul><li> =bar <span>foo]]</span>=</li></ul>
22897 <ul><li> <s></s>: a</li></ul>
22898 <ul><li> <i>* foo</i></li></ul>
22901 * bar <span><nowiki>[[foo]]</nowiki></span>
22903 * =bar <span><nowiki>[[foo]]</nowiki></span>
22905 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22907 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22909 * =bar <span>foo]]</span>=
22917 Lists: 6. Escape bullets in SOL position
22921 <p><!--cmt-->*foo</p>
22923 <!--cmt--><nowiki>*</nowiki>foo
22927 Lists: 7. Escape bullets in a multi-line context
22936 <nowiki>*</nowiki>b
22940 Lists: 8. Escape colons only if not present in tags
22944 <dl><dt>a:b<i>c:d</i></dt></dl>
22946 ; <nowiki>a:b</nowiki>''c:d''
22949 #### --------------- HRs ---------------
22950 #### 1. Single line
22951 #### -----------------------------------
22954 HRs: 1. Single line
22962 ----<nowiki>----</nowiki>
22967 #### --------------- Tables ---------------
22968 #### 1a. Simple example
22969 #### 1b. No escaping needed (!foo)
22970 #### 1c. No escaping needed (|foo)
22971 #### 1d. No escaping needed (|}foo)
22973 #### 2a. Nested in td (<td>foo|bar</td>)
22974 #### 2b. Nested in td (<td>foo||bar</td>)
22975 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22977 #### 3a. Nested in th (<th>foo!bar</th>)
22978 #### 3b. Nested in th (<th>foo!!bar</th>)
22979 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22983 #### 4c. No escaping needed
22984 #### --------------------------------------
22987 Tables: 1a. Simple example
22995 <nowiki>{|</nowiki>
23000 Tables: 1b. No escaping needed
23011 Tables: 1c. No escaping needed
23022 Tables: 1d. No escaping needed
23033 Tables: 2a. Nested in td
23038 <td>foo|bar</td></tr>
23039 <tr><td>x<div>a|b</div></td>
23043 |<nowiki>foo|bar</nowiki>
23045 |x<div><nowiki>a|b</nowiki></div>
23061 Tables: 2b. Nested in td
23067 <td>a<i>b||c</i></td>
23068 <td>a<i><div>b||c</div></i></td>
23069 </tr></tbody></table>
23072 |<nowiki>foo||bar</nowiki>
23073 |a''<nowiki>b||c</nowiki>''
23074 |a''<div><nowiki>b||c</nowiki></div>''
23083 <td>a<i><div>b||c</div></i>
23089 Tables: 2c. Nested in td -- no escaping needed
23107 Tables: 3a. Nested in th
23125 Tables: 3b. Nested in th
23130 <tr><th>foo!!bar</th>
23131 <th><i>foo|bar</i></th>
23132 <th><i>foo!!bar</i></th>
23133 <th><i><span>foo!!bar</span></i></th>
23134 </tr></tbody></table>
23137 !<nowiki>foo!!bar</nowiki>
23138 !''<nowiki>foo|bar</nowiki>''
23139 !''<nowiki>foo!!bar</nowiki>''
23140 !''<span><nowiki>foo!!bar</nowiki></span>''
23149 <th><i>foo!!bar</i>
23151 <th><i><span>foo!!bar</span></i>
23157 Tables: 3c. Nested in th
23162 <tr><th>foo||bar</th>
23163 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23164 </tr></tbody></table>
23167 !<nowiki>foo||bar</nowiki>
23168 !<nowiki>foo||bar</nowiki>
23181 Tables: 4a. Escape -
23200 |<nowiki>-bar</nowiki>
23205 Tables: 4b. Escape +
23224 |<nowiki>+bar</nowiki>
23229 Tables: 4c. No escaping needed
23234 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23235 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23241 <div>a|b</div></td>
23286 Tables: 4d. No escaping needed
23291 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23292 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23293 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23304 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23314 T97430: Don't emit empty nowiki pairs around marker meta tags
23318 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23319 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23321 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23322 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23326 Unclosed xmlish element in table line shouldn't eat end delimiters
23331 <tbody><tr><td> <foo</td>
23332 <td> bar></td></tr>
23349 #### --------------- Links ----------------
23350 #### 1. Quote marks in link text
23351 #### 2. Wikilinks: Escapes needed
23352 #### 3. Wikilinks: No escapes needed
23353 #### 4. Extlinks: Escapes needed
23354 #### 5. Extlinks: No escapes needed
23355 #### --------------------------------------
23357 Links 1. WikiLinks: No escapes needed
23361 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23362 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23363 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23367 [[Foo|x [Foobar] x]]
23369 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23370 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23371 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23376 Links 2. WikiLinks: Escapes needed
23380 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23381 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23382 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23383 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23384 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23385 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23386 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23387 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23388 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23389 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23391 [[Foo|<nowiki>Foobar]</nowiki>]]
23392 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23393 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23394 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23395 [[Foo|<nowiki>|Bar</nowiki>]]
23396 [[Foo|<nowiki>]]bar</nowiki>]]
23397 [[Foo|<nowiki>[[bar</nowiki>]]
23398 [[Foo|<nowiki>x [[ y</nowiki>]]
23399 [[Foo|<nowiki>x ]] y</nowiki>]]
23400 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23402 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23403 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23404 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23405 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23406 <a href="/wiki/Foo" title="Foo">|Bar</a>
23407 <a href="/wiki/Foo" title="Foo">]]bar</a>
23408 <a href="/wiki/Foo" title="Foo">[[bar</a>
23409 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23410 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23411 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23416 Links 3. WikiLinks: No escapes needed
23420 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23421 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23426 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23427 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23432 Links 4. ExtLinks: Escapes needed
23436 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23437 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23438 <p>[http://google.com]</p>
23439 <p>[http://google.com google]</p>
23440 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23441 <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>
23443 [http://google.com <nowiki>[google]</nowiki>]
23444 [http://google.com <nowiki>google]</nowiki>]
23446 <nowiki>[http://google.com]</nowiki>
23448 <nowiki>[http://google.com google]</nowiki>
23450 [http://google.com<nowiki>]</nowiki>
23452 [{{echo|http://google.com}}<nowiki>]</nowiki>
23454 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23455 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23456 </p><p>[http://google.com]
23457 </p><p>[http://google.com google]
23458 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23459 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23464 Links 5. ExtLinks: No escapes needed
23468 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23469 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23471 [http://google.com [google]
23473 [[http://google.com]]
23475 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23476 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23481 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23485 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23486 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23487 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23488 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23489 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23490 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23491 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23492 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23493 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23494 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23495 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23496 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23497 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23500 x<nowiki/>http://example.com<nowiki/>y
23501 http://example.com<nowiki/>?x
23502 http://example.com<nowiki/>&x
23503 http://example.com<nowiki/>'x
23504 http://example.com<nowiki/>,x
23505 http://example.com<nowiki/>.x
23506 http://example.com<nowiki/>;x
23507 http://example.com<nowiki/>:x
23508 http://example.com<nowiki/>;x
23509 http://example.com<nowiki/>!x
23510 http://example.com<nowiki/>=x
23511 http://example.com<nowiki/>(x)
23512 http://example.com(x<nowiki/>)
23516 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23521 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23523 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23524 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23525 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23526 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23527 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23533 "http://example.com"
23534 (http://example.com)
23535 (http://example.com) foo
23536 http://example.com,
23537 http://example.com, foo
23540 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23542 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23543 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23544 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23545 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23546 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23551 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23555 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23556 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23558 http://example.com.,;:!?\
23559 -http://example.com:
23561 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23562 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23567 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23571 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23572 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23573 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23577 X<nowiki/>RFC 123<nowiki/>y
23581 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23585 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23586 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23587 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23594 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23595 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23596 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23601 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23605 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23606 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23607 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23611 X<nowiki/>PMID 123<nowiki/>y
23615 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23619 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23620 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23621 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23628 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23629 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23630 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23635 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23639 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23640 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23641 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23644 ISBN 1234567890<nowiki/>1
23645 ISBN 1234567890<nowiki/>x
23646 a<nowiki/>ISBN 1234567890<nowiki/>b
23650 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23654 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23658 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23663 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23667 <p>this is not a link: http://example.com
23670 this is not a link: <nowiki>http://example.com</nowiki>
23674 Links 15. Link trails can't become link prefixes.
23679 <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>
23681 [[Söfnuður]]-[[00]]
23683 <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>
23687 #### --------------- Quotes ---------------
23688 #### 1. Quotes inside <b> and <i>
23689 #### 2. Link fragments separated by <i> and <b> tags
23690 #### 3. Link fragments inside <i> and <b>
23691 #### 4. No escaping needed
23692 #### --------------------------------------
23694 1a. Quotes inside <b> and <i>
23705 <b>foo'<i>bar'</i>baz</b>
23714 <i>fools'<span> errand</span></i>
23715 <i><span>fool</span>'s errand</i>
23716 '<i>foo</i> bar '<i>baz</i>
23717 a|!*#-:;+-~[]{}b'<i>x</i>
23721 ''<nowiki>''foo''</nowiki>''
23722 ''<nowiki>'''foo'''</nowiki>''
23724 '''<nowiki/>'foo''''
23725 '''<nowiki>''foo''</nowiki>'''
23726 '''<nowiki>'''foo'''</nowiki>'''
23727 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23728 '''foo'''<nowiki/>'s
23734 '''foo'''<nowiki/>'
23735 ''''foo'''<nowiki/>'
23736 ''fools'<span> errand</span>''
23737 ''<span>fool</span>'s errand''
23738 '<nowiki/>''foo'' bar '''baz''
23739 a|!*#-:;+-~[]{}b'''x''
23743 1b. Quotes inside <b> and <i> with other tags on same line
23747 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23748 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23749 <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>
23750 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23751 '<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>
23752 '<i>foo</i> <div title="name">test</div>
23753 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23754 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23755 <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>
23758 '''a'' foo ''[[bar]]''
23759 ''a''' foo ''[[bar]]''
23760 ''a''' foo '''{{echo|[[bar]]}}'''
23761 [[foo]] x'''[[bar]]''
23762 '''foo'' <ref>test</ref>
23763 '''foo'' <div title="name">test</div>
23764 '''foo'' and <br> bar
23769 2. Link fragments separated by <i> and <b> tags
23773 <p>[[<i>foo</i>hello]]</p>
23774 <p>[[<b>foo</b>hello]]</p>
23776 [[''foo''<nowiki>hello]]</nowiki>
23778 [['''foo'''<nowiki>hello]]</nowiki>
23781 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23782 # this is one of the shortcomings of this format
23784 3. Link fragments inside <i> and <b>
23788 <p><i>[[foo</i>]]</p>
23789 <p><b>[[foo</b>]]</p>
23791 ''[[foo''<nowiki>]]</nowiki>
23793 '''[[foo'''<nowiki>]]</nowiki>
23797 4. No escaping needed
23801 <p>'<span><i>bar</i></span>'
23802 '<span><b>bar</b></span>'
23806 '<span>''bar''</span>'
23807 '<span>'''bar'''</span>'
23811 #### ----------- Paragraphs ---------------
23812 #### 1. No unnecessary escapes
23813 #### --------------------------------------
23816 1. No unnecessary escapes
23820 <p>bar <span>[[foo]]</span>
23821 </p><p>=bar <span>[[foo]]</span>
23822 </p><p>[[bar <span>[[foo]]</span>
23823 </p><p>]]bar <span>[[foo]]</span>
23824 </p><p>=bar <span>foo]]</span>=
23827 bar <span><nowiki>[[foo]]</nowiki></span>
23829 =bar <span><nowiki>[[foo]]</nowiki></span>
23831 [[bar <span><nowiki>[[foo]]</nowiki></span>
23833 ]]bar <span><nowiki>[[foo]]</nowiki></span>
23835 =bar <span>foo]]</span><nowiki>=</nowiki>
23838 #### ----------------------- PRE --------------------------
23839 #### 1. Leading whitespace in SOL context should be escaped
23840 #### ------------------------------------------------------
23842 1. Leading whitespace in SOL context should be escaped
23865 <nowiki> </nowiki>a
23867 <nowiki> </nowiki> a
23871 <nowiki> </nowiki> a
23873 <nowiki> </nowiki>a
23876 <nowiki> </nowiki>b
23899 2. Leading whitespace in non-indent-pre contexts should not be escaped
23903 <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>
23904 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23905 <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>
23915 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
23934 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
23938 <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>
23940 [[File:Foobar.jpg|thumb|caption]]
23944 5. Nowiki escaping should account for indent-pres
23954 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23967 #### --------------- Behavior Switches --------------------
23970 1. Valid behavior switches should be escaped
23977 <nowiki>__TOC__</nowiki>
23978 ''<nowiki>__TOC__</nowiki>''
23982 2. Invalid behavior switches should not be escaped
23993 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23995 Behavior switches should be SOL-transparent
23999 <meta property="mw:PageProp/toc" />
24001 <!-- this one's bogus -->
24004 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24006 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24010 <!-- this one's bogus -->
24019 #### --------------- HTML tags ---------------
24022 #### 3. multi-line html tag
24023 #### 4. extension tags
24024 #### -----------------------------------------
24030 <a href="http://google.com">google</a>
24032 <a href="http://google.com">google</a>
24040 <ul><li> <div>foo</div></li>
24041 <li> <div style="color:red">foo</div></li>
24042 <li> <td></li></ul>
24045 * <nowiki><div>foo</div></nowiki>
24046 * <nowiki><div style="color:red">foo</div></nowiki>
24047 * <nowiki><td></nowiki>
24051 3. multi-line html tag
24070 <p><ref>foo</ref>
24071 </p><p><ref>bar
24072 </p><p>baz</ref>
24075 <nowiki><ref>foo</ref></nowiki>
24077 <nowiki><ref>bar</nowiki>
24079 baz<nowiki></ref></nowiki>
24082 #### --------------- Others ---------------
24088 <p><nowiki>foo</nowiki>
24091 <nowiki>foo</nowiki>
24094 ## The quote-char in the input is necessary for triggering the bug
24096 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24105 #----------- End of wikitext escaping tests --------------
24109 Tag-like HTML structures are passed through as text
24131 </p><p>1<d e>f
24136 HTML tag with necessary entities in attributes
24138 <span title="&amp;">foo</span>
24140 <p><span title="&amp;">foo</span>
24145 HTML tag with 'unnecessary' entity encoding in attributes
24147 <span title="&">foo</span>
24149 <p><span title="&">foo</span>
24154 HTML tag with broken attribute value quoting
24156 parsoid=wt2html,html2html
24158 <span title="Hello world>Foo</span>
24160 <p><span title="Hello world">Foo</span>
24163 <p><span title="Hello world">Foo</span></p>
24167 Self-closed tag with broken attribute value quoting
24169 parsoid=wt2html,html2html
24171 <div title="Hello world />Foo
24173 <div title="Hello world"></div>
24176 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24180 Table with broken attribute value quoting
24182 parsoid=wt2html,html2html
24185 | title="Hello world|Foo
24190 <td title="Hello world">Foo
24196 <td title="Hello world">Foo
24202 Table with broken attribute value quoting on consecutive lines
24204 parsoid=wt2html,html2html
24207 | title="Hello world|Foo
24208 | style="color:red|Bar
24213 <td title="Hello world">Foo
24215 <td style="color:red">Bar
24221 <td title="Hello world">Foo
24222 </td><td style="color: red">Bar
24223 </td></tr></tbody></table>
24228 Accept empty td cell attribute
24231 | align="center" | foo || |
24236 <td align="center"> foo </td>
24243 Non-empty attributes in th-cells
24246 ! Foo !! style="color: red" | Bar
24252 <th style="color: red"> Bar
24258 Accept empty attributes in th-cells
24273 Empty table rows go away
24294 ### Parsoid-centric tests for testing RTing of inter-element separators
24295 ### Edge cases not tested by existing parser tests and specific to
24296 ### Parsoid-specific serialization strategies.
24300 RT-ed inter-element separators should be valid separators
24312 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24316 # Parsoid-only since PHP parser relies on Tidy for correct output
24318 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24332 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24333 <p>bar</p></small></td></tr>
24337 <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>
24341 # Note that the "style" attribute is really a template parameter here.
24342 # The = would have to be {{=}} if you wanted the literal.
24344 Empty TD followed by TD with tpl-generated attribute
24349 |{{echo|style='color:red'}}|foo
24363 Indented table with an empty td
24381 ## We have some newline diffs RT-ing this edge case
24382 ## and it is not important enough -- we seem to be emitting
24383 ## at most 2 newlines after a </tr> and this is unrelated to
24384 ## the issue from T85627 that this is testing.
24386 Indented table with blank lines in between (T85627)
24405 Indented block & table
24419 <div data-parsoid='{"stx":"html"}'>foo</div>
24421 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24426 Indent and comment before table row
24441 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24442 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24446 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24448 Empty TR followed by a template-generated TR
24454 {{echo|<tr><td>foo</td></tr>}}
24460 <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}}]}'>
24465 ## PHP and parsoid output differ for this, and since this is primarily
24466 ## for testing Parsoid's serializer, marking this Parsoid only
24468 Empty TR followed by mixed-ws-comment line should RT correctly
24484 <!--c--> </tr><!--d-->
24490 Multi-line image caption generated by templates with/without trailing newlines
24492 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24493 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24495 <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>
24496 <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>
24500 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24504 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24506 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24508 <includeonly>foo</includeonly>
24516 ## PHP emits broken html for this, and since this is primarily
24517 ## a Parsoid serializer test, marking this Parsoid only
24519 Improperly nested inline or quotes tags with whitespace in between
24521 <span> <s>x</span> </s>
24524 <p><span> <s>x</s></span><s> </s>
24525 <b> <i>x</i></b><i> </i>
24530 Encapsulate protected attributes from wt
24532 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24534 <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>
24538 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24539 ## Having nested or stray pre tags results in the attempt to add duplicates,
24540 ## causing an assertion fail. This test tries to prevent that situation.
24542 Ensure ParagraphWrapper can deal with stray closing pre tags
24552 1. Ensure fostered text content is wrapped in element nodes
24556 <table>hi</table><table>ho</table>
24565 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24567 parsoid=wt2html,wt2wt
24576 <tbody><tr><td> a</td></tr>
24581 Encapsulation properly handles null DSR information from foster box
24583 parsoid=wt2html,wt2wt
24585 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24587 <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>
24591 1. Encapsulate foster-parented transclusion content
24593 parsoid=wt2wt,wt2html
24595 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24597 <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>
24607 2. Encapsulate foster-parented transclusion content
24609 parsoid=wt2wt,wt2html
24611 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24613 <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>
24624 3. Encapsulate foster-parented transclusion content
24626 parsoid=wt2wt,wt2html
24628 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24630 <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>"]}">
24643 4. Encapsulate foster-parented transclusion content
24645 parsoid=wt2wt,wt2html
24647 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24649 <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>"]}">
24662 5. Encapsulate foster-parented transclusion content
24664 parsoid=wt2wt,wt2html
24666 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24668 <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>
24683 6. Encapsulate foster-parented transclusion content
24685 parsoid=wt2wt,wt2html
24687 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24689 <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>
24705 7. Encapsulate foster-parented transclusion content
24707 parsoid=wt2wt,wt2html
24709 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24711 <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>
24721 # Note that the wt is broken on purpose: the = should be {{=}} if you
24722 # don't want it to be a template parameter key.
24724 8. Encapsulate foster-parented transclusion content
24726 parsoid=wt2wt,wt2html
24729 }}{|{{echo|style='color:red'}}
24734 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24736 <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>
24747 9. Encapsulate foster-parented transclusion content
24749 parsoid=wt2wt,wt2html
24751 <table>{{echo|hi</table>hello}}
24753 <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>
24757 Table in fosterable position
24768 <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">
24770 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24776 # Parsoid only for bug 64747
24778 Properly encapsulate empty-content transclusions in fosterable positions
24786 <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"}]]}'>
24792 Always encapsulate foster box when template range is expanded to table
24805 T115289: Unclosed table
24807 {{echo|<table>}}<!--c-->[[Category:Two]]
24809 <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>
24813 T115289: Don't migrate newlines out of tables with fostered content
24815 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
24817 <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>
24821 T73074: More fostering fun
24823 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
24825 <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>
24829 Support <object> element with .data attribute
24833 <object data="test.swf"></object>
24835 <object data="test.swf"></object>
24839 Don't block XML namespace declaration
24841 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24843 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24846 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
24849 # -----------------------------------------------------------------
24850 # The following section of tests are primarily to spec requirements
24851 # around serialization of new/edited content.
24853 # All these tests are marked Parsoid html2wt and html2html only
24854 # ----------------------------------------------------------------
24856 # 'mi' is a localinterwiki prefix as well as a language
24858 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
24862 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
24869 New wikilinks should be serialized properly
24873 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
24874 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
24881 New wiki links (href variations)
24885 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24886 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
24887 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
24888 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
24893 [[Toxine bactérienne]]
24897 New wiki links (content string variations)
24901 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24902 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
24903 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
24907 [[Foo_bar|./Foo_bar]]
24911 New category links (href variations)
24915 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
24916 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
24917 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
24919 [[Category:Toxine bactérienne]]
24920 [[Category:Toxine bactérienne]]
24921 [[Category:Toxine bactérienne]]
24925 New sol transparent links don't need indent-pre nowiki protection
24930 <link rel="mw:PageProp/redirect" href="./Main_Page">
24931 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
24932 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
24934 #WEITERLEITUNG [[Main Page]]
24935 <!-- this is good --> [[Category:Good]]
24936 <!-- this is great --> [[Kategorie:Great]]
24940 New interlanguage links (href variations)
24944 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
24945 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
24946 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
24948 [[es:Toxine bactérienne]]
24949 [[es:Toxine_bactérienne]]
24950 [[es:Toxine_bactérienne]]
24954 Image: Modifying size of an image (1)
24957 "modes": ["wt2wt"],
24959 ["img[height]", "attr", "height", "22"],
24960 ["img[width]", "attr", "width", "200"]
24964 [[Image:Foobar.jpg|230x230px]]
24966 [[Image:Foobar.jpg|200x200px]]
24970 Image: Modifying size of an image (2)
24973 "modes": ["wt2wt"],
24975 ["img[height]", "attr", "height", "100"],
24976 ["img[width]", "attr", "width", "500"]
24980 [[Image:Foobar.jpg|230x230px]]
24982 [[Image:Foobar.jpg|500x500px]]
24985 # Change in size is ignored so long as class='mw-default-size'
24987 Image: Modifying size of an image (3)
24990 "modes": ["wt2wt"],
24992 ["figure[class]", "removeClass", "mw-default-size"],
24993 ["figure img", "attr", "height", "19"],
24994 ["figure img", "attr", "width", "170"]
24998 [[Image:Foobar.jpg|thumb]]
25000 [[Image:Foobar.jpg|thumb|170x170px]]
25004 Image: Modifying alignment of an image (bug 48665)
25007 "modes": ["wt2wt"],
25009 ["figure[class]", "removeClass", "mw-halign-right"],
25010 ["figure[class]", "addClass", "mw-halign-left"]
25014 [[Image:Foobar.jpg|thumb|caption|right]]
25016 [[Image:Foobar.jpg|thumb|caption|left]]
25020 Image: Modifying mw-default-size of an frameless image (bug 62805)
25023 "modes": ["wt2wt"],
25025 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25029 [[Image:Foobar.jpg|frameless|right]]
25031 [[Image:Foobar.jpg|frameless|right|220x220px]]
25035 Image: Modifying valign of an image (bug 49221)
25038 "modes": ["wt2wt"],
25040 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25041 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25045 [[File:Foobar.jpg|20px|middle]]
25047 [[File:Foobar.jpg|20px|text-top]]
25051 Image: Modifying alt attribute of an image (bug 56400)
25054 "modes": ["wt2wt"],
25056 ["img[alt]", "attr", "alt", "some alternate edited text"]
25060 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25062 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25066 Image: Modifying caption of an image
25069 "modes": ["wt2wt"],
25071 ["figcaption", "text", "new caption"]
25075 [[Image:Foobar.jpg|thumb|original caption]]
25077 [[Image:Foobar.jpg|thumb|new caption]]
25081 Image: empty alt attribute (bug 48924)
25085 [[File:Foobar.jpg|thumb|alt=|bar]]
25087 <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>
25091 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25097 <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>
25099 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25103 Image: Block level image should have \n before and after
25106 [[File:Foobar.jpg|right|thumb|150x150px]]
25110 <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>
25115 Image: New block level image should have \n before and after (existing content)
25118 [[File:Foobar.jpg|right|thumb|150x150px]]
25122 <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>
25127 Image: upright option (parsoid)
25129 [[File:Foobar.jpg|thumb|upright|caption]]
25130 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25131 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25133 <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>
25134 <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>
25135 <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>
25139 Image: upright option is ignored on inline and frame images (parsoid)
25141 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25143 <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>
25147 Image: from basic HTML (1)
25151 <span typeof="mw:Image">
25152 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25155 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25159 Image: from basic HTML (2)
25163 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25165 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25169 Image: from basic HTML (3)
25173 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25175 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25179 Image: from basic HTML (4)
25183 <img src="./File:Foobar.jpg">
25185 [[File:Foobar.jpg|link=]]
25189 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25194 <li><p>foo</p></li>
25201 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25205 <ul> <li>foo</li></ul>
25211 Don't strip leading whitespace when handling indent-pre suppressing tags
25216 <tr><td> indented row</td></tr>
25219 <b>This is very bold of you!</b>
25222 indented cell (no pre-wrapping!)
25232 '''This is very bold of you!'''
25236 indented cell (no pre-wrapping!)
25244 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25266 <nowiki> </nowiki></span>bar2
25269 <nowiki> </nowiki><span>bar</span>
25272 <nowiki> </nowiki><span>foo</span>
25277 Lists: Dont insert newlines in a serialized list item.
25281 <ul><li>a<br>b</li><li>c</li></ul>
25288 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25291 "modes": ["html2wt"],
25292 "scrubWikitext": false
25295 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25296 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25298 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25299 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25301 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25303 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25305 == hello there [[Category:A1]] ==
25307 == [[Category:A2]] hi pal ==
25309 == <!--foo--> [[Category:A3]] how goes it ==
25311 == it goes well [[Category:A4]] <!--bar--> ==
25313 ==howdy [[Category:A5]]==
25319 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25322 "modes": ["html2wt"],
25323 "scrubWikitext": true
25326 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25327 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25329 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25330 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25332 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25340 <!--foo--> [[Category:A3]]
25345 [[Category:A4]] <!--bar-->
25353 Headings: Don't hoist metas that come from templates
25356 "modes": ["html2wt"],
25357 "scrubWikitext": true
25360 <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>
25362 == {{echo|foo [[Category:Foo]]}} ==
25366 Headings: Category in ref isn't hoisted
25369 "modes": ["html2wt"],
25370 "scrubWikitext": true
25373 <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>
25375 <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>
25378 [[Category:Baz]] </ref> ==
25384 Parsoid: Serialize positional parameters with = in them as named parameter
25388 <p about="#mwt1" typeof="mw:Transclusion"
25389 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25391 <p about="#mwt1" typeof="mw:Transclusion"
25392 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25394 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25395 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25396 <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>
25400 {{echo|1=f=oo|2=bar}}
25402 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25403 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25404 {{echo|<nowiki>f=oo</nowiki>|bar}}
25408 Parsoid: Serialize positional parameters with = in extlink as named parameter
25412 <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>
25414 {{echo|1=http://stuff?is=ok}}
25418 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25422 <div>a<p>b</p></div>
25443 Substrings resembling wikitext in hrefs should not get nowiki escapes
25447 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25453 Enforce single-line context in the serializer
25460 <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">
25461 </span><span about="#mwt1">you</span> </h2>
25463 <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>
25465 <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
25466 there</span></li></ol>
25478 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25485 </tbody></table></dd></dl>
25489 == hi {{bogus|there
25500 * foo '''bar''' baz
25512 Serialize new placeholder space without spans
25516 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25518 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25520 <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>
25526 <ref>foo : bar</ref>ok
25530 #-----------------------
25531 # Tag minimization tests
25532 #-----------------------
25535 1. I/B quote minimization: wikitext-only tags should be combined
25539 <p><i>A</i><i>B</i></p>
25540 <p><b>A</b><b>B</b></p>
25541 <p><i>A</i><b><i>B</i></b></p>
25542 <p><b>A</b><i><b>B</b></i></p>
25543 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25544 <p><i><b>A</b></i><i><b>B</b></i></p>
25545 <p><i><b>A</b></i><b><i>B</i></b></p>
25546 <p><b><i>A</i></b><i><b>B</b></i></p>
25566 2. I/B quote minimization: wikitext and html tags should not be combined
25570 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25571 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25575 ''A''<nowiki/>'''<i>B</i>'''
25579 3. I/B quote minimization: templated content stops minimization
25583 <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>
25584 <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>
25586 ''A''{{echo|''B''}}
25588 ''A''{{echo|'''''B'''''}}
25592 4. I/B quote minimization: new content should be mimimized with adjacent old content
25596 <p><i>A</i><i>B</i></p>
25597 <p><b>A</b><b>B</b></p>
25598 <p><i>A</i><b><i>B</i></b></p>
25608 5a. Merge adjacent quote nodes if they've been edited
25611 "modes": ["wt2wt", "selser"],
25613 ["p", "contents", "remove", ":contains('b')"]
25623 5b. Merge adjacent quote nodes if they've been edited
25626 "modes": ["wt2wt", "selser"],
25632 ''a''<span id="x">b</span>''c''
25638 1. Merge adjacent link nodes as long as at least one element is new
25641 "modes": ["html2wt"],
25642 "scrubWikitext": true
25645 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25646 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25647 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25651 [[Football|Foot]][[Football|ball]]
25655 2. Merge adjacent link nodes and enable additional normalizations
25658 "modes": ["html2wt"],
25659 "scrubWikitext": true
25662 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25664 [[Football|''Football'']]
25668 3. Don't merge adjacent link nodes if scrubWikitext is false
25671 "modes": ["html2wt"],
25672 "scrubWikitext": false
25675 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25677 [[Football|Foot]][[Football|ball]]
25680 #------------------------------
25681 # End of tag minimization tests
25682 #------------------------------
25685 Bug 54262: New entities
25689 <span typeof="mw:Entity"> </span>
25694 ## Note that there is no wikitext output for 'unknownproperty' ##
25695 ## Unknown magic words are silently dropped ##
25702 <meta property='mw:PageProp/toc' />
25703 <meta property='mw:PageProp/notoc' />
25704 <meta property='mw:PageProp/forcetoc' />
25705 <meta property='mw:PageProp/index' />
25706 <meta property='mw:PageProp/noindex' />
25707 <meta property='mw:PageProp/nogallery' />
25708 <meta property='mw:PageProp/noeditsection' />
25709 <meta property='mw:PageProp/notitleconvert' />
25710 <meta property='mw:PageProp/nocontentconvert' />
25711 <meta property='mw:PageProp/unknownproperty' />
25721 __NOCONTENTCONVERT__
25725 Consecutive <pre>s should not get merged
25727 parsoid=html2wt,html2html
25729 <pre>a</pre><pre>b</pre>
25757 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
25761 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
25763 [[Special:BookSources/1234567890|ISBN 1234567895]]
25767 Edited RFC links not serializable as RFC links should serialize as extlinks
25771 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
25773 [//tools.ietf.org/html/rfc123 New RFC]
25777 Edited PMID links not serializable as PMID links should serialize as extlinks
25781 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
25783 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
25787 WTS of autolinks with trailing/surrounding context
25791 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25792 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25793 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25794 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25795 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25796 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
25798 http://cscott.net'''foo'''
25800 http://cscott.net<b>foo</b>
25802 '''http://cscott.net'''
25804 '''http://cscott.net '''
25806 '''http://cscott.net<nowiki/>x'''
25808 http://cscott.net<nowiki/>x
25812 WTS of autolinks with nowikis (round-trip)
25814 x<nowiki/>http://cscott.net<nowiki/>x
25816 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
25819 # this is the "easy" test because it leaves in place all the
25820 # data-parsoid information indicating this is an autolink
25822 WTS of autolinks with escapes (editing)
25825 "modes": ["wt2wt"],
25827 [ "meta", "remove" ]
25831 x<nowiki/>http://cscott.net<nowiki/>x
25833 x<nowiki/>http://cscott.net<nowiki/>x
25837 WTS of edited autolink-like text (T103364)
25840 "modes": ["wt2wt"],
25842 [ "span[typeof]", "removeAttr", "typeof" ]
25846 Not a link: <nowiki>http://example.com</nowiki>.
25848 Not a link: <span><nowiki>http://example.com</nowiki></span>.
25852 WTS of newly-authored autolink-like text (T103364)
25856 <p>http://example.com is not a link.</p>
25858 <nowiki>http://example.com</nowiki> is not a link.
25862 WTS of autolink-like text after an autolink (T108563)
25866 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
25868 http://example.com <nowiki>http://example.com</nowiki> is not a link.
25872 Magic links inside links (not autolinked)
25874 [[Foo|http://example.com]]
25877 [[Foo|ISBN 123456789x]]
25879 [http://foo.com http://example.com]
25880 [http://foo.com RFC 1234]
25881 [http://foo.com PMID 1234]
25882 [http://foo.com ISBN 123456789x]
25884 <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>
25885 <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>
25887 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
25888 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
25889 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
25890 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
25892 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
25893 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
25894 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
25895 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
25899 Magic links inside image captions (autolinked)
25901 [[File:Foobar.jpg|thumb|http://example.com]]
25902 [[File:Foobar.jpg|thumb|RFC 1234]]
25903 [[File:Foobar.jpg|thumb|PMID 1234]]
25904 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
25906 <div class="thumb tright">
25907 <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>
25908 <div class="thumbcaption">
25909 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25910 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
25913 <div class="thumb tright">
25914 <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>
25915 <div class="thumbcaption">
25916 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25917 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
25920 <div class="thumb tright">
25921 <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>
25922 <div class="thumbcaption">
25923 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25924 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
25927 <div class="thumb tright">
25928 <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>
25929 <div class="thumbcaption">
25930 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25931 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
25935 <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>
25936 <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>
25937 <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>
25938 <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>
25942 WTS of magic word text (T109371)
25947 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
25948 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
25950 <nowiki>RFC 1234</nowiki>
25952 [http://foo.com RFC 1234]
25958 Edited Redirect link should emit a non-piped wikitext link
25962 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
25968 T75121: Infer extension name from typeOf if data-mw is not present
25970 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25972 <div typeOf="mw:Extension/foo"></div>
25977 # Note that the <p> wrapping isn't present in PHP parser output
25978 # The important thing for this test is that P-wrapping doesn't
25979 # interfere with the <nowiki> protection for leading - in <td>
25980 # (which isn't necessary for <th>).
25982 T88318: p-wrapped dash in table.
25984 parsoid=html2wt,wt2wt
25987 <tr><th><p>-</p></th><th><p>- </p></th></tr>
25988 <tr><td><p>-</p></td><td><p>- </p></td></tr>
25989 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
25996 |<nowiki>-</nowiki>
25997 |<nowiki>- </nowiki>
26016 <td><small>-</small></td>
26028 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26033 <td id='mwAc'>foo</td>
26034 <td id='serialize-this'>bar</td>
26039 | id="serialize-this" |bar
26044 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26048 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26050 <div id="hello">ok</div>
26057 "modes": ["wt2wt"],
26059 [ "#xyz", "before", "<b>before</b> stuff " ],
26060 [ "#xyz", "after", " stuff <i>after</i>" ],
26061 [ "#xyz", "html", "x <b>y</b> z" ]
26065 <span id="xyz">hello</span>
26067 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26071 Never serialize a-tag as html, regardless of what data-parsoid has to say
26073 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26075 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26080 ## SSS FIXME: This is broken output nevertheless.
26081 ## What might be a reasonable non-broken output for this?
26082 ## This is an edge case unlikely to be seen in production
26083 ## that I am not wasting more time on this right now.
26085 Never serialize a-tag as html, no matter what attributes it has
26087 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26089 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26091 [http://boo.org http://boohoo.org]
26094 # Misnested is an indication that selser can reuse the source but these have
26095 # shown to sneak through on occasion. See T101768.
26096 # The original wikitext here is: [http://test.com [[one]] two three]
26098 Strip span tags added to mark misnested links
26102 <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>
26104 [http://test.com][[one]] two three
26108 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26112 <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|}"]}'>
26124 ## This test verifies the presence and computation of this attribute indirectly
26125 ## by making an edit and ensuring that the serialization is correct (which it would be
26126 ## only if firstWikitextNode is properly set).
26128 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26131 "modes": ["wt2wt"],
26133 [ "div#x", "remove" ],
26134 [ "div", "before", "<div>new</div>" ]
26138 <div id="x">foo</div>
26140 {{echo|<div>boo</div>
26148 {{echo|<div>boo</div>
26154 # --------------------------------------------
26155 # Tests spec'ing wikitext serialization norms |
26156 # --------------------------------------------
26159 1. Categories should always be serialized on their own line
26163 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26171 2. Categories that are part of templates should not introduce a line break
26173 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26175 <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>
26178 # Careful while editing these next 2 tests. There are \u200f characters
26179 # before and after the <link> tags in the HTML and following some
26180 # of the categories in wikitext
26181 # Do not remove these characters in edits.
26183 # As part of the serialization, these bidi characters will get stripped.
26185 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26188 "modes": ["html2wt"],
26189 "scrubWikitext": true
26192 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26193 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26196 [[קטגוריה: שיטות משפט]]
26200 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26203 "modes": ["html2wt"],
26204 "scrubWikitext": true
26207 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26214 Lists: Add space after bullets
26221 <li><span> baz</span></li>
26226 * <span> baz</span>
26230 1. Headings: Add space before/after == (T53744)
26237 <h2><span> baz</span></h2>
26245 == <span> baz</span> ==
26249 2. Headings: Add space before/after == even after hoisted content
26252 "modes": ["html2wt"],
26253 "scrubWikitext": true
26256 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26264 1. Headings: suppress newly created empty headings
26267 "modes": ["html2wt"],
26268 "scrubWikitext": true
26276 2. Headings: don't suppress empty headings if scrubWikitext is false
26286 3. Headings: suppress empty headings on edits
26289 "modes": ["selser"],
26290 "scrubWikitext": true,
26296 ==<span id="x">foo</span>==
26301 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26304 "modes": ["html2wt"],
26305 "scrubWikitext": true
26308 <h2>foo<br/>bar</h2>
26309 <h2>foo <span><br/>bar</span> baz</h2>
26313 == foo <span> bar</span> baz ==
26317 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26320 "modes": ["html2wt"],
26321 "scrubWikitext": false
26324 <h2>foo<br/>bar</h2>
26330 1. WT Quote Tags: suppress newly created empty style tags
26333 "modes": ["html2wt"],
26334 "scrubWikitext": true
26342 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26348 ''<nowiki/>'''''<nowiki/>'''
26352 3. WT Quote Tags: suppress empty style tags on edits
26355 "modes": ["selser"],
26356 "scrubWikitext": true,
26362 '''<span id="x">foo</span>'''
26367 1. Anchors: suppress newly created empty anchors
26370 "modes": ["html2wt"],
26371 "scrubWikitext": true
26374 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26379 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26382 "modes": ["html2wt"],
26383 "scrubWikitext": false
26386 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26392 3. Anchors: suppress empty anchors on edits
26395 "modes": ["selser"],
26396 "scrubWikitext": true,
26402 [[Test|<span id="x">foo</span>]]
26407 3a. Anchors: do not suppress numbered extlinks
26410 "modes": ["wt2wt"],
26411 "scrubWikitext": true
26416 <a rel="mw:ExtLink" href="http://foo.com"></a>
26420 3b. Anchors: do not suppress numbered extlinks
26423 "modes": ["wt2wt"],
26424 "scrubWikitext": true,
26430 [http://foo.com <span id="x">foo</span>]
26436 Normalizations should be restricted to edited content
26439 "modes": ["selser"],
26440 "scrubWikitext": true,
26442 [ "h1", "before", "<i></i>"]
26456 1. Multiple normalizations (html2wt)
26459 "modes": ["html2wt"],
26460 "scrubWikitext": true
26464 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26465 </a><b><i></i></b>x</p>
26474 2. Multiple normalizations (selser)
26477 "modes": ["selser"],
26478 "scrubWikitext": true,
26480 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26484 <span id="x">foo</span>
26486 <span id="x">foo</span>
26492 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26495 "modes": ["html2wt"],
26496 "scrubWikitext": true
26508 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26515 <nowiki> </nowiki>hi
26517 <nowiki> </nowiki> hello
26521 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26524 "modes": ["html2wt"],
26525 "scrubWikitext": true
26534 baz bang</td></tr></table>
26540 bar<span>boo</span></p>
26556 bar<span>boo</span>
26560 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26563 "modes": ["selser"],
26564 "scrubWikitext": true,
26566 [ "p", "html", " a\n b" ]
26577 1. New links that end in spaces
26580 "modes": ["html2wt"],
26581 "scrubWikitext": false
26584 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26585 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26586 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26588 [[Berlin ]]<nowiki/>is the capital of Germany.
26592 [[Boston ]] is a city.
26596 2. New links that end in spaces
26599 "modes": ["html2wt"],
26600 "scrubWikitext": true
26603 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26604 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26605 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26607 [[Berlin]] is the capital of Germany.
26611 [[Boston]] is a city.
26615 1. Table cells with escapable prefixes
26618 "modes": ["html2wt"],
26619 "scrubWikitext": false
26623 <tr><td>a</td></tr>
26624 <tr><td>-</td></tr>
26625 <tr><td>+</td></tr>
26631 |<nowiki>-</nowiki>
26633 |<nowiki>+</nowiki>
26638 2. Table cells with escapable prefixes
26641 "modes": ["html2wt"],
26642 "scrubWikitext": true
26646 <tr><td>a</td></tr>
26647 <tr><td>-</td></tr>
26648 <tr><td>+</td></tr>
26661 3a. Table cells with escapable prefixes after edits
26664 "modes": ["selser"],
26665 "scrubWikitext": true,
26667 [ "table tbody tr:first-child td:first-child", "remove"]
26681 3b. Table cells with escapable prefixes after edits
26684 "modes": ["selser"],
26685 "scrubWikitext": true,
26687 [ "table tbody tr:first-child td:first-child", "html", "-" ],
26694 |<span id="x">foo</span>+
26703 # FIXME: This test will fail because
26704 # normalization doesn't realize that the id attribute
26705 # will eliminate the escapable scenario
26707 4a. Table cells without escapable prefixes after edits
26710 "modes": ["selser"],
26711 "scrubWikitext": true,
26713 [ "#x", "html", "-" ]
26726 ## This tests normalizer's ability to discriminate between
26727 ## cells having identical content.
26729 4b. Table cells without escapable prefixes after edits
26732 "modes": ["selser"],
26733 "scrubWikitext": true,
26735 [ "td", "html", "-" ]
26748 ## This tests normalizer's ability to not be tripped by
26749 ## comments (and whitespace)
26751 4c. Table cells without escapable prefixes after edits
26754 "modes": ["selser"],
26755 "scrubWikitext": true,
26757 [ "table tbody tr td:first-child", "remove" ]
26772 ## This tests normalizer's ability to handle HTML cells
26774 4d. Table cells without escapable prefixes after edits
26777 "modes": ["selser"],
26778 "scrubWikitext": true,
26780 [ "td", "html", "-" ]
26785 <tr><td>a</td></tr>
26789 <tr><td>-</td></tr>
26793 ## T111151 Remove font elements without attributes
26795 5a. font tags without attributes should be dropped in scrubWikitext mode
26798 "modes": ["html2wt"],
26799 "scrubWikitext": true
26803 <font><font>bar</font></font>
26804 <font class="x">boo</font>
26808 <font class="x">boo</font>
26812 5b. font tags should not be dropped without scrubWikitext being enabled
26815 "modes": ["html2wt"],
26816 "scrubWikitext": false
26825 Escape nowiki DOM elements
26829 <nowiki><i>foo</i></nowiki>
26831 <nowiki>''foo''</nowiki>
26834 # This is meant to be an interim fix while we go about figuring out
26835 # how to not introduce these trailing <nowiki/>s in the first place.
26837 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
26841 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
26843 <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>
26844 <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>
26857 # ---------------------------------------------------
26858 # End of tests spec'ing wikitext serialization norms |
26859 # ---------------------------------------------------
26863 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
26871 <td><b>c</b><p>d</p></td>
26889 # -----------------------------------------------------------------
26890 # End of section for Parsoid-only html2wt tests for serialization
26892 # -----------------------------------------------------------------
26894 # -----------------------------------------------------------------
26895 # The following section of tests are primarily to spec behavior of
26896 # the selective serializer. All these tests have manual selser
26897 # changes. The automated selser changes for all tests handle the
26898 # wide variation of changes, but these tests here capture specs
26899 # deterministically.
26900 # ----------------------------------------------------------------
26904 Selser: New comments should not be lost
26907 "modes": ["selser"],
26909 [ "#a", "after", "<!--c1-->" ],
26910 [ "#b", "before", "<!--c2-->" ]
26914 <span id="a">a</span>
26916 <span id="b">b</span>
26918 <span id="a">a</span><!--c1-->
26920 <!--c2--><span id="b">b</span>
26925 Selser: Check for validity of DSR before using it
26928 "modes": ["selser"],
26930 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
26934 <span id="a">a</span>
26936 {{DISPLAYTITLE:foo}}
26937 <span id="a">a</span>
26941 1. DOMDiff: Changes to <ref> content should be looked up using id
26944 "modes": ["selser"],
26946 ["#X", "after", "bar"],
26947 ["#Y", "after", "baz"]
26951 X <ref><span id="X">foo</span></ref>
26954 <ref name="a"><span id="Y">foo</span></ref>
26957 X <ref><span id="X">foo</span>bar</ref>
26960 <ref name="a"><span id="Y">foo</span>baz</ref>
26965 2. DOMDiff: Changes to <ref> content should be looked up using id
26968 "modes": ["selser"],
26970 ["#Z", "after", "bar"]
26974 A <ref>foo bar for a</ref>
26975 B <ref group="X" name="b" />
26979 <references group="X">
26980 <ref name="b"><span id="Z">foo</span></ref>
26983 A <ref>foo bar for a</ref>
26984 B <ref group="X" name="b" />
26988 <references group="X">
26989 <ref name="b"><span id="Z">foo</span>bar</ref>
27003 <li class="mw-empty-li"></li>
27004 <li class="mw-empty-li"></li>