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>
2278 <nowiki> and <pre> preference (first one wins)
2307 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2309 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2312 <p><span typeof="mw:Nowiki">
2321 </pre> inside nowiki
2323 <nowiki></pre></nowiki>
2329 # Parsoid doesn't strip empty tags, like Tidy does.
2331 Empty pre; pre inside other HTML tags (bug 54946)
2333 parsoid=wt2html,wt2wt
2364 HTML pre followed by indent-pre
2374 # Note that tidy removes the empty <p> tags from the start and end.
2375 # Parsoid does not, by design.
2379 <p><pre>foo</pre></p>
2385 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2389 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2397 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2407 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2419 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2440 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2444 {{echo| foo}}{{echo| bar}}
2449 {{echo|<!--cmt--> foo}}
2451 <!--cmt-->{{echo| foo}}
2453 {{echo|{{echo| }}bar}}
2471 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2508 Pres with newline attributes
2513 <pre class="one two">hi</pre>
2517 two" data-parsoid='{"stx":"html"}'>hi</pre>
2521 Things that look like <pre> tags aren't treated as such
2523 Barack Obama <President> of the United States
2524 <President></President>
2526 <p>Barack Obama <President> of the United States
2527 <President></President>
2532 Handle broken pre-like tags (bug 64025)
2536 {{echo|<pre <pre>x</pre>}}
2538 <table><pre </table>
2541 <table><pre </table>
2549 <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>
2558 Parsoid: handle pre with space after attribute
2562 <pre style="width:50%;" >{{echo|foo}}</pre>
2564 <pre style="width:50%;">{{echo|foo}}</pre>
2567 <pre style="width:50%;">{{echo|foo}}</pre>
2570 # TODO / maybe: fix wt2wt for this
2572 Parsoid: Don't paragraph-wrap fosterable content
2598 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2626 #--------------------------------------------------------------------
2627 # Transclusion parameter whitespace stripping tests
2628 # Behavior is different for positional and named parameters
2629 #--------------------------------------------------------------------
2631 Templates: Strip leading and trailing whitespace from named-param values
2635 {{echo|1= {{echo|b}} }}
2648 <ul><li> d</li></ul>
2653 Templates: Don't strip whitespace from positional-param values
2657 {{echo|{{echo|b}} }}
2689 <ul><li> f</li></ul>
2697 Templates: Handle empty comment-and-ws-only lines correctly
2700 <!--should be ignored-->
2701 <!--should be ignored as well-->
2710 Templates: Handle comments in the target
2713 <!-- should be ignored -->
2716 {{echo<!-- should be ignored -->
2719 {{echo<!-- should be ignored -->|foo}}
2721 {{<!-- should be ignored -->echo|foo}}
2723 <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>
2725 <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>
2727 <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>
2729 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2733 Templates: Handle comments in parameter names (bug 67657)
2736 <!-- should be ignored -->
2740 <!-- should be ignored -->
2743 {{echo|1<!-- should be ignored -->=foo}}
2745 {{echo|<!-- should be ignored -->1=foo}}
2747 <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>
2749 <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>
2751 <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>
2753 <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>
2757 Templates: Other wikitext in parameter names (bug 67657)
2761 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2767 #--------------------------------------------------------------------
2768 # Transclusion parameter escaping tests
2769 #--------------------------------------------------------------------
2771 Templates: Parsoid parameter escaping test 1
2773 {{echo|[foo]|{{echo|[bar]}}}}
2777 <p about="#mwt1" typeof="mw:Transclusion"
2778 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2782 Parsoid: Pipes in external links in template parameter
2784 {{echo|[{{echo|http://example.com}} link]}}
2786 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2788 <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>
2792 Parsoid: pipe in transclusion parameter
2794 {{echo|http://foo.com/a|b}}
2796 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2798 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2799 typeof="mw:Transclusion"
2800 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>
2804 Parsoid: Pipe in external link target and content in template parameter
2806 parsoid=html2wt,wt2wt
2808 {{echo|[http://foo.com/a|b a|b]}}
2810 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2812 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2813 typeof="mw:Transclusion"
2814 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2815 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2819 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2823 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2825 <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>
2829 Templates: Don't escape already nowiki-escaped text in template parameters
2831 parsoid=html2wt,wt2wt
2833 {{echo|foo<nowiki>|</nowiki>bar}}
2834 {{echo|<nowiki><div></nowiki>}}
2835 {{echo|<nowiki></nowiki>}}
2837 <p>foo|bar <div></p>
2839 <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>
2840 <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>
2841 <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>
2847 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2849 parsoid=html2wt,wt2wt
2851 {{echo|{{echo|1=bar}}}}
2855 <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>
2860 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2866 <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>
2871 Templates: Preserve blank parameter names
2877 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2881 Templates: Preserve blank parameter names in other positions
2883 {{blank_param|bar|=foo}}
2887 <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
2892 ### Parsoid-centric tests for testing RT edge cases for pre
2896 1a. Indent-Pre and Comments
2909 1b. Indent-Pre and Comments
2922 1c. Indent-Pre and Comments
2935 1d. Indent-Pre and Comments
2936 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2949 2a. Indent-Pre and tables
2970 2b. Indent-Pre and tables
2986 2c. Indent-Pre and tables (bug 42252)
3003 2d. Indent-Pre and tables
3020 <tbody><tr><td> b</td></tr>
3025 2e. Indent-Pre and table-line syntax
3038 2f. Indent-pre started by table-line syntax
3057 3a. Indent-Pre and block tags (single-line html)
3061 c <blockquote> foo </blockquote>
3066 c <blockquote> foo </blockquote>
3067 <pre><span> foo </span>
3070 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3071 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3072 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3073 <pre><span> foo </span>
3090 3b. Indent-Pre and block tags (multi-line html)
3095 <pre>a <span>foo</span>
3100 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3101 b <div data-parsoid='{"stx":"html"}'> foo </div>
3111 3c. Indent-Pre and block tags (pre-content on separate line)
3175 4. Indent-Pre and extension tags
3181 a <ul class="gallery mw-gallery-traditional">
3182 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3183 <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>
3184 <div class="gallerytext">
3191 <ul class="gallery mw-gallery-traditional">
3192 <li class="gallerybox" style="width: 155px">
3193 <div style="width: 155px">
3194 <div class="thumb" style="width: 150px;">
3195 <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>
3197 <div class="gallerytext"></div>
3204 Table wikitext syntax outside wiki-tables
3207 ! not a table heading
3210 | class="foo bar" | baz
3217 ! not a table heading
3220 | class="foo bar" | baz
3229 Render paragraphs when indent-pre is suppressed in blocklevels
3246 4. Multiple spaces at start-of-line
3264 ## NOTE: the leading white-space chars on empty line are significant
3266 5a. White-space in indent-pre
3278 ## NOTE: the leading white-space chars on empty line are significant
3280 5b. White-space in indent-pre
3299 5c. White-space in indent-pre
3312 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3335 7a. Indent-pre and category links
3337 parsoid=wt2html,wt2wt
3339 [[Category:foo]] <!-- No pre-wrapping -->
3340 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3343 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3344 <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 -->
3347 ## We used to, but no longer wt2wt this test since the default serializer
3348 ## will normalize all categories to serialize on their own line.
3349 ## This wikitext usage is going to be fairly uncommon in production and
3350 ## selser will take care of preserving formatting in those scenarios.
3352 7b. Indent-pre and category links
3357 [[Category:foo]] {{echo|b}}
3359 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3360 <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>
3364 Indent-Pre: Newlines in comments shouldn't affect sol state
3378 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3382 HTML-pre: 1. embedded newlines
3417 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3419 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3423 <pre data-parsoid='{"stx":"html"}'>
3428 <pre data-parsoid='{"stx":"html"}'>
3436 HTML-pre: big spaces
3472 <pre data-parsoid='{"stx":"html"}'>
3491 HTML-pre: 2: indented text
3504 HTML-pre: 3: other wikitext
3523 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3532 ### Definition lists
3539 <dl><dt> name </dt>
3540 <dd> Definition</dd></dl>
3545 Definition list for indentation only
3549 <dl><dd> Indented text</dd></dl>
3554 Definition list with no space
3559 <dd>Definition</dd></dl>
3564 Definition list with URL link
3566 ; http://example.com/ : definition
3568 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3569 <dd> definition</dd></dl>
3574 Definition list with bracketed URL link
3576 ;[http://www.example.com/ Example]:Something about it
3578 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3579 <dd>Something about it</dd></dl>
3584 Definition list with wikilink containing colon
3586 ; [[Help:FAQ]]: The least-read page on Wikipedia
3588 <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>
3589 <dd> The least-read page on Wikipedia</dd></dl>
3593 # At Brion's and JeLuF's insistence... :)
3595 Definition list with news link containing colon
3597 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3599 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3600 <dd> This isn't even a real newsgroup!</dd></dl>
3603 <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>
3607 Malformed definition list with colon
3609 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3611 <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>
3616 Definition lists: colon in external link text
3618 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3620 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3621 <dd> OK, I made that up</dd></dl>
3626 Definition lists: colon in HTML attribute
3628 ;<b style="display: inline">bold</b>
3630 <dl><dt><b style="display: inline">bold</b></dt></dl>
3635 Definition lists: self-closed tag
3637 ;one<br/>two : two-line fun
3639 <dl><dt>one<br />two </dt>
3640 <dd> two-line fun</dd></dl>
3645 Bug 11748: Literal closing tags
3649 <dd>test test test test test</dd>
3651 <dd>test test test test test</dd>
3656 <dd>test test test test test</dd>
3658 <dd>test test test test test</dd>
3664 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3667 ; term : description
3672 <dl><dt> term </dt>
3673 <dd> description</dd></dl>
3674 <ul><li> unordered</li></ul>
3681 Definition list with empty definition and following paragraph
3693 Nested definition lists using html syntax
3702 Definition Lists: No nesting: Multiple dd's
3715 Definition Lists: Indentation: Regular
3723 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3728 Definition Lists: Indentation: Missing 1st level
3734 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3739 Definition Lists: Indentation: Multi-level indent
3743 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3748 Definition Lists: Hacky use to indent tables
3755 should be left alone
3757 <dl><dd><dl><dd><table>
3762 </td></tr></table></dd></dl></dd></dl>
3764 should be left alone
3769 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3777 should be left alone
3780 <dl><dd><dl><dd><table><tr>
3783 </tr></table><!-- bar --></dd></dl></dd></dl>
3785 should be left alone</p>
3789 Definition Lists: Hacky use to indent tables, with comment before table
3795 <dl><dd><dl><dd><!-- foo --><table><tr>
3797 </tr></table></dd></dl></dd></dl>
3800 # The trailing whitespace in this test is to catch a regression in
3801 # Parsoid after T54473.
3803 Definition Lists: Hacky use to indent tables (WS-insensitive)
3812 </td></tr></table></dd></dl>
3816 <tbody><tr><td>a</td></tr>
3817 </tbody></table> </dd></dl>
3820 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3821 ## as an empty dt item. It also ignores all but the last ";" when followed
3822 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3823 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3826 ## Ex: ";;t2 ::d2" is transformed into:
3838 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3839 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3850 ## All Parsoid only definition list tests have this difference.
3852 ## See also: https://phabricator.wikimedia.org/T8569
3853 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3856 Table / list interaction: indented table with lists in table contents
3871 <ul><li> b</li></ul>
3875 <ul><li> d</li></ul>
3876 </td></tr></table></dd></dl>
3881 Table / list interaction: lists nested in tables nested in indented lists
3904 </td></tr></table></dd></dl>
3911 Definition Lists: Nesting: Multi-level (Parsoid only)
3941 Definition Lists: Nesting: Test 2 (Parsoid only)
3968 Definition Lists: Nesting: Test 3 (Parsoid only)
4011 Definition Lists: Nesting: Test 4
4016 <dl><dd><dl><dd><dl><dt>t3</dt>
4017 <dd>d3</dd></dl></dd></dl></dd></dl>
4022 ## The Parsoid team believes the following three test exposes a
4023 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4024 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4025 ## It also exposes a "misfeature" in tidy, which doesn't like
4026 ## <dl> tags with a single <dt> child; it converts the <dt> into
4027 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4029 Definition Lists: Mixed Lists: Test 1
4035 <dl><dd><dl><dt><ul><li> foo</li>
4036 <li> bar</li></ul></dt></dl>
4037 <dl><dt> baz</dt></dl></dd></dl>
4072 Definition Lists: Mixed Lists: Test 2
4077 <ul><li><dl><dd> d1</dd>
4078 <dd> d2</dd></dl></li></ul>
4084 Definition Lists: Mixed Lists: Test 3
4089 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4090 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4096 Definition Lists: Mixed Lists: Test 4
4101 <ul><li><dl><dt>d1 </dt>
4104 <dd>d4</dd></dl></li></ul>
4110 Definition Lists: Mixed Lists: Test 5
4116 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4122 Definition Lists: Mixed Lists: Test 6
4127 <ol><li><ul><li><dl><dd>d1
4128 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4134 Definition Lists: Mixed Lists: Test 7
4139 <dl><dd><ul><li> d1</li>
4140 <li> d2</li></ul></dd></dl>
4146 Definition Lists: Mixed Lists: Test 8
4151 <dl><dd><ul><li> d1</li></ul>
4152 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4158 Definition Lists: Mixed Lists: Test 9
4162 <ul><li><dl><dt>foo </dt>
4163 <dd>bar</dd></dl></li></ul>
4169 Definition Lists: Mixed Lists: Test 10
4173 <ul><li><ol><li><dl><dt>foo </dt>
4174 <dd>bar</dd></dl></li></ol></li></ul>
4178 # The Parsoid team disagrees with the PHP parser's seemingly-random
4179 # rules regarding dd/dt on the next two tests. Parsoid is more
4180 # consistent, and recognizes the shared nesting and keeps the
4181 # still-open tags around until the nesting is complete.
4182 # (And tidy again converts <dt> to <dd> before 'bar'.)
4185 Definition Lists: Mixed Lists: Test 11
4190 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4191 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4192 <dl><dt>boo </dt>
4193 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4248 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4249 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4253 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4254 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4263 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4265 # * The test is wrong, there are two colons where there should be :;
4266 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4268 Definition Lists: Weird Ones: Test 1
4270 *#;*::;; foo : bar (who uses this?)
4272 <ul><li><ol><li><dl><dt> foo </dt>
4273 <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>
4292 <dt>bar (who uses this?)</dt>
4324 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4325 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4337 Definition Lists: colons occurring in tags
4355 <dt><span>a:b</span></dt>
4382 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4384 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4385 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4386 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4387 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4389 <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>
4390 <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>
4391 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4395 Definition Lists: colons and tables 1
4407 </td></tr></table></dd></dl>
4411 </td></tr></table></dd></dl>
4415 # Parsoid's output (as documented below) differs from php's in this case.
4416 # This is probably a bug. If we fixup parsoid to match php's output, the
4417 # above test should pass and the below test case can be removed. It is
4418 # unclear which output is more desirable.
4421 Definition Lists: colons and tables 2
4433 </td></tr></table></dd>
4437 </td></tr></table></dd></dl>
4441 Definition Lists: template interaction
4443 ::{{definition_list}}
4446 ::{{definition_list}}
4451 <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">
4452 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4454 <dl><dd data-parsoid='{}'>one
4455 <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">
4456 </span><dd about="#mwt2">two
4458 <dd>three</dd></dl></dd>
4459 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4467 External links: non-bracketed
4469 Non-bracketed: http://example.com
4471 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4475 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4477 External links: numbered
4479 Numbered: [http://example.com]
4480 Numbered: [http://example.net]
4481 Numbered: [http://example.com]
4483 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4484 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4485 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4488 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4489 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4490 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4494 External links: specified text
4496 Specified text: [http://example.com link]
4498 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4503 External links: trail
4505 Linktrails should not work for external links: [http://example.com link]s
4507 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4512 External links: dollar sign in URL
4514 http://example.com/1$2345
4516 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4520 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4522 External links: dollar sign in URL (autonumber)
4524 [http://example.com/1$2345]
4526 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4529 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4533 External links: open square bracket forbidden in URL (bug 4377)
4535 parsoid=wt2html,wt2wt,html2html
4537 http://example.com/1[2345
4539 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4542 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4546 External links: open square bracket forbidden in URL (named) (bug 4377)
4548 parsoid=wt2html,html2html
4550 [http://example.com/1[2345]
4552 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4555 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4558 # parsoid adds a space before the link name
4560 External links: open square bracket forbidden in URL (named) (bug 4377)
4563 [http://example.com/1 [2345]
4565 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4570 External links: nowiki in URL link text (bug 6230)
4572 [http://example.com/ <nowiki>''example site''</nowiki>]
4574 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4579 External links: newline forbidden in text (bug 6230 regression check)
4581 [http://example.com/ first
4584 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4590 External links: Pipe char between url and text
4592 [http://example.com | link]
4594 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4599 External links: protocol-relative URL in brackets
4601 [//example.com/ Test]
4603 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4607 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4609 External links: protocol-relative URL in brackets without text
4613 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4616 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4620 External links: protocol-relative URL in free text is left alone
4624 <p>//example.com/Foo
4629 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4631 foo//example.com/Foo
4633 <p>foo//example.com/Foo
4638 External links: with no contents
4640 [http://en.wikipedia.org/wiki/Foo]
4642 [[wikipedia:Foo|Bar]]
4644 [[wikipedia:Foo|<span>Bar</span>]]
4646 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4647 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4648 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4651 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4652 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4653 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4657 External links: Free with trailing punctuation
4667 http://example.com/url_with_(brackets)
4668 (http://example.com/url_without_brackets)
4669 http://example.com/url_with_entity&
4670 http://example.com/url_with_entity&
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<
4679 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4680 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4681 <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/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4688 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4689 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4690 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</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><
4700 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4701 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4702 <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/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4709 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4710 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4711 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</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><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4714 <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>
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":"&#160;","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":"&lt;","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":"&#x3C;","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":"&#60;","srcContent":"<"}'><</span></p>
4722 External links: tricky Parsoid html2html case
4724 parsoid=wt2html,wt2wt,html2html
4726 http://example.com/url_with_entity&amp;
4728 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4731 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4735 External links: Free with trailing quotes (T113666)
4737 '''News:''' Stuff here
4741 <p><b>News:</b> Stuff here
4742 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4745 <p><b>News:</b> Stuff here</p>
4746 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4750 External links: Lone protocols are never linked (T105697)
4769 External links: No preceding word characters allowed (bug 65278)
4771 NOPEhttp://example.com
4772 N0http://example.com
4773 ok:http://example.com
4774 ok-http://example.com
4776 <p>NOPEhttp://example.com
4777 N0http://example.com
4778 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4779 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4786 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4788 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4793 External image from https
4795 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4797 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4802 External image (when not allowed)
4804 wgAllowExternalImages=0
4806 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4808 <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>
4813 Link to non-http image, no img tag
4815 Link to non-http image, no img tag: ftp://example.com/test.jpg
4817 <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>
4822 External links: terminating separator
4824 Terminating separator: http://example.com/thing,
4826 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4831 External links: intervening separator
4833 Intervening separator: http://example.com/1,2,3
4835 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4840 External links: old bug with URL in query
4842 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4844 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4849 External links: old URL-in-URL bug, mixed protocols
4851 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4853 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4858 External links: URL in text
4860 URL in text: [http://example.com http://example.com]
4862 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4867 External links: Clickable images
4869 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4871 <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>
4874 <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>
4878 External links: raw ampersand
4880 Old & use: http://x&y
4882 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4887 External links: encoded ampersand
4889 Old & use: http://x&y
4891 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4894 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4898 External links: encoded equals (bug 6102)
4900 http://example.com/?foo=bar
4902 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4905 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4909 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4910 ## does it number them. As discussed in bug 53505, we can identify
4911 ## autonumbered links via CSS.
4915 External links: [raw ampersand]
4917 Old & use: [http://x&y]
4919 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4922 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4925 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4926 # mode will return the [raw ampersand] wikitext
4928 External links: [encoded ampersand]
4930 parsoid=wt2html,wt2wt,html2html
4932 Old & use: [http://x&y]
4934 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4937 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4941 External links: [raw equals]
4943 [http://example.com/?foo=bar]
4945 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4948 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4951 # note that parsoid html is identical to [raw equals] case; so html2wt
4952 # mode will return the [raw equals] wikitext
4954 External links: [encoded equals] (bug 6102)
4956 parsoid=wt2html,wt2wt,html2html
4958 [http://example.com/?foo=bar]
4960 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4963 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4966 # xxx parsoid strips the IDN character, so the round-trip tests will
4967 # obviously fail and are disabled. --cscott
4969 External links: [IDN ignored character reference in hostname; strip it right off]
4971 parsoid=wt2html,wt2wt,html2html
4973 [http://e‌xample.com/]
4975 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4978 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4981 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4982 # Where an external link could easily circumvent the sanitization of the text of
4983 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4984 # test demands a higher standard. That's a bit strange.
4988 # http://example.com -> [http://example.com|http://example.com]
4989 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4991 # The first example is sanitized, but the second is not. Any security benefits
4992 # from this production are trivial to circumvent. Either remove this test and
4993 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4994 # the test accordingly.
4998 # xxx parsoid strips the IDN character, so the round-trip tests will
4999 # obviously fail and are disabled. --cscott
5001 External links: IDN ignored character reference in hostname; strip it right off
5003 parsoid=wt2html,html2html
5005 http://e‌xample.com/
5007 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5010 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5014 External links: www.jpeg.org (bug 554)
5018 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5022 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5024 External links: URL within URL (original bug 2)
5026 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5028 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5031 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5035 BUG 361: URL inside bracketed URL
5037 [http://www.example.com/foo http://www.example.com/bar]
5039 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5044 BUG 361: URL within URL, not bracketed
5046 http://www.example.com/foo?=http://www.example.com/bar
5048 <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>
5053 BUG 289: ">"-token in URL-tail
5055 http://www.example.com/<hello>
5057 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5062 BUG 289: literal ">"-token in URL-tail
5064 http://www.example.com/<b>html</b>
5066 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5069 <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>
5073 BUG 289: ">"-token in bracketed URL
5075 [http://www.example.com/<hello> stuff]
5077 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5082 BUG 289: literal ">"-token in bracketed URL
5084 [http://www.example.com/<b>html</b> stuff]
5086 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5091 BUG 289: literal double quote at end of URL
5093 http://www.example.com/"hello"
5095 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5100 BUG 289: literal double quote in bracketed URL
5102 [http://www.example.com/"hello" stuff]
5104 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5109 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5111 [http://www.example.com test]
5113 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5118 External links: link text with spaces
5120 [http://www.example.com a b c]
5121 [http://www.example.com ''a'' ''b'']
5123 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5124 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5129 External links: wiki links within external link (Bug 3695)
5131 parsoid=wt2html,html2html
5133 [http://example.com [[wikilink]] embedded in ext link]
5135 <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>
5138 <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>
5142 BUG 787: Links with one slash after the url protocol are invalid
5146 [http:/example.com title]
5148 <p>http:/example.com
5149 </p><p>[http:/example.com title]
5154 Bracketed external links with template-generated invalid target
5156 [{{echo|http:/example.com}} title]
5158 <p>[http:/example.com title]
5163 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5165 ''[http://example.com text'']
5166 [http://example.com '''text]'''
5167 ''Something [http://example.com in italic'']
5168 ''Something [http://example.com mixed''''', even bold]'''
5169 '''''Now [http://example.com both''''']
5171 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5172 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5173 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5174 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5175 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5181 Bug 4781: %26 in URL
5183 http://www.example.com/?title=AT%26T
5185 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5188 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5191 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5192 # % is actually legal in HTML5. Any change in output would need testing though.
5194 Bug 4781, 5267: %25 in URL
5196 http://www.example.com/?title=100%25_Bran
5198 <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>
5201 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5205 Bug 4781, 5267: %28, %29 in URL
5207 http://www.example.com/?title=Ben-Hur_%281959_film%29
5209 <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>
5212 <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>
5217 Bug 4781: %26 in autonumber URL
5219 [http://www.example.com/?title=AT%26T]
5221 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5224 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5228 Bug 4781, 5267: %26 in autonumber URL
5230 [http://www.example.com/?title=100%25_Bran]
5232 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5235 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5239 Bug 4781, 5267: %28, %29 in autonumber URL
5241 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5243 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5246 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5251 Bug 4781: %26 in bracketed URL
5253 [http://www.example.com/?title=AT%26T link]
5255 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5258 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5262 Bug 4781, 5267: %25 in bracketed URL
5264 [http://www.example.com/?title=100%25_Bran link]
5266 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5271 Bug 4781, 5267: %28, %29 in bracketed URL
5273 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5275 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5278 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5282 External link containing a period in the anchor. (bug 63947)
5284 [//foo.org/bar#baz. bang]
5286 [//foo.org/bar. bang]
5288 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5289 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5292 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5293 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5297 External link containing a single quote. (bug 63947)
5301 [//foo.org/bar'baz bang]
5303 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5304 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5307 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5308 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5312 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5314 Some [http://example.com/ pretty ''italics'' and stuff]!
5316 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5321 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5323 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5325 <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>
5330 External link containing double-single-quotes with no space separating the url from text in italics
5332 [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]].]
5334 <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>
5337 <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>
5339 <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>
5343 External link with comments in link text
5345 [http://www.google.com Google <!-- comment -->]
5347 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5350 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5354 External link to bare IPv4 address
5356 [http://192.168.0.1 Link]
5358 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5361 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5365 URL-encoding in URL functions (single parameter)
5367 {{localurl:Some page|amp=&}}
5369 <p>/index.php?title=Some_page&amp=&
5374 URL-encoding in URL functions (multiple parameters)
5376 {{localurl:Some page|q=?&=&}}
5378 <p>/index.php?title=Some_page&q=?&amp=&
5385 http://example.com/index.php?foozoid%5B%5D=bar
5387 http://example.com/index.php?foozoid[]=bar
5389 <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>
5390 </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>
5393 <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>
5395 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5399 IPv6 urls, autolink format (T23261)
5401 http://[2404:130:0:1000::187:2]/index.php
5403 Examples from RFC 2373, section 2.2:
5404 * http://[1080::8:800:200C:417A]/unicast
5405 * http://[FF01::101]/multicast
5406 * http://[::1]/loopback
5407 * http://[::]/unspecified
5408 * http://[::13.1.68.3]/ipv4compat
5409 * http://[::FFFF:129.144.52.38]/ipv4compat
5411 Examples from RFC 2732, section 2:
5412 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5413 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5414 * http://[3ffe:2a00:100:7031::1]
5415 * http://[1080::8:800:200C:417A]/foo
5416 * http://[::192.9.5.5]/ipng
5417 * http://[::FFFF:129.144.52.38]:80/index.html
5418 * http://[2010:836B:4179::836B:4179]
5421 <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>
5422 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5424 <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>
5425 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5426 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5427 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5428 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5429 <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>
5430 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5432 <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>
5433 <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>
5434 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5435 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5436 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5437 <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>
5438 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5441 <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>
5443 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5444 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5445 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5446 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5447 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5448 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5449 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5451 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5452 <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>
5453 <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>
5454 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5455 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5456 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5457 <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>
5458 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5462 IPv6 urls, bracketed format (T23261)
5464 [http://[2404:130:0:1000::187:2]/index.php test]
5466 Examples from RFC 2373, section 2.2:
5467 * [http://[1080::8:800:200C:417A] unicast]
5468 * [http://[FF01::101] multicast]
5469 * [http://[::1]/ loopback]
5470 * [http://[::] unspecified]
5471 * [http://[::13.1.68.3] ipv4compat]
5472 * [http://[::FFFF:129.144.52.38] ipv4compat]
5474 Examples from RFC 2732, section 2:
5475 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5476 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5477 * [http://[3ffe:2a00:100:7031::1] 3]
5478 * [http://[1080::8:800:200C:417A]/foo 4]
5479 * [http://[::192.9.5.5]/ipng 5]
5480 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5481 * [http://[2010:836B:4179::836B:4179] 7]
5484 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5485 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5487 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5488 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5489 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5490 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5491 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5492 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5493 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5495 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5496 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5497 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5498 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5499 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5500 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5501 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5504 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5506 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5507 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5508 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5509 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5510 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5511 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5512 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5514 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5515 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5516 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5517 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5518 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5519 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5520 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5521 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5525 Non-extlinks in brackets
5534 [{{echo|foo}} ''bar'']
5535 [{{echo|foo}}l's] errand
5536 [{{echo|foo}}l's errand]
5538 [url=http://example.com]
5539 [http:// bare protocols don't count]
5552 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5553 [http:// bare protocols don't count]
5561 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5562 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5563 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5564 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5565 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5566 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5567 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5568 [http:// bare protocols don't count]</p>
5572 Percent encoding in external links
5574 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5576 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5579 <p><a rel="mw:ExtLink"
5580 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5584 Use url link syntax for links where the content is equal the link target
5588 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5591 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5595 Parenthesis in external links, especially URL links
5599 http://example.com/test)
5601 http://example.com/(test)
5603 http://example.com/((test)
5605 (http://example.com/(test))
5607 (http://example.com/(test)))))
5609 http://example.com/a)b
5611 [http://example.com) foo]
5613 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5614 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5615 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5616 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5617 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5618 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5619 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5620 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5623 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5624 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5625 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5626 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5627 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5628 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5629 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5630 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5634 Parenthesis in external links, w/ transclusion or comment
5636 (http://example.com/{{echo|hi}})
5638 (http://example.com<!-- hi -->)
5640 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5641 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5644 <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>
5646 <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>
5650 Serialize <a> tags with invalid link targets as plain text
5652 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5654 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5655 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5656 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5657 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5660 <nowiki>*</nowiki>text
5661 <nowiki>[[foo]]</nowiki>
5662 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5666 mw:ExtLink -vs- mw:WikiLink (T94723)
5670 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5671 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5672 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5673 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5675 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5676 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5681 [[wikipedia:Foo|Bar]]
5682 [[wikipedia:Foo|Bar]]
5684 [[wikipedia:European_Robin|European Robin]]
5685 [[wikipedia:European_Robin|European Robin]]
5689 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5693 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5695 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5706 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5708 Normal text. '''''Bold italic text.''''' Normal text.
5710 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5711 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5716 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5717 # parser strips. The wikitext contains just the first half of the bold
5720 Unclosed and unmatched quotes
5722 '''''Bold italic text '''with bold deactivated''' in between.'''''
5724 '''''Bold italic text ''with italic deactivated'' in between.'''''
5728 ..spanning two paragraphs (should not work).'''
5730 '''Bold tag left open
5732 ''Italic tag left open
5736 <!-- Unmatching number of opening, closing tags: -->
5737 '''This year''''s election ''should'' beat '''last year''''s.
5739 ''Tom'''s car is bigger than ''Susan'''s.
5741 Plain ''italic'''s plain
5743 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5744 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5745 </p><p><b>Bold text..</b>
5746 </p><p>..spanning two paragraphs (should not work).
5747 </p><p><b>Bold tag left open</b>
5748 </p><p><i>Italic tag left open</i>
5750 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5751 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5752 </p><p>Plain <i>italic'</i>s plain
5755 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5756 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5757 </p><p><b>Bold text..</b>
5758 </p><p>..spanning two paragraphs (should not work).<b></b>
5759 </p><p><b>Bold tag left open</b>
5760 </p><p><i>Italic tag left open</i>
5763 <!-- Unmatching number of opening, closing tags: -->
5764 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5765 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5766 </p><p>Plain <i>italic'</i>s plain
5773 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5776 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5777 # is the bare minimum required by the spec, see:
5778 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5779 # Parsoid team replies: empty table tags are legal in HTML5
5781 A table with no data.
5794 A table with stray table end tags on start tag line (wt2html)
5798 {|style="color: red;"|}
5800 {|style="color: red;" |}
5804 {|style="color: red;"|} id="foo"
5808 {|style="color: red;" |} id="foo"
5812 <table style="color: red;"></table>
5814 <table style="color: red;">
5820 <table style="color: red;" id="foo">
5826 <table style="color: red;" id="foo">
5835 A table with no data (take 2)
5843 # A table with nothing but a caption is invalid XHTML, we might want to render
5844 # this as <p>caption</p>
5845 # Parsoid team replies: table with only a caption is legal in HTML5
5847 A table with nothing but a caption
5855 </caption><tr><td></td></tr></table>
5858 <table><caption> caption</caption></table>
5862 A table with caption with default-spaced attributes and a table row
5865 |+ style="color: red;" | caption1
5871 <caption style="color: red;"> caption1
5880 A table with captions with non-default spaced attributes and a table row
5883 |+style="color: red;"|caption2
5884 |+ style="color: red;"| caption3
5890 <caption style="color: red;">caption2
5892 <caption style="color: red;"> caption3
5901 Table td-cell syntax variations
5905 | foo bar foo || baz
5906 | style='color:red;' | baz
5907 | style='color:red;' || baz
5914 <td> foo bar foo </td>
5917 <td style="color:red;"> baz
5919 <td> style='color:red;' </td>
5947 Simple table but with multiple dashes for row wikitext
5966 Multiplication table
5968 {| border="1" cellpadding="2"
5969 |+Multiplication table
5971 ! × !! 1 !! 2 !! 3
5989 <table border="1" cellpadding="2">
5990 <caption>Multiplication table
6037 Accept "||" in table headings
6052 Accept "!!" in table data
6066 <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>
6071 Accept "||" in indented table headings
6081 </th></tr></table></dd></dl>
6086 Accept "!!" in templates
6100 <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>
6104 Accept "!!" in table headings after newline
6121 <p>b!!c</p></th></tr>
6126 Accept "!!" in table data of mixed wikitext / html syntax
6130 <tr><td>b!!c</td></tr>
6143 <tbody><tr><th>a</th></tr>
6144 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6149 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6166 Accept "| !" at start of line in tables (ignore !-attribute)
6170 | !style="color:red" | bar
6182 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 +/-
6186 |style='color:red;'|+1
6187 |style='color:blue;'|-1
6199 <td style="color:red;">+1
6201 <td style="color:blue;">-1
6225 |rowspan=2| Cell 2, row 1 (and 2)
6236 <td rowspan="2"> Cell 2, row 1 (and 2)
6254 {| bgcolor=#ABCDEF border=2
6259 |the original table again
6267 <table bgcolor="#ABCDEF" border="2">
6275 <td>the original table again
6281 Invalid attributes in table cell (bug 1830)
6295 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6299 | title="foo<nowiki>|</nowiki>" |bar
6300 | title="foo<nowiki>|</nowiki>" bar
6307 <td title="foo|">bar
6309 <td> title="foo|" bar
6314 <tbody><tr><td title="foo">bar</td>
6315 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6316 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6320 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6321 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6322 # *2wt modes will fail.
6324 Table security: embedded pipes
6326 parsoid=wt2html,html2html
6329 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6333 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6334 <td>]" onmouseover="alert(document.cookie)">test
6342 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6346 Element attributes with double ! should not be broken up by <th>
6349 ! hi <div class="!!">ha</div> ho
6354 <th> hi <div class="!!">ha</div> ho
6359 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6364 ! and || in element attributes should not be parsed as <th>/<td>
6367 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6372 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6377 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6381 # FIXME: The output seems broken. Filed as T110268.
6383 ! and || in td attributes should not be parsed as <th>/<td>
6388 | style="color: red !important;" data-contrived="put this here ||" | foo
6393 <td> style="color: red !important;" data-contrived="put this here </td>
6399 <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>
6404 Break on | in element attribute in template
6406 parsoid=wt2html,html2html
6408 {{echo|1=<div class="hi|ho">ha</div>}}
6410 <p>ho">ha</div>
6413 <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>
6417 Indented table markup mixed with indented pre content (proposed in bug 6200)
6422 Text that should be rendered preformatted
6430 <pre>Text that should be rendered preformatted
6439 1. Template-generated table cell attributes and cell content
6444 || {{table_attribs_5}}
6445 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6446 |align=center {{table_attribs}}
6447 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6452 <td style="color:red;">Foo
6454 <td style="color:red;">Foo
6456 <td> style="color:red;"</td>
6459 <td style="color:red;">Foo
6461 <td align="center" style="color:red;">Foo
6463 <td align="center" style="color:red;">Foo
6469 2. Template-generated table cell attributes and cell content
6472 |{{table_attribs_2}}
6477 <td style="color:red;">Foo
6485 <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>
6486 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6491 3. Template-generated table cell attributes and cell content
6494 !align=center {{table_header_cells}}
6496 |align=center {{table_cells}}
6501 <th align="center" style="color:red;">Foo</th>
6502 <th style="color:red;"><i>Bar</i></th>
6503 <th style="color:brown;"><i>Foo</i> and Baz
6506 <td align="center" style="color:red;">Foo</td>
6507 <td style="color:red;"><i>Bar</i></td>
6508 <td style="color:brown;"><i>Foo</i> and Baz
6513 <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>
6514 <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>
6519 4. Template-generated table cell attributes and cell content inside a templated table
6522 !align=center {{table_header_cells}}
6524 |align=center {{table_cells}}
6529 <th align="center" style="color:red;">Foo</th>
6530 <th style="color:red;"><i>Bar</i></th>
6531 <th style="color:brown;"><i>Foo</i> and Baz
6534 <td align="center" style="color:red;">Foo</td>
6535 <td style="color:red;"><i>Bar</i></td>
6536 <td style="color:brown;"><i>Foo</i> and Baz
6540 <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}}]}'>
6541 <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>
6543 <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>
6547 ## Edge case fix to prevent future regressions
6549 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6552 |{{table_attribs_7}}
6557 <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>
6559 <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>
6563 Table with row followed by newlines and table heading
6581 Table with empty line following the start tag
6599 Table attributes with empty value
6601 parsoid=wt2html,html2html
6614 <tbody><tr><td style=""> hello</td></tr>
6619 Wikitext table with a lot of comments
6642 Wikitext table comments represented in parsoid dom
6644 {|<!--c1--><!--c2-->
6655 <table><!--c1--><!--c2-->
6656 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6657 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6662 Wikitext table with double-line table cell
6679 Table cell with a single comment
6696 Table-cell after a comment-only-empty-line
6713 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6715 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6721 Build table with {{!}}
6723 {{{!}} class="wikitable"
6726 {{!}}- style="color:red;"
6727 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6730 <table class="wikitable">
6736 <tr style="color:red;">
6738 <td style="color:red;"> second data
6744 Build table with pipe as data
6746 {| class="wikitable"
6749 |- style="color:red;"
6750 | data || style="color:red;" | second data
6752 | style="color:red;" | data with | || style="color:red;" | second data with |
6754 || data with | ||| second data with |
6757 <table class="wikitable">
6763 <tr style="color:red;">
6765 <td style="color:red;"> second data
6768 <td style="color:red;"> data with | </td>
6769 <td style="color:red;"> second data with |
6772 <td> data with | </td>
6773 <td> second data with |
6779 Build table with wikilink
6781 {| class="wikitable"
6782 ! header || second header
6783 |- style="color:red;"
6784 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6786 | data || second data [[Main Page|link|text with pipe]]
6789 <table class="wikitable">
6794 <tr style="color:red;">
6795 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6796 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6800 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6805 # The expected HTML structure in this test is debatable. The PHP parser does
6806 # not parse this kind of table at all. The main focus for Parsoid is on
6807 # round-tripping, so this output is ok for now. TODO: revisit!
6809 Wikitext table with html-syntax row
6819 <td>foo</td></tr></tbody></table>
6822 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6823 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6824 ## PHP parser, which tidy then compounds by fostering the content
6825 ## entirely out of the table. Parsoid recognizes the table context
6826 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6827 ## depends on PHP's treatment of broken table markup!
6829 Implicit <td> after a |-
6831 parsoid=wt2html,html2html
6851 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6853 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6855 parsoid=wt2html,html2html
6888 <tr><td><pre>a</pre></td></tr>
6889 <tr><td> b</td></tr>
6894 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6895 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6897 Lists should be recognized in an implicit <td> context
6899 parsoid=wt2html,html2html
6926 Table cells not properly parsed in an implicit-td context
6930 {{table_attribs_4}} || a || b
6935 <td style="background-color:#DC241f;" width="10px"></td>
6942 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6943 <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>
6948 Parsoid: Round-trip tables directly followed by content (bug 51219)
6950 parsoid=wt2html,wt2wt
6975 Parsoid: Default to a newline after tables in new content (bug 51219)
6980 <tr><td>foo</td></tr></tbody></table> bar
6982 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6987 <nowiki> </nowiki>bar
6995 Parsoid: newline inducing block nodes don't suppress <nowiki>
7007 Parsoid: Row-syntax table headings followed by comment & table cells
7009 parsoid=wt2html,wt2wt
7013 <!-- foo --> || baz || quux
7027 <tbody><tr><th> foo </th><th> bar
7028 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7033 Parsoid: Recover better from broken table attributes
7053 <p>foo</p></td></tr>
7058 Tables: Digest broken attributes on table and tr tag
7075 Strip unsupported table tags
7123 Testing serialization after deletion in references
7132 hi <ref><div id="x">ho</div></ref>
7142 Testing serialization after deletion of table cells
7145 "modes": ["wt2wt", "selser"],
7153 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7166 Plain link, capitalized
7170 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7175 Plain link, uncapitalized
7179 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7186 [[Main Page|The Main Page]]
7188 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7193 Piped link with comment in link text
7195 [[Main Page|The Main<!--front--> Page]]
7197 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7202 Piped link with multiple pipe characters in link text
7204 [[Main Page||The|Main|Page|]]
7206 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7209 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7213 Piped link with no link text
7215 [[Thomas Bek (bishop of St David's)|]]
7217 <p>[[Thomas Bek (bishop of St David's)|]]
7220 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7228 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7233 Broken link with fragment
7235 [[Zigzagzogzagzig#zug]]
7237 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7242 Special page link with fragment
7244 [[Special:Version#anchor]]
7246 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7251 Nonexistent special page link with fragment
7253 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7255 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7262 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7264 <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>
7271 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7273 <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>!!!
7284 Bug 43661: Piped links with identical prefixes
7286 [[prefixed article|prefixed articles with spaces]]
7288 [[prefixed article|prefixed articlesaoeu]]
7290 [[Main Page|Main Page test]]
7292 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7293 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7294 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7300 Link with HTML entity in suffix / tail
7302 [[Main Page]]", [[Main Page]]a
7304 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7307 <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>
7311 Link with 3 brackets
7322 Link with 4 brackets
7326 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7331 Piped link with 3 brackets
7333 [[[main page|the main page]]]
7335 <p>[[[main page|the main page]]]
7340 Piped link with extlink-like text
7343 [[Main Page|This is a [bar]]]
7345 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7346 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7349 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7350 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7354 Link with multiple pipes
7356 [[Main Page|The|Main|Page]]
7358 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7362 # Note that parsoid does not munge anchor text; all non-space
7363 # characters are valid in HTML5 ids.
7365 Anchor containing a #. (bug 63430)
7367 [[Main Page#And#Link]]
7369 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7372 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7378 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7380 <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>
7385 Link with space in namespace
7387 [[User talk:Foo bar]]
7389 <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>
7394 MemoryAlpha:AlphaTest
7396 This is an article in the MemoryAlpha namespace
7397 (which shadows the memoryalpha interwiki link).
7401 Namespace takes precedence over interwiki link (bug 51680)
7403 [[MemoryAlpha:AlphaTest]]
7405 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7409 # The previous test doesn't work correctly in html2*, due to not recognizing the
7410 # link as an internal one. This one checks for the correct behavior.
7412 Link to namespace preferred over interwiki with correct rel attribute
7414 parsoid=html2wt,html2html
7416 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7418 [[MemoryAlpha:AlphaTest]]
7422 Piped link to namespace
7424 [[Meta:Disclaimers|The disclaimers]]
7426 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7433 [[Usually caused by a typo (oops}]]
7435 <p>[[Usually caused by a typo (oops}]]
7442 Just a test of an article title containing a percent.
7446 Link containing % (not as a hex sequence)
7450 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7453 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7456 # note that the parsoid HTML is identical to the previous test output,
7457 # so the previous test ensures that the html2wt mode will generate the
7458 # "not as a hex sequence" wikitext.
7460 Link containing % as a single hex sequence interpreted to char
7462 parsoid=wt2wt,wt2html,html2html
7466 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7469 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7473 Link containing % as a double hex sequence interpreted to hex sequence
7477 <p>[[7%2525 Solution]]
7481 # note that parsoid does not munge anchor text; all non-space
7482 # characters are valid in HTML5 anchors.
7484 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7485 Example for such a section: == < ==
7487 [[%23%3c]][[%23%3e]]
7489 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7492 <p><a rel="mw:WikiLink" href="./Main%20Page#%3C" title="Main Page">#<</a><a rel="mw:WikiLink" href="./Main%20Page#%3E" title="Main Page">#></a></p>
7496 Link containing "<#" and ">#" as a hex sequences
7498 [[%3c%23]][[%3e%23]]
7500 <p>[[%3c%23]][[%3e%23]]
7505 Link containing an equals sign
7507 [[Special:BookSources/isbn=4-00-026157-6]]
7509 <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>
7512 <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>
7518 Just a test of an article title containing a tilde.
7521 # note that links containing signatures, like [[Foo~~~~]], are
7522 # massaged by the pre-save transform (PST) and so the tildes are never
7523 # seen by the parser.
7525 Link containing a tilde
7529 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7532 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7536 Link containing double-single-quotes '' (bug 4598)
7538 [[Lista d''e paise d''o munno]]
7540 <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>
7543 <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>
7547 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7549 Some [[Link|pretty ''italics'' and stuff]]!
7551 <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>!
7554 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7558 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7560 ''Some [[Link|pretty ''italics'' and stuff]]!''
7562 <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>
7567 Link with double quotes in title part (literal) and alternate part (interpreted)
7569 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7573 [[''Pentecoste''|Pentecoste]]
7575 [[''Pentecoste''|''Pentecoste'']]
7577 <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>
7578 </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>
7579 </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>
7580 </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>
7583 <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>
7584 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7585 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7586 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7590 Broken image links with HTML captions (bug 39700)
7592 [[File:Nonexistent|<script></script>]]
7593 [[File:Nonexistent|100x100px|<script></script>]]
7594 [[File:Nonexistent|<]]
7595 [[File:Nonexistent|a<i>b</i>c]]
7597 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7598 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7599 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7600 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7603 <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>
7604 <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>
7605 <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>
7606 <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>
7612 [[http://www.example.com]]
7614 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7617 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7621 Plain link to URL with link text
7623 [[http://www.example.com Link text]]
7625 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7630 Plain link to protocol-relative URL
7632 [[//www.example.com]]
7634 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7637 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7641 Plain link to protocol-relative URL with link text
7643 [[//www.example.com Link text]]
7645 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7650 Plain link to page with question mark in title
7656 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7657 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7662 # I'm fairly sure the expected result here is wrong.
7663 # We want these to be URL links, not pseudo-pages with URLs for titles....
7664 # However the current output is also pretty screwy.
7667 # I'm changing it to match the current output--it arguably makes more
7668 # sense in the light of the test above. Old expected result was:
7669 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7671 # But I think this test is bordering on "garbage in, garbage out" anyway.
7676 Piped link to URL: [[http://www.example.com|an example URL]]
7678 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7681 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7685 BUG 2: [[page|http://url/]] should link to page, not http://url/
7687 [[Main Page|http://url/]]
7689 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7692 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7695 # Parsoid does not mark self-links, by design.
7697 BUG 337: Escaped self-links should be bold
7701 [[Bug462]] [[Bug462]]
7703 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7706 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7708 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7712 Self-link to section should not be bold
7716 [[Main Page#section]]
7718 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7729 Self-link to numeric title
7735 <p><strong class="selflink">0</strong>
7740 Link to numeric-equivalent title
7746 <p><a href="/wiki/00" title="00">00</a>
7751 <nowiki> inside a link
7753 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7755 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7760 Non-breaking spaces in title
7762 [[ Main Page ]]
7764 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7769 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7775 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7780 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7786 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7791 Internal link with en linktrail: no apostrophes (bug 27473)
7797 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7802 Internal link with ca linktrail with apostrophes (bug 27473)
7808 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7813 Internal link with kaa linktrail with apostrophes (bug 27473)
7819 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7824 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7826 [[User:Foo/Test/63636:Bar|Test]]
7828 <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>
7831 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7835 Purely hash wikilink
7837 title=[[User:test/123]]
7841 <p><a href="#a">b</a>
7844 <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>
7848 1. Interaction of linktrail and template encapsulation
7854 <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>
7858 2. Interaction of linktrail and template encapsulation
7862 {{echo|Some [[Fool]]}}s
7864 <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>
7868 3. Interaction of linktrail and template encapsulation
7872 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7874 <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>
7884 Internal link with is link prefix
7888 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7890 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7901 Internal link with is link trail and link prefix
7905 [[mótmælendatrú|xxx]]ar
7907 mótmælenda[[söfnuður]]
7908 mótmælenda[[söfnuður|söfnuðir]]
7909 mótmælenda[[söfnuður|söfnuðir]]xxx
7911 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7912 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7913 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7914 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7915 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7920 Parsoid link trail escaping
7922 parsoid=html2wt,html2html
7924 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7930 Parsoid link prefix escaping
7933 parsoid=html2wt,html2html
7935 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7937 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7941 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7949 [http://wp.org ''foo'']
7951 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7952 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7953 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7954 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7959 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7963 [[Foo|{{echo|a}} b {{echo|c}}]]
7965 <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>
7969 Link with angle bracket after anchor
7973 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7976 <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>
7980 ### Interwiki links (see maintenance/interwiki.sql)
7984 Inline interwiki link
7986 parsoid=wt2html,wt2wt,html2html
7988 [[MeatBall:SoftSecurity]]
7990 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7993 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7997 Inline interwiki link with empty title (bug 2372)
7999 parsoid=wt2html,wt2wt,html2html
8003 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8006 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8010 Interwiki link encoding conversion (bug 1636)
8012 *[[Wikipedia:ro:Olteniţa]]
8013 *[[Wikipedia:ro:Olteniţa]]
8015 <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>
8016 <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>
8020 <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>
8021 <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>
8026 Interwiki link with fragment (bug 2130)
8028 [[MeatBall:SoftSecurity#foo]]
8030 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8034 # Ideally the wikipedia: prefix here should be proto-relative too
8035 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8036 # define the 'en' prefix, and originally the test used 'wikipedia',
8037 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8040 Different interwiki prefixes mapping to the same URL
8048 [[:wikipedia:Foo|Foo]]
8050 [[wikipedia:en:Foo]]
8052 [[:wikipedia:en:Foo]]
8056 <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>
8058 <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>
8060 <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>
8062 <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>
8064 <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>
8066 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
8068 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/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>
8072 Interwiki links that cannot be represented in wiki syntax
8075 [[meatball:ok#foo|ok with fragment]]
8076 [[meatball:ok_as_well?|ok ending with ? mark]]
8077 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8078 [http://de.wikipedia.org/wiki/#foo is just fragment]
8081 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8082 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8083 <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>
8084 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8085 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8088 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8089 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8090 <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>
8091 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8092 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8096 Interwiki links: trail
8098 [[wikipedia:Foo|Ba]]r
8100 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8103 <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>
8107 Local interwiki link
8109 parsoid=wt2html,wt2wt,html2html
8111 [[local:Template:Foo]]
8113 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8116 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8119 # Parsoid does not mark self-links, by design.
8121 Local interwiki link: self-link to current page
8124 parsoid=wt2html,wt2wt,html2html
8128 <p><strong class="selflink">local:Main Page</strong>
8131 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8135 Local interwiki link: prefix only (bug 64167)
8137 parsoid=wt2html,wt2wt,html2html
8141 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8144 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8148 Local interwiki link: with additional interwiki prefix (bug 61357)
8150 parsoid=wt2html,wt2wt,html2html
8152 [[local:meatball:Hello]]
8154 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8157 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8161 Multiple local interwiki link prefixes
8163 [[local:local:local:local:mi:local:Foo]]
8165 parsoid=wt2html,wt2wt,html2html
8167 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8170 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8174 ### Interlanguage links
8175 ### Language links (so that searching for '### language' matches..)
8181 parsoid=wt2html,wt2wt,html2html
8189 <p>Blah blah blah</p>
8190 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8194 Interlanguage link with spacing
8196 parsoid=wt2html,wt2wt,html2html
8204 <p>Blah blah blah</p>
8205 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8209 Double interlanguage link
8211 parsoid=wt2html,wt2wt,html2html
8220 <p>Blah blah blah</p>
8221 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8222 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8226 Interlanguage link variations
8228 parsoid=wt2html,wt2wt,html2html
8238 <p>Blah blah blah</p>
8239 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8240 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8241 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8245 Space and question mark encoding in interlanguage links (T95473)
8247 parsoid=wt2html,wt2wt,html2html
8255 <p>Blah blah blah</p>
8256 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8260 Interlanguage link, with prefix links
8270 <p>Blah blah blah</p>
8271 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8275 Double interlanguage link, with prefix links (bug 8897)
8286 <p>Blah blah blah</p>
8287 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8288 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8292 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8300 <p>Blah blah blah</p>
8301 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8305 Parsoid-specific test: Wikilinks with should RT properly
8311 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8316 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8320 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8321 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8323 He&nbsp;llo [[Foo|He&nbsp;llo]]
8325 He&nbsp;llo [[He&nbsp;llo]]
8329 Parsoid: handle constructor well
8335 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8336 </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>
8339 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8341 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8350 # Note that `ko` isn't a known interlanguage prefix
8352 Parsoid: recognize interlanguage links without a target page
8362 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8364 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8367 # Note that `ko` isn't a known interwiki prefix
8369 Parsoid: recognize interwiki links without a target page
8371 parsoid=wt2html,wt2wt,html2html
8377 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8378 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8381 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8382 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8386 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8390 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8393 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8397 Interlanguage link with preceding local interwiki link (bug 68085)
8399 parsoid=wt2html,wt2wt,html2html
8402 [[local:es:Spanish]]
8405 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8409 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8413 Looks like an interlanguage link, but is actually a local interwiki
8415 parsoid=wt2html,wt2wt,html2html
8421 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8425 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8429 ### Redirects, Parsoid-only
8433 1. Simple redirect to page
8435 #REDIRECT [[Main Page]]
8437 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8441 2. Other redirect variants
8443 #REDIRECT [[Main_Page]]
8445 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8448 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8449 # This tests the Parsoid bail-out code.
8451 3. Other redirect variants
8453 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8455 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8459 4. Redirect to a templated destination
8461 #REDIRECT [[{{echo|Foo}}bar]]
8463 <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"}]]}'/>
8469 parsoid=wt2html,wt2wt
8474 <li>REDIRECT [[]]</li></ol>
8478 Optional colon in #REDIRECT
8480 # the colon is archaic syntax. we support it for wt2html, but we
8481 # don't care that it roundtrips back to the modern syntax.
8482 parsoid=wt2html,html2html
8484 #REDIRECT:[[Main Page]]
8486 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8490 Whitespace in #REDIRECT with optional colon
8492 # the colon and gratuitous whitespace is archaic syntax. we support
8493 # it for wt2html, but we don't care that it roundtrips back to the
8494 # modern syntax (without extra whitespace)
8495 parsoid=wt2html,html2html
8502 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8506 Piped link in #REDIRECT
8508 # content after piped link is ignored. we support this syntax,
8509 # but don't care that the piped link is lost when we roundtrip this.
8512 #REDIRECT [[Main Page|bar]]
8514 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8518 Redirect to category (T104502)
8520 parsoid=wt2html,wt2wt
8522 #REDIRECT [[Category:Foo]]
8524 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8528 Redirect to category with URL encoding (T104502)
8532 #REDIRECT [[Category%3AFoo]]
8534 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8538 Redirect to category page
8540 #REDIRECT [[:Category:Foo]]
8542 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8546 Redirect to image page (1)
8548 #REDIRECT [[File:Wiki.png]]
8550 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8554 Redirect to image page (2)
8556 #REDIRECT [[Image:Wiki.png]]
8558 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8561 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8562 # Next test confirms this.
8564 Redirect to language (1) (T104918)
8566 parsoid=wt2html,wt2wt,html2html
8568 #REDIRECT [[en:File:Wiki.png]]
8570 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8574 Redirect to language (2) (T104918)
8576 #REDIRECT [[:en:File:Wiki.png]]
8578 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8582 Redirect to interwiki (T104918)
8584 #REDIRECT [[meatball:File:Wiki.png]]
8586 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8590 Non-English #REDIRECT
8594 #TILVÍSUN [[Main Page]]
8596 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8600 Redirect syntax under text isn't considered a redirect
8603 #redirect [[Main Page]]
8606 <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>
8609 # FIXME: Should hoist the redirect to the top of the page and ensure there
8616 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8636 Broken br tag sanitization
8644 # TODO: Fix html2html mode (bug 51055)!
8646 Parsoid: Broken br tag recognition
8659 Incorrecly removing closing slashes from correctly formed XHTML
8661 <br style="clear:both;" />
8663 <p><br style="clear:both;" />
8668 Failing to transform badly formed HTML into correct XHTML
8670 <br style="clear: left;">
8671 <br style="clear: right;">
8672 <br style="clear: both;">
8674 <p><br style="clear: left;" />
8675 <br style="clear: right;" />
8676 <br style="clear: both;" />
8680 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8681 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8683 Handling html with a div self-closing tag
8692 <p><div title />
8696 <p><div title=bar />
8697 <div title=bar/>
8699 <div title="bar/"></div>
8703 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8704 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8705 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8706 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8707 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8708 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8712 Handling html with a br self-closing tag
8739 Horizontal ruler (should it add that extra space?)
8754 Horizontal ruler -- 4+ dashes render hr
8763 Horizontal ruler -- eats additional dashes on the same line
8772 Horizontal ruler -- does not collapse dashes on consecutive lines
8783 Horizontal ruler -- <4 dashes render as plain text
8792 Horizontal ruler -- Supports content following dashes on same line
8804 ### Block-level elements
8813 <ul><li>Common list</li>
8815 <li>item 3</li></ul>
8826 <ol><li>Numbered list</li>
8828 <li> item 3</li></ol>
8842 ***#Number on level 4
8844 **#Number on level 3
8845 **#Number on level 3
8849 #** Level 3, but ordered
8852 <ol><li> with numbers</li></ol>
8853 <ul><li> and bullets</li></ul>
8854 <ol><li> and numbers</li></ol></li>
8856 <ul><li>bullet level 2
8857 <ul><li>bullet level 3
8858 <ol><li>Number on level 4</li></ol></li></ul></li>
8860 <ol><li>Number on level 3</li>
8861 <li>Number on level 3</li></ol></li></ul>
8862 <ol><li>number level 2</li></ol></li>
8864 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8865 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8870 1. Nested mixed wikitext and html list
8873 * <ul><li>ho</li></ul>
8878 <li> <ul><li>ho</li></ul></li>
8880 <ul><li> ho</li></ul></li></ul>
8884 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
8886 <ul><li> ho</li></ul></li></ul>
8890 2. Nested mixed wikitext and html list (incompatible)
8893 : {{echo|<li>ho</li>}}
8896 <dd> <li>ho</li></dd></dl>
8900 <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>
8910 <ul><li>bar</li></ul></li></ul>
8920 <ul><li><ul><li>foo</li></ul></li>
8926 Nested lists 3 (first element empty)
8932 <ul><li>bar</li></ul></li></ul>
8937 Nested lists 4 (first element empty)
8942 <ul><li><ul><li></li></ul></li>
8948 Nested lists 5 (both elements empty)
8953 <ul><li><ul><li></li></ul></li>
8959 Nested lists 6 (both elements empty)
8965 <ul><li></li></ul></li></ul>
8970 Nested lists 7 (skip initial nesting levels)
8974 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8979 Nested lists 8 (multiple nesting transitions)
8987 <ul><li><ul><li> bar</li></ul></li>
8988 <li> baz</li></ul></li>
8994 Nested lists 9 (extension interaction)
9000 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9004 1. Lists with start-of-line-transparent tokens before bullets: Comments
9017 2. Lists with start-of-line-transparent tokens before bullets: Template close
9022 <ul><li>foo bar</li>
9028 List items are not parsed correctly following a <pre> block (bug 785)
9034 <ul><li> <pre>foo</pre></li>
9035 <li> <pre>bar</pre></li>
9039 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9040 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9045 List items from template
9056 * notSOL{{inner list}}
9059 <ul><li> item 1</li>
9060 <li> item 2</li></ul>
9061 <ul><li> item 0</li>
9063 <li> item 2</li></ul>
9064 <ul><li> item 0</li>
9067 <li> item 2</li></ul>
9072 List interrupted by empty line or heading
9080 <ul><li> foo</li></ul>
9081 <ul><li><ul><li> bar</li></ul></li></ul>
9082 <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>
9083 <ul><li> Another list item</li></ul>
9088 Multiple list tags generated by templates
9109 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9112 <!--This line will NOT split the list-->
9114 <!--This line will NOT split the list either-->
9116 <!--foo--> <!----> <!--This line NOT split the list either-->
9127 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9130 <!--This line will NOT split the list-->
9132 <!--This line will NOT split the list either-->
9134 <!--foo--> <!----> <!--This line NOT split the list
9147 (The PHP parser relies on Tidy for the hack)
9149 parsoid=wt2html,wt2wt
9153 * {{echo|<li>templated li-hack}}
9154 * <!--foo--> <li> unsupported li-hack with preceding comments
9157 <li><li>not a li-hack
9164 <li>templated li-hack</li>
9165 <li>unsupported li-hack with preceding comments</li>
9168 <li>not a li-hack</li>
9173 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9200 Parsoid: Test of whitespace serialization with Templated bullets
9207 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9211 # ------------------------------------------------------------------------
9212 # The next set of tests are about Parsoid's ability to handle badly nested
9213 # tags (parse, minimize scope of fixup, and roundtrip back)
9214 # ------------------------------------------------------------------------
9217 Unbalanced closing block tags break a list
9218 (php parser relies on Tidy to fix up)
9236 # Parsoid fails this test, but it might be tricky to support properly.
9239 Unbalanced closing non-block tags don't break a list
9240 (php parser relies on Tidy to fix up)
9247 <li><span>a</span></li>
9248 <li><span>b</span></li>
9262 Unclosed formatting tags that straddle lists are closed and reopened
9263 (php parser relies on Tidy to fix up)
9265 parsoid=wt2html,wt2wt,html2html
9275 <ol><li> <s> a</s></li>
9276 <li><s> b </s></li></ol>
9281 1. List embedded in a formatting tag
9288 <li><small>foo</small></li>
9298 ## Ugly Parsoid output here
9299 ## Not sure what the right output is.
9301 2. List embedded in a formatting tag
9308 <li><small>a</small></li>
9309 <li><small>b</small></li>
9316 <li><small>b</small></li>
9320 # Ugly Parsoid and PHP parser output here
9321 # Not sure if we want to make this a test!
9324 ## 3. Unclosed formatting tags in list elements
9330 ## <li><small>a</small></li>
9331 ## <li><small><small>b</small></small></li>
9335 ## <li><small>a</small></li>
9337 ## <li><small>b</small></li>
9341 # This is a bug in the PHP parser + tidy combination.
9342 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9343 # and then fostered out of the table by tidy.)
9344 # We believe the Parsoid output to be correct.
9346 Table with missing opening <tr> tag
9348 parsoid=wt2html,wt2wt
9366 # Note that the current date is hard-coded as
9367 # 1970-01-01T00:02:03Z (a Thursday)
9368 # when running parser tests. The timezone is also fixed to GMT, so
9369 # local date will be identical to current date.
9372 Magic Word: {{CURRENTDAY}}
9381 Magic Word: {{CURRENTDAY2}}
9390 Magic Word: {{CURRENTDAYNAME}}
9399 Magic Word: {{CURRENTDOW}}
9408 Magic Word: {{CURRENTMONTH}}
9417 Magic Word: {{CURRENTMONTH1}}
9426 Magic Word: {{CURRENTMONTHABBREV}}
9428 {{CURRENTMONTHABBREV}}
9435 Magic Word: {{CURRENTMONTHNAME}}
9437 {{CURRENTMONTHNAME}}
9444 Magic Word: {{CURRENTMONTHNAMEGEN}}
9446 {{CURRENTMONTHNAMEGEN}}
9453 Magic Word: {{CURRENTTIME}}
9462 Magic Word: {{CURRENTHOUR}}
9471 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9480 Magic Word: {{CURRENTYEAR}}
9489 Magic Word: {{CURRENTTIMESTAMP}}
9491 {{CURRENTTIMESTAMP}}
9498 Magic Words LOCAL (UTC)
9502 * {{LOCALMONTHNAME}}
9503 * {{LOCALMONTHNAMEGEN}}
9504 * {{LOCALMONTHABBREV}}
9513 * {{LOCALTIMESTAMP}}
9528 <li> 19700101000203</li></ul>
9533 Magic Word: {{FULLPAGENAME}}
9535 title=[[User:Ævar Arnfjörð Bjarmason]]
9539 <p>User:Ævar Arnfjörð Bjarmason
9544 Magic Word: {{FULLPAGENAMEE}}
9546 title=[[User:Ævar Arnfjörð Bjarmason]]
9550 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9555 Magic Word: {{TALKSPACE}}
9557 title=[[User:Ævar Arnfjörð Bjarmason]]
9566 Magic Word: {{TALKSPACE}}, same namespace
9568 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9577 Magic Word: {{TALKSPACE}}, main namespace
9579 title=[[Parser Test]]
9588 Magic Word: {{TALKSPACEE}}
9590 title=[[User:Ævar Arnfjörð Bjarmason]]
9599 Magic Word: {{SUBJECTSPACE}}
9601 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9610 Magic Word: {{SUBJECTSPACE}}, same namespace
9612 title=[[User:Ævar Arnfjörð Bjarmason]]
9621 Magic Word: {{SUBJECTSPACE}}, main namespace
9623 title=[[Parser Test]]
9631 Magic Word: {{SUBJECTSPACEE}}
9633 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9642 Magic Word: {{NAMESPACE}}
9644 title=[[User:Ævar Arnfjörð Bjarmason]]
9653 Magic Word: {{NAMESPACEE}}
9655 title=[[User:Ævar Arnfjörð Bjarmason]]
9664 Magic Word: {{NAMESPACENUMBER}}
9666 title=[[User:Ævar Arnfjörð Bjarmason]]
9675 Magic Word: {{SUBPAGENAME}}
9677 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9686 Magic Word: {{SUBPAGENAMEE}}
9688 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9697 Magic Word: {{ROOTPAGENAME}}
9699 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9703 <p>Ævar Arnfjörð Bjarmason
9708 Magic Word: {{ROOTPAGENAMEE}}
9710 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9714 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9719 Magic Word: {{BASEPAGENAME}}
9721 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9725 <p>Ævar Arnfjörð Bjarmason
9730 Magic Word: {{BASEPAGENAMEE}}
9732 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9736 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9741 Magic Word: {{TALKPAGENAME}}
9743 title=[[User:Ævar Arnfjörð Bjarmason]]
9747 <p>User talk:Ævar Arnfjörð Bjarmason
9752 Magic Word: {{TALKPAGENAMEE}}
9754 title=[[User:Ævar Arnfjörð Bjarmason]]
9758 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9763 Magic Word: {{SUBJECTPAGENAME}}
9765 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9769 <p>User:Ævar Arnfjörð Bjarmason
9774 Magic Word: {{SUBJECTPAGENAMEE}}
9776 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9778 {{SUBJECTPAGENAMEE}}
9780 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9785 Magic Word: {{NUMBEROFFILES}}
9794 Magic Word: {{PAGENAME}}
9796 title=[[User:Ævar Arnfjörð Bjarmason]]
9800 <p>Ævar Arnfjörð Bjarmason
9805 Magic Word: {{PAGENAME}} with metacharacters
9807 title=[['foo & bar = baz']]
9811 <p><i>'foo & bar = baz'</i>
9814 <p><i>'foo & bar = baz'</i></p>
9818 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9820 title=[[*RFC 1234 http://example.com/]]
9824 <p>*RFC 1234 http://example.com/
9827 <p>*RFC 1234 http://example.com/</p>
9831 Magic Word: {{PAGENAMEE}}
9833 title=[[User:Ævar Arnfjörð Bjarmason]]
9837 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9842 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9844 title=[[*RFC 1234 http://example.com/]]
9848 <p>*RFC_1234_http://example.com/
9851 <p>*RFC_1234_http://example.com/</p>
9855 Magic Word: {{REVISIONID}}
9864 Magic Word: {{SCRIPTPATH}}
9872 Magic Word: {{STYLEPATH}}
9881 Magic Word: {{SERVER}}
9885 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9890 Magic Word: {{SERVERNAME}}
9899 Magic Word: {{SITENAME}}
9908 Case-sensitive magic words, when cased differently, should just be template transclusions
9915 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9916 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9917 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9918 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9923 Case-insensitive magic words should still work with weird casing.
9933 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9937 # From plwiki:PLOS_ONE
9939 Parsoid: Page property magic word with magic word contents
9941 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9943 <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>"}]]}'/>
9947 Parsoid: Template-generated DISPLAYTITLE
9949 {{{{echo|DISPLAYTITLE}}:Foo}}
9951 <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}}]}'/>
9955 Namespace 1 {{ns:1}}
9964 Namespace 1 {{ns:01}}
9973 Namespace 0 {{ns:0}} (bug 4783)
9981 Namespace 0 {{ns:00}} (bug 4783)
9989 Namespace -1 {{ns:-1}}
9998 Namespace User {{ns:User}}
10007 Namespace User talk {{ns:User_talk}}
10016 Namespace User talk {{ns:uSeR tAlK}}
10025 Namespace File {{ns:File}}
10034 Namespace File {{ns:Image}}
10043 Namespace (lang=de) Benutzer {{ns:User}}
10054 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10060 <p>Benutzer Diskussion
10068 {{urlencode:hi world?!}}
10069 {{urlencode:hi world?!|WIKI}}
10070 {{urlencode:hi world?!|PATH}}
10071 {{urlencode:hi world?!|QUERY}}
10081 Magic Word: prioritize type info over data-parsoid
10085 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10091 Magic Word: serialize on separate line (parsoid)
10093 parsoid=wt2wt,html2wt
10099 foo<meta property="mw:PageProp/notoc"/>bar
10103 Magic Word: rt non-english wikis
10110 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10114 __proto__ is treated as normal wikitext (T105997)
10126 Magic links: internal link to RFC (bug 479)
10130 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10133 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10137 Magic links: RFC (bug 479)
10141 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10144 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10148 Magic links: RFC (bug 65278)
10150 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10152 <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.
10155 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10159 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10161 RFC      822
10165 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10170 <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>
10176 Magic links: ISBN (bug 1937)
10180 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10183 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10187 Magic links: ISBN (bug 65278)
10189 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10191 <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.
10194 <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>
10198 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10200 ISBN      978 0 316 09811 3
10206 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10213 <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>
10221 Magic links: PMID incorrectly converts space to underscore
10225 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10228 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10232 Magic links: PMID (bug 65278)
10234 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10236 <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.
10239 <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>
10243 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10245 PMID      1234
10249 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10254 <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>
10259 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10260 # since these are ExtLinkText, not MagicLinkText
10262 Magic links: use appropriate serialization for "almost" magic links.
10264 X[[Special:BookSources/0978739256|foo]]
10266 X[//tools.ietf.org/html/rfc1234 foo]
10268 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10269 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10272 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10273 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10281 Nonexistent template
10283 {{thistemplatedoesnotexist}}
10285 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10290 Template with invalid target containing tags
10292 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10294 <p>{{a<b>b</b>|foo|a=b|a = b}}
10299 Template with invalid target containing unclosed tag
10301 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10303 <p>{{a<b>|foo|a=b|a = b}}</b>
10308 Template with invalid target containing wikilink
10312 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10315 <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>
10319 Template with just whitespace in it, bug #68421
10323 <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>
10329 This is a test template
10337 <p>This is a test template
10342 Template with explicit namespace
10346 <p>This is a test template
10354 This is a test template with parameter {{{param}}}
10360 {{paramtest|param=foo}}
10362 <p>This is a test template with parameter foo
10367 Template:paramtestnum
10369 [[{{{1}}}|{{{2}}}]]
10373 Template unnamed parameter
10375 {{paramtestnum|Main Page|the main page}}
10377 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10382 Template:templatesimple
10388 Template:templateredirect
10390 #redirect [[Template:templatesimple]]
10394 Template:templateasargtestnum
10400 Template:templateasargtest
10402 {{template{{{templ}}}}}
10406 Template:templateasargtest2
10412 Template with template name as unnamed argument
10414 {{templateasargtestnum|templatesimple}}
10421 Template with template name as argument
10423 {{templateasargtest|templ=simple}}
10430 Template with template name as argument (2)
10432 {{templateasargtest2|templ=templatesimple}}
10439 Template:templateasargtestdefault
10441 {{{{{templ|templatesimple}}}}}
10451 Template with default value
10453 {{templateasargtestdefault}}
10460 Template with default value (value set)
10462 {{templateasargtestdefault|templ=templa}}
10471 {{templateredirect}}
10476 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10480 Template with argument in separate line
10482 {{ templateasargtest |
10490 Template with complex template as argument
10493 param ={{ templateasargtest |
10494 templ = simple }}}}
10496 <p>This is a test template with parameter (test)
10501 Template with thumb image (with link in description)
10503 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10505 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>
10508 <p>This is a test template with parameter</p>
10509 <div class="thumb tright">
10510 <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>
10511 <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>
10515 <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>
10519 Template:complextemplate
10521 {{{1}}} {{paramtest|
10522 param ={{{param}}}}}
10526 Template with complex arguments
10529 param ={{ templateasargtest |
10530 templ = simple }}|[[Template:complextemplate|link]]}}
10532 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10537 BUG 553: link with two variables in a piped link
10540 |[[{{{1}}}|{{{2}}}]]
10545 <td>[[{{{1}}}|{{{2}}}]]
10550 <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>
10555 Abort table cell attribute parsing on wikilink
10558 | testing [[one|two]] | three || four
10559 | testing one two | three || four
10560 | testing="[[one|two]]" | three || four
10565 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10571 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10577 <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>
10578 <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>
10579 <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>
10584 Don't abort table cell attribute parsing if wikilink is found in template arg
10587 | Test {{#tag:ref|One two "[[three]]" four}}
10591 <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>
10596 Magic variable as template parameter
10598 {{paramtest|param={{SITENAME}}}}
10600 <p>This is a test template with parameter MediaWiki
10607 [[{{{param}}}|link]]
10611 Template parameter as link source
10613 {{linktest|param=Main Page}}
10615 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10620 Template:paramtest2
10622 including another template, {{paramtest|param={{{arg}}}}}
10626 Template passing argument to another template
10628 {{paramtest2|arg='hmm'}}
10630 <p>including another template, This is a test template with parameter 'hmm'
10641 Template as link source
10645 [[{{linktest2}}|Main Page]]
10647 [[{{linktest2}}]]Page
10649 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10650 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10651 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10669 Template infinite loop
10673 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10678 Template from main namespace
10697 BUG 529: Template with table, not included at beginning of line
10716 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10736 BUG 41: Template parameters shown as broken links
10745 Template with targets containing wikilinks
10749 {{[[{{echo|foo}}]]}}
10751 {{{{echo|[[foo}}]]}}
10753 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10754 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10766 Templates: Double quotes as template target
10773 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10777 ## This test is about making sure Parsoid's data-mw is well formed in the
10778 ## face of multiple templates with intersecting and overlapping ranges. The
10779 ## wikitext itself is wretched.
10781 Templates with intersecting and overlapping ranges
10806 <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":""}]]}'>
10808 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
10810 <tbody><tr><td>hi</td></tr>
10815 Template:MSGNW test
10817 ''None'' of '''this''' should be
10819 but rather passed unmodified
10827 # hmm, fix this or just deprecate msgnw and document its behavior?
10831 {{msgnw:MSGNW test}}
10833 <p>''None'' of '''this''' should be
10835  but rather passed unmodified
10836 {{test}}
10840 <!-- comment -->
10847 {{int:youhavenewmessages|lots of money|not!}}
10849 <p>You have lots of money (not!).
10854 int keyword - non-existing message
10865 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10869 <includeonly> and <noinclude> being included
10880 <onlyinclude>Foo</onlyinclude>bar
10884 <onlyinclude> being included
10896 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10900 <onlyinclude> and <includeonly> being included
10909 <includeonly> and <noinclude> on a page
10911 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10918 Un-closed <noinclude>
10925 <onlyinclude> on a page
10927 <onlyinclude>Foo</onlyinclude>bar
10934 Un-closed <onlyinclude>
10941 Self-closed noinclude, includeonly, onlyinclude tags
10952 Unbalanced includeonly and noinclude tags
10956 |b</noinclude></noinclude>
10957 |c</noinclude></includeonly>
10958 |d</includeonly></includeonly>
10967 <td>c</includeonly>
10969 <td>d</includeonly></includeonly>
10975 Template:Includeonly section
10978 ==Includeonly section==
10984 Bug 6563: Edit link generation for section shown by <includeonly>
10986 {{includeonly section}}
10988 <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>
10989 <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>
10993 # Uses same input as the contents of [[Template:Includeonly section]]
10995 Bug 6563: Section extraction for section shown by <includeonly>
11000 ==Includeonly section==
11008 Bug 6563: Edit link generation for section suppressed by <includeonly>
11011 ==Includeonly section==
11015 <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>
11020 Bug 6563: Section extraction for section suppressed by <includeonly>
11025 ==Includeonly section==
11033 Un-closed <includeonly>
11038 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11041 ## We used to, but no longer wt2wt this test since the default serializer
11042 ## will normalize the include directives to serialize on their own line.
11043 ## Selser will take care of preserving formatting in scenarios where they
11044 ## intermingled with other wikitext.
11046 Includes and comments at SOL
11048 parsoid=wt2html,html2html
11050 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11054 </noinclude>* stuff
11057 <includeonly>can have stuff</includeonly>=== here ===
11060 <h2><span class="mw-headline" id="hu">hu</span></h2>
11063 <ul><li> stuff</li>
11064 <li> here</li></ul>
11065 <h3><span class="mw-headline" id="here">here</span></h3>
11068 <!-- 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>
11070 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11072 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11073 <li> here</li></ul>
11075 <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>
11079 # TODO: test with DOM fragment reuse!
11081 Parsoid: DOM fragment reuse
11083 parsoid=wt2wt,wt2html
11085 a{{echo|b<table></table>c}}d
11097 <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>
11099 <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">
11100 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11101 </span><p about="#mwt2">cd</p>
11103 <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">
11105 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11107 </span><p about="#mwt3">b</p>
11111 Parsoid: Merge double tds (T52603)
11116 |{{echo|{{!}} foo}}
11120 <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>
11125 Parsoid: Merge double tds in nested transclusion content (T52603)
11131 |{{echo|{{!}} foo}}
11135 <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}}]}'>
11137 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11143 ### <includeonly> and <noinclude> in attributes
11146 0. includeonly around the entire attribute
11148 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11150 <p><span id="v2">bar</span>
11155 1. includeonly in html attr key
11157 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11159 <p><span id="foo">bar</span>
11164 2. includeonly in html attr value
11166 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11167 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11169 <p><span id="v1">bar</span>
11170 <span id="v1">bar</span>
11175 3. includeonly in part of an attr value
11177 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11179 <p><span style="color:red;">bar</span>
11184 4. includeonly in table attributes
11208 ### Token Stream Patcher tests
11210 ### These tests won't always pass wt2wt and other modes because
11211 ### on serialization, the table will be output on a new line.
11212 ### For now, we are blacklisting them, and using this to test selser.
11216 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11218 parsoid=wt2html,wt2wt
11220 {{echo|}}{| width = '100%'
11224 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11225 <tbody><tr><td>foo</td></tr>
11229 ## We used to, but no longer wt2wt this test since the default serializer
11230 ## will normalize the include directives to serialize on their own line.
11231 ## Selser will take care of preserving formatting in scenarios where they
11232 ## intermingled with other wikitext.
11234 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11238 <includeonly>a</includeonly>{| {{{b}}}
11242 <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":""}]]}'>
11243 <tbody><tr><td>c</td></tr>
11248 ### Testing parsing of templates where a template arg
11249 ### has the same name as the template itself.
11255 {{{quote|{{{1}}}}}}
11259 Templates: Template Name/Arg clash: 1. Use of positional param
11268 Templates: Template Name/Arg clash: 2. Use of named param
11270 {{quote|quote=foo}}
11277 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11286 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11290 Templates: 1. Simple use
11299 Templates: 2. Inside a block tag
11301 <div>{{echo|Foo}}</div>
11302 <blockquote>{{echo|Foo}}</blockquote>
11305 <blockquote>Foo</blockquote>
11315 Templates: P-wrapping: 1a. Templates on consecutive lines
11326 Templates: P-wrapping: 1b. Templates on consecutive lines
11340 Templates: P-wrapping: 1c. Templates on consecutive lines
11343 {{echo|bar}} <div>baz</div>
11356 Templates: P-wrapping: 1d. Template preceded by comment-only line
11365 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11369 Templates: Inline Text: 1. Multiple template uses
11371 {{echo|Foo}}bar{{echo|baz}}
11378 Templates: Inline Text: 2. Back-to-back template uses
11380 {{echo|Foo}}{{echo|bar}}
11387 Templates: Block Tags: 1. Multiple template uses
11389 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11391 <div>Foo</div><div>bar</div><div>baz</div>
11396 Templates: Block Tags: 2. Back-to-back template uses
11398 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11400 <div>Foo</div><div>bar</div>
11404 # This is an edge case relating to paragraph wrapping.
11406 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11411 <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
11416 Templates: Links: 1. Simple example
11418 {{echo|[[Foo|bar]]}}
11420 <p><a href="/wiki/Foo" title="Foo">bar</a>
11425 Templates: Links: 2. Generation of link href
11427 [[{{echo|Foo}}|bar]]
11429 <p><a href="/wiki/Foo" title="Foo">bar</a>
11434 Templates: Links: 3. Generation of part of a link href
11436 [[Fo{{echo|o}}|bar]]
11438 [[Foo{{echo|bar}}]]
11440 [[Foo{{echo|bar}}baz]]
11442 [[Foo{{echo|bar}}|bar]]
11444 [[:Foo{{echo|bar}}]]
11446 [[:Foo{{echo|bar}}|bar]]
11448 <p><a href="/wiki/Foo" title="Foo">bar</a>
11449 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11450 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11451 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11452 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11453 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11458 Templates: Links: 4. Multiple templates generating link href
11460 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11462 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11467 Templates: Links: 5. Generation of link text
11469 [[Foo|{{echo|bar}}]]
11471 <p><a href="/wiki/Foo" title="Foo">bar</a>
11476 Templates: Links: 5. Nested templates (only outermost template should be marked)
11478 {{echo|[[{{echo|Foo}}|bar]]}}
11480 <p><a href="/wiki/Foo" title="Foo">bar</a>
11485 Templates: HTML Tag: 1. Generation of HTML attr. key
11487 <div {{echo|style}}="color:red;">foo</div>
11489 <div style="color:red;">foo</div>
11494 Templates: HTML Tag: 2. Generation of HTML attr. value
11496 <div style={{echo|'color:red;'}}>foo</div>
11498 <div style="color:red;">foo</div>
11503 Templates: HTML Tag: 3. Generation of HTML attr key and value
11505 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11507 <div style="color:red;">foo</div>
11512 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11514 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11516 <div title="This is a long title with just one piece templated">foo</div>
11521 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11523 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11525 <div title="This is a long title with just one piece templated">foo</div>
11530 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11532 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11534 <div title="This is a long title with just one piece templated">foo</div>
11538 # SSS FIXME: While it is great we added support for all this,
11539 # do we want to make this part of the spec? Maybe we want to
11540 # deprecate this kind of usage in the future?
11542 Templates: HTML Tag: 7. Generation of partial attribute key string
11544 <div st{{echo|yle}}="color:red;">foo</div>
11546 <div style="color:red;">foo</div>
11551 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11553 <div {{echo|1=id="v1"}}>bar</div>
11555 <div id="v1">bar</div>
11560 Templates: HTML Tag: 9. Multiple template-generated attributes
11562 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11564 <div id="v1" title="foo">bar</div>
11569 Templates: Support for templates generating attributes and content
11571 {| {{mixed_attr_content_template}}
11576 <table style="color:red;" title="T48811">
11586 <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|}"]}'>
11595 1. Entities and nowikis inside templated attributes should be handled correctly
11597 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11599 <div style="background:#f9f9f9;">foo</div>
11602 <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>
11606 2. Entities and nowikis inside templated attributes should be handled correctly
11609 |{{table_attribs_3}}
11614 <td style="background:#f9f9f9;">Foo
11619 <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>
11624 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11627 |{{table_attribs_3}}
11632 <td style="background:#f9f9f9;">Foo
11636 <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}}]}'>
11637 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11643 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11646 | {{table_attribs_6}} hi
11651 <td style="background: red;"> hi
11656 <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>
11661 Templates: HTML Tables: 1. Generating start of a HTML table
11663 {{echo|<table><tr><td>foo</td>}}</tr></table>
11665 <table><tr><td>foo</td></tr></table>
11670 Templates: HTML Tables: 2a. Generating middle of a HTML table
11672 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11674 <table><tr><td>foo</td></tr></table>
11679 Templates: HTML Tables: 2b. Generating middle of a HTML table
11681 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11683 <table><tr><td>foo</td></tr></table>
11688 Templates: HTML Tables: 3. Generating end of a HTML table
11690 <table><tr>{{echo|<td>foo</td></tr></table>}}
11692 <table><tr><td>foo</td></tr></table>
11697 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11699 {{echo|<table>}}<tr><td>foo</td></tr></table>
11701 <table><tr><td>foo</td></tr></table>
11706 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11708 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11710 <table><tr><td>foo</td></tr></table>
11715 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11717 <table><tr>{{echo|<td>}}foo</td></tr></table>
11719 <table><tr><td>foo</td></tr></table>
11724 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11726 <table><tr><td>foo{{echo|</td>}}</tr></table>
11728 <table><tr><td>foo</td></tr></table>
11733 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11735 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11737 <table><tr><td>foo</td></tr></table>
11742 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11744 <table><tr><td>foo</td></tr>{{echo|</table>}}
11746 <table><tr><td>foo</td></tr></table>
11751 Templates: HTML Tables: 5. Proper fostering of categories from inside
11753 parsoid=wt2html,wt2wt
11755 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11756 <!--Two categories (Bug 50330)-->
11757 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11759 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11760 <!--Two categories (Bug 50330)-->
11761 <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>
11765 Templates: Wiki Tables: 1a. Fostering of entire template content
11773 <tr><td></td></tr></table>
11785 Templates: Wiki Tables: 1b. Fostering of entire template content
11798 <tr><td></td></tr></table>
11812 Templates: Wiki Tables: 2. Fostering of partial template content
11822 <tr><td></td></tr></table>
11835 Templates: Wiki Tables: 3. td-content via multiple templates
11838 {{echo|{{pipe}}a}}{{echo|b}}
11849 Templates: Wiki Tables: 4. Templated tags, no content
11855 <tr><td></td></tr></table>
11860 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11874 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11887 ## This test case is very specific to Parsoid's internals
11888 ## and is hence only tested for Parsoid's code. Parsoid uses
11889 ## a <meta> marker tag for <ref> tags and they are expanded
11890 ## much later. We are verifying that this <meta> tag usage
11891 ## doesn't prevent foster parenting.
11893 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11895 {{PartialTable}}<ref>foo</ref>
11900 <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">
11904 <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>
11908 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11918 <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{{!}}}"]}'>
11919 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11923 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11928 Templates: Lists: Multi-line list-items via templates
11930 *{{echo|a {{nonexistent|
11932 *{{echo|b {{nonexistent|
11935 <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>
11936 <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>
11941 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11943 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11945 <p><i>ab</i>c<i>d</i>e
11950 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11951 (PHP parser generates misnested html)
11953 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11955 <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>
11959 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11960 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11962 parsoid=wt2html,wt2wt
11964 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11966 <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>
11967 <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>
11968 <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>
11972 Templates: Ugly nesting: 4. Divs opened/closed across templates
11974 a<div>b{{echo|c</div>d}}e
11985 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11991 |{{echo|foo</table>}}
11995 <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|}"]}'>
11999 <td>foo</td></tr></tbody></table><span about="#mwt1">
12000 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12005 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12015 <td>1. {{echo|foo </table>}}</td>
12017 <td>2. {{echo|baz </table>}}</td>
12030 <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>"]}'>
12035 <td>1. foo </td></tr></tbody></table></td>
12037 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12038 </span><span about="#mwt2">
12039 </span><span about="#mwt2">
12040 </span><span about="#mwt2">abc</span><span about="#mwt2">
12041 </span><span about="#mwt2">
12042 </span><span about="#mwt2">
12043 </span><span about="#mwt2">
12044 </span><span about="#mwt2">
12045 </span><span about="#mwt2">
12046 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12047 </span><span about="#mwt2">
12052 Templates: Ugly templates: 3. newline-only template parameter
12061 # This looks like a bug: a single newline triggers p/br for some reason.
12063 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12072 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12073 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12075 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12081 <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
12082 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12086 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12087 # that are "identical" and generate nesting cycles in the algorithm
12089 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12091 {{echo|<table><tr><td><table>}}
12095 <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"}'>
12096 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12097 </table></td></tr></tbody></table>
12101 Templates: Parameters substituted at the top-level
12103 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12105 <p><i>who</i> me? <b>never!</b>
12108 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12112 Parser Functions: 1. Simple example
12121 Parser Functions: 2. Nested use (only outermost should be marked up)
12130 ### Pre-save transform tests
12133 pre-save transform: subst:
12139 This is a test template
12143 pre-save transform: normal template
12153 pre-save transform: nonexistent template
12157 {{thistemplatedoesnotexist}}
12159 {{thistemplatedoesnotexist}}
12163 pre-save transform: subst magic variables
12172 # This is bug 89, which I fixed. -- wtm
12174 pre-save transform: subst: templates with parameters
12178 {{subst:paramtest|param="something else"}}
12180 This is a test template with parameter "something else"
12184 Template:nowikitest
12186 <nowiki>'''not wiki'''</nowiki>
12190 pre-save transform: nowiki in subst (bug 1188)
12194 {{subst:nowikitest}}
12196 <nowiki>'''not wiki'''</nowiki>
12200 Template:commenttest
12202 This template has <!-- a comment --> in it.
12206 pre-save transform: comment in subst (bug 1936)
12210 {{subst:commenttest}}
12212 This template has <!-- a comment --> in it.
12216 pre-save transform: unclosed tag
12220 <nowiki>'''not wiki'''
12222 <nowiki>'''not wiki'''
12226 pre-save transform: mixed tag case
12230 <NOwiki>'''not wiki'''</noWIKI>
12232 <NOwiki>'''not wiki'''</noWIKI>
12236 pre-save transform: unclosed comment in <nowiki>
12240 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12242 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12245 # Leading @ in this template definition works around a limitation
12246 # in parsoid's parserTests which otherwise strips the <span> from the
12247 # result (confusing it for a template wrapper)
12251 @<span onmouseover="alert('crap')">Oh no</span>
12255 (confirming safety of fix for subst bug 1936)
12257 {{Template:dangerous}}
12259 <p>@<span>Oh no</span>
12264 pre-save transform: comment containing gallery (bug 5024)
12268 <!-- <gallery>data</gallery> -->
12270 <!-- <gallery>data</gallery> -->
12274 pre-save transform: comment containing extension
12278 <!-- <tag>data</tag> -->
12280 <!-- <tag>data</tag> -->
12284 pre-save transform: comment containing nowiki
12288 <!-- <nowiki>data</nowiki> -->
12290 <!-- <nowiki>data</nowiki> -->
12294 pre-save transform: <noinclude> in subst (bug 3298)
12304 pre-save transform: <onlyinclude> in subst (bug 3298)
12308 {{subst:Includes2}}
12316 {{<includeonly>subst:</includeonly>Includes}}
12320 Template:SafeSubstTest
12322 {{<includeonly>safesubst:</includeonly>Includes}}
12326 bug 22297: safesubst: works during PST
12330 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12336 bug 22297: safesubst: works during normal parse
12345 subst: does not work during normal parse
12349 <p>{{subst:Includes}}
12354 pre-save transform: context links ("pipe trick")
12358 [[Article (context)|]]
12361 [[Bar:Article (context)|]]
12362 [[:Bar:Article (context)|]]
12364 [[|Article (context)]]
12368 [[Article (context)|Article]]
12369 [[Bar:Article|Article]]
12370 [[:Bar:Article|Article]]
12371 [[Bar:Article (context)|Article]]
12372 [[:Bar:Article (context)|Article]]
12374 [[Article (context)]]
12375 [[Bar:X (Y) Z|X (Y) Z]]
12376 [[:Bar:X (Y) Z|X (Y) Z]]
12380 pre-save transform: context links ("pipe trick") with interwiki prefix
12384 [[interwiki:Article|]]
12385 [[:interwiki:Article|]]
12386 [[interwiki:Bar:Article|]]
12387 [[:interwiki:Bar:Article|]]
12389 [[interwiki:Article|Article]]
12390 [[:interwiki:Article|Article]]
12391 [[interwiki:Bar:Article|Bar:Article]]
12392 [[:interwiki:Bar:Article|Bar:Article]]
12396 pre-save transform: context links ("pipe trick") with parens in title
12398 pst title=[[Somearticle (context)]]
12402 [[Article (context)|Article]]
12406 pre-save transform: context links ("pipe trick") with comma in title
12408 pst title=[[Someplace, Somewhere]]
12411 [[Otherplace, Elsewhere|]]
12412 [[Otherplace, Elsewhere, Anywhere|]]
12414 [[Otherplace, Somewhere|Otherplace]]
12415 [[Otherplace, Elsewhere|Otherplace]]
12416 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12420 pre-save transform: context links ("pipe trick") with parens and comma
12422 pst title=[[Someplace (IGNORED), Somewhere]]
12425 [[Otherplace (place), Elsewhere|]]
12427 [[Otherplace, Somewhere|Otherplace]]
12428 [[Otherplace (place), Elsewhere|Otherplace]]
12432 pre-save transform: context links ("pipe trick") with comma and parens
12434 pst title=[[Who, me? (context)]]
12437 [[Me, Myself, and I (1937 song)|]]
12439 [[Yes, you. (context)|Yes, you.]]
12440 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12444 pre-save transform: context links ("pipe trick") with namespace
12446 pst title=[[Ns:Somearticle]]
12450 [[Ns:Article|Article]]
12454 pre-save transform: context links ("pipe trick") with namespace and parens
12456 pst title=[[Ns:Somearticle (context)]]
12460 [[Ns:Article (context)|Article]]
12464 pre-save transform: context links ("pipe trick") with namespace and comma
12466 pst title=[[Ns:Somearticle, Context, Whatever]]
12470 [[Ns:Article, Context, Whatever|Article]]
12474 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12476 pst title=[[Ns:Somearticle, Context (context)]]
12480 [[Ns:Article (context)|Article]]
12484 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12486 pst title=[[Ns:Somearticle (IGNORED), Context]]
12490 [[Ns:Article, Context|Article]]
12494 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12498 [[Article(context)|]]
12499 [[Bar:Article(context)|]]
12500 [[:Bar:Article(context)|]]
12501 [[|Article(context)]]
12505 [[Article(context)|Article]]
12506 [[Bar:Article(context)|Article]]
12507 [[:Bar:Article(context)|Article]]
12508 [[Article(context)]]
12509 [[Bar:X(Y)Z|X(Y)Z]]
12510 [[:Bar:X(Y)Z|X(Y)Z]]
12514 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12518 [[Article (context)|]]
12519 [[Bar:Article (context)|]]
12520 [[:Bar:Article (context)|]]
12521 [[|Article (context)]]
12525 [[Article (context)|Article]]
12526 [[Bar:Article (context)|Article]]
12527 [[:Bar:Article (context)|Article]]
12528 [[Article (context)]]
12529 [[Bar:X (Y) Z|X (Y) Z]]
12530 [[:Bar:X (Y) Z|X (Y) Z]]
12534 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12538 [[Article(context)|]]
12539 [[Bar:Article(context)|]]
12540 [[:Bar:Article(context)|]]
12541 [[|Article(context)]]
12545 [[Article(context)|Article]]
12546 [[Bar:Article(context)|Article]]
12547 [[:Bar:Article(context)|Article]]
12548 [[Article(context)]]
12549 [[Bar:X(Y)Z|X(Y)Z]]
12550 [[:Bar:X(Y)Z|X(Y)Z]]
12554 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12558 [[Article (context), context|]]
12559 [[Article (context),context|]]
12560 [[Bar:Article (context), context|]]
12561 [[Bar:Article (context),context|]]
12562 [[:Bar:Article (context), context|]]
12563 [[:Bar:Article (context),context|]]
12565 [[Article (context), context|Article]]
12566 [[Article (context),context|Article]]
12567 [[Bar:Article (context), context|Article]]
12568 [[Bar:Article (context),context|Article]]
12569 [[:Bar:Article (context), context|Article]]
12570 [[:Bar:Article (context),context|Article]]
12574 pre-save transform: trim trailing empty lines
12578 Empty lines are trimmed
12584 Empty lines are trimmed
12588 pre-save transform: Signature expansion
12593 * <noinclude>~~~</noinclude>
12594 * <includeonly>~~~</includeonly>
12595 * <onlyinclude>~~~</onlyinclude>
12597 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12598 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12599 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12600 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12605 pre-save transform: Signature expansion in nowiki tags (bug 93)
12611 <nowiki>~~~~</nowiki>
12613 <includeonly><nowiki>~~~~</nowiki></includeonly>
12615 <noinclude><nowiki>~~~~</nowiki></noinclude>
12617 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12619 {{subst:Foo}} shall be converted to FOO
12621 As well as inside noinclude/onlyinclude
12622 <noinclude>{{subst:Foo}}</noinclude>
12623 <onlyinclude>{{subst:Foo}}</onlyinclude>
12625 But not inside includeonly
12626 <includeonly>{{subst:Foo}}</includeonly>
12630 <nowiki>~~~~</nowiki>
12632 <includeonly><nowiki>~~~~</nowiki></includeonly>
12634 <noinclude><nowiki>~~~~</nowiki></noinclude>
12636 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12638 FOO shall be converted to FOO
12640 As well as inside noinclude/onlyinclude
12641 <noinclude>FOO</noinclude>
12642 <onlyinclude>FOO</onlyinclude>
12644 But not inside includeonly
12645 <includeonly>{{subst:Foo}}</includeonly>
12649 Parsoid: Recognize nowiki with trailing space in tags
12653 <nowiki ><div>[[foo]]</nowiki >
12661 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12668 Parsoid: Recognize nowiki with odd capitalization
12672 <noWikI ><div>[[foo]]</Nowiki >
12674 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12679 Parsoid: Escape nowiki with trailing space in tags
12683 <p><nowiki > foo </nowiki ></p>
12684 <p>a<nowiki />b</p>
12685 <p>c<nowiki/ >d</p>
12687 <nowiki > foo </nowiki >
12695 Parsoid: Escape weird noWikI capitalizations
12699 <p><noWikI > foo </NoWikI ></p>
12701 <noWikI > foo </NoWikI >
12705 ### Message transform tests
12708 message transform: magic variables
12718 message transform: should not transform wiki markup
12728 message transform: <noinclude> in transcluded template (bug 4926)
12738 message transform: <onlyinclude> in transcluded template (bug 4926)
12748 {{#special:}} page name, known
12752 {{#special:Recentchanges}}
12754 Special:RecentChanges
12758 {{#special:}} page name with subpage, known
12762 {{#special:Recentchanges/param}}
12764 Special:RecentChanges/param
12768 {{#special:}} page name, unknown
12772 {{#special:foobar nonexistent}}
12774 Special:Foobar nonexistent
12778 {{#speciale:}} page name, known
12782 {{#speciale:Recentchanges}}
12784 Special:RecentChanges
12788 {{#speciale:}} page name with subpage, known
12792 {{#speciale:Recentchanges/param}}
12794 Special:RecentChanges/param
12798 {{#speciale:}} page name, unknown
12802 {{#speciale:foobar nonexistent}}
12804 Special:Foobar_nonexistent
12810 ### For Parsoid-specific tests, see
12811 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12816 parsoid=wt2html,wt2wt,html2html
12818 [[Image:foobar.jpg]]
12820 <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>
12823 <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>
12827 Simple image (using File: namespace, now canonical)
12829 [[File:Foobar.jpg]]
12831 <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>
12834 <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>
12838 Right-aligned image
12840 [[File:Foobar.jpg|right]]
12842 <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>
12845 <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>
12851 [[File:Foobar.jpg|right|Caption text]]
12853 <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>
12856 <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>
12860 Image with caption, bug 53312 #1
12862 [[File:Foobar.jpg|right|Caption page stuff]]
12864 <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>
12867 <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>
12871 Image with caption, bug 53312 #2
12873 [[File:Foobar.jpg|right|Caption page=]]
12875 <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>
12878 <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>
12882 Image with caption, bug 53312 #3
12884 [[File:Foobar.jpg|right|Caption page=stuff]]
12886 <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>
12889 <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>
12893 Allow empty links in image captions (Bug 60753)
12897 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12902 <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>
12905 <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>
12907 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12908 </figcaption></figure>
12912 Titles in unlinked images (T23454)
12914 [[File:Foobar.jpg|link=|stuff]]
12916 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12921 Link with empty target
12930 Image with link trail
12932 Linktrails should not work for images: [[File:Foobar.jpg]]s
12934 <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
12937 <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>
12941 Image with empty attribute
12943 parsoid=wt2html,wt2wt,html2html
12945 [[File:Foobar.jpg|right||Caption text]]
12947 <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>
12950 <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>
12954 1. Block image with individual attributes from templates
12956 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12958 <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>
12961 <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>
12965 2. Block Image with individual attributes from templates
12967 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12969 <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>
12972 <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>
12976 3. Inline image with individual attributes from templates
12978 [[File:Foobar.jpg|{{echo|50px}}]]
12980 <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>
12983 <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>
12986 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12987 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12989 Image with multiple attributes from the same template
12991 [[File:Foobar.jpg|{{image_attribs}}]]
12993 <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>
12996 <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>
13000 Image with link tails
13004 123[[File:Foobar.jpg]]456
13005 123[[File:Foobar.jpg|right]]456
13006 123[[File:Foobar.jpg|thumb]]456
13008 <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
13010 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
13011 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
13014 <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>
13016 <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>
13018 <div class="thumb tright">
13019 <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>
13020 <div class="thumbcaption">
13021 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13027 <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>
13028 <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>
13029 <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>
13033 Image with multiple captions -- only last one is accepted
13035 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13037 <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>
13040 <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>
13044 Image with multiple widths -- use last
13046 [[File:Foobar.jpg|200px|300px|caption]]
13048 <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>
13051 <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>
13055 Image with multiple alignments -- use first (bug 48664)
13059 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13061 [[File:Foobar.jpg|middle|text-top|caption]]
13063 <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>
13064 <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>
13067 <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>
13068 <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>
13072 Image with width attribute at different positions
13074 [[File:Foobar.jpg|200px|right|Caption]]
13075 [[File:Foobar.jpg|right|200px|Caption]]
13076 [[File:Foobar.jpg|right|Caption|200px]]
13078 <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>
13079 <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>
13080 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
13083 <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>
13084 <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>
13085 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
13088 # a sad bit of backward-compatibility
13090 Image with size specified with pxpx (bug 13500, 51628)
13092 parsoid=wt2html,wt2wt,html2html
13094 [[File:Foobar.jpg|20pxpx]]
13095 [[File:Foobar.jpg|200x20pxpx]]
13097 <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>
13098 <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>
13101 <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>
13105 Image with link parameter, wiki target
13107 [[File:Foobar.jpg|link=Main Page]]
13109 <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>
13112 <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>
13115 # parsoid bug 49293 (part 1)
13117 Image with link parameter, URL target
13119 [[File:Foobar.jpg|link=http://example.com/]]
13121 <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>
13124 <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>
13127 # parsoid bug 49293 (part 2)
13129 Image with link parameter, protocol-less URL target
13131 [[File:Foobar.jpg|link=//example.com/]]
13133 <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>
13136 <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>
13140 Escaping non-block captions (T107435)
13143 "modes": ["wt2wt"],
13145 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13149 [[Image:Foobar.jpg|caption]]
13151 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13154 # wgExternalLinkTarget not supported by Parsoid
13156 Image with link parameter, wgExternalLinkTarget
13158 [[Image:foobar.jpg|link=http://example.com/]]
13160 wgExternalLinkTarget='foobar'
13162 <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>
13167 Image with link parameter, wgNoFollowLinks set to false
13169 [[Image:foobar.jpg|link=http://example.com/]]
13171 wgNoFollowLinks=false
13173 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13178 Image with link parameter, wgNoFollowDomainExceptions
13180 [[Image:foobar.jpg|link=http://example.com/]]
13182 wgNoFollowDomainExceptions='example.com'
13184 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13188 # wgExternalLinkTarget not supported by Parsoid
13190 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13192 [[Image:foobar.jpg|link=http://example.com/|Title]]
13194 wgExternalLinkTarget='foobar'
13196 <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>
13201 Image with empty link parameter
13203 [[File:Foobar.jpg|link=]]
13205 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13208 <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>
13212 Image with link parameter (wiki target) and unnamed parameter
13214 [[File:Foobar.jpg|link=Main_Page|Title]]
13216 <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>
13219 <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>
13223 Image with link parameter (URL target) and unnamed parameter
13225 [[File:Foobar.jpg|link=http://example.com/|Title]]
13227 <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>
13230 <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>
13234 Thumbnail image with link parameter
13237 parsoid=wt2html,wt2wt,html2html
13239 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13241 <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>
13244 <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>
13248 Manually-specified thumbnail image
13252 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13254 <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>
13257 <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>
13261 Manually-specified thumbnail image with explicit link to wiki page
13264 parsoid=wt2html,wt2wt,html2html
13266 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13268 <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>
13271 <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>
13275 Manually-specified thumbnail image with explicit link to url
13278 parsoid=wt2html,wt2wt,html2html
13280 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13282 <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>
13285 <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>
13289 Manually-specified thumbnail image with explicit no link
13292 parsoid=wt2html,wt2wt,html2html
13294 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13296 <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>
13299 <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>
13303 Manually-specified thumbnail image with explicit link and alt text
13306 parsoid=wt2html,wt2wt,html2html
13308 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13310 <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>
13313 <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>
13317 Image with frame and link
13319 parsoid=wt2html,wt2wt,html2html
13321 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13323 <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>
13326 <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>
13330 Image with frame and link and explicit alt
13332 parsoid=wt2html,wt2wt,html2html
13334 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13336 <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>
13339 <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>
13343 Image with wiki markup in implicit alt
13345 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13347 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13349 <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>
13350 </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>
13353 <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>
13355 <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>
13359 Alt image option should handle most kinds of wikitext without barfing
13361 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13363 <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>
13366 <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>
13369 ###################
13370 # Conflicting image format options.
13371 # First option specified should 'win'.
13372 # All three cases in each test should be identical.
13375 Image with 'frameless' first.
13377 parsoid=wt2html,wt2wt,html2html
13379 [[File:Foobar.jpg|frameless|caption]]
13381 [[File:Foobar.jpg|frameless|frame|caption]]
13383 [[File:Foobar.jpg|frameless|thumb|caption]]
13385 <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>
13386 </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>
13387 </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>
13390 <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>
13391 <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>
13392 <p><span class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
13396 Image with 'frame' first.
13398 parsoid=wt2html,wt2wt,html2html
13400 [[File:Foobar.jpg|frame|caption]]
13401 [[File:Foobar.jpg|frame|frameless|caption]]
13402 [[File:Foobar.jpg|frame|thumb|caption]]
13404 <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>
13405 <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>
13406 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
13409 <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>
13410 <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>
13411 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
13415 Image with 'thumb' first.
13417 parsoid=wt2html,wt2wt,html2html
13419 [[File:Foobar.jpg|thumb|caption]]
13420 [[File:Foobar.jpg|thumb|frameless|caption]]
13421 [[File:Foobar.jpg|thumb|frame|caption]]
13423 <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>
13424 <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>
13425 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
13428 <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>
13429 <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>
13430 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
13433 ###################
13435 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13436 # and https://phabricator.wikimedia.org/T64258
13437 # Foobar has actual size of 1941x220
13438 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13439 # a scalable format.
13440 # 2. Framed images always ignore size options; always render at default size.
13441 # 3. "Unspecified format" and border are the only types which can be
13445 Image: "unspecified format" and border enlarge
13447 parsoid=wt2html,wt2wt,html2html
13449 [[File:Foobar.jpg|2000px]]
13451 [[File:Foobar.jpg|border|2000px]]
13453 <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>
13454 </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>
13457 <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>
13458 <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>
13462 Image: "unspecified format" and border reduce
13464 parsoid=wt2html,wt2wt,html2html
13466 [[File:Foobar.jpg|1000px]]
13468 [[File:Foobar.jpg|border|1000px]]
13470 <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>
13471 </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>
13474 <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>
13475 <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>
13479 Image: thumbs reduce
13481 parsoid=wt2html,wt2wt,html2html
13483 [[File:Foobar.jpg|thumb|50px]]
13485 <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>
13488 <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>
13492 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13494 parsoid=wt2html,wt2wt,html2html
13496 [[File:Foobar.jpg|thumb|2000px]]
13498 [[File:Foobar.svg|thumb|2000px]]
13500 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
13501 <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>
13504 <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>
13505 <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>
13509 Image: frameless can reduce in size
13511 parsoid=wt2html,wt2wt,html2html
13513 [[File:Foobar.jpg|frameless|50px]]
13515 <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>
13518 <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>
13522 Image: bitmap frameless can't be enlarged past original size, but vector can
13524 parsoid=wt2html,wt2wt,html2html
13526 [[File:Foobar.jpg|frameless|2000px]]
13528 [[File:Foobar.svg|frameless|2000px]]
13530 <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>
13531 </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>
13534 <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>
13535 <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>
13539 Image: framed images are always unscaled.
13541 parsoid=wt2html,wt2wt,html2html
13543 [[File:Foobar.jpg|frame]]
13545 [[File:Foobar.jpg|frame|50px]]
13547 [[File:Foobar.jpg|frame|50x50px]]
13549 [[File:Foobar.jpg|frame|2000px]]
13551 <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>
13552 <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>
13553 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
13554 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
13557 <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>
13558 <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>
13559 <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>
13560 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
13563 ###################
13566 Link to image page- image page normally doesn't exists, hence edit link
13567 Add test with existing image page
13568 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13572 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13577 bug 18784 Link to non-existent image page with caption should use caption as link text
13579 [[:Image:test|caption]]
13581 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13586 Frameless image caption with a free URL
13588 [[File:Foobar.jpg|http://example.com]]
13590 <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>
13593 <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>
13597 Thumbnail image caption with a free URL
13601 [[File:Foobar.jpg|thumb|http://example.com]]
13603 <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>
13606 <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>
13610 Thumbnail image caption with a free URL and explicit alt
13613 parsoid=wt2html,wt2wt,html2html
13615 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13617 <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>
13620 <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>
13624 SVG thumbnails with no language set
13627 [[File:Foobar.svg|thumb|caption]]
13629 <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>
13632 <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>
13636 SVG thumbnails with language de
13638 parsoid=wt2html,wt2wt,html2html
13640 [[File:Foobar.svg|thumb|caption|lang=de]]
13642 <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>
13645 <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>
13649 SVG thumbnails with invalid language code
13651 parsoid=wt2html,wt2wt,html2html
13653 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13655 <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>
13658 <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>
13662 BUG 1887: A ISBN with a thumbnail
13664 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13666 <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>
13669 <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>
13673 BUG 1887: A RFC with a thumbnail
13675 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13677 <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>
13680 <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>
13684 BUG 1887: A mailto link with a thumbnail
13686 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13688 <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>
13691 <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>
13694 # Pending resolution to bug 368
13696 BUG 648: Frameless image caption with a link
13698 [[File:Foobar.jpg|text with a [[link]] in it]]
13700 <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>
13703 <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>
13707 BUG 648: Frameless image caption with a link (suffix)
13709 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13711 <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>
13714 <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>
13718 BUG 648: Frameless image caption with an interwiki link
13720 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13722 <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>
13725 <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>
13729 BUG 648: Frameless image caption with a piped interwiki link
13731 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13733 <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>
13736 <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>
13740 T107474: Frameless image caption with <nowiki>
13742 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13744 <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>
13748 Escape HTML special chars in image alt text
13750 [[File:Foobar.jpg|& < > "]]
13752 <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>
13755 <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>
13759 BUG 499: Alt text should have Ӓ, not &1234;
13761 [[File:Foobar.jpg|♀]]
13763 <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>
13766 <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>
13770 Broken image caption with link
13772 parsoid=wt2html,wt2wt,html2html
13774 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13776 <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.
13779 <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>
13783 Image caption containing another image
13785 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13787 <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>
13790 <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>
13794 Image: caption containing a newline
13796 [[File:Foobar.jpg|This
13799 <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>
13802 <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>
13806 Image: caption containing leading space
13807 (The leading space should not trigger nowiki escaping in wt2wt mode)
13809 [[File:Foobar.jpg|thumb| bar]]
13811 <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>
13814 <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>
13818 Image: caption containing a table
13820 parsoid=wt2html,wt2wt,html2html
13822 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13828 and some more text.]]
13830 <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>
13833 <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
13836 <tr><th>Foo </th><th>Bar</th></tr>
13839 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13843 Bug 3090: External links other than http: in image captions
13845 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13847 <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>
13850 <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>
13856 parsoid=wt2html,wt2wt,html2html
13858 [[Image:foobar.jpg|a|class=b]]
13860 <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>
13863 <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>
13867 Localized image handling (1).
13869 parsoid=wt2html,wt2wt,html2html
13872 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13874 <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>
13877 <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>
13881 Localized image handling (2).
13884 parsoid=wt2html,wt2wt,html2html
13887 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13889 <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>
13892 <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>
13896 Localized image handling (3).
13901 <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>
13903 [[File:Foobar.jpg|بندانگشتی]]
13907 "border", "frameless" and "class" attributes on an image.
13910 parsoid=wt2html,wt2wt,html2html
13912 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13914 <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>
13917 <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>
13920 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13922 Invalid image attributes (bug 62500)
13925 parsoid=wt2html,wt2wt,html2html
13927 [[File:Foobar.jpg|thumb|float|left|caption]]
13929 [[File:Foobar.jpg|thumb|righ|caption]]
13931 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13933 <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>
13934 <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>
13935 <div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
13938 <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>
13939 <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>
13940 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
13946 #REDIRECT [[File:Barfoo.jpg]]
13949 # FIXME: Parsoid should run this test -- but we'd need to teach the
13950 # mockAPI about the redirected Barfoo.jpg image.
13954 [[Image:Barfoo.jpg]]
13956 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg" class="mw-redirect">File:Barfoo.jpg</a>
13961 Missing image with uploads disabled
13965 [[File:Foobaz.jpg]]
13967 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13970 <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>
13973 # Parsoid-specific testing for images
13974 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13975 # Currently imperfect due to a flaw in the Parsoid testrunner
13977 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13981 Parsoid-specific image handling - simple image with size and middle alignment
13983 [[File:Foobar.jpg|middle|50px]]
13985 <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>
13989 Parsoid-specific image handling - simple image with size, middle alignment,
13990 non-standard namespace alias
13992 parsoid=wt2wt,wt2html,html2html
13994 [[Image:Foobar.jpg|middle|50px]]
13996 <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>
14000 Parsoid-specific image handling - simple image with size and middle alignment
14003 [[File:Foobar.jpg|50px|middle]]
14005 <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>
14009 Parsoid-specific image handling - simple image with size and middle alignment
14010 and non-standard namespace name
14012 parsoid=wt2html,wt2wt,html2html
14014 [[Image:Foobar.jpg|50px|middle]]
14016 <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>
14020 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14022 [[File:Foobar.jpg|500x10px|baseline|caption]]
14024 <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>
14028 Parsoid-specific image handling - simple image with border and size spec
14030 [[File:Foobar.jpg|50px|border|caption]]
14032 <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>
14036 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14038 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14040 <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>
14044 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14047 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14049 <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>
14053 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14055 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14057 <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>
14061 Parsoid-specific image handling - thumbnail with specific size, halign,
14062 valign, and caption (existing content)
14064 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14066 <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>
14070 Parsoid-specific image handling - framed image with specific size and caption
14073 parsoid=wt2html,wt2wt,html2html
14075 [[File:Foobar.jpg|frame|500x50px|caption]]
14077 <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>
14081 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14084 parsoid=wt2html,wt2wt,html2html
14086 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14088 <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>
14092 Parsoid-specific image handling - frameless image with specific size, border, and caption
14094 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14096 <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>
14100 Parsoid-specific image handling - simple image with a formatted caption
14102 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14104 <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>
14108 Parsoid-specific image handling - caption with a template in it
14110 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14112 <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>
14116 Parsoid-specific image handling - caption with unbalanced tags in it
14118 parsoid=wt2html,wt2wt,html2html
14121 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14125 <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>
14130 Parsoid-specific image handling - empty caption (1)
14132 parsoid=wt2html,wt2wt
14134 [[File:Foobar.jpg|thumb|]]
14136 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption></figcaption></figure>
14139 # empty captions don't get serialized unless we're in the "round trip" case
14141 Parsoid-specific image handling - empty caption (2)
14145 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14146 <a href="./File:Foobar.jpg">
14147 <img resource="./File:Foobar.jpg"
14148 src="//example.com/images/3/3a/Foobar.jpg"
14149 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14150 height="25" width="220"/>
14152 <figcaption></figcaption>
14155 [[File:Foobar.jpg|thumb]]
14159 Parsoid-specific image handling - whitespace caption
14161 [[File:Foobar.jpg|thumb| ]]
14163 <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>
14167 Parsoid-specific image handling - lang option
14170 [[File:Foobar.svg|lang=de|caption]]
14174 <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>
14178 ## Edge case bugs in Parsoid from T93580
14180 T93580: 1. Templated <ref> inside block images
14182 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14186 <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>
14188 <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>
14192 T93580: 2. <ref> inside inline images
14194 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14198 <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>
14200 <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>
14204 T93580: 3. Templated <ref> inside inline images
14206 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14210 <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>
14212 <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>
14219 Subpage test/subpage
14227 subpage title=[[Subpage test]]
14231 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14236 Subpage noslash link
14238 subpage title=[[Subpage test]]
14242 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14247 Subpage test/1/2/subpage
14253 Relative subpage noslash link
14255 parsoid=wt2wt,wt2html,html2html
14256 subpage title=[[Subpage test/1/2/3/4]]
14262 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14263 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14266 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14267 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14271 Parsoid: dot-slash prefixed wikilinks
14281 </p><p>[[././baz/]]
14286 </p><p>[[././baz/]]
14291 Render invalid page names as plain text (bug 51090)
14304 [[{{echo|./../foo}}|bar]]
14305 [[{{echo|foo/.}}|bar]]
14306 [[{{echo|foo/..}}|bar]]
14307 [[{{echo|foo~~~~bar}}]]
14308 [[{{echo|foo>bar}}]]
14309 [[{{echo|foo././bar}}]]
14310 [[{{echo|foo{bar}}]]
14311 [[{{echo|foo}bar}}]]
14312 [[{{echo|foo[bar}}]]
14313 [[{{echo|foo]bar}}]]
14314 [[{{echo|foo<bar}}]]
14316 <p>[[./../foo|bar]]
14326 </p><p>[[./../foo|bar]]
14339 <p>[[./../foo|bar]]
14350 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14351 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14352 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14353 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14354 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14355 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14356 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14357 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14358 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14359 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14360 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<bar"}},"i":0}}]}'>foo<bar</span>]]</p>
14368 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14373 BUG 561: {{/Subpage}}
14375 subpage title=[[Page]]
14379 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14387 Category:MediaWiki User's Guide
14395 [[:Category:MediaWiki User's Guide]]
14397 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14406 [[Category:MediaWiki User's Guide]]
14408 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14412 PAGESINCATEGORY invalid title fatal (r33546 fix)
14414 {{PAGESINCATEGORY:<bogus>}}
14421 Category with different sort key
14425 [[Category:MediaWiki User's Guide|Foo]]
14427 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14431 Category with identical sort key
14435 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14437 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14441 Category with empty sort key
14446 [[Category:MediaWiki User's Guide|]]
14448 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14452 Category with empty sort key and parentheses
14457 [[Category:Foo (bar)|]]
14459 [[Category:Foo (bar)|Foo]]
14462 ## We used to, but no longer wt2wt this test since the default serializer
14463 ## will normalize all categories to serialize on their own line.
14464 ## This wikitext usage is going to be fairly uncommon in production and
14465 ## selser will take care of preserving formatting in those scenarios.
14467 Category with link tail
14473 123[[Category:Foo]]456
14475 123[[Category:Foo]]456
14477 <p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
14481 Category with template
14486 [[Category:{{echo|Foo}}]]
14488 [[Category:{{echo|Foo}}]]
14492 Category with template in sort key
14497 [[Category:Foo|{{echo|Bar}}]]
14499 [[Category:Foo|{{echo|Bar}}]]
14503 Category with template in sort key and title
14508 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14510 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14513 ## We used to, but no longer wt2wt this test since the default serializer
14514 ## will normalize all categories to serialize on their own line.
14515 ## This wikitext usage is going to be fairly uncommon in production and
14516 ## selser will take care of preserving formatting in those scenarios.
14518 Category / paragraph interactions
14522 Foo [[Category:Baz]] Bar
14524 Foo [[Category:Baz]]
14532 [[Category:Baz]] Bar
14545 {{echo|[[Category:Baz]]}}
14558 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14559 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14560 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14561 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14562 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> <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>
14563 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14566 ## We used to, but no longer wt2wt this test since the default serializer
14567 ## will normalize all categories to serialize on their own line.
14568 ## This wikitext usage is going to be fairly uncommon in production and
14569 ## selser will take care of preserving formatting in those scenarios.
14571 ## The whitespace on the empty line is part of the test. Please do not delete
14573 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14579 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14581 {{echo|[[Category:Foo]] and so should this!}}
14583 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14588 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14590 <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>
14593 ## Parsoid will not try to wt2wt this while preserving newlines because
14594 ## it suppresses excess newlines within list items -- and we don't want to
14595 ## introduce a special case just for categories, which is, in reality somewhat
14596 ## odd behavior -- categories are unlikely to be used in list items like this
14597 ## in top-level pages and are only likely to show up in template-generated
14598 ## list items where this RT-ing is a non-issue.
14600 ## The whitespace on the empty line is part of the test. Please do not delete
14602 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14608 [[Category:Foo]] and this should be part of the same list item
14611 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14613 <ul><li>This and this should be part of the same list item</li>
14614 <li>So should this and this should be part of the same list item</li></ul>
14617 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14618 <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>
14622 ## Newlines and categories that follow the last item of a list
14623 ## are treated differently because this (list followed by categories)
14624 ## is an extremely common pattern on wikis.
14626 3. Categories and newlines: newline suppression for last list item should RT properly
14639 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14641 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14642 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14646 4. Categories and newlines: newline suppression for last list item should RT properly
14654 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14656 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14659 ## only wt2html for this to make sure the algo only applies to the rightmost path
14661 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14674 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14676 <ul><li> d</li></ul></li></ul>
14677 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14680 ## We used to, but no longer wt2wt this test since the default serializer
14681 ## will normalize all categories to serialize on their own line.
14682 ## This wikitext usage is going to be fairly uncommon in production and
14683 ## selser will take care of preserving formatting in those scenarios.
14685 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14689 * a [[Category:Foo]]
14691 <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>
14694 # This test also demonstrates because of newline+category tunneling
14695 # through the list hander, template wrapping doesn't expand to the
14696 # containing list when the list item swallows the category.
14698 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14703 <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
14704 </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>
14708 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14712 {{echo|[[Category:Foo]]
14716 <ul><li> a</li></ul>
14718 <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">
14719 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14720 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14724 Parsoid: Serialize link to category page with colon escape
14730 [[:Category:Foo|Bar]]
14733 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14734 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14738 # We used to, but no longer wt2wt this test since the default serializer
14739 # will normalize all categories to serialize on their own line.
14740 # This wikitext usage is going to be fairly uncommon in production and
14741 # selser will take care of preventing whitespace insertion if this
14742 # occurs in an article.
14744 # html2html disabled for the same reason (whitespace insertion between
14747 # html2wt disabled because it localizes the "Category" namespace.
14749 Link prefix/suffixes aren't applied to category links
14759 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14763 Parsoid: Serialize link to file page with colon escape
14769 [[:File:Foo.png|Bar]]
14772 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14773 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14778 Parsoid: Serialize a genuine category link without colon escape
14783 [[Category:Foo|Bar]]
14785 <link rel="mw:PageProp/Category" href="./Category:Foo">
14786 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14790 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14794 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14796 [[Category:Toxine bactérienne]]
14800 Parsoid: Defaultsort
14802 {{DEFAULTSORT:Foo}}
14804 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14808 Parsoid: Defaultsort (template-generated)
14810 {{{{echo|DEFAULTSORT}}:Foo}}
14812 <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}}]}'/>
14816 ### Inter-language links
14819 Interlanguage links
14827 es:Alimento fr:Nourriture zh:食品
14829 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14830 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14831 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14835 Duplicate interlanguage links (bug 24502)
14846 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14847 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14848 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14849 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14856 Basic section headings
14863 ===Smaller headline===
14866 <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>
14869 <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>
14872 <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>
14878 Section headings with TOC
14881 === Subheadline 1 ===
14882 ===== Skipping a level =====
14883 ====== Skipping a level ======
14887 ===Another headline===
14889 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14891 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14893 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14895 <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>
14897 <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>
14904 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14906 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14912 <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>
14913 <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>
14914 <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>
14915 <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>
14916 <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>
14919 <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>
14924 TOC anchors don't collide
14932 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14934 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14935 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14936 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14937 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14941 <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>
14942 <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>
14943 <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>
14944 <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>
14948 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14950 Handling of sections up to level 6 and beyond
14953 == Level 2 Heading==
14954 === Level 3 Heading===
14955 ==== Level 4 Heading====
14956 ===== Level 5 Heading=====
14957 ====== Level 6 Heading======
14958 ======= Level 7 Heading=======
14959 ======== Level 8 Heading========
14960 ========= Level 9 Heading=========
14961 ========== Level 10 Heading==========
14963 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14965 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14967 <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>
14969 <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>
14971 <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>
14973 <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>
14975 <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>
14976 <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>
14977 <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>
14978 <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>
14979 <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>
14993 <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>
14994 <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>
14995 <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>
14996 <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>
14997 <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>
14998 <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>
14999 <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>
15000 <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>
15001 <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>
15002 <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>
15007 TOC regression (T11764)
15011 ==== title 1.1.1 ====
15016 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15018 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15020 <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>
15022 <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>
15025 <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>
15028 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15030 <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>
15036 <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>
15037 <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>
15038 <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>
15039 <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>
15040 <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>
15041 <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>
15046 TOC for heading containing <span id="..."></span> (T96153)
15049 ==<span id="old-anchor"></span>New title==
15051 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15053 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15057 <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>
15062 TOC with wgMaxTocLevel=3 (bug 6204)
15068 ==== title 1.1.1 ====
15073 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15075 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15077 <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>
15078 <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>
15081 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15083 <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>
15089 <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>
15090 <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>
15091 <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>
15092 <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>
15093 <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>
15094 <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>
15099 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15105 ====Section 1.1.1====
15106 ====Section 1.1.1.1====
15109 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15111 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15113 <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>
15116 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15120 <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>
15121 <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>
15122 <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>
15123 <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>
15124 <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>
15130 Resolving duplicate section names
15135 <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>
15136 <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>
15141 Resolving duplicate section names with differing case (bug 10721)
15146 <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>
15147 <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>
15159 Template with sections, __NOTOC__
15166 <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>
15167 <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>
15168 <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>
15169 <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>
15174 __NOEDITSECTION__ keyword
15180 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15181 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15186 Link inside a section heading
15188 ==Section with a [[Main Page|link]] in it==
15190 <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>
15195 TOC regression (T14077)
15202 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15204 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15206 <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>
15209 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15213 <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>
15214 <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>
15215 <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>
15220 BUG 1219 URL next to image (good)
15222 http://example.com [[File:Foobar.jpg]]
15224 <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>
15227 <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>
15231 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15234 The line above must have a trailing space!
15237 But just in case it doesn't...
15239 <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>
15240 <p>The line above must have a trailing space!
15242 <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>
15243 <p>But just in case it doesn't...
15248 Header with special characters (bug 25462)
15250 The tooltips shall not show entities to the user (ie. be double escaped)
15267 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15269 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15271 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15272 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15273 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15274 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15275 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15279 <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>
15282 <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>
15285 <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>
15288 <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>
15291 <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>
15297 Header with space, plus and underscore as entity
15299 Id should not contain + for spaces
15301 == Space between Text ==
15304 == Space-Entity between Text ==
15307 == Plus+between+Text ==
15310 == Plus-Entity+between+Text ==
15313 == Underscore_between_Text ==
15316 == Underscore-Entity_between_Text ==
15319 [[#Space between Text]]
15320 [[#Space-Entity between Text]]
15321 [[#Plus+between+Text]]
15322 [[#Plus-Entity+between+Text]]
15323 [[#Underscore_between_Text]]
15324 [[#Underscore-Entity_between_Text]]
15326 <p>Id should not contain + for spaces
15328 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15330 <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>
15331 <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>
15332 <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>
15333 <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>
15334 <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>
15335 <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>
15339 <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>
15342 <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>
15345 <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>
15348 <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>
15351 <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>
15354 <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>
15356 </p><p><a href="#Space_between_Text">#Space between Text</a>
15357 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15358 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15359 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15360 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15361 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15366 Headers with excess '=' characters
15367 (Are similar tests necessary beyond the 1st level?)
15371 =''italic'' heading==
15372 ==''italic'' heading=
15374 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15376 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15377 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15378 <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>
15379 <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>
15383 <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>
15384 <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>
15385 <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>
15386 <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>
15391 HTML headers vs TOC (bug 23393)
15392 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15404 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15406 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15408 <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>
15409 <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>
15412 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15414 <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>
15415 <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>
15421 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15422 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15423 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15424 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15425 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15426 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15431 Single-line or multiline-comments can follow headings
15433 parsoid=wt2html,wt2wt
15441 <h2><span class="mw-headline" id="foo">foo</span></h2>
15442 <h2><span class="mw-headline" id="bar">bar</span></h2>
15443 <h2><span class="mw-headline" id="baz">baz</span></h2>
15448 BUG 1219 URL next to image (broken)
15450 http://example.com[[File:Foobar.jpg]]
15452 <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>
15455 <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>
15459 Bug 1186 news: in the middle of text
15461 http://en.wikinews.org/wiki/Wikinews:Workplace
15463 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15469 Namespaced link must have a title
15478 Namespaced link must have a title (bad fragment version)
15480 [[Project:#fragment]]
15482 <p>[[Project:#fragment]]
15488 ### HTML tags and HTML attributes
15492 div with no attributes
15494 <div>HTML rocks</div>
15496 <div>HTML rocks</div>
15501 div with double-quoted attribute
15503 <div id="rock">HTML rocks</div>
15505 <div id="rock">HTML rocks</div>
15510 div with single-quoted attribute
15512 <div id='rock'>HTML rocks</div>
15514 <div id="rock">HTML rocks</div>
15519 div with unquoted attribute
15521 <div id=rock>HTML rocks</div>
15523 <div id="rock">HTML rocks</div>
15528 div with illegal double attributes
15530 <div id="a" id="b">HTML rocks</div>
15532 <div id="b">HTML rocks</div>
15537 div with empty attribute value, space before equals
15539 parsoid=wt2html,html2html
15541 <div class =>HTML rocks</div>
15543 <div class="">HTML rocks</div>
15546 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15550 div with multiple empty attribute values
15552 parsoid=wt2html,html2html
15554 <div id= title=>HTML rocks</div>
15556 <div id="title.3D">HTML rocks</div>
15559 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15563 table with multiple empty attribute values
15565 parsoid=wt2html,html2html
15571 <table title="id=">
15577 <table title="id=">
15578 <tbody><tr><td> hi</td></tr>
15583 div with braces in attribute value
15585 <div title="{}">Foo</div>
15587 <div title="{}">Foo</div>
15590 <div title="{}">Foo</div>
15594 div with empty attribute value, no space before equals
15596 parsoid=wt2html,html2html
15598 <div class=>HTML rocks</div>
15600 <div class="">HTML rocks</div>
15603 <div class="">HTML rocks</div>
15607 HTML multiple attributes correction
15609 <p class="error" class="awesome">Awesome!</p>
15611 <p class="awesome">Awesome!</p>
15616 Table multiple attributes correction
15619 !+ class="error" class="awesome"| status
15624 <th class="awesome"> status
15632 <DIV ID="x">HTML ROCKS</DIV>
15634 <div id="x">HTML ROCKS</div>
15639 Non-ASCII pseudo-tags are rendered as text
15648 Pseudo-tag with URL 'name' renders as url link
15650 <http://example.com/>
15652 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15657 text with amp in the middle of nowhere
15661 <p>Remember AT&T?
15666 text with character entity: eacute
15668 I always thought é was a cute letter.
15670 <p>I always thought é was a cute letter.
15673 <p>I always thought é was a cute letter.</p>
15677 text with entity-escaped character entity-like string: eacute
15679 I always thought &eacute; was a cute letter.
15681 <p>I always thought &eacute; was a cute letter.
15686 text with undefined character entity: xacute
15688 I always thought &xacute; was a cute letter.
15690 <p>I always thought &xacute; was a cute letter.
15697 <data value="5">five</data>
15698 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15699 <mark>This highlighted text</mark>
15701 <p><data value="5">five</data>
15702 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15703 <mark>This highlighted text</mark>
15708 HTML tag with leading space is parsed as text
15712 <p>< div>foo< /div>
15717 ### Nesting tests (see bug 41545, 50604, 51081)
15720 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15721 # Note that html2wt is considerably more difficult if we use <b> in
15722 # the test case, instead of <big>
15724 Ensure that HTML adoption agency algorithm is properly implemented.
15726 <big>X<big>Y</big>Z</big>
15728 <p><big>X<big>Y</big>Z</big>
15732 # This was bug 41545 in the PHP parser.
15733 # Note that tidy doesn't handle this correctly.
15737 <kbd>X<kbd>Y</kbd>Z</kbd>
15739 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15743 # The following cases were bug 51081 in the PHP parser.
15744 # Note that there are some other nestable tags (b, i, etc) which are
15745 # not covered; see bug 51081 for discussion.
15747 # Note that tidy doesn't handle this correctly.
15751 <em>X<em>Y</em>Z</em>
15753 <p><em>X<em>Y</em>Z</em>
15757 # Note that tidy doesn't handle this correctly.
15759 Nesting of <strong>
15761 <strong>X<strong>Y</strong>Z</strong>
15763 <p><strong>X<strong>Y</strong>Z</strong>
15772 <p><q>X<q>Y</q>Z</q></p>
15775 # Note that tidy doesn't handle this correctly.
15779 <ruby>X<ruby>Y</ruby>Z</ruby>
15781 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15785 # Note that tidy doesn't handle this correctly.
15789 <bdo>X<bdo>Y</bdo>Z</bdo>
15791 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15803 [[Media:Foobar.jpg]]
15805 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15810 Media link with text
15812 [[Media:Foobar.jpg|A neat file to look at]]
15814 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15818 # FIXME: this is still bad HTML tag nesting
15819 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15821 Media link with nasty text
15823 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15825 <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>
15828 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15829 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15833 Media link to nonexistent file (bug 1702)
15835 [[Media:No such.jpg]]
15837 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15842 Image link to nonexistent file (bug 1850 - good)
15844 [[File:No_such.jpg]]
15846 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15849 <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>
15853 :Image link to nonexistent file (bug 1850 - bad)
15855 [[:Image:No such.jpg]]
15857 <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>
15860 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15866 Character reference normalization in link text (bug 1938)
15868 [[Main Page|this&that]]
15870 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15877 Test for unicode normalization
15879 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15883 (bug 19451) Links should refer to the normalized form.
15891 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15892 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15893 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15894 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15895 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15900 Empty attribute crash test (bug 2067)
15902 <font color="">foo</font>
15904 <p><font color="">foo</font>
15909 Empty attribute crash test single-quotes (bug 2067)
15911 <font color=''>foo</font>
15913 <p><font color="">foo</font>
15918 Attribute test: equals, then nothing
15920 parsoid=wt2html,html2html
15922 <font color=>foo</font>
15924 <p><font color="">foo</font>
15927 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
15931 Attribute test: unquoted value
15933 parsoid=wt2html,html2html
15935 <font color=x>foo</font>
15937 <p><font color="x">foo</font>
15940 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
15944 Attribute test: unquoted but illegal value (hash)
15946 <font color=#x>foo</font>
15948 <p><font color="#x">foo</font>
15952 # Parsoid does not serialize to empty attribute syntax,
15953 # so wt2wt and html2wt cases are skipped
15955 Attribute test: no value (T54330)
15957 parsoid=wt2html,html2html
15959 <font color>foo</font>
15961 <p><font color="">foo</font>
15964 <p><font color="">foo</font></p>
15968 Bug 2095: link with three closing brackets
15972 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15975 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15979 Bug 2095: link with pipe and three closing brackets
15981 [[Main Page|link]]]
15983 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15986 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15990 Bug 2095: link with pipe and three closing brackets, version 2
15992 [[Main Page|[http://example.com/]]]
15994 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15997 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16006 Template:Dangerous attribute
16008 " onmouseover="alert(document.cookie)
16012 Template:Dangerous style attribute
16014 border-size: expression(alert(document.cookie))
16020 <div style="float: right; {{{1}}}">Magic div</div>
16024 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16026 <div title="{{test}}"></div>
16028 <div title="This is a test template"></div>
16032 # Parsoid has enough context to handle this case
16034 Bug 2304: HTML attribute safety (dangerous template; 2309)
16036 <div title="{{dangerous attribute}}"></div>
16038 <div title=""></div>
16041 <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>
16045 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16047 <div style="{{dangerous style attribute}}"></div>
16049 <div style="/* insecure input */"></div>
16054 Bug 2304: HTML attribute safety (safe parameter; 2309)
16056 {{div style|width: 200px}}
16058 <div style="float: right; width: 200px">Magic div</div>
16063 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16065 {{div style|width: expression(alert(document.cookie))}}
16067 <div style="/* insecure input */">Magic div</div>
16072 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16074 {{div style|"><script>alert(document.cookie)</script>}}
16076 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16081 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16083 {{div style|" ><script>alert(document.cookie)</script>}}
16085 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16090 Bug 2304: HTML attribute safety (link)
16092 <div title="[[Main Page]]"></div>
16094 <div title="[[Main Page]]"></div>
16099 Bug 2304: HTML attribute safety (italics)
16101 <div title="''foobar''"></div>
16103 <div title="''foobar''"></div>
16108 Bug 2304: HTML attribute safety (bold)
16110 <div title="'''foobar'''"></div>
16112 <div title="'''foobar'''"></div>
16118 Bug 2304: HTML attribute safety (ISBN)
16120 <div title="ISBN 1234567890"></div>
16122 <div title="ISBN 1234567890"></div>
16127 Bug 2304: HTML attribute safety (RFC)
16129 <div title="RFC 1234"></div>
16131 <div title="RFC 1234"></div>
16136 Bug 2304: HTML attribute safety (PMID)
16138 <div title="PMID 1234567890"></div>
16140 <div title="PMID 1234567890"></div>
16145 Bug 2304: HTML attribute safety (web link)
16147 <div title="http://example.com/"></div>
16149 <div title="http://example.com/"></div>
16154 Bug 2304: HTML attribute safety (named web link)
16156 <div title="[http://example.com/ link]"></div>
16158 <div title="[http://example.com/ link]"></div>
16163 Bug 3244: HTML attribute safety (extension; safe)
16165 <div style="<nowiki>background:blue</nowiki>"></div>
16167 <div style="background:blue"></div>
16172 Bug 3244: HTML attribute safety (extension; unsafe)
16174 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16176 <div style="/* insecure input */"></div>
16180 # More MSIE fun discovered by Tom Gilder
16183 MSIE CSS safety test: spurious slash
16185 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16187 <div style="/* insecure input */">evil</div>
16192 MSIE CSS safety test: hex code
16194 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16196 <div style="/* insecure input */">evil</div>
16201 MSIE CSS safety test: comment in url
16203 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16205 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16210 MSIE CSS safety test: comment in expression
16212 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16214 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16219 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16221 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16223 <p style="/* invalid control char */">A</p>
16228 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16230 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16231 <div style="top:EXPRESSION(alert())">B</div>
16233 <p style="/* insecure input */">A</p>
16234 <div style="/* insecure input */">B</div>
16239 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16241 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16242 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16244 <div style="/* insecure input */">A</div>
16245 <p style="/* insecure input */">B</p>
16250 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16252 <div style="background-image:url⁽javascript:alert())">A</div>
16253 <div style="background-image:url₍javascript:alert())">B</div>
16254 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16256 <div style="/* insecure input */">A</div>
16257 <div style="/* insecure input */">B</div>
16258 <p style="/* insecure input */">C</p>
16262 # FIXME: Parsoid fails to sanitize this! See T58846.
16267 title="data:text/html,<img src=1 onerror=alert(1)>"
16268 style="-o-link:attr(title);-o-link-source:current">X</div>
16270 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16275 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16277 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16278 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16279 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16280 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16281 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16282 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16283 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16285 <p style="/* insecure input */">A</p>
16286 <p style="/* insecure input */">B</p>
16287 <p style="/* insecure input */">C</p>
16288 <p style="/* insecure input */">D</p>
16289 <p style="/* insecure input */">E</p>
16290 <p style="/* insecure input */">F</p>
16291 <p style="/* insecure input */">G</p>
16296 Table attribute legitimate extension
16299 !+ style="<nowiki>color:blue</nowiki>"| status
16304 <th style="color:blue"> status
16310 Table attribute safety
16313 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16318 <th style="/* insecure input */"> status
16324 CSS line continuation 1
16326 <div style="background-image: u\ rl(test.jpg);"></div>
16328 <div style="/* insecure input */"></div>
16333 CSS line continuation 2
16335 <div style="background-image: u\ rl(test.jpg); "></div>
16337 <div style="/* invalid control char */"></div>
16348 Expansion of multi-line templates in attribute values (bug 6255)
16350 <div style="background: {{identity|#00FF00}}">-</div>
16352 <div style="background: #00FF00">-</div>
16358 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16360 <div style="background:
16363 <div style="background: #00FF00">-</div>
16366 <div style="background:
16371 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16373 <div style="background: #00FF00">-</div>
16375 <div style="background: #00FF00">-</div>
16380 evil <math>-wiki-tags without Extension:Math enabled
16382 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16384 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16388 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16391 Parser hook: empty input
16402 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16405 ## Don't expect parsoid to rt this form.
16407 Parser hook: empty input using terminated empty elements
16409 parsoid=wt2html,html2html
16420 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16424 Parser hook: empty input using terminated empty elements (space before)
16435 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16439 Parser hook: basic input
16450 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16453 ## Don't expect parsoid to rt this form.
16455 Parser hook: case insensitive
16457 parsoid=wt2html,html2html
16468 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16471 ## Don't expect parsoid to rt this form.
16473 Parser hook: case insensitive, redux
16475 parsoid=wt2html,html2html
16486 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16490 Parser hook: nested tags
16492 <tag><tag></tag></tag>
16501 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16505 Parser hook: basic arguments
16507 <tag width="200" height="100" depth="50" square=""></tag>
16520 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16523 ## Don't expect parsoid to rt this form.
16525 Parser hook: basic arguments, variations
16527 parsoid=wt2html,html2html
16529 <tag width=200 height = "100" depth = '50' square></tag>
16542 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16546 Parser hook: argument containing a forward slash (bug 5344)
16548 <tag filename="/tmp/bla"></tag>
16553 'filename' => '/tmp/bla',
16558 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16561 ## Don't expect parsoid to rt this form.
16563 Parser hook: empty input using terminated empty elements (bug 2374)
16565 parsoid=wt2html,html2html
16577 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16580 ## </tag> should be output literally since there is no matching tag that begins it
16581 ## Don't expect parsoid to rt this form.
16583 Parser hook: basic arguments using terminated empty elements (bug 2374)
16587 <tag width=200 height = "100" depth = '50' square/>
16604 <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
16608 ## Don't expect parsoid to rt this form.
16610 Parser hook: Don't allow unclosed extension tags
16616 this is a '''test'''
16618 <p>test <tag>123
16619 </p><p>this is a <b>test</b>
16622 <p>test <tag>123</p>
16624 <p>this is a <b>test</b></p>
16628 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16632 Parser hook: static parser hook not inside a comment
16634 <statictag>hello, world</statictag>
16636 <statictag action="flush" />
16642 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16643 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
16647 Parser hook: static parser hook inside a comment
16649 <!-- <statictag>hello, world</statictag> -->
16650 <statictag action="flush" />
16655 <!-- <statictag>hello, world</statictag> -->
16656 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
16659 # Nested template calls; this case was broken by Parser.php rev 1.506,
16663 Template:One-parameter
16665 (My parameter is: {{{1}}})
16669 Template:Map-one-parameter
16671 {{{{{1}}}|{{{2}}}}}
16675 Nested template calls
16677 {{Map-one-parameter|One-parameter|param}}
16679 <p>(My parameter is: param)
16688 # HTML+Tidy effectively strips out the empty tags completely
16689 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16690 # which Tidy would have done for the PHP parser had there been content inside it.
16692 Sanitizer: Closing of open tags
16694 <s></s><table></table>
16696 <s></s><table></table>
16699 <p><s></s></p><table></table>
16703 Sanitizer: Closing of open but not closed tags
16712 Sanitizer: Closing of closed but not open tags
16722 Sanitizer: Closing of closed but not open table tags
16726 Table not started</td></tr></table>
16728 <p>Table not started</p>
16730 <p>Table not started</p>
16734 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16736 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16738 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16742 # In HTML5, the restrictions are that id must contain at least one character,
16743 # and must not contain any space characters.
16745 Sanitizer: Validating the contents of the id attribute (bug 4515)
16749 <br id="" /><br id="a space" />
16754 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16756 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16760 <br id="foo" /><br id="foo" />
16762 Something need to be done. foo-2 ?
16766 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16769 <meta itemprop="hello" content="world">
16770 <meta http-equiv="refresh" content="5">
16771 <meta itemprop="hello" http-equiv="refresh" content="5">
16772 <link itemprop="hello" href="{{SERVER}}">
16773 <link rel="stylesheet" href="{{SERVER}}">
16774 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16778 <p> <meta itemprop="hello" content="world" />
16779 <meta http-equiv="refresh" content="5">
16780 <meta itemprop="hello" content="5" />
16782 <link itemprop="hello" href="http://example.org" />
16783 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16784 <link itemprop="hello" href="http://example.org" />
16790 Language converter: output gets cut off unexpectedly (bug 5757)
16794 this bit is safe: }-
16796 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16798 then we get cut off here: }-
16800 all additional text is vanished
16802 <p>this bit is safe: }-
16803 </p><p>but if we add a conversion instance: xxx
16804 </p><p>then we get cut off here: }-
16805 </p><p>all additional text is vanished
16810 Self closed html pairs (bug 5487)
16813 <center><font id="bug" />Centered text</center>
16814 <div><font id="bug2" />In div text</div>
16816 <center><font id="bug" />Centered text</center>
16817 <div><font id="bug2" />In div text</div>
16826 Punctuation: nbsp before exclamation
16830 <p>C'est grave !
16835 Punctuation: CSS !important (bug 11874)
16837 <div style="width:50% !important">important</div>
16839 <div style="width:50% !important">important</div>
16844 Punctuation: CSS ! important (bug 11874; with space after)
16846 <div style="width:50% ! important">important</div>
16848 <div style="width:50% ! important">important</div>
16853 HTML bullet list, closed tags (bug 5497)
16866 <ul data-parsoid='{"stx":"html"}'>
16867 <li data-parsoid='{"stx":"html"}'>One</li>
16868 <li data-parsoid='{"stx":"html"}'>Two</li>
16874 HTML bullet list, unclosed tags (bug 5497)
16886 <ul data-parsoid='{"stx":"html"}'>
16887 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16888 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16894 HTML ordered list, closed tags (bug 5497)
16907 <ol data-parsoid='{"stx":"html"}'>
16908 <li data-parsoid='{"stx":"html"}'>One</li>
16909 <li data-parsoid='{"stx":"html"}'>Two</li>
16915 HTML ordered list, unclosed tags (bug 5497)
16928 <ol data-parsoid='{"stx":"html"}'>
16929 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16930 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16936 HTML nested bullet list, closed tags (bug 5497)
16959 <ul data-parsoid='{"stx":"html"}'>
16960 <li data-parsoid='{"stx":"html"}'>One</li>
16961 <li data-parsoid='{"stx":"html"}'>Two:
16962 <ul data-parsoid='{"stx":"html"}'>
16963 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
16964 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
16971 HTML nested bullet list, open tags (bug 5497)
17008 HTML nested ordered list, closed tags (bug 5497)
17033 HTML nested ordered list, open tags (bug 5497)
17070 HTML ordered list item with parameters oddity
17072 <ol><li id="fragment">One</li>
17075 <ol><li id="fragment">One</li>
17080 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17082 bug 5918: autonumbering
17084 [http://first/] [http://second] [ftp://ftp]
17088 [mailto:enclosed@mail.tld With target]
17090 [mailto:enclosed@mail.tld]
17092 mailto:inline@mail.tld
17094 <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>
17095 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17096 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17097 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17098 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17101 <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>
17102 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17103 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17104 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17105 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17110 # Security and HTML correctness
17111 # From Nick Jenkins' fuzz testing
17115 Fuzz testing: Parser13
17130 Fuzz testing: Parser14
17135 <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>
17136 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17138 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17144 <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>
17146 <div id="toc" class="toc">
17147 <div id="toctitle">
17151 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17158 Fuzz testing: Parser14-table
17160 parsoid=wt2html,html2html
17165 <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>
17166 <table style="__TOC__">
17171 <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>
17172 <table style="__TOC__">
17179 <table style="__TOC__"></table>
17182 # Known to produce bogus xml (extra </td>)
17184 Fuzz testing: Parser16
17211 Fuzz testing: Parser21
17214 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17219 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17229 Fuzz testing: Parser22
17231 http://===r:::https://b
17235 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17243 # Known to produce bad XML for now
17245 Fuzz testing: Parser24
17250 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17251 <br style="onmouseover='alert(document.cookie);' " />
17253 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17258 <u class="|">}}}} >
17259 <br style="onmouseover='alert(document.cookie);'" />
17261 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17270 # Note: the current result listed for this is not what the original one was,
17271 # but the original bug was JavaScript injection, which is fixed in any case.
17272 # It's not clear that the original result listed was any more correct than the
17273 # current one. Original result:
17276 # <li class="||">
17277 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17279 Fuzz testing: Parser25 (bug 6055)
17285 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17287 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17292 Fuzz testing: URL adjacent extension (with space, clean)
17294 http://example.com <nowiki>junk</nowiki>
17296 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17299 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17303 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17305 http://example.com<nowiki>junk</nowiki>
17307 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17310 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17314 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17316 http://example.com<pre>junk</pre>
17318 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17321 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17326 <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>
17330 Fuzz testing: image with bogus manual thumbnail
17332 [[Image:foobar.jpg|thumbnail= ]]
17334 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17337 <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>
17341 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17343 <pre dir=" "></pre>
17345 <pre dir=" "></pre>
17350 Parsing optional HTML elements (Bug 6171)
17355 <td> Some tabular data</td>
17356 <td> More tabular data ...
17357 <td> And yet som tabular data</td>
17363 <td> Some tabular data</td>
17364 <td> More tabular data ...
17365 </td><td> And yet som tabular data</td>
17372 Correct handling of <td>, <tr> (Bug 6171)
17377 <td> Some tabular data</td>
17378 <td> More tabular data ...</td>
17379 <td> And yet som tabular data</td>
17385 <td> Some tabular data</td>
17386 <td> More tabular data ...</td>
17387 <td> And yet som tabular data</td>
17395 Parsing crashing regression (fr:JavaScript)
17399 <p></body></x>
17404 Inline wiki vs wiki block nesting
17410 <p><b>Bold paragraph</b>
17411 </p><p>New wiki paragraph
17415 # FIXME: The current php output is documented
17416 # and desired output is the parsoid target.
17418 Inline HTML vs wiki block nesting
17424 <p><b>Bold paragraph
17425 </p><p>New wiki paragraph</b>
17428 <p><b>Bold paragraph</b>
17429 </p><p>New wiki paragraph
17433 # Original result was this:
17434 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17436 # While that might be marginally more intuitive, maybe, the six-apostrophe
17437 # construct is clearly pathological and the result stated here (which is what
17438 # the parser actually does) is about as reasonable as anything.
17440 Mixing markup for italics and bold
17443 '''bold''''''bold''bolditalics'''''
17445 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17453 Article for special page transclusion test
17457 Special page transclusion
17460 {{Special:Prefixindex/Xyzzyx}}
17462 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17468 Special page transclusion twice (bug 5021)
17471 {{Special:Prefixindex/Xyzzyx}}
17472 {{Special:Prefixindex/Xyzzyx}}
17474 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17476 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17482 Transclusion of default MediaWiki message
17484 {{MediaWiki:Mainpage}}
17491 Transclusion of nonexistent MediaWiki message
17493 {{MediaWiki:Mainpagexxx}}
17495 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17500 Transclusion of MediaWiki message with underscore
17502 {{MediaWiki:history_short}}
17509 Transclusion of MediaWiki message with space
17511 {{MediaWiki:history short}}
17518 Invalid header with following text
17528 Section extraction test (section 0)
17548 Section extraction test (section 1)
17570 Section extraction test (section 2)
17591 Section extraction test (section 3)
17611 Section extraction test (section 4)
17635 Section extraction test (section 5)
17655 Section extraction test (section 6)
17676 Section extraction test (section 7)
17696 Section extraction test (section 8)
17716 Section extraction test (section 9)
17737 Section extraction test (section 10)
17757 Section extraction test (nonexistent section 11)
17776 Section extraction test with bogus heading (section 1)
17781 ==bogus== not a legal section
17785 ==bogus== not a legal section
17789 Section extraction test with bogus heading (section 2)
17794 ==bogus== not a legal section
17801 Section extraction test with comment after heading (section 1)
17813 Section extraction test with comment after heading (section 2)
17825 Section extraction test with bogus <nowiki> heading (section 1)
17830 ==bogus== <nowiki>not a legal section</nowiki>
17834 ==bogus== <nowiki>not a legal section</nowiki>
17838 Section extraction test with bogus <nowiki> heading (section 2)
17843 ==bogus== <nowiki>not a legal section</nowiki>
17849 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17850 # instead of respecting commented sections
17852 Section extraction prefixed by comment (section 1)
17863 Section extraction prefixed by comment (section 2)
17873 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17874 # instead of respecting HTML-style headings
17876 Section extraction, mixed wiki and html (section 1)
17892 Section extraction, mixed wiki and html (section 2)
17908 # Formerly testing for bug 3342
17910 Section extraction, heading surrounded by <noinclude>
17914 <noinclude>==unmarked==</noinclude>
17920 # Test behavior of bug 19910
17922 Sectiion with all-equals
17927 The line above must have a trailing space
17930 But just in case it doesn't...
17934 But just in case it doesn't...
17938 Section replacement test (section 0)
17969 Section replacement test (section 1)
17998 Section replacement test (section 2)
18028 Section replacement test (section 3)
18059 Section replacement test (section 4)
18086 Section replacement test (section 5)
18117 Section replacement test (section 6)
18147 Section replacement test (section 7)
18178 Section replacement test (section 8)
18209 Section replacement test (section 9)
18238 Section replacement test (section 10)
18268 Section replacement test with initial whitespace (bug 13728)
18272 Preformatted initial line
18276 Preformatted initial line
18283 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18295 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18308 Section extraction, <pre> around bogus header (bug 10309)
18325 Section replacement, <pre> around bogus header (bug 10309)
18347 Handling of 
 in URLs
18351 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18354 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18356 a</a></li></ul></li></ul>
18360 Handling of %0A in URLs
18364 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18367 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18371 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18373 5 quotes, code coverage +1 line
18380 <p><b><i></i></b></p>
18383 # same html as previous, but wikitext adjusted to match parsoid html2wt
18384 # note that wt2html and html2html will put the <i> before the <b>
18386 5 quotes, code coverage +1 line w/ nowiki (1)
18388 parsoid=wt2wt,html2wt
18390 '''''<nowiki/>'''''
18395 <p><b><i></i></b></p>
18398 # same as previous, just swapping the <i> and <b>
18400 5 quotes, code coverage +1 line w/ nowiki (2)
18402 '''''<nowiki/>'''''
18407 <p><i><b></b></i></p>
18411 Special:Search page linking.
18415 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18420 {{!}} is a magic word
18422 {{!}} is a magic word there and {{!}} is still a magic word here
18423 | is not a magic word here but {{!}} is still a magic word here
18425 <p>| is a magic word there and | is still a magic word here
18426 | is not a magic word here but | is still a magic word here
18429 <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
18430 | 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>
18437 title=[[Parser test]]
18442 * {{FULLPAGENAMEE}}
18444 * {{BASEPAGENAMEE}}
18448 * {{ROOTPAGENAMEE}}
18450 * {{TALKPAGENAMEE}}
18451 * {{SUBJECTPAGENAME}}
18452 * {{SUBJECTPAGENAMEE}}
18455 * {{NAMESPACENUMBER}}
18459 * {{SUBJECTSPACEE}}
18460 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18462 <ul><li> Parser test</li>
18463 <li> Parser_test</li>
18464 <li> Parser test</li>
18465 <li> Parser_test</li>
18466 <li> Parser test</li>
18467 <li> Parser_test</li>
18468 <li> Parser test</li>
18469 <li> Parser_test</li>
18470 <li> Parser test</li>
18471 <li> Parser_test</li>
18472 <li> Talk:Parser test</li>
18473 <li> Talk:Parser_test</li>
18474 <li> Parser test</li>
18475 <li> Parser_test</li>
18483 <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>
18486 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18496 image4 |300px| centre
18497 image5.svg| http://///////
18502 <ul class="gallery mw-gallery-traditional">
18503 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18504 <div class="thumb" style="height: 150px;">Image1.png</div>
18505 <div class="gallerytext">
18508 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18509 <div class="thumb" style="height: 150px;">Image2.gif</div>
18510 <div class="gallerytext">
18513 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18514 <div class="thumb" style="height: 150px;">Image3</div>
18515 <div class="gallerytext">
18518 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18519 <div class="thumb" style="height: 150px;">Image4</div>
18520 <div class="gallerytext">
18525 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18526 <div class="thumb" style="height: 150px;">Image5.svg</div>
18527 <div class="gallerytext">
18528 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18532 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18533 <div class="thumb" style="height: 150px;">* image6</div>
18534 <div class="gallerytext">
18542 Gallery (with options)
18544 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18545 File:Nonexistent.jpg|caption
18546 File:Nonexistent.jpg
18547 image:foobar.jpg|some '''caption''' [[Main Page]]
18549 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18552 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18553 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18554 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18555 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18556 <div class="gallerytext">
18561 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18562 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18563 <div class="gallerytext">
18566 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18567 <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>
18568 <div class="gallerytext">
18569 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18573 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18574 <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>
18575 <div class="gallerytext">
18578 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18579 <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>
18580 <div class="gallerytext">
18590 Gallery with link that has fragment
18593 image:foobar.jpg|link=Main_Page
18594 image:foobar.jpg|link=Main_Page#section
18595 image:foobar.jpg|link=Main Page#section|caption
18598 <ul class="gallery mw-gallery-traditional">
18599 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18600 <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>
18601 <div class="gallerytext">
18604 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18605 <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>
18606 <div class="gallerytext">
18609 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18610 <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>
18611 <div class="gallerytext">
18621 Gallery with wikitext inside caption
18624 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18625 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18628 <ul class="gallery mw-gallery-traditional">
18629 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18630 <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>
18631 <div class="gallerytext">
18632 <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>
18636 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18637 <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>
18638 <div class="gallerytext">
18639 <p>This is a test template
18648 gallery (with showfilename option)
18650 <gallery showfilename>
18651 File:Nonexistent.jpg|caption
18652 File:Nonexistent.jpg
18653 image:foobar.jpg|some '''caption''' [[Main Page]]
18657 <ul class="gallery mw-gallery-traditional">
18658 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18659 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18660 <div class="gallerytext">
18661 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18666 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18667 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18668 <div class="gallerytext">
18669 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18673 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18674 <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>
18675 <div class="gallerytext">
18676 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18677 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18681 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18682 <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>
18683 <div class="gallerytext">
18684 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18693 Gallery (with namespace-less filenames)
18696 File:Nonexistent.jpg
18702 <ul class="gallery mw-gallery-traditional">
18703 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18704 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18705 <div class="gallerytext">
18708 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18709 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18710 <div class="gallerytext">
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="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>
18715 <div class="gallerytext">
18718 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18719 <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>
18720 <div class="gallerytext">
18728 HTML Hex character encoding (spells the word "JavaScript")
18730 parsoid=wt2html,wt2wt,html2html
18732 JavaScript
18734 <p>JavaScript
18739 <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>
18743 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18747 <p>&#xsee;&#XSEE;
18750 <p>&#xsee;&#XSEE;</p>
18754 HTML Hex character encoding mixed case
18756 parsoid=wt2html,wt2wt,html2html
18765 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18768 # See: http://www.w3.org/TR/html5/syntax.html#character-references
18769 # Note that U+000C (form feed) is not a valid XML character, so
18770 # it is banned even though allowed in HTML5.
18772 Illegal character references (T106578)
18777 ; Control (low): 
18778 ; Control (high):  Ÿ
18779 ; Surrogate: ��
18780 ; This is an okay astral character: 💩
18789 <dt>Control (low)</dt>
18791 <dt>Control (high)</dt>
18792 <dd>&#x7F; &#x9F;</dd>
18794 <dd>&#xD83D;&#xDCA9;</dd>
18795 <dt>This is an okay astral character</dt>
18801 __FORCETOC__ override
18813 ISBN 978-0-1234-56 789
18815 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18818 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18820 <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>
18824 ISBN followed by 5 spaces
18835 ISBN ISBN 1234567890
18837 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18840 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18843 # Uppercase X and lowercase x as well
18854 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18855 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
18856 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18857 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
18858 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18859 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
18862 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18863 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
18864 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18865 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
18866 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
18867 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
18871 ISBN with empty prefix (parsoid test)
18875 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18878 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
18882 Bug 22905: <abbr> followed by ISBN followed by </a>
18884 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18886 <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>
18889 <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>
18897 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18902 Double RFC with a wiki link
18906 <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>
18915 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18918 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18922 Centre-aligned image
18924 [[Image:foobar.jpg|centre]]
18926 <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>
18933 [[Image:foobar.jpg|none]]
18935 <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>
18940 Width + Height sized image (using px) (height is ignored)
18942 [[Image:foobar.jpg|640x480px]]
18944 <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>
18949 Width-sized image (using px, no following whitespace)
18951 [[Image:foobar.jpg|640px]]
18953 <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>
18958 Width-sized image (using px, with following whitespace - test regression from r39467)
18960 [[Image:foobar.jpg|640px ]]
18962 <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>
18967 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18969 [[Image:foobar.jpg| 640px]]
18971 <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>
18976 Image with page parameter
18980 [[File:LoremIpsum.djvu|page=2]]
18982 <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>
18985 <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>
18989 Another italics / bold test
18997 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19003 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19006 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19011 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19013 Images with the "|" character in the comment
19015 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19017 <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>
19020 <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>
19024 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19026 <html><script>alert(1);</script></html>
19028 <p><html><script>alert(1);</script></html>
19033 HTML with raw HTML ($wgRawHtml==true)
19037 <html><script>alert(1);</script></html>
19039 <p><script>alert(1);</script>
19044 Parents of subpages, one level up
19046 subpage title=[[Subpage test/L1/L2/L3]]
19050 <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>
19056 Parents of subpages, one level up, not named
19058 subpage title=[[Subpage test/L1/L2/L3]]
19062 <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>
19069 Parents of subpages, two levels up
19071 subpage title=[[Subpage test/L1/L2/L3]]
19077 <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
19078 </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>
19083 Parents of subpages, two levels up, without trailing slash or name.
19085 subpage title=[[Subpage test/L1/L2/L3]]
19094 Parents of subpages, two levels up, with lots of extra trailing slashes.
19096 subpage title=[[Subpage test/L1/L2/L3]]
19100 <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>
19105 Subpage test/L1/L2/L3Sibling
19111 Transclusion of a sibling page (one level up)
19113 subpage title=[[Subpage test/L1/L2/L3]]
19122 Transclusion of a child page
19124 subpage title=[[Subpage test/L1/L2]]
19133 Non-transclusion because of too many up levels
19135 subpage title=[[Subpage test/L1/L2/L3]]
19137 {{../../../../More than parent}}
19139 <p>{{../../../../More than parent}}
19144 Definition list code coverage
19150 <dl><dt> title  </dt>
19152 <dt> title </dt>
19158 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19159 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19160 <dt>title</dt><dd> def</dd></dl>
19164 Don't fall for the self-closing div
19166 <div>hello world</div/>
19168 <div>hello world</div>
19177 <p>[[:Template:Msg]]
19186 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19190 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19192 Always escape literal '>' in output, not just after '<'
19206 <p>This is a test template
19207 This is a test template
19219 Inclusion of !userCanEdit() content
19223 <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>
19229 Out-of-order TOC heading levels
19238 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19240 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19242 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19243 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19246 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19248 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19249 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19255 <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>
19256 <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>
19257 <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>
19258 <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>
19259 <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>
19260 <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>
19266 ISBN with a dummy number
19276 ISBN with space-delimited number
19280 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19286 ISBN with multiple spaces, no number
19305 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19306 </p><p>ISBN 12345678901
19312 ISBN with trailing year (bug 8110)
19314 ISBN 1-234-56789-0 - 2006
19316 ISBN 1 234 56789 0 - 2006
19318 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19319 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19327 {{anchorencode:foo bar©#%n}}
19329 <p>foo_bar.C2.A9.23.25n
19334 anchorencode trims spaces
19336 {{anchorencode: __pretty__please__}}
19343 anchorencode deals with links
19345 {{anchorencode: [[hello|world]] [[hi]]}}
19352 anchorencode deals with templates
19354 {{anchorencode: {{Foo}} }}
19361 anchorencode encodes like the TOC generator: (bug 18431)
19363 === _ +:.3A%3A&&]] ===
19364 {{anchorencode: _ +:.3A%3A&&]] }}
19367 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19368 <p>.2B:.3A.253A.26.26.5D.5D
19373 Bug 6200: blockquotes and paragraph formatting
19394 Bug 8293: Use of center tag ruins paragraph formatting
19415 Parsing of overlapping (improperly nested) inline html tags
19417 <span><s>x</span></s>
19419 <p><span><s>x</span></s></span>
19422 <p><span><s>x</s></span>
19427 ### Language variants related tests
19430 Self-link in language variants
19432 title=[[Dunav]] language=sr
19434 Both [[Dunav]] and [[Дунав]] are names for this river.
19436 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19447 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19449 title=[[Duna]] language=sr
19451 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19453 <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.
19458 Link to a section of a variant of this title shouldn't be parsed as self-link
19460 title=[[Duna]] language=sr
19462 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19464 <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.
19469 Link to pages in language variants
19473 Main Page can be written as [[Маин Паге]]
19475 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19481 Multiple links to pages in language variants
19485 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19487 <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>.
19493 Simple template in language variants
19499 <p>This is a test template
19505 Template with explicit namespace in language variants
19511 <p>This is a test template
19517 Basic test for template parameter in language variants
19521 {{парамтест|param=foo}}
19523 <p>This is a test template with parameter foo
19529 Simple category in language variants
19533 [[Category:МедиаWики Усер'с Гуиде]]
19535 <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>
19551 ## We used to, but no longer wt2wt this test since the default serializer
19552 ## will normalize all categories to serialize on their own line.
19553 ## This wikitext usage is going to be fairly uncommon in production and
19554 ## selser will take care of preserving formatting in those scenarios.
19556 Don't convert blue categorylinks to another variant (bug 33210)
19562 [[A]][[Category:分类]]
19564 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
19566 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19567 <link rel="mw:PageProp/Category" href="Category:分类"/>
19571 Stripping -{}- tags (language variants)
19575 Latin proverb: -{Ne nuntium necare}-
19577 <p>Latin proverb: Ne nuntium necare
19583 Prevent conversion with -{}- tags (language variants)
19585 language=sr variant=sr-ec
19587 Latinski: -{Ne nuntium necare}-
19589 <p>Латински: Ne nuntium necare
19595 Prevent conversion of text with -{}- tags (language variants)
19597 language=sr variant=sr-ec
19599 Latinski: -{Ne nuntium necare}-
19601 <p>Латински: Ne nuntium necare
19607 Prevent conversion of links with -{}- tags (language variants)
19609 language=sr variant=sr-ec
19613 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19619 -{}- tags within headlines (within html for parserConvert())
19621 language=sr variant=sr-ec
19625 <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>
19631 Explicit definition of language variant alternatives
19633 language=zh variant=zh-tw
19635 -{zh:China;zh-tw:Taiwan}-, not China
19637 <p>Taiwan, not China
19643 Conversion around HTML tags
19645 language=sr variant=sr-ec
19647 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19648 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19651 <span title="ЛаCтин">ски</span>
19657 Explicit session-wise language variant mapping (A flag and - flag)
19659 language=zh variant=zh-tw
19661 Taiwan is not China.
19662 But -{A|zh:China;zh-tw:Taiwan}- is China,
19663 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19664 and -{China}- is China.
19666 <p>Taiwan is not China.
19667 But Taiwan is Taiwan,
19668 (This should be stripped!)
19669 and China is China.
19674 Explicit session-wise language variant mapping (H flag for hide)
19676 language=zh variant=zh-tw
19678 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19681 <p>(This should be stripped!)
19687 Adding explicit conversion rule for title (T flag)
19689 language=zh variant=zh-tw showtitle
19691 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19694 <p>Should be stripped!
19699 Testing that changing the language variant here in the tests actually works
19701 language=zh variant=zh showtitle
19703 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19706 <p>Should be stripped!
19711 Recursive conversion of alt and title attrs shouldn't clear converter state
19713 language=zh variant=zh-cn showtitle
19715 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19716 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19720 Should be stripped<span title="Exclamation">!</span>
19725 Bug 24072: more test on conversion rule for title
19727 language=zh variant=zh-tw showtitle
19729 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19730 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19733 <p>This should be stripped!
19734 This won't take interferes with the title rule.
19739 Partly disable title conversion if variant == main language code
19741 language=zh variant=zh title=[[ZH]] showtitle
19743 -{T|zh-cn:CN;zh-tw:TW}-
19751 Partly disable title conversion if variant == main language code, more
19753 language=zh variant=zh title=[[ZH]] showtitle
19763 Raw output of variant escape tags (R flag)
19765 language=zh variant=zh-tw
19767 Raw: -{R|zh:China;zh-tw:Taiwan}-
19769 <p>Raw: zh:China;zh-tw:Taiwan
19774 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19776 language=zh variant=zh-cn
19778 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19785 Conversion rules from [numeric-only string] to [something else] (T48634)
19787 language=zh variant=zh-cn
19789 -{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
19796 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19798 language=zh variant=zh-cn
19800 -{H|zh-cn:foo;zh-tw:;}-foobar
19807 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19809 language=zh variant=zh-cn
19811 -{H|=>zh-cn:foo;}-foobar
19818 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19820 language=zh variant=zh-cn
19829 Nested using of manual convert syntax
19831 language=zh variant=zh-hk
19833 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19835 <p>Nested: Hello Hong Kong!
19840 Proper conversion of text in external links
19842 language=sr variant=sr-ec
19844 http://www.google.com
19845 gopher://www.google.com
19846 [http://www.google.com http://www.google.com]
19847 [gopher://www.google.com gopher://www.google.com]
19848 [https://www.google.com irc://www.google.com]
19849 [ftp://www.google.com www.google.com/ftp://dir]
19850 [//www.google.com www.google.com]
19852 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19853 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19854 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19855 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19856 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19857 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19858 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19863 Do not convert roman numbers to language variants
19865 language=sr variant=sr-ec
19869 <p>Фридрих IV је цар.
19874 Unclosed language converter markup "-{"
19885 Don't convert raw rule "-{R|=>}-" to "=>"
19896 Don't break link parsing if language converter markup is in the caption.
19898 language=sr variant=sr-ec
19900 [[Main Page|-{R|main page}-]]
19902 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19906 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19908 Don't break image parsing if language converter markup is in the caption.
19912 [[File:Foobar.jpg|-{R|caption}-]]
19914 <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>
19918 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19920 Don't break list handling if language converter markup is in the item.
19922 language=zh variant=zh-cn
19924 ;-{zh-cn:AAA;zh-tw:BBB}-
19926 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19933 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19935 Don't break table handling if language converter markup is in the cell.
19937 language=sr variant=sr-ec
19960 Bug 529: Uncovered bullet
19969 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19970 # Templates in Wikipedia rely on this behavior, as tidy has always been
19971 # enabled there. These tests are normally run *without* tidy, so specify the
19972 # full output here.
19973 # To test realistic parsing behavior, apply a tidy-like transformation to both
19974 # the expected output and your parser's output.
19976 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19978 ******* Foo {{bullet}}
19980 <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>
19986 Bug 529: Uncovered table already at line-start
20009 Bug 529: Uncovered bullet in parser function result
20011 * Foo {{lc:{{bullet}} }}
20019 Bug 5678: Double-parsed template argument
20021 {{lc:{{{1}}}|hello}}
20028 Bug 5678: Double-parsed template invocation
20030 {{lc:{{paramtest {{!}} param = hello }} }}
20032 <p>{{paramtest | param = hello }}
20037 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20040 title=[[Main Page]]
20042 {{PRVNÍVELKÉ:ěščř}}
20043 {{prvnívelké:ěščř}}
20063 Morwen/13: Unclosed link followed by heading
20070 <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>
20075 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20082 <h1><span class="mw-headline" id="heading">heading</span></h1>
20087 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20094 <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>
20109 Paragraphs inside divs (no extra line breaks)
20121 Paragraphs inside divs (extra line break on open)
20136 Paragraphs inside divs (extra line break on close)
20151 Paragraphs inside divs (extra line break on open and close)
20168 Nesting tags, paragraphs on lines which begin with <div>
20170 <div></div><strong>A
20173 <p><strong>A</strong></p>
20174 <p><strong>B</strong></p>
20182 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20184 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20186 <blockquote>Line one
20188 Line two</blockquote>
20190 <blockquote>Line one
20191 Line two</blockquote>
20195 <p>Line one Line two</p>
20200 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20205 Line two</blockquote>
20210 Line two</blockquote>
20215 Line two</blockquote>
20219 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20221 <blockquote>Line one
20226 <blockquote>Line one
20239 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20261 Paragraphs inside blockquotes/divs (no extra line breaks)
20263 <blockquote><div>Line one
20265 Line two</div></blockquote>
20267 <blockquote><div>Line one
20268 Line two</div></blockquote>
20273 Paragraphs inside blockquotes/divs (extra line break on open)
20278 Line two</div></blockquote>
20283 Line two</div></blockquote>
20288 Paragraphs inside blockquotes/divs (extra line break on close)
20290 <blockquote><div>Line one
20293 </div></blockquote>
20295 <blockquote><div>Line one
20298 </div></blockquote>
20303 Paragraphs inside blockquotes/divs (extra line break on open and close)
20309 </div></blockquote>
20315 </div></blockquote>
20320 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20322 wgLinkHolderBatchSize=0
20328 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20329 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20330 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20335 Free external link invading image caption
20337 [[Image:Foobar.jpg|thumb|http://x|hello]]
20339 <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>
20344 Bug 15196: localised external link numbers
20348 [http://en.wikipedia.org/]
20350 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20353 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20357 Multibyte character in padleft
20359 {{padleft:-Hello|7|Æ}}
20366 Multibyte character in padright
20368 {{padright:Hello-|7|Æ}}
20375 formatdate parser function
20377 {{#formatdate:2009-03-24}}
20379 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20384 formatdate parser function, with default format
20386 {{#formatdate:2009-03-24|mdy}}
20388 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20393 Spacing of numbers in formatted dates
20395 {{#formatdate:January 15}}
20397 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20402 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
20404 language=nl title=[[MediaWiki:Common.css]]
20406 {{#formatdate:2009-03-24|dmy}}
20408 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20421 Edit comment with link
20425 I like the [[Main Page]] a lot
20427 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20431 Edit comment with link and link text
20435 I like the [[Main Page|best pages]] a lot
20437 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20441 Edit comment with link and link text with suffix
20445 I like the [[Main Page|best page]]s a lot
20447 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20451 Edit comment with section link (non-local, eg in history list)
20453 comment title=[[Main Page]]
20455 /* External links */ removed bogus entries
20457 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20461 Edit comment with section link and text before it (non-local, eg in history list)
20463 comment title=[[Main Page]]
20465 pre-comment text /* External links */ removed bogus entries
20467 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>
20471 Edit comment with section link (local, eg in diff view)
20473 comment local title=[[Main Page]]
20475 /* External links */ removed bogus entries
20477 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20481 Edit comment with subpage link (bug 14080)
20485 title=[[Subpage test]]
20487 Poked at a [[/subpage]] here...
20489 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20493 Edit comment with subpage link and link text (bug 14080)
20497 title=[[Subpage test]]
20499 Poked at a [[/subpage|neat little page]] here...
20501 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20505 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20508 title=[[Subpage test]]
20510 Poked at a [[/subpage]] here...
20512 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20516 Edit comment with bare anchor link (local, as on diff)
20520 title=[[Main Page]]
20524 <a href="#section">#section</a>
20528 Edit comment with bare anchor link (non-local, as on history)
20531 title=[[Main Page]]
20535 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20539 Anchor starting with underscore
20545 <p><a href="#_ref">One</a>
20548 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20552 Id starting with underscore
20554 <div id="_ref"></div>
20556 <div id="_ref"></div>
20561 Space normalisation on autocomment (bug 22784)
20564 title=[[Main Page]]
20566 /* __hello__world__ */
20568 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20572 percent-encoding and + signs in comments (Bug 26410)
20576 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20578 <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>
20581 # Parsoid doesn't support this yet: see bug 73581
20582 # but it *should* omit the 'src' attribute if the image is bad.
20583 # PHP side of tests was disabled in
20584 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20585 # because of issues in the PHP parserTests infrastructure
20586 # (but the output below is indeed what the PHP side emits)
20588 Bad images - basic functionality
20591 !! DISABLED/html/php
20593 <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>
20597 Bad images - bug 16039: text after bad image disappears
20602 !! DISABLED/html/php
20608 <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>
20613 Verify that displaytitle works (bug #22501) no displaytitle
20617 wgAllowDisplayTitle=true
20618 wgRestrictDisplayTitle=false
20620 this is not the the title
20623 <p>this is not the the title
20628 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20633 wgAllowDisplayTitle=true
20634 wgRestrictDisplayTitle=false
20636 this is not the the title
20637 {{DISPLAYTITLE:whatever}}
20640 <p>this is not the the title
20645 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20650 wgAllowDisplayTitle=true
20651 wgRestrictDisplayTitle=true
20653 this is not the the title
20654 {{DISPLAYTITLE:whatever}}
20657 <p>this is not the the title
20658 <span class="error"><strong>Warning:</strong> Display title "whatever" was ignored since it is not equivalent to the page's actual title.</span>
20663 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20668 wgAllowDisplayTitle=true
20669 wgRestrictDisplayTitle=true
20671 this is not the the title
20672 {{DISPLAYTITLE:screen}}
20675 <p>this is not the the title
20680 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20685 wgAllowDisplayTitle=false
20687 this is not the the title
20688 {{DISPLAYTITLE:screen}}
20691 <p>this is not the the title
20692 <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>
20697 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20702 wgAllowDisplayTitle=false
20704 this is not the the title
20707 <p>this is not the the title
20712 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20717 wgAllowDisplayTitle=true
20718 wgRestrictDisplayTitle=true
20720 this is not the the title
20721 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20723 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20724 <p>this is not the the title
20729 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20734 wgAllowDisplayTitle=true
20735 wgRestrictDisplayTitle=true
20737 this is not the the title
20738 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20740 <span style="color: red;">s</span>creen
20741 <p>this is not the the title
20746 Page status indicators: Empty name is invalid
20750 <indicator name=" "></indicator>
20751 <indicator></indicator>
20753 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20754 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20759 Page status indicators: Weird syntaxes that are okay
20763 <indicator name="empty" />
20764 <indicator name="name"></indicator>
20773 Page status indicators: Torture test
20777 <indicator name="01">hello world</indicator>
20778 <indicator name="02">[[Main Page]]</indicator>
20779 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20780 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20781 <indicator name="05">* foo
20783 <indicator name="06"><nowiki>foo</nowiki></indicator>
20784 <indicator name="07"> Preformatted</indicator>
20785 <indicator name="08"><div>Broken tag</indicator>
20786 <indicator name="09">{| class=wikitable
20789 <indicator name="10">Two
20791 paragraphs</indicator>
20794 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20795 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" />
20796 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>
20797 05=<ul><li> foo</li>
20801 07=<pre>Preformatted
20803 08=<div>Broken tag</div>
20805 09=<table class="wikitable">
20822 preload: check <noinclude> and <includeonly>
20826 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20832 preload: check <onlyinclude>
20836 Goodbye <onlyinclude>Hello world</onlyinclude>
20842 preload: can pass tags through if we want to
20846 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20848 <includeonly>Hello world</includeonly>
20852 preload: check that it doesn't try to do tricks
20856 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20858 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20862 Play a bit with r67090 and bug 3158
20864 <div style="width:50% !important"> </div>
20865 <div style="width:50% !important"> </div>
20866 <div style="width:50% !important"> </div>
20867 <div style="border : solid;"> </div>
20869 <div style="width:50% !important"> </div>
20870 <div style="width:50% !important"> </div>
20871 <div style="width:50% !important"> </div>
20872 <div style="border : solid;"> </div>
20875 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20876 <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>
20877 <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>
20878 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20883 HTML5 data attributes
20885 <span data-foo="bar">Baz</span>
20886 <p data-abc-def_hij="">Quuz</p>
20888 <p><span data-foo="bar">Baz</span>
20890 <p data-abc-def_hij="">Quuz</p>
20893 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
20894 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
20898 Strip reserved data attributes
20900 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
20902 <div data-ok="fred">d</div>
20905 <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>
20909 percent-encoding and + signs in internal links (Bug 26410)
20911 [[User:+%]] [[Page+title%]]
20912 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20913 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20914 [[%33%45]] [[%33%45+]]
20916 <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>
20917 <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>
20918 <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>
20919 <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>
20922 <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>
20923 <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>
20924 <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>
20925 <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>
20929 Special characters in embedded file links (bug 27679)
20931 [[File:Contains & ampersand.jpg]]
20932 [[File:Does not exist.jpg|Title with & ampersand]]
20934 <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>
20935 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20938 <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>
20939 <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>
20943 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20945 Text's been normalized?
20947 <p>Text's been normalized?
20952 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20954 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20956 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20961 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20963 [http://www.example.org/ ideograms]
20965 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20970 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20972 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20974 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
20998 Bug 31098 Template which includes system messages which includes the template
21002 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21003 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21008 Bug31490 Turkish: ucfirst 'blah'
21019 Bug31490 Turkish: ucfirst 'ix'
21030 Bug31490 Turkish: lcfirst 'BLAH'
21041 Bug31490 Turkish: ucfırst (with a dotless i)
21047 <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>
21052 Bug31490 ucfırst (with a dotless i) with English language
21058 <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>
21063 Bug 26375: TOC with italics
21065 title=[[Main Page]]
21068 == ''Lost'' episodes ==
21070 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21072 <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>
21076 <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>
21081 Bug 26375: TOC with bold
21083 title=[[Main Page]]
21086 == '''should be bold''' then normal text ==
21088 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21090 <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>
21094 <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>
21099 Bug 33845: Headings become cursive in TOC when they contain an image
21101 title=[[Main Page]]
21104 == Image [[Image:foobar.jpg]] ==
21106 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21108 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21112 <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>
21117 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21119 title=[[Main Page]]
21122 == <blockquote>Quote</blockquote> ==
21124 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21126 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21130 <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>
21134 <div id="toc" class="toc">
21135 <div id="toctitle">
21139 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21143 <h2><span class="mw-headline" id="Quote"></span></h2>
21145 <p><span class="mw-headline" id="Quote">Quote</span></p>
21147 <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>
21151 Unclosed tags in TOC
21153 title=[[Main Page]]
21157 <small>Hanc marginis exiguitas non caperet.</small>
21160 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21162 <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>
21166 <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>
21167 <p><small>Hanc marginis exiguitas non caperet.</small>
21173 Multiple tags in TOC
21176 == <i>Foo</i> <b>Bar</b> ==
21178 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21180 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21182 <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>
21183 <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>
21187 <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>
21188 <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>
21192 <div id="toc" class="toc">
21193 <div id="toctitle">
21197 <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>
21198 <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>
21202 <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>
21203 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21205 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21207 <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>
21210 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21211 # html5 tag parsing.
21213 Tags with parameters in TOC
21218 == <sup class="in-h2">Hello</sup> ==
21220 == <sup class="a > b">Evilbye</sup> ==
21222 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21224 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21225 <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>
21229 <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>
21230 <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>
21233 <meta property="mw:PageProp/toc" />
21234 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21236 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21240 span tags with directionality in TOC
21243 == <span dir="ltr">C++</span> ==
21245 == <span dir="rtl">זבנג!</span> ==
21247 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21249 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21251 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21253 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21255 <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>
21256 <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>
21257 <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>
21258 <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>
21259 <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>
21263 <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>
21264 <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>
21265 <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>
21266 <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>
21267 <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>
21272 Bug 72884: bdi element in ToC
21275 == <bdi>test</bdi> ==
21277 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21279 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21283 <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>
21287 # Note that the html output does not have the <p></p>, but the
21288 # html+tidy output *does*. This is because the empty <p></p> is
21289 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21291 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21296 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21298 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21302 <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>
21306 <div id="toc" class="toc">
21307 <div id="toctitle">
21311 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21315 <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>
21321 == {{int:headline_sample}} ==
21325 Bug 32057: Title needed when expanding <h> nodes.
21327 title=[[Main Page]]
21331 <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>
21336 Strip marker in urlencode
21338 {{urlencode:x<nowiki/>y}}
21339 {{urlencode:x<nowiki/>y|wiki}}
21340 {{urlencode:x<nowiki/>y|path}}
21341 {{urlencode:x<pre id="one">two</pre>y}}
21369 Strip marker in formatNum
21371 {{formatnum:1<nowiki/>2}}
21372 {{formatnum:1<nowiki/>2|R}}
21380 Check noCommafy in formatNum
21384 {{formatnum:123456.78}}
21385 {{formatnum:123456.78|NOSEP}}
21393 Wrong option for formatNum (bug 56199)
21395 {{formatnum:1,234.56|Random}}
21396 {{formatnum:1,234.56|EVERYTHING}}
21397 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21406 Strip marker in grammar
21410 {{grammar:elative|foo<nowiki/>bar}}
21417 Strip marker in padleft
21419 {{padleft:|2|x<nowiki/>y}}
21426 Strip marker in padright
21428 {{padright:|2|x<nowiki/>y}}
21435 Strip marker in anchorencode
21437 {{anchorencode:x<nowiki/>y}}
21444 nowiki inside link inside heading (bug 18295)
21446 ==[[foo|x<nowiki>y</nowiki>z]]==
21448 <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>
21453 new support for bdi element (bug 31817)
21455 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21457 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21462 Ignore pipe between table row attributes
21466 |- id=foo | style='color: red'
21474 <tr id="foo" style="color: red">
21481 Gallery override link with WikiLink (bug 34852)
21484 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21487 <ul class="gallery mw-gallery-traditional">
21488 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21489 <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>
21490 <div class="gallerytext">
21500 Gallery override link with absolute external link (bug 34852)
21503 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21506 <ul class="gallery mw-gallery-traditional">
21507 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21508 <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>
21509 <div class="gallerytext">
21519 Gallery override link with malicious javascript (bug 34852)
21522 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21525 <ul class="gallery mw-gallery-traditional">
21526 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21527 <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>
21528 <div class="gallerytext">
21538 Gallery with invalid title as link (bug 43964)
21541 File:foobar.jpg|link=<
21544 <ul class="gallery mw-gallery-traditional">
21545 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21546 <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>
21547 <div class="gallerytext">
21555 Language parser function
21564 Padleft and padright as substr
21566 {{padleft:|3|abcde}}
21567 {{padright:|3|abcde}}
21575 Special parser function
21577 {{#special:RandomPage}}
21578 {{#special:BaDtItLe}}
21579 {{#special:Foobar}}
21588 Bug 34939 - Case insensitive link parsing ([HttP://])
21590 [HttP://MediaWiki.Org/]
21592 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21595 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21599 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21601 [HttP://MediaWiki.Org/ MediaWiki]
21603 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21608 Bug 34939 - Case insensitive link parsing (HttP://)
21610 HttP://MediaWiki.Org/
21612 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21615 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21633 <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>
21634 <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>
21635 <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>
21636 <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>
21637 <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>
21643 ### Parsoid-specific tests
21644 ### Parsoid-PHP parser incompatibilities
21647 1. SOL-sensitive wikitext tokens as template-args
21649 parsoid=wt2html,wt2wt
21655 <span about="#mwt1" typeof="mw:Transclusion">
21656 </span><ul about="#mwt1"><li>a</li>
21658 <span about="#mwt2" typeof="mw:Transclusion">
21659 </span><ol about="#mwt2"><li>a</li>
21661 <span about="#mwt3" typeof="mw:Transclusion">
21662 </span><dl about="#mwt3"><dd>a</dd>
21666 #### -----------------------------------------------------------------
21667 #### Parsoid-specific functionality tests
21668 #### -----------------------------------------------------------------
21670 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21671 # We know wt2wt will fail, but we expect selser to pass.
21672 # Due to the nature of our testing, wt2wt and selser tests will enter the
21673 # blacklist and we'll catch selser regressions based on changes to the
21674 # blacklist entries for selser tests.
21676 1. Bad treebuilder fixup of formatting elt is cleaned up
21678 parsoid=wt2html,wt2wt
21683 [[Image:Foobar.jpg|right|Test]]
21690 <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>
21697 2. Bad treebuilder fixup of formatting elt is cleaned up
21699 parsoid=wt2html,wt2wt
21701 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21703 <small>[[Image:Foobar.jpg|right|300px]]</small>
21707 <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>
21709 <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>
21713 3. Bad treebuilder fixup of formatting elt is cleaned up
21715 parsoid=wt2html,wt2wt
21717 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21719 <p><small><b>foo</b></small></p>
21720 <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>
21721 <p><small><b>bar</b></small></p>
21725 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21727 parsoid=wt2html,wt2wt
21729 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21731 <p><b><small></small></b></p>
21732 <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>
21736 #### ----------------------------------------------------------------
21737 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
21738 #### tags. Parsoid's output for these tags differs from that of the
21740 #### ----------------------------------------------------------------
21743 Ref: 1. ref-location should be replaced with an index span
21746 B <ref name="x">foo</ref>
21750 <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>
21751 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>
21752 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>
21753 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21754 <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>
21755 <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>
21756 <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>
21761 Ref: 2. ref-tags with identical names should all get the same index
21763 A <ref name="x">foo</ref>
21767 <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>
21768 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>
21769 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21770 <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>
21775 Ref: 3. spaces in ref-names should be ignored
21777 A <ref name="x">foo</ref>
21778 B <ref name=" x " />
21782 <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>
21783 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>
21784 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>
21785 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21786 <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>
21790 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21792 Ref: 4. 'constructor' should be accepted as a valid ref-name
21794 A <ref name="constructor">foo</ref>
21797 <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>
21798 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21799 <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>
21804 Ref: 5. body should accept generic wikitext
21807 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
21812 <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>
21814 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21815 <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>
21821 Ref: 6. indent-pres should not be output in ref-body
21831 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
21833 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21834 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo
21842 Ref: 7. No p-wrapping in ref-body
21859 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
21861 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21862 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo
21877 Ref: 8. transclusion wikitext has lower precedence
21879 A <ref> foo {{echo|</ref> B C}}
21883 <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>
21884 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21885 <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>
21890 Ref: 9. unclosed comments should not leak out of ref-body
21892 A <ref> foo <!--</ref> B C
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> B C</p>
21896 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21897 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <!----></span></li>
21902 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21904 A <ref> <b> foo </ref> B C
21908 <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>
21911 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21912 <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>
21917 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21923 <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
21924 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>
21925 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21926 <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>
21927 <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>
21932 Ref: 12. ref-tags act as trailing newline migration barrier
21934 <!--the newline at the end of this line moves out of the p tag-->a
21936 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21942 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21945 <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>
21946 <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>
21949 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21950 <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>
21951 <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>
21955 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21962 <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
21963 <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>
21964 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21965 <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>
21966 <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
21972 Ref: 14. A nested ref-tag should be emitted as plain text
21974 <ref>foo <ref>bar</ref> baz</ref>
21978 <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>
21980 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21981 <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>
21986 Ref: 15. ref-tags with identical names should get identical indexes
21988 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21989 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21993 <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>
21994 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>
21996 <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>
22000 ## We don't bother wt2wt-ing non-standard whitespace
22002 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22010 <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>
22011 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22012 <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>
22016 Ref: 17. Generate valid HTML5 id/about attributes
22018 <ref name="a b">foo</ref>
22022 <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>
22025 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22026 <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>
22031 Ref: 18. T58916: Extension attributes should be parsed as plain text
22033 <ref name="{{echo|a}}">foo</ref>
22037 <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>
22040 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22041 <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>
22046 Ref: 19. ref-tags with identical name encodings should get identical indexes
22048 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22052 <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>
22054 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22055 <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>
22060 Ref: 20. ref-tags with identical names but different content should keep it
22062 A <ref name="foo">Foo one</ref>
22063 B <ref name="foo">Foo two</ref>
22064 C <ref name="foo" />
22068 <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>
22069 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>
22070 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>
22072 <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>
22077 References: 1. references tag without any refs should be handled properly
22081 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22085 References: 2. references tag with group only outputs references from that group
22087 A <ref group="a">foo</ref>
22088 B <ref group="b">bar</ref>
22091 <references group="a" />
22093 <references group="b" />
22095 <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>
22096 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>
22097 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>
22099 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22100 <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>
22102 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22103 <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>
22105 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22106 <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>
22111 References: 3. ref list should be cleared after processing references
22121 <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>
22123 <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>
22126 <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>
22128 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22129 <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>
22134 References: 4. only referenced group should be cleared after processing references
22136 A <ref group="a">afoo</ref>
22139 <references group="a" />
22145 <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>
22146 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>
22148 <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>
22151 <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>
22153 <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>
22157 ## Don't expect this to rt since we're dropping content
22159 References: 5. ref tags in references should be processed while ignoring all other content
22161 parsoid=wt2html,html2html
22164 B <ref name="b">bar</ref>
22167 <ref name="a">foo</ref>
22168 This should just get lost.
22171 <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>
22172 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>
22175 <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>
22180 References: 6. <references /> from a transclusion
22182 <ref>Foo</ref> {{echo|<references />}}
22184 <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>
22189 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22191 A <ref>foo bar for a</ref>
22192 B <ref group="X" name="b" />
22196 <references group="X">
22197 <ref name="b">foo</ref>
22200 <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>
22201 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>
22204 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22205 <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>
22208 <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"}}'>
22209 <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>
22214 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22216 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22219 <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>
22220 <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>
22224 # This test only works in wt2html now as the <references /> are always generated
22225 # unless selser is active. Once T72722 is fixed, we should add a changes test
22226 # here to ensure that unrelated changes don't add the new <references />
22227 # when selser is active.
22229 References: 9. Generate missing references list at the end
22232 B <ref group="inexistent">bar</ref>
22234 <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>
22235 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
22236 <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>
22238 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
22239 <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>
22244 References: 10. New <references/> shouldn't be added for unrelated edits.
22247 "modes": ["selser"],
22248 "changes": [["#x", "remove"]],
22252 Unrelated text<span id="x"> that's going to disappear</span>.
22260 Entities in ref name
22262 <ref name="test & me">hi</ref>
22265 <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>
22266 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22267 <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>
22271 ## The output here may look funny, but it's what the php parser will do. The
22272 ## unclosed references tag becomes escaped text, and then a new references
22273 ## tag is auto-generated. The test is wt2html only because it roundtrips with
22274 ## nowiki tags, and the auto-generated references tag is only dropped in
22277 Generate references for unclosed references tag
22285 <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>
22287 <p><references></p>
22288 <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>
22292 New reference serializes on its own line
22294 parsoid=wt2wt,html2wt
22299 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22302 #### ----------------------------------------------------------------
22303 #### Parsoid-only testing of Parsoid's impl of LST
22304 #### Not implemented yet, see
22305 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22306 #### ----------------------------------------------------------------
22309 LST Sections: 1. Simple section start and end
22311 parsoid={ "suppressErrors": true }
22313 <section begin="2011-05-16" />
22314 <section end="2014-04-10 (MW 1.23wmf22)" />
22316 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22317 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22320 #--------- Test stripping of empty nodes in template content ----------
22322 Empty LI and TR nodes should be stripped from template content
22327 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22331 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22344 Empty LI and TR nodes should not be stripped from top-level content
22371 Empty TR nodes should not be stripped if they have any attributes set
22373 {{EmptyTRWithHTMLAttrTest}}
22375 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22376 <tr align="center"></tr>
22377 <tr><td>foo</td></tr>
22378 <tr align="center"></tr>
22379 <tr><td>bar</td></tr>
22383 #### ----------------------------------------------------------------
22384 #### The following section of tests are primarily to test
22385 #### wikitext escaping capabilities of Parsoid. Given that
22386 #### escaping can be done any number of ways, the wikitext (input)
22387 #### is always adjusted to reflect how Parsoid adds nowiki
22390 #### We are marking several tests as parsoid-only since the
22391 #### HTML in the result section is different from what the
22392 #### PHP parser generates for it.
22393 #### ----------------------------------------------------------------
22396 #### --------------- Headings ---------------
22398 #### 1. Nested inside html <h1>=foo=</h1>
22399 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22400 #### 3. Nested inside html with wikitext split by html tags
22401 #### 4. No escape needed
22402 #### 5. Empty headings <h1></h1>
22403 #### 6. Heading chars in SOL context
22404 #### ----------------------------------------
22406 Headings: 0. Unnested
22416 <p>=foo<i>a</i>=</p>
22418 <nowiki>=foo=</nowiki>
22420 <nowiki> </nowiki>=foo=
22422 <nowiki>=foo=</nowiki>
22424 =foo''a''<nowiki>=</nowiki>
22427 # New headings and existing headings are handled differently
22429 Headings: 1. Nested inside html
22437 <h1 data-parsoid=''>=foo=</h1>
22438 <h2 data-parsoid=''>=foo=</h2>
22439 <h3 data-parsoid=''>=foo=</h3>
22440 <h4 data-parsoid=''>=foo=</h4>
22441 <h5 data-parsoid=''>=foo=</h5>
22442 <h6 data-parsoid=''>=foo=</h6>
22450 =<nowiki>=foo=</nowiki>=
22451 ==<nowiki>=foo=</nowiki>==
22452 ===<nowiki>=foo=</nowiki>===
22453 ====<nowiki>=foo=</nowiki>====
22454 =====<nowiki>=foo=</nowiki>=====
22455 ======<nowiki>=foo=</nowiki>======
22460 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22469 <nowiki>*</nowiki>bar
22475 <nowiki>=bar=</nowiki>
22479 Headings: 3. Nested inside html with wikitext split by html tags
22483 <h1>=<b>bold</b>foo=</h1>
22485 = ='''bold'''foo= =
22489 Headings: 4a. No escaping needed (testing just h1 and h2)
22500 <h1><i>=</i>foo=</h1>
22520 Headings: 4b. No escaping needed (inside p-tags)
22535 Headings: 5. Empty headings
22539 <h1 data-parsoid='{}'></h1>
22541 <h2 data-parsoid='{}'></h2>
22543 <h3 data-parsoid='{}'></h3>
22545 <h4 data-parsoid='{}'></h4>
22547 <h5 data-parsoid='{}'></h5>
22549 <h6 data-parsoid='{}'></h6>
22559 =====<nowiki/>=====
22561 ======<nowiki/>======
22565 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22575 <nowiki>=a=</nowiki>
22577 <nowiki>=a=</nowiki>
22579 <nowiki>=a=</nowiki>
22583 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22596 <nowiki>=a=</nowiki>
22599 <nowiki>=a=</nowiki>
22602 <nowiki>=a=</nowiki>
22607 Headings: 6c. Heading chars in SOL context (leading newline break)
22615 <nowiki>=b=</nowiki>
22619 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22623 <!--c0--><p>=a=</p>
22625 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22627 <!--c0--><nowiki>=a=</nowiki>
22629 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22633 Headings: 6d. Heading chars in SOL context (No escaping needed)
22643 Headings: 7. Insert a newline between new content and headings
22649 <h2 data-parsoid='{}'>A</h2>
22650 <p data-parsoid='{}'>a</p>
22660 #### --------------- Lists ---------------
22661 #### 0. Outside nests (*foo, etc.)
22662 #### 1. Nested inside html <ul><li>*foo</li></ul>
22663 #### 2. Inside definition lists
22664 #### 3. Only bullets at start should be escaped
22665 #### 4. No escapes needed
22666 #### 5. No unnecessary escapes
22667 #### 6. Escape bullets in SOL position
22668 #### 7. Escape bullets in a multi-line context
22669 #### ----------------------------------------
22672 Lists: 0. Outside nests
22682 <nowiki>*</nowiki>foo
22684 <nowiki>#</nowiki>foo
22686 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
22689 ## Making these next 3 tests Parsoid-only since they are html2wt tests
22690 ## to test wikitext escaping, and insignificant whitespace diffs
22691 ## cause PHP parser tests to barf
22693 Lists: 1. Nested inside html (No unnecessary escapes)
22702 <li data-parsoid='{}'>*foo</li>
22703 <li data-parsoid='{}'>#foo</li>
22704 <li data-parsoid='{}'>:foo</li>
22705 <li data-parsoid='{}'>;foo</li>
22713 <li data-parsoid='{}'>*foo</li>
22714 <li data-parsoid='{}'>#foo</li>
22715 <li data-parsoid='{}'>:foo</li>
22716 <li data-parsoid='{}'>;foo</li>
22723 *<nowiki>*foo</nowiki>
22724 *<nowiki>#foo</nowiki>
22725 *<nowiki>:foo</nowiki>
22726 *<nowiki>;foo</nowiki>
22732 #<nowiki>*foo</nowiki>
22733 #<nowiki>#foo</nowiki>
22734 #<nowiki>:foo</nowiki>
22735 #<nowiki>;foo</nowiki>
22739 Lists: 2. Inside definition lists
22743 <dl><dt>;foo</dt></dl>
22744 <dl><dt>:foo</dt></dl>
22747 <dl><dd>:foo</dd></dl>
22751 ; <nowiki>:foo</nowiki>
22753 ; <nowiki>:foo</nowiki>
22760 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
22766 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
22770 *<nowiki>*foo</nowiki>''it''*bar
22774 Lists: 4. No escapes needed
22787 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22791 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22805 Lists: 5. No unnecessary escapes
22809 <ul><li> bar <span>[[foo]]</span></li></ul>
22810 <ul><li> =bar <span>[[foo]]</span></li></ul>
22811 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22812 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22813 <ul><li> =bar <span>foo]]</span>=</li></ul>
22814 <ul><li> <s></s>: a</li></ul>
22815 <ul><li> <i>* foo</i></li></ul>
22818 * bar <span><nowiki>[[foo]]</nowiki></span>
22820 * =bar <span><nowiki>[[foo]]</nowiki></span>
22822 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22824 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22826 * =bar <span>foo]]</span>=
22834 Lists: 6. Escape bullets in SOL position
22838 <p><!--cmt-->*foo</p>
22840 <!--cmt--><nowiki>*</nowiki>foo
22844 Lists: 7. Escape bullets in a multi-line context
22853 <nowiki>*</nowiki>b
22857 Lists: 8. Escape colons only if not present in tags
22861 <dl><dt>a:b<i>c:d</i></dt></dl>
22863 ; <nowiki>a:b</nowiki>''c:d''
22866 #### --------------- HRs ---------------
22867 #### 1. Single line
22868 #### -----------------------------------
22871 HRs: 1. Single line
22879 ----<nowiki>----</nowiki>
22884 #### --------------- Tables ---------------
22885 #### 1a. Simple example
22886 #### 1b. No escaping needed (!foo)
22887 #### 1c. No escaping needed (|foo)
22888 #### 1d. No escaping needed (|}foo)
22890 #### 2a. Nested in td (<td>foo|bar</td>)
22891 #### 2b. Nested in td (<td>foo||bar</td>)
22892 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22894 #### 3a. Nested in th (<th>foo!bar</th>)
22895 #### 3b. Nested in th (<th>foo!!bar</th>)
22896 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22900 #### 4c. No escaping needed
22901 #### --------------------------------------
22904 Tables: 1a. Simple example
22912 <nowiki>{|</nowiki>
22917 Tables: 1b. No escaping needed
22928 Tables: 1c. No escaping needed
22939 Tables: 1d. No escaping needed
22950 Tables: 2a. Nested in td
22955 <td>foo|bar</td></tr>
22956 <tr><td>x<div>a|b</div></td>
22960 |<nowiki>foo|bar</nowiki>
22962 |x<div><nowiki>a|b</nowiki></div>
22978 Tables: 2b. Nested in td
22984 <td>a<i>b||c</i></td>
22985 <td>a<i><div>b||c</div></i></td>
22986 </tr></tbody></table>
22989 |<nowiki>foo||bar</nowiki>
22990 |a''<nowiki>b||c</nowiki>''
22991 |a''<div><nowiki>b||c</nowiki></div>''
23000 <td>a<i><div>b||c</div></i>
23006 Tables: 2c. Nested in td -- no escaping needed
23024 Tables: 3a. Nested in th
23042 Tables: 3b. Nested in th
23047 <tr><th>foo!!bar</th>
23048 <th><i>foo|bar</i></th>
23049 <th><i>foo!!bar</i></th>
23050 <th><i><span>foo!!bar</span></i></th>
23051 </tr></tbody></table>
23054 !<nowiki>foo!!bar</nowiki>
23055 !''<nowiki>foo|bar</nowiki>''
23056 !''<nowiki>foo!!bar</nowiki>''
23057 !''<span><nowiki>foo!!bar</nowiki></span>''
23066 <th><i>foo!!bar</i>
23068 <th><i><span>foo!!bar</span></i>
23074 Tables: 3c. Nested in th
23079 <tr><th>foo||bar</th>
23080 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23081 </tr></tbody></table>
23084 !<nowiki>foo||bar</nowiki>
23085 !<nowiki>foo||bar</nowiki>
23098 Tables: 4a. Escape -
23117 |<nowiki>-bar</nowiki>
23122 Tables: 4b. Escape +
23141 |<nowiki>+bar</nowiki>
23146 Tables: 4c. No escaping needed
23151 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23152 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23158 <div>a|b</div></td>
23203 Tables: 4d. No escaping needed
23208 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23209 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23210 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23221 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23231 T97430: Don't emit empty nowiki pairs around marker meta tags
23235 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23236 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23238 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23239 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23243 Unclosed xmlish element in table line shouldn't eat end delimiters
23248 <tbody><tr><td> <foo</td>
23249 <td> bar></td></tr>
23266 #### --------------- Links ----------------
23267 #### 1. Quote marks in link text
23268 #### 2. Wikilinks: Escapes needed
23269 #### 3. Wikilinks: No escapes needed
23270 #### 4. Extlinks: Escapes needed
23271 #### 5. Extlinks: No escapes needed
23272 #### --------------------------------------
23274 Links 1. WikiLinks: No escapes needed
23278 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23279 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23280 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23284 [[Foo|x [Foobar] x]]
23286 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23287 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23288 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23293 Links 2. WikiLinks: Escapes needed
23297 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23298 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23299 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23300 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23301 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23302 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23303 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23304 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23305 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23306 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23308 [[Foo|<nowiki>Foobar]</nowiki>]]
23309 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23310 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23311 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23312 [[Foo|<nowiki>|Bar</nowiki>]]
23313 [[Foo|<nowiki>]]bar</nowiki>]]
23314 [[Foo|<nowiki>[[bar</nowiki>]]
23315 [[Foo|<nowiki>x [[ y</nowiki>]]
23316 [[Foo|<nowiki>x ]] y</nowiki>]]
23317 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23319 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23320 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23321 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23322 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23323 <a href="/wiki/Foo" title="Foo">|Bar</a>
23324 <a href="/wiki/Foo" title="Foo">]]bar</a>
23325 <a href="/wiki/Foo" title="Foo">[[bar</a>
23326 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23327 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23328 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23333 Links 3. WikiLinks: No escapes needed
23337 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23338 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23343 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23344 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23349 Links 4. ExtLinks: Escapes needed
23353 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23354 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23355 <p>[http://google.com]</p>
23356 <p>[http://google.com google]</p>
23357 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23358 <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>
23360 [http://google.com <nowiki>[google]</nowiki>]
23361 [http://google.com <nowiki>google]</nowiki>]
23363 <nowiki>[http://google.com]</nowiki>
23365 <nowiki>[http://google.com google]</nowiki>
23367 [http://google.com<nowiki>]</nowiki>
23369 [{{echo|http://google.com}}<nowiki>]</nowiki>
23371 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23372 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23373 </p><p>[http://google.com]
23374 </p><p>[http://google.com google]
23375 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23376 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23381 Links 5. ExtLinks: No escapes needed
23385 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23386 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23388 [http://google.com [google]
23390 [[http://google.com]]
23392 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23393 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23398 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23402 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23403 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23404 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23405 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23406 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23407 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23408 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23409 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23410 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23411 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23412 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23413 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23414 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23417 x<nowiki/>http://example.com<nowiki/>y
23418 http://example.com<nowiki/>?x
23419 http://example.com<nowiki/>&x
23420 http://example.com<nowiki/>'x
23421 http://example.com<nowiki/>,x
23422 http://example.com<nowiki/>.x
23423 http://example.com<nowiki/>;x
23424 http://example.com<nowiki/>:x
23425 http://example.com<nowiki/>;x
23426 http://example.com<nowiki/>!x
23427 http://example.com<nowiki/>=x
23428 http://example.com<nowiki/>(x)
23429 http://example.com(x<nowiki/>)
23433 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23438 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23440 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23441 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23442 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23443 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23444 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23450 "http://example.com"
23451 (http://example.com)
23452 (http://example.com) foo
23453 http://example.com,
23454 http://example.com, foo
23457 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23459 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23460 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23461 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23462 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23463 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23468 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23472 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23473 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23475 http://example.com.,;:!?\
23476 -http://example.com:
23478 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23479 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23484 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23488 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23489 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23490 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23494 X<nowiki/>RFC 123<nowiki/>y
23498 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23502 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23503 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23504 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23511 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23512 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23513 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23518 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23522 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23523 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23524 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23528 X<nowiki/>PMID 123<nowiki/>y
23532 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23536 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23537 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23538 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23545 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23546 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23547 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23552 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23556 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23557 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23558 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23561 ISBN 1234567890<nowiki/>1
23562 ISBN 1234567890<nowiki/>x
23563 a<nowiki/>ISBN 1234567890<nowiki/>b
23567 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23571 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23575 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23580 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23584 <p>this is not a link: http://example.com
23587 this is not a link: <nowiki>http://example.com</nowiki>
23591 Links 15. Link trails can't become link prefixes.
23596 <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>
23598 [[Söfnuður]]-[[00]]
23600 <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>
23604 #### --------------- Quotes ---------------
23605 #### 1. Quotes inside <b> and <i>
23606 #### 2. Link fragments separated by <i> and <b> tags
23607 #### 3. Link fragments inside <i> and <b>
23608 #### 4. No escaping needed
23609 #### --------------------------------------
23611 1a. Quotes inside <b> and <i>
23622 <b>foo'<i>bar'</i>baz</b>
23631 <i>fools'<span> errand</span></i>
23632 <i><span>fool</span>'s errand</i>
23633 '<i>foo</i> bar '<i>baz</i>
23634 a|!*#-:;+-~[]{}b'<i>x</i>
23638 ''<nowiki>''foo''</nowiki>''
23639 ''<nowiki>'''foo'''</nowiki>''
23641 '''<nowiki/>'foo''''
23642 '''<nowiki>''foo''</nowiki>'''
23643 '''<nowiki>'''foo'''</nowiki>'''
23644 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23645 '''foo'''<nowiki/>'s
23651 '''foo'''<nowiki/>'
23652 ''''foo'''<nowiki/>'
23653 ''fools'<span> errand</span>''
23654 ''<span>fool</span>'s errand''
23655 '<nowiki/>''foo'' bar '''baz''
23656 a|!*#-:;+-~[]{}b'''x''
23660 1b. Quotes inside <b> and <i> with other tags on same line
23664 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23665 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23666 <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>
23667 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23668 '<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>
23669 '<i>foo</i> <div title="name">test</div>
23670 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23671 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23672 <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>
23675 '''a'' foo ''[[bar]]''
23676 ''a''' foo ''[[bar]]''
23677 ''a''' foo '''{{echo|[[bar]]}}'''
23678 [[foo]] x'''[[bar]]''
23679 '''foo'' <ref>test</ref>
23680 '''foo'' <div title="name">test</div>
23681 '''foo'' and <br> bar
23686 2. Link fragments separated by <i> and <b> tags
23690 <p>[[<i>foo</i>hello]]</p>
23691 <p>[[<b>foo</b>hello]]</p>
23693 [[''foo''<nowiki>hello]]</nowiki>
23695 [['''foo'''<nowiki>hello]]</nowiki>
23698 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23699 # this is one of the shortcomings of this format
23701 3. Link fragments inside <i> and <b>
23705 <p><i>[[foo</i>]]</p>
23706 <p><b>[[foo</b>]]</p>
23708 ''[[foo''<nowiki>]]</nowiki>
23710 '''[[foo'''<nowiki>]]</nowiki>
23714 4. No escaping needed
23718 <p>'<span><i>bar</i></span>'
23719 '<span><b>bar</b></span>'
23723 '<span>''bar''</span>'
23724 '<span>'''bar'''</span>'
23728 #### ----------- Paragraphs ---------------
23729 #### 1. No unnecessary escapes
23730 #### --------------------------------------
23733 1. No unnecessary escapes
23737 <p>bar <span>[[foo]]</span>
23738 </p><p>=bar <span>[[foo]]</span>
23739 </p><p>[[bar <span>[[foo]]</span>
23740 </p><p>]]bar <span>[[foo]]</span>
23741 </p><p>=bar <span>foo]]</span>=
23744 bar <span><nowiki>[[foo]]</nowiki></span>
23746 =bar <span><nowiki>[[foo]]</nowiki></span>
23748 [[bar <span><nowiki>[[foo]]</nowiki></span>
23750 ]]bar <span><nowiki>[[foo]]</nowiki></span>
23752 =bar <span>foo]]</span><nowiki>=</nowiki>
23755 #### ----------------------- PRE --------------------------
23756 #### 1. Leading whitespace in SOL context should be escaped
23757 #### ------------------------------------------------------
23759 1. Leading whitespace in SOL context should be escaped
23782 <nowiki> </nowiki>a
23784 <nowiki> </nowiki> a
23788 <nowiki> </nowiki> a
23790 <nowiki> </nowiki>a
23793 <nowiki> </nowiki>b
23816 2. Leading whitespace in non-indent-pre contexts should not be escaped
23820 <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>
23821 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23822 <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>
23832 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
23851 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
23855 <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>
23857 [[File:Foobar.jpg|thumb|caption]]
23861 5. Nowiki escaping should account for indent-pres
23871 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23884 #### --------------- Behavior Switches --------------------
23887 1. Valid behavior switches should be escaped
23894 <nowiki>__TOC__</nowiki>
23895 ''<nowiki>__TOC__</nowiki>''
23899 2. Invalid behavior switches should not be escaped
23910 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23912 Behavior switches should be SOL-transparent
23916 <meta property="mw:PageProp/toc" />
23918 <!-- this one's bogus -->
23921 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23923 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23927 <!-- this one's bogus -->
23936 #### --------------- HTML tags ---------------
23939 #### 3. multi-line html tag
23940 #### 4. extension tags
23941 #### -----------------------------------------
23947 <a href="http://google.com">google</a>
23949 <a href="http://google.com">google</a>
23957 <ul><li> <div>foo</div></li>
23958 <li> <div style="color:red">foo</div></li>
23959 <li> <td></li></ul>
23962 * <nowiki><div>foo</div></nowiki>
23963 * <nowiki><div style="color:red">foo</div></nowiki>
23964 * <nowiki><td></nowiki>
23968 3. multi-line html tag
23987 <p><ref>foo</ref>
23988 </p><p><ref>bar
23989 </p><p>baz</ref>
23992 <nowiki><ref>foo</ref></nowiki>
23994 <nowiki><ref>bar</nowiki>
23996 baz<nowiki></ref></nowiki>
23999 #### --------------- Others ---------------
24005 <p><nowiki>foo</nowiki>
24008 <nowiki>foo</nowiki>
24011 ## The quote-char in the input is necessary for triggering the bug
24013 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24022 #----------- End of wikitext escaping tests --------------
24026 Tag-like HTML structures are passed through as text
24048 </p><p>1<d e>f
24053 HTML tag with necessary entities in attributes
24055 <span title="&amp;">foo</span>
24057 <p><span title="&amp;">foo</span>
24062 HTML tag with 'unnecessary' entity encoding in attributes
24064 <span title="&">foo</span>
24066 <p><span title="&">foo</span>
24071 HTML tag with broken attribute value quoting
24073 parsoid=wt2html,html2html
24075 <span title="Hello world>Foo</span>
24077 <p><span title="Hello world">Foo</span>
24080 <p><span title="Hello world">Foo</span></p>
24084 Self-closed tag with broken attribute value quoting
24086 parsoid=wt2html,html2html
24088 <div title="Hello world />Foo
24090 <div title="Hello world"></div>
24093 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24097 Table with broken attribute value quoting
24099 parsoid=wt2html,html2html
24102 | title="Hello world|Foo
24107 <td title="Hello world">Foo
24113 <td title="Hello world">Foo
24119 Table with broken attribute value quoting on consecutive lines
24121 parsoid=wt2html,html2html
24124 | title="Hello world|Foo
24125 | style="color:red|Bar
24130 <td title="Hello world">Foo
24132 <td style="color:red">Bar
24138 <td title="Hello world">Foo
24139 </td><td style="color: red">Bar
24140 </td></tr></tbody></table>
24145 Accept empty td cell attribute
24148 | align="center" | foo || |
24153 <td align="center"> foo </td>
24160 Non-empty attributes in th-cells
24163 ! Foo !! style="color: red" | Bar
24169 <th style="color: red"> Bar
24175 Accept empty attributes in th-cells
24190 Empty table rows go away
24211 ### Parsoid-centric tests for testing RTing of inter-element separators
24212 ### Edge cases not tested by existing parser tests and specific to
24213 ### Parsoid-specific serialization strategies.
24217 RT-ed inter-element separators should be valid separators
24229 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24233 # Parsoid-only since PHP parser relies on Tidy for correct output
24235 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24249 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24250 <p>bar</p></small></td></tr>
24254 <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>
24258 # Note that the "style" attribute is really a template parameter here.
24259 # The = would have to be {{=}} if you wanted the literal.
24261 Empty TD followed by TD with tpl-generated attribute
24266 |{{echo|style='color:red'}}|foo
24280 Indented table with an empty td
24298 ## We have some newline diffs RT-ing this edge case
24299 ## and it is not important enough -- we seem to be emitting
24300 ## at most 2 newlines after a </tr> and this is unrelated to
24301 ## the issue from T85627 that this is testing.
24303 Indented table with blank lines in between (T85627)
24322 Indented block & table
24336 <div data-parsoid='{"stx":"html"}'>foo</div>
24338 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24343 Indent and comment before table row
24358 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24359 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24363 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24365 Empty TR followed by a template-generated TR
24371 {{echo|<tr><td>foo</td></tr>}}
24377 <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}}]}'>
24382 ## PHP and parsoid output differ for this, and since this is primarily
24383 ## for testing Parsoid's serializer, marking this Parsoid only
24385 Empty TR followed by mixed-ws-comment line should RT correctly
24401 <!--c--> </tr><!--d-->
24407 Multi-line image caption generated by templates with/without trailing newlines
24409 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24410 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24412 <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>
24413 <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>
24417 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24421 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24423 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24425 <includeonly>foo</includeonly>
24433 ## PHP emits broken html for this, and since this is primarily
24434 ## a Parsoid serializer test, marking this Parsoid only
24436 Improperly nested inline or quotes tags with whitespace in between
24438 <span> <s>x</span> </s>
24441 <p><span> <s>x</s></span><s> </s>
24442 <b> <i>x</i></b><i> </i>
24447 Encapsulate protected attributes from wt
24449 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24451 <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>
24455 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24456 ## Having nested or stray pre tags results in the attempt to add duplicates,
24457 ## causing an assertion fail. This test tries to prevent that situation.
24459 Ensure ParagraphWrapper can deal with stray closing pre tags
24469 1. Ensure fostered text content is wrapped in element nodes
24473 <table>hi</table><table>ho</table>
24482 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24484 parsoid=wt2html,wt2wt
24493 <tbody><tr><td> a</td></tr>
24498 Encapsulation properly handles null DSR information from foster box
24500 parsoid=wt2html,wt2wt
24502 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24504 <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>
24508 1. Encapsulate foster-parented transclusion content
24510 parsoid=wt2wt,wt2html
24512 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24514 <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>
24524 2. Encapsulate foster-parented transclusion content
24526 parsoid=wt2wt,wt2html
24528 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24530 <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>
24541 3. Encapsulate foster-parented transclusion content
24543 parsoid=wt2wt,wt2html
24545 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24547 <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>"]}">
24560 4. Encapsulate foster-parented transclusion content
24562 parsoid=wt2wt,wt2html
24564 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24566 <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>"]}">
24579 5. Encapsulate foster-parented transclusion content
24581 parsoid=wt2wt,wt2html
24583 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24585 <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>
24600 6. Encapsulate foster-parented transclusion content
24602 parsoid=wt2wt,wt2html
24604 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24606 <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>
24622 7. Encapsulate foster-parented transclusion content
24624 parsoid=wt2wt,wt2html
24626 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24628 <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>
24638 # Note that the wt is broken on purpose: the = should be {{=}} if you
24639 # don't want it to be a template parameter key.
24641 8. Encapsulate foster-parented transclusion content
24643 parsoid=wt2wt,wt2html
24646 }}{|{{echo|style='color:red'}}
24651 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24653 <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>
24664 9. Encapsulate foster-parented transclusion content
24666 parsoid=wt2wt,wt2html
24668 <table>{{echo|hi</table>hello}}
24670 <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>
24674 Table in fosterable position
24685 <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">
24687 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24693 # Parsoid only for bug 64747
24695 Properly encapsulate empty-content transclusions in fosterable positions
24703 <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"}]]}'>
24709 Always encapsulate foster box when template range is expanded to table
24722 T115289: Unclosed table
24724 {{echo|<table>}}<!--c-->[[Category:Two]]
24726 <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>
24730 T115289: Don't migrate newlines out of tables with fostered content
24732 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
24734 <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>
24738 T73074: More fostering fun
24740 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
24742 <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>
24746 Support <object> element with .data attribute
24750 <object data="test.swf"></object>
24752 <object data="test.swf"></object>
24756 Don't block XML namespace declaration
24758 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24760 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24763 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
24766 # -----------------------------------------------------------------
24767 # The following section of tests are primarily to spec requirements
24768 # around serialization of new/edited content.
24770 # All these tests are marked Parsoid html2wt and html2html only
24771 # ----------------------------------------------------------------
24773 # 'mi' is a localinterwiki prefix as well as a language
24775 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
24779 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
24786 New wikilinks should be serialized properly
24790 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
24791 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
24798 New wiki links (href variations)
24802 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24803 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
24804 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
24805 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
24810 [[Toxine bactérienne]]
24814 New wiki links (content string variations)
24818 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24819 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
24820 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
24824 [[Foo_bar|./Foo_bar]]
24828 New category links (href variations)
24832 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
24833 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
24834 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
24836 [[Category:Toxine bactérienne]]
24837 [[Category:Toxine bactérienne]]
24838 [[Category:Toxine bactérienne]]
24842 New sol transparent links don't need indent-pre nowiki protection
24847 <link rel="mw:PageProp/redirect" href="./Main_Page">
24848 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
24849 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
24851 #WEITERLEITUNG [[Main Page]]
24852 <!-- this is good --> [[Category:Good]]
24853 <!-- this is great --> [[Kategorie:Great]]
24857 New interlanguage links (href variations)
24861 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
24862 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
24863 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
24865 [[es:Toxine bactérienne]]
24866 [[es:Toxine_bactérienne]]
24867 [[es:Toxine_bactérienne]]
24871 Image: Modifying size of an image (1)
24874 "modes": ["wt2wt"],
24876 ["img[height]", "attr", "height", "22"],
24877 ["img[width]", "attr", "width", "200"]
24881 [[Image:Foobar.jpg|230x230px]]
24883 [[Image:Foobar.jpg|200x200px]]
24887 Image: Modifying size of an image (2)
24890 "modes": ["wt2wt"],
24892 ["img[height]", "attr", "height", "100"],
24893 ["img[width]", "attr", "width", "500"]
24897 [[Image:Foobar.jpg|230x230px]]
24899 [[Image:Foobar.jpg|500x500px]]
24902 # Change in size is ignored so long as class='mw-default-size'
24904 Image: Modifying size of an image (3)
24907 "modes": ["wt2wt"],
24909 ["figure[class]", "removeClass", "mw-default-size"],
24910 ["figure img", "attr", "height", "19"],
24911 ["figure img", "attr", "width", "170"]
24915 [[Image:Foobar.jpg|thumb]]
24917 [[Image:Foobar.jpg|thumb|170x170px]]
24921 Image: Modifying alignment of an image (bug 48665)
24924 "modes": ["wt2wt"],
24926 ["figure[class]", "removeClass", "mw-halign-right"],
24927 ["figure[class]", "addClass", "mw-halign-left"]
24931 [[Image:Foobar.jpg|thumb|caption|right]]
24933 [[Image:Foobar.jpg|thumb|caption|left]]
24937 Image: Modifying mw-default-size of an frameless image (bug 62805)
24940 "modes": ["wt2wt"],
24942 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24946 [[Image:Foobar.jpg|frameless|right]]
24948 [[Image:Foobar.jpg|frameless|right|220x220px]]
24952 Image: Modifying valign of an image (bug 49221)
24955 "modes": ["wt2wt"],
24957 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24958 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24962 [[File:Foobar.jpg|20px|middle]]
24964 [[File:Foobar.jpg|20px|text-top]]
24968 Image: Modifying alt attribute of an image (bug 56400)
24971 "modes": ["wt2wt"],
24973 ["img[alt]", "attr", "alt", "some alternate edited text"]
24977 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24979 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24983 Image: Modifying caption of an image
24986 "modes": ["wt2wt"],
24988 ["figcaption", "text", "new caption"]
24992 [[Image:Foobar.jpg|thumb|original caption]]
24994 [[Image:Foobar.jpg|thumb|new caption]]
24998 Image: empty alt attribute (bug 48924)
25002 [[File:Foobar.jpg|thumb|alt=|bar]]
25004 <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>
25008 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25014 <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>
25016 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25020 Image: Block level image should have \n before and after
25023 [[File:Foobar.jpg|right|thumb|150x150px]]
25027 <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>
25032 Image: New block level image should have \n before and after (existing content)
25035 [[File:Foobar.jpg|right|thumb|150x150px]]
25039 <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>
25044 Image: upright option (parsoid)
25046 [[File:Foobar.jpg|thumb|upright|caption]]
25047 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25048 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25050 <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>
25051 <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>
25052 <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>
25056 Image: upright option is ignored on inline and frame images (parsoid)
25058 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25060 <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>
25064 Image: from basic HTML (1)
25068 <span typeof="mw:Image">
25069 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25072 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25076 Image: from basic HTML (2)
25080 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25082 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25086 Image: from basic HTML (3)
25090 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25092 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25096 Image: from basic HTML (4)
25100 <img src="./File:Foobar.jpg">
25102 [[File:Foobar.jpg|link=]]
25106 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25111 <li><p>foo</p></li>
25118 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25122 <ul> <li>foo</li></ul>
25128 Don't strip leading whitespace when handling indent-pre suppressing tags
25133 <tr><td> indented row</td></tr>
25136 <b>This is very bold of you!</b>
25139 indented cell (no pre-wrapping!)
25149 '''This is very bold of you!'''
25153 indented cell (no pre-wrapping!)
25161 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25183 <nowiki> </nowiki></span>bar2
25186 <nowiki> </nowiki><span>bar</span>
25189 <nowiki> </nowiki><span>foo</span>
25194 Lists: Dont insert newlines in a serialized list item.
25198 <ul><li>a<br>b</li><li>c</li></ul>
25205 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25208 "modes": ["html2wt"],
25209 "scrubWikitext": false
25212 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25213 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25215 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25216 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25218 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25220 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25222 == hello there [[Category:A1]] ==
25224 == [[Category:A2]] hi pal ==
25226 == <!--foo--> [[Category:A3]] how goes it ==
25228 == it goes well [[Category:A4]] <!--bar--> ==
25230 ==howdy [[Category:A5]]==
25236 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25239 "modes": ["html2wt"],
25240 "scrubWikitext": true
25243 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25244 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25246 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25247 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25249 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25257 <!--foo--> [[Category:A3]]
25262 [[Category:A4]] <!--bar-->
25270 Headings: Don't hoist metas that come from templates
25273 "modes": ["html2wt"],
25274 "scrubWikitext": true
25277 <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>
25279 == {{echo|foo [[Category:Foo]]}} ==
25283 Headings: Category in ref isn't hoisted
25286 "modes": ["html2wt"],
25287 "scrubWikitext": true
25290 <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>
25292 <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>
25295 [[Category:Baz]] </ref> ==
25301 Parsoid: Serialize positional parameters with = in them as named parameter
25305 <p about="#mwt1" typeof="mw:Transclusion"
25306 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25308 <p about="#mwt1" typeof="mw:Transclusion"
25309 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25311 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25312 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25313 <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>
25317 {{echo|1=f=oo|2=bar}}
25319 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25320 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25321 {{echo|<nowiki>f=oo</nowiki>|bar}}
25325 Parsoid: Serialize positional parameters with = in extlink as named parameter
25329 <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>
25331 {{echo|1=http://stuff?is=ok}}
25335 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25339 <div>a<p>b</p></div>
25360 Substrings resembling wikitext in hrefs should not get nowiki escapes
25364 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25370 Enforce single-line context in the serializer
25377 <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">
25378 </span><span about="#mwt1">you</span> </h2>
25380 <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>
25382 <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
25383 there</span></li></ol>
25395 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25402 </tbody></table></dd></dl>
25406 == hi {{bogus|there
25417 * foo '''bar''' baz
25429 Serialize new placeholder space without spans
25433 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25435 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25437 <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>
25443 <ref>foo : bar</ref>ok
25447 #-----------------------
25448 # Tag minimization tests
25449 #-----------------------
25452 1. I/B quote minimization: wikitext-only tags should be combined
25456 <p><i>A</i><i>B</i></p>
25457 <p><b>A</b><b>B</b></p>
25458 <p><i>A</i><b><i>B</i></b></p>
25459 <p><b>A</b><i><b>B</b></i></p>
25460 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25461 <p><i><b>A</b></i><i><b>B</b></i></p>
25462 <p><i><b>A</b></i><b><i>B</i></b></p>
25463 <p><b><i>A</i></b><i><b>B</b></i></p>
25483 2. I/B quote minimization: wikitext and html tags should not be combined
25487 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25488 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25492 ''A''<nowiki/>'''<i>B</i>'''
25496 3. I/B quote minimization: templated content stops minimization
25500 <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>
25501 <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>
25503 ''A''{{echo|''B''}}
25505 ''A''{{echo|'''''B'''''}}
25509 4. I/B quote minimization: new content should be mimimized with adjacent old content
25513 <p><i>A</i><i>B</i></p>
25514 <p><b>A</b><b>B</b></p>
25515 <p><i>A</i><b><i>B</i></b></p>
25525 5a. Merge adjacent quote nodes if they've been edited
25528 "modes": ["wt2wt", "selser"],
25530 ["p", "contents", "remove", ":contains('b')"]
25540 5b. Merge adjacent quote nodes if they've been edited
25543 "modes": ["wt2wt", "selser"],
25549 ''a''<span id="x">b</span>''c''
25555 1. Merge adjacent link nodes as long as at least one element is new
25558 "modes": ["html2wt"],
25559 "scrubWikitext": true
25562 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25563 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25564 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25568 [[Football|Foot]][[Football|ball]]
25572 2. Merge adjacent link nodes and enable additional normalizations
25575 "modes": ["html2wt"],
25576 "scrubWikitext": true
25579 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25581 [[Football|''Football'']]
25585 3. Don't merge adjacent link nodes if scrubWikitext is false
25588 "modes": ["html2wt"],
25589 "scrubWikitext": false
25592 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25594 [[Football|Foot]][[Football|ball]]
25597 #------------------------------
25598 # End of tag minimization tests
25599 #------------------------------
25602 Bug 54262: New entities
25606 <span typeof="mw:Entity"> </span>
25611 ## Note that there is no wikitext output for 'unknownproperty' ##
25612 ## Unknown magic words are silently dropped ##
25619 <meta property='mw:PageProp/toc' />
25620 <meta property='mw:PageProp/notoc' />
25621 <meta property='mw:PageProp/forcetoc' />
25622 <meta property='mw:PageProp/index' />
25623 <meta property='mw:PageProp/noindex' />
25624 <meta property='mw:PageProp/nogallery' />
25625 <meta property='mw:PageProp/noeditsection' />
25626 <meta property='mw:PageProp/notitleconvert' />
25627 <meta property='mw:PageProp/nocontentconvert' />
25628 <meta property='mw:PageProp/unknownproperty' />
25638 __NOCONTENTCONVERT__
25642 Consecutive <pre>s should not get merged
25644 parsoid=html2wt,html2html
25646 <pre>a</pre><pre>b</pre>
25674 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
25678 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
25680 [[Special:BookSources/1234567890|ISBN 1234567895]]
25684 Edited RFC links not serializable as RFC links should serialize as extlinks
25688 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
25690 [//tools.ietf.org/html/rfc123 New RFC]
25694 Edited PMID links not serializable as PMID links should serialize as extlinks
25698 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
25700 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
25704 WTS of autolinks with trailing/surrounding context
25708 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25709 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25710 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25711 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25712 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25713 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
25715 http://cscott.net'''foo'''
25717 http://cscott.net<b>foo</b>
25719 '''http://cscott.net'''
25721 '''http://cscott.net '''
25723 '''http://cscott.net<nowiki/>x'''
25725 http://cscott.net<nowiki/>x
25729 WTS of autolinks with nowikis (round-trip)
25731 x<nowiki/>http://cscott.net<nowiki/>x
25733 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
25736 # this is the "easy" test because it leaves in place all the
25737 # data-parsoid information indicating this is an autolink
25739 WTS of autolinks with escapes (editing)
25742 "modes": ["wt2wt"],
25744 [ "meta", "remove" ]
25748 x<nowiki/>http://cscott.net<nowiki/>x
25750 x<nowiki/>http://cscott.net<nowiki/>x
25754 WTS of edited autolink-like text (T103364)
25757 "modes": ["wt2wt"],
25759 [ "span[typeof]", "removeAttr", "typeof" ]
25763 Not a link: <nowiki>http://example.com</nowiki>.
25765 Not a link: <span><nowiki>http://example.com</nowiki></span>.
25769 WTS of newly-authored autolink-like text (T103364)
25773 <p>http://example.com is not a link.</p>
25775 <nowiki>http://example.com</nowiki> is not a link.
25779 WTS of autolink-like text after an autolink (T108563)
25783 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
25785 http://example.com <nowiki>http://example.com</nowiki> is not a link.
25789 Magic links inside links (not autolinked)
25791 [[Foo|http://example.com]]
25794 [[Foo|ISBN 123456789x]]
25796 [http://foo.com http://example.com]
25797 [http://foo.com RFC 1234]
25798 [http://foo.com PMID 1234]
25799 [http://foo.com ISBN 123456789x]
25801 <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>
25802 <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>
25804 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
25805 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
25806 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
25807 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
25809 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
25810 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
25811 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
25812 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
25816 Magic links inside image captions (autolinked)
25818 [[File:Foobar.jpg|thumb|http://example.com]]
25819 [[File:Foobar.jpg|thumb|RFC 1234]]
25820 [[File:Foobar.jpg|thumb|PMID 1234]]
25821 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
25823 <div class="thumb tright">
25824 <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>
25825 <div class="thumbcaption">
25826 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25827 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
25830 <div class="thumb tright">
25831 <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>
25832 <div class="thumbcaption">
25833 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25834 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
25837 <div class="thumb tright">
25838 <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>
25839 <div class="thumbcaption">
25840 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25841 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
25844 <div class="thumb tright">
25845 <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>
25846 <div class="thumbcaption">
25847 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25848 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
25852 <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>
25853 <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>
25854 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></figcaption></figure>
25855 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/123456789X" rel="mw:WikiLink">ISBN 123456789x</a></figcaption></figure>
25859 WTS of magic word text (T109371)
25864 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
25865 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
25867 <nowiki>RFC 1234</nowiki>
25869 [http://foo.com RFC 1234]
25875 Edited Redirect link should emit a non-piped wikitext link
25879 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
25885 T75121: Infer extension name from typeOf if data-mw is not present
25887 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25889 <div typeOf="mw:Extension/foo"></div>
25894 # Note that the <p> wrapping isn't present in PHP parser output
25895 # The important thing for this test is that P-wrapping doesn't
25896 # interfere with the <nowiki> protection for leading - in <td>
25897 # (which isn't necessary for <th>).
25899 T88318: p-wrapped dash in table.
25901 parsoid=html2wt,wt2wt
25904 <tr><th><p>-</p></th><th><p>- </p></th></tr>
25905 <tr><td><p>-</p></td><td><p>- </p></td></tr>
25906 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
25913 |<nowiki>-</nowiki>
25914 |<nowiki>- </nowiki>
25933 <td><small>-</small></td>
25945 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
25950 <td id='mwAc'>foo</td>
25951 <td id='serialize-this'>bar</td>
25956 | id="serialize-this" |bar
25961 Parsoid-like element ids should not be serialized to wikitext unless shadowed
25965 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
25967 <div id="hello">ok</div>
25974 "modes": ["wt2wt"],
25976 [ "#xyz", "before", "<b>before</b> stuff " ],
25977 [ "#xyz", "after", " stuff <i>after</i>" ],
25978 [ "#xyz", "html", "x <b>y</b> z" ]
25982 <span id="xyz">hello</span>
25984 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
25988 Never serialize a-tag as html, regardless of what data-parsoid has to say
25990 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25992 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
25997 ## SSS FIXME: This is broken output nevertheless.
25998 ## What might be a reasonable non-broken output for this?
25999 ## This is an edge case unlikely to be seen in production
26000 ## that I am not wasting more time on this right now.
26002 Never serialize a-tag as html, no matter what attributes it has
26004 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26006 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26008 [http://boo.org http://boohoo.org]
26011 # Misnested is an indication that selser can reuse the source but these have
26012 # shown to sneak through on occasion. See T101768.
26013 # The original wikitext here is: [http://test.com [[one]] two three]
26015 Strip span tags added to mark misnested links
26019 <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>
26021 [http://test.com][[one]] two three
26025 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26029 <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|}"]}'>
26041 ## This test verifies the presence and computation of this attribute indirectly
26042 ## by making an edit and ensuring that the serialization is correct (which it would be
26043 ## only if firstWikitextNode is properly set).
26045 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26048 "modes": ["wt2wt"],
26050 [ "div#x", "remove" ],
26051 [ "div", "before", "<div>new</div>" ]
26055 <div id="x">foo</div>
26057 {{echo|<div>boo</div>
26065 {{echo|<div>boo</div>
26071 # --------------------------------------------
26072 # Tests spec'ing wikitext serialization norms |
26073 # --------------------------------------------
26076 1. Categories should always be serialized on their own line
26080 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26088 2. Categories that are part of templates should not introduce a line break
26090 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26092 <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>
26095 # Careful while editing these next 2 tests. There are \u200f characters
26096 # before and after the <link> tags in the HTML and following some
26097 # of the categories in wikitext
26098 # Do not remove these characters in edits.
26100 # As part of the serialization, these bidi characters will get stripped.
26102 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26105 "modes": ["html2wt"],
26106 "scrubWikitext": true
26109 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26110 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26113 [[קטגוריה: שיטות משפט]]
26117 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26120 "modes": ["html2wt"],
26121 "scrubWikitext": true
26124 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26131 Lists: Add space after bullets
26138 <li><span> baz</span></li>
26143 * <span> baz</span>
26147 1. Headings: Add space before/after == (T53744)
26154 <h2><span> baz</span></h2>
26162 == <span> baz</span> ==
26166 2. Headings: Add space before/after == even after hoisted content
26169 "modes": ["html2wt"],
26170 "scrubWikitext": true
26173 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26181 1. Headings: suppress newly created empty headings
26184 "modes": ["html2wt"],
26185 "scrubWikitext": true
26193 2. Headings: don't suppress empty headings if scrubWikitext is false
26203 3. Headings: suppress empty headings on edits
26206 "modes": ["selser"],
26207 "scrubWikitext": true,
26213 ==<span id="x">foo</span>==
26218 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26221 "modes": ["html2wt"],
26222 "scrubWikitext": true
26225 <h2>foo<br/>bar</h2>
26226 <h2>foo <span><br/>bar</span> baz</h2>
26230 == foo <span> bar</span> baz ==
26234 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26237 "modes": ["html2wt"],
26238 "scrubWikitext": false
26241 <h2>foo<br/>bar</h2>
26247 1. WT Quote Tags: suppress newly created empty style tags
26250 "modes": ["html2wt"],
26251 "scrubWikitext": true
26259 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26265 ''<nowiki/>'''''<nowiki/>'''
26269 3. WT Quote Tags: suppress empty style tags on edits
26272 "modes": ["selser"],
26273 "scrubWikitext": true,
26279 '''<span id="x">foo</span>'''
26284 1. Anchors: suppress newly created empty anchors
26287 "modes": ["html2wt"],
26288 "scrubWikitext": true
26291 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26296 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26299 "modes": ["html2wt"],
26300 "scrubWikitext": false
26303 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26309 3. Anchors: suppress empty anchors on edits
26312 "modes": ["selser"],
26313 "scrubWikitext": true,
26319 [[Test|<span id="x">foo</span>]]
26324 3a. Anchors: do not suppress numbered extlinks
26327 "modes": ["wt2wt"],
26328 "scrubWikitext": true
26333 <a rel="mw:ExtLink" href="http://foo.com"></a>
26337 3b. Anchors: do not suppress numbered extlinks
26340 "modes": ["wt2wt"],
26341 "scrubWikitext": true,
26347 [http://foo.com <span id="x">foo</span>]
26353 Normalizations should be restricted to edited content
26356 "modes": ["selser"],
26357 "scrubWikitext": true,
26359 [ "h1", "before", "<i></i>"]
26373 1. Multiple normalizations (html2wt)
26376 "modes": ["html2wt"],
26377 "scrubWikitext": true
26381 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26382 </a><b><i></i></b>x</p>
26391 2. Multiple normalizations (selser)
26394 "modes": ["selser"],
26395 "scrubWikitext": true,
26397 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26401 <span id="x">foo</span>
26403 <span id="x">foo</span>
26409 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26412 "modes": ["html2wt"],
26413 "scrubWikitext": true
26425 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26432 <nowiki> </nowiki>hi
26434 <nowiki> </nowiki> hello
26438 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26441 "modes": ["html2wt"],
26442 "scrubWikitext": true
26451 baz bang</td></tr></table>
26457 bar<span>boo</span></p>
26473 bar<span>boo</span>
26477 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26480 "modes": ["selser"],
26481 "scrubWikitext": true,
26483 [ "p", "html", " a\n b" ]
26494 1. New links that end in spaces
26497 "modes": ["html2wt"],
26498 "scrubWikitext": false
26501 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26502 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26503 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26505 [[Berlin ]]<nowiki/>is the capital of Germany.
26509 [[Boston ]] is a city.
26513 2. New links that end in spaces
26516 "modes": ["html2wt"],
26517 "scrubWikitext": true
26520 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26521 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26522 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26524 [[Berlin]] is the capital of Germany.
26528 [[Boston]] is a city.
26532 1. Table cells with escapable prefixes
26535 "modes": ["html2wt"],
26536 "scrubWikitext": false
26540 <tr><td>a</td></tr>
26541 <tr><td>-</td></tr>
26542 <tr><td>+</td></tr>
26548 |<nowiki>-</nowiki>
26550 |<nowiki>+</nowiki>
26555 2. Table cells with escapable prefixes
26558 "modes": ["html2wt"],
26559 "scrubWikitext": true
26563 <tr><td>a</td></tr>
26564 <tr><td>-</td></tr>
26565 <tr><td>+</td></tr>
26578 3a. Table cells with escapable prefixes after edits
26581 "modes": ["selser"],
26582 "scrubWikitext": true,
26584 [ "table tbody tr:first-child td:first-child", "remove"]
26598 3b. Table cells with escapable prefixes after edits
26601 "modes": ["selser"],
26602 "scrubWikitext": true,
26604 [ "table tbody tr:first-child td:first-child", "html", "-" ],
26611 |<span id="x">foo</span>+
26620 # FIXME: This test will fail because
26621 # normalization doesn't realize that the id attribute
26622 # will eliminate the escapable scenario
26624 4a. Table cells without escapable prefixes after edits
26627 "modes": ["selser"],
26628 "scrubWikitext": true,
26630 [ "#x", "html", "-" ]
26643 ## This tests normalizer's ability to discriminate between
26644 ## cells having identical content.
26646 4b. Table cells without escapable prefixes after edits
26649 "modes": ["selser"],
26650 "scrubWikitext": true,
26652 [ "td", "html", "-" ]
26665 ## This tests normalizer's ability to not be tripped by
26666 ## comments (and whitespace)
26668 4c. Table cells without escapable prefixes after edits
26671 "modes": ["selser"],
26672 "scrubWikitext": true,
26674 [ "table tbody tr td:first-child", "remove" ]
26689 ## This tests normalizer's ability to handle HTML cells
26691 4d. Table cells without escapable prefixes after edits
26694 "modes": ["selser"],
26695 "scrubWikitext": true,
26697 [ "td", "html", "-" ]
26702 <tr><td>a</td></tr>
26706 <tr><td>-</td></tr>
26710 ## T111151 Remove font elements without attributes
26712 5a. font tags without attributes should be dropped in scrubWikitext mode
26715 "modes": ["html2wt"],
26716 "scrubWikitext": true
26720 <font><font>bar</font></font>
26721 <font class="x">boo</font>
26725 <font class="x">boo</font>
26729 5b. font tags should not be dropped without scrubWikitext being enabled
26732 "modes": ["html2wt"],
26733 "scrubWikitext": false
26742 Escape nowiki DOM elements
26746 <nowiki><i>foo</i></nowiki>
26748 <nowiki>''foo''</nowiki>
26751 # This is meant to be an interim fix while we go about figuring out
26752 # how to not introduce these trailing <nowiki/>s in the first place.
26754 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
26758 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
26760 <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>
26761 <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>
26774 # ---------------------------------------------------
26775 # End of tests spec'ing wikitext serialization norms |
26776 # ---------------------------------------------------
26780 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
26788 <td><b>c</b><p>d</p></td>
26806 # -----------------------------------------------------------------
26807 # End of section for Parsoid-only html2wt tests for serialization
26809 # -----------------------------------------------------------------
26811 # -----------------------------------------------------------------
26812 # The following section of tests are primarily to spec behavior of
26813 # the selective serializer. All these tests have manual selser
26814 # changes. The automated selser changes for all tests handle the
26815 # wide variation of changes, but these tests here capture specs
26816 # deterministically.
26817 # ----------------------------------------------------------------
26821 Selser: New comments should not be lost
26824 "modes": ["selser"],
26826 [ "#a", "after", "<!--c1-->" ],
26827 [ "#b", "before", "<!--c2-->" ]
26831 <span id="a">a</span>
26833 <span id="b">b</span>
26835 <span id="a">a</span><!--c1-->
26837 <!--c2--><span id="b">b</span>
26842 Selser: Check for validity of DSR before using it
26845 "modes": ["selser"],
26847 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
26851 <span id="a">a</span>
26853 {{DISPLAYTITLE:foo}}
26854 <span id="a">a</span>
26858 1. DOMDiff: Changes to <ref> content should be looked up using id
26861 "modes": ["selser"],
26863 ["#X", "after", "bar"],
26864 ["#Y", "after", "baz"]
26868 X <ref><span id="X">foo</span></ref>
26871 <ref name="a"><span id="Y">foo</span></ref>
26874 X <ref><span id="X">foo</span>bar</ref>
26877 <ref name="a"><span id="Y">foo</span>baz</ref>
26882 2. DOMDiff: Changes to <ref> content should be looked up using id
26885 "modes": ["selser"],
26887 ["#Z", "after", "bar"]
26891 A <ref>foo bar for a</ref>
26892 B <ref group="X" name="b" />
26896 <references group="X">
26897 <ref name="b"><span id="Z">foo</span></ref>
26900 A <ref>foo bar for a</ref>
26901 B <ref group="X" name="b" />
26905 <references group="X">
26906 <ref name="b"><span id="Z">foo</span>bar</ref>
26920 <li class="mw-empty-li"></li>
26921 <li class="mw-empty-li"></li>