1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
36 # You can also set the following parser properties via test options:
37 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
38 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic
40 # For testing purposes, temporary articles can created:
41 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
42 # where '/' denotes a newline.
44 # This is the standard article assumed to exist.
81 MediaWiki:bad image list
83 * [[File:Bad.jpg]] except [[Nasty page]]
111 Template:echo_with_span
117 Template:echo_with_div
130 Template:table_attribs
133 |</noinclude>style="color:red;"|Foo
137 Template:table_attribs_2
140 |</noinclude>style="color:red;"|Foo
145 Template:table_attribs_3
148 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
152 Template:table_attribs_4
154 | style="background-color:#DC241f;" width="10px" |
158 Template:table_attribs_5
161 |</noinclude>style="color:red;"||Bar
165 Template:table_attribs_6
167 style="background: <nowiki>
174 Template:table_attribs_7
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
181 Template:table_header_cells
183 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
189 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
193 Template:PartialTable
200 Template:image_attribs
203 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
206 ## See T48811 for details
208 Template:mixed_attr_content_template
210 style="color:red;" title="T48811"
216 Template:definition_list
263 Template:EmptyTRWithHTMLAttrTest
266 <tr align="center"></tr>
267 <tr><td>foo</td></tr>
268 <tr align="center"></tr>
269 <tr><td>bar</td></tr>
286 This is a simple paragraph.
288 <p>This is a simple paragraph.
293 Paragraphs with extra newline spacing
316 Paragraphs with newline spacing with comment lines in between
324 <!--foo--><!--More than 1 comment, still stripped-->
328 <!--foo--> <!----> <!-- bar -->
389 Paragraphs with newline spacing with non-empty white-space lines in between
416 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
424 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
463 Extra newlines: More paragraphs with indented comment
478 Extra newlines followed by heading
493 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
494 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
497 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
502 Extra newlines between heading and content are swallowed
510 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
511 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
518 http://fr.wikipedia.org/wiki/🍺
519 <!-- EasterEgg we love beer, better be able be able to link to it -->
521 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
525 # Note that the html+tidy output removes the spaces after the <li>,
526 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
527 # This is an issue for all tests with lists. We intentionally do
528 # *not* add html+tidy clauses for these, as we don't want to
529 # document/test the broken behavior. (Parsoid matches the non-tidy
530 # output in these cases.)
539 <li> Item 2</li></ul>
547 * plain''italic''plain
548 * plain''italic''plain''italic''plain
549 * plain'''bold'''plain
550 * plain'''bold'''plain'''bold'''plain
551 * plain''italic''plain'''bold'''plain
552 * plain'''bold'''plain''italic''plain
553 * plain''italic'''bold-italic'''italic''plain
554 * plain'''bold''bold-italic''bold'''plain
555 * plain'''''bold-italic'''italic''plain
556 * plain'''''bold-italic''bold'''plain
557 * plain''italic'''bold-italic'''''plain
558 * plain'''bold''bold-italic'''''plain
559 * plain l'''italic''plain
560 * plain l''''bold''' plain
563 <li> plain<i>italic</i>plain</li>
564 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
565 <li> plain<b>bold</b>plain</li>
566 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
567 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
568 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
569 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
570 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
571 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
572 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
573 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
574 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
575 <li> plain l'<i>italic</i>plain</li>
576 <li> plain l'<b>bold</b> plain</li></ul>
580 # this example taken from the [[simple:Moon]] article (bug 47326)
582 Italics and possessives (1)
584 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
586 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
590 # this example taken from [[en:Flaming Pie]] (bug 49926)
592 Italics and possessives (2)
594 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
596 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
600 # this example taken from [[en:Dictionary]] (bug 49926)
602 Italics and possessives (3)
604 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
606 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
612 ### 2-quote opening sequence tests
615 Italics and bold: 2-quote opening sequence: (2,2)
624 Italics and bold: 2-quote opening sequence: (2,3)
633 Italics and bold: 2-quote opening sequence: (2,4)
643 # same html as previous, but wikitext adjusted to match parsoid html2wt
645 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
647 ''foo<nowiki>''</nowiki>''
653 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
655 Italics and bold: 2-quote opening sequence: (2,5)
668 # same html as previous, but wikitext adjusted to match parsoid html2wt
670 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
672 ''foo'''''<nowiki/>'''
683 ### 3-quote opening sequence tests
687 Italics and bold: 3-quote opening sequence: (3,2)
696 Italics and bold: 3-quote opening sequence: (3,3)
705 Italics and bold: 3-quote opening sequence: (3,4)
713 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
715 Italics and bold: 3-quote opening sequence: (3,5)
728 # same html as previous, but wikitext adjusted to match parsoid html2wt
730 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
732 '''foo'''''<nowiki/>''
743 ### 4-quote opening sequence tests
747 Italics and bold: 4-quote opening sequence: (4,2)
757 # same html as previous, but wikitext adjusted to match parsoid html2wt
759 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
761 <nowiki>''</nowiki>''foo''
768 Italics and bold: 4-quote opening sequence: (4,3)
777 Italics and bold: 4-quote opening sequence: (4,4)
787 # same html as previous, but wikitext adjusted to match parsoid html2wt
789 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
797 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
799 Italics and bold: 4-quote opening sequence: (4,5)
808 <p>'<b>foo</b><i></i>
812 # same html as previous, but wikitext adjusted to match parsoid html2wt
814 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
816 '<nowiki/>'''foo'''''<nowiki/>''
821 <p>'<b>foo</b><i></i>
827 ### 5-quote opening sequence tests
831 Italics and bold: 5-quote opening sequence: (5,2)
841 # same html as previous, but wikitext adjusted to match parsoid html2wt
843 Italics and bold: 5-quote opening sequence: (5,2+3)
852 Italics and bold: 5-quote opening sequence: (5,3)
862 # same html as previous, but wikitext adjusted to match parsoid html2wt
864 Italics and bold: 5-quote opening sequence: (5,3+2)
873 Italics and bold: 5-quote opening sequence: (5,4)
879 <p><i><b>foo'</b></i>
884 Italics and bold: 5-quote opening sequence: (5,5)
893 Italics and bold: 5-quote opening sequence: (5,6)
897 <p><i><b>foo'</b></i>
902 ### multiple quote sequences in a line
905 Italics and bold: multiple quote sequences: (2,4,2)
911 <p><i>foo'<b>bar</b></i>
916 # same html as previous, but wikitext adjusted to match parsoid html2wt
918 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
920 ''foo'<nowiki/>'''bar'''''
922 <p><i>foo'<b>bar</b></i>
928 Italics and bold: multiple quote sequences: (2,4,3)
934 <p><i>foo'<b>bar</b></i>
939 # same html as previous, but wikitext adjusted to match parsoid html2wt
941 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
943 ''foo'<nowiki/>'''bar'''''
945 <p><i>foo'<b>bar</b></i>
951 Italics and bold: multiple quote sequences: (2,4,4)
957 <p><i>foo'<b>bar'</b></i>
962 # same html as previous, but wikitext adjusted to match parsoid html2wt
964 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
966 ''foo'<nowiki/>'''bar'<nowiki/>'''''
968 <p><i>foo'<b>bar'</b></i>
973 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
975 Italics and bold: multiple quote sequences: (3,4,2)
984 <p><b>foo'</b>bar<i></i>
988 # same html as previous, but wikitext adjusted to match parsoid html2wt
990 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
994 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
999 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1004 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1006 Italics and bold: multiple quote sequences: (3,4,3)
1015 <p><b>foo'</b>bar<b></b>
1019 # same html as previous, but wikitext adjusted to match parsoid html2wt
1021 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1023 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1028 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1033 ### other quote tests
1036 Italics and bold: other quote tests: (2,3,5)
1038 ''this is about '''foo's family'''''
1040 <p><i>this is about <b>foo's family</b></i>
1046 Italics and bold: other quote tests: (2,(3,3),2)
1048 ''this is about '''foo's''' family''
1050 <p><i>this is about <b>foo's</b> family</i>
1056 Italics and bold: other quote tests: (3,2,3,2)
1060 '''this is about ''foo'''s family''
1062 <p><b>this is about <i>foo</i></b><i>s family</i>
1067 # same html as previous, but wikitext adjusted to match parsoid html2wt
1069 Italics and bold: other quote tests: (3,2,3+2+2,2)
1071 '''this is about ''foo'''''<nowiki/>''s family''
1073 <p><b>this is about <i>foo</i></b><i>s family</i>
1079 Italics and bold: other quote tests: (3,2,3,3)
1081 '''this is about ''foo'''s family'''
1083 <p>'<i>this is about </i>foo<b>s family</b>
1089 Italics and bold: other quote tests: (3,(2,2),3)
1091 '''this is about ''foo's'' family'''
1093 <p><b>this is about <i>foo's</i> family</b>
1099 Italicized possessive
1101 The ''[[Main Page]]'''s talk page.
1103 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1106 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1110 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1111 (Requires tidy for PHP parser output to be fixed up)
1113 parsoid=wt2html,wt2wt
1130 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1131 <td><i>a</i></td><td><i>b</i></td></tr>
1140 Non-html5 tags should be accepted
1142 <center>''foo''</center>
1144 <font>''foo''</font>
1145 <strike>''foo''</strike>
1148 <center><i>foo</i></center>
1149 <p><big><i>foo</i></big>
1150 <font><i>foo</i></font>
1151 <strike><i>foo</i></strike>
1157 <wbr> is valid wikitext (bug 52468)
1165 # <strike> is HTML4, <s> is HTML4/5.
1167 <s> or <strike> for strikethrough
1169 <strike>strike</strike>
1173 <p><strike>strike</strike>
1181 Text-level semantic html elements in wikitext
1184 <strong>text</strong>
1200 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1207 <strong>text</strong>
1223 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1231 # test cases taken from
1232 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1234 Ruby markup (W3C-style)
1236 ; Mono-ruby for individual base characters
1237 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1239 : <ruby>今日<rt>きょう</rt></ruby>
1241 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1243 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1245 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1247 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1248 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1249 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1252 <dl><dt> Mono-ruby for individual base characters</dt>
1253 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1254 <dt> Group ruby</dt>
1255 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1256 <dt> Jukugo ruby</dt>
1257 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1258 <dt> Inline ruby</dt>
1259 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1260 <dt> Double-sided ruby</dt>
1261 <dd> <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1263 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1264 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1265 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1270 # The next two test different paths in the sanitizer.
1272 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1274 <blockquote|>a</blockquote>
1276 <b→> doesn't terminate </b→>
1278 <bä> doesn't terminate </bä>
1280 <boo> doesn't terminate </boo>
1282 <s.foo> doesn't terminate </s.foo>
1286 <p><blockquote|>a</blockquote>
1287 </p><p><b→> doesn't terminate </b→>
1288 </p><p><bä> doesn't terminate </bä>
1289 </p><p><boo> doesn't terminate </boo>
1290 </p><p><s.foo> doesn't terminate </s.foo>
1291 </p><p><sub-ID#1>
1295 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1296 # If the non-word-character tag made it through the sanitizer, tidy
1297 # would munge it up.
1299 Non-word characters don't terminate tag names + tidy
1301 <blockquote|>a</blockquote>
1303 <b→> doesn't terminate </b→>
1305 <bä> doesn't terminate </bä>
1307 <boo> doesn't terminate </boo>
1309 <s.foo> doesn't terminate </s.foo>
1313 <p><blockquote|>a</p>
1314 <p><b→> doesn't terminate </b→></p>
1315 <p><bä> doesn't terminate </bä></p>
1316 <p><boo> doesn't terminate </boo></p>
1317 <p><s.foo> doesn't terminate </s.foo></p>
1318 <p><sub-ID#1></p>
1322 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1323 ### This checks that HTML5 tags (with non-word characters in the tag
1324 ### name) make it safely through the parser -- the Sanitizer will
1325 ### munge them later, as it should.
1328 Non-word characters are valid in extension tags (T19663)
1339 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1343 Isolated close tags should be treated as literal text (bug 52760)
1351 <p><s.foo>s</p>
1353 <p><s.foo>s</p>
1357 ### Special characters
1361 Bare pipe character (bug 52363)
1370 Bare pipe character from a template (bug 52363)
1379 ### <nowiki> test cases
1383 <nowiki> unordered list
1385 <nowiki>* This is not an unordered list item.</nowiki>
1387 <p>* This is not an unordered list item.
1390 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1396 <nowiki>Lorem ipsum dolor
1404 <p>Lorem ipsum dolor
1413 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1425 :There is not nowiki.
1426 :There is <nowiki>nowiki</nowiki>.
1428 #There is not nowiki.
1429 #There is <nowiki>nowiki</nowiki>.
1431 *There is not nowiki.
1432 *There is <nowiki>nowiki</nowiki>.
1434 <dl><dd>There is not nowiki.</dd>
1435 <dd>There is nowiki.</dd></dl>
1436 <ol><li>There is not nowiki.</li>
1437 <li>There is nowiki.</li></ol>
1438 <ul><li>There is not nowiki.</li>
1439 <li>There is nowiki.</li></ul>
1442 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1443 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1445 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1446 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1448 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1449 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1453 Entities inside <nowiki>
1455 <nowiki><</nowiki>
1462 Entities inside template parameters
1468 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1472 Properly escape nowiki when combined with other wiki markup
1476 <p>* </nowiki> tag</p>
1478 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1482 T93824: Put escaped HTML tags inside nowiki
1486 <p><h2>foo</h2></p>
1488 <nowiki><h2>foo</h2></nowiki>
1492 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1496 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1497 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1498 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1500 This text: L'[[Foo]]
1501 This text: L<nowiki>''</nowiki>[[Foo]]
1502 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1505 # This test fails because wikitext whitespace is not normalized before comparing.
1507 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1511 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1514 This text : L<nowiki>''</nowiki>[[Foo]]
1517 # This test and the next one are html2wt only as they test that incorrect wikitext
1518 # passed in template arguments gets escaped or wrapped in nowikis where required.
1520 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1524 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1525 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1527 {{echo|foo{{!}}bar}}
1528 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1532 T53961: Output correct nowikis in template arguments
1536 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1537 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1538 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1539 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1540 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1543 {{echo|<nowiki>a }} b</nowiki>}}
1544 {{echo|<nowiki>a [[ b</nowiki>}}
1545 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1546 {{echo|a <nowiki>}</nowiki>}}
1550 Cases where "!!" needs nowiki protection
1555 <tr><th>this needs protection !! here</th></tr>
1559 <tr><th>this does not need
1560 protection !! here</th></tr>
1564 !<nowiki>this needs protection !! here</nowiki>
1577 Comments and Indent-Pre
1579 <!-- comment 1 --> asdf
1581 <!-- comment 1 --> asdf
1584 <!-- comment 1 --> asdf
1585 <!-- comment 2 -->xyz
1587 <!-- comment 1 --> asdf
1588 <!-- comment 2 --> xyz
1644 asdf<!-- comment 1 -->jkl
1654 <!-- foo --> b <!-- bar -->
1668 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1674 Comment semantics and delimiters
1676 <!-- --><!----><!-----><!------>
1680 <!-- --><!----><!-----><!------>
1684 Comment semantics and delimiters, redux
1686 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1687 -- foo -- funky huh? ... -->
1691 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1692 -- foo -- funky huh? ... -->
1696 Comment semantics and delimiters: directors cut
1698 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1699 everything starting with < followed by !-- until the first -- and > we see,
1700 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1706 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1707 everything starting with < followed by !-- until the first -- and > we see,
1708 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1713 Comment semantics: nesting
1715 <!--<!-- no, we're not going to do anything fancy here -->-->
1720 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1723 # Parsoid closes the unclosed comment, even if it means a slight
1726 Comment semantics: unclosed comment at end
1728 parsoid=wt2html,html2html
1730 <!--This comment will run out to the end of the document
1734 <!--This comment will run out to the end of the document-->
1738 Comment semantics: normalize comments to play nice with XML and browsers
1740 <!-- Browsers --!> think this is closed -->
1741 <!--> This would normally be text -->
1742 <!---> As would this -->
1743 <!-- XML doesn't like trailing dashes -------->
1744 <!-- Nor doubled hyphens -- anywhere in the data -->
1745 But this is not a comment.
1747 <p>But this is not a comment.
1750 <!-- Browsers --!> think this is closed -->
1751 <!--> This would normally be text -->
1752 <!---> As would this -->
1753 <!-- XML doesn't like trailing dashes -------->
1754 <!-- Nor doubled hyphens -- anywhere in the data -->
1755 <p>But this is not a comment.</p>
1759 Comment semantics: round-trip even text which contains encoded -->
1761 <!-- hello & goodbye - > --> --&gt; --&xx -->
1763 <!-- hello & goodbye - > --> --&gt; --&xx -->
1767 Comment in template title
1776 Comment on its own line post-expand
1788 Comment on its own line post-expand with non-significant whitespace
1800 Multiple comments should still parse as SOL-transparent
1802 parsoid=wt2html,wt2wt
1805 <!--c2--><!--c3--><!--c4-->*b
1814 <!--c2--><!--c3--><!--c4-->
1821 ### paragraph wrapping tests
1836 Block tag on one line (<div>)
1852 Block tag on one line (<blockquote>)
1854 a <blockquote>foo</blockquote>
1858 a <blockquote>foo</blockquote>
1870 Block tag on both lines (<div>)
1887 Block tag on both lines (<blockquote>)
1889 a <blockquote>foo</blockquote>
1891 b <blockquote>foo</blockquote>
1893 a <blockquote>foo</blockquote>
1894 b <blockquote>foo</blockquote>
1908 Multiple lines without block tags
1932 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1933 # So, we have a separate section for Parsoid. We don't want
1934 # to mimic this stripping behavior in Parsoid. It affects
1935 # editing experience and also requires us to maintain additional
1938 Empty lines between lines with block tags
1976 <div data-parsoid='{"stx":"html"}'></div>
1979 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1982 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1984 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1987 <div data-parsoid='{"stx":"html"}'>e</div>
1990 ## PHP parser emits output which is broken
1992 Unclosed HTML p-tags should be handled properly
2005 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2010 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2011 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2014 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2018 a [[Category:A1]] [[Category:A2]]
2023 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2027 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2033 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2037 ### Preformatted text
2046 And a [[Main Page|link]]
2052 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2057 Tabs don't trigger preformatted text
2061 This is preformatted text.
2067 <pre>This is preformatted text.
2072 preformatted text.</p>
2073 <pre>This is preformatted text.
2078 Space before tab needs nowiki pre protection
2084 <nowiki> </nowiki> a
2088 Ident preformatting with inline content
2099 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2116 Regression with preformatted in <center>
2130 Bug 52763: Preformatted in <blockquote>
2136 indented cell (no pre-wrapping!)
2146 <p> indented cell (no pre-wrapping!)
2154 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2171 Bug 15491: <ins>/<del> in blockquote
2174 Foo <del>bar</del> <ins>baz</ins> quux
2178 <p>Foo <del>bar</del> <ins>baz</ins> quux
2184 # Note that the p-wrapping is newline sensitive, which could be
2185 # considered a bug: tidy will wrap only the 'Foo' in the example
2186 # below in a <p> tag. (see comment 23-25 of bug #6200)
2188 Bug 15491: <ins>/<del> in blockquote (2)
2190 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2193 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2199 <del>bar</del> <ins>baz</ins> quux</blockquote>
2203 <pre> with attributes (bug 3202)
2205 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2207 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2212 <pre> with width attribute (bug 3202)
2214 <pre width="8">Narrow screen goodies</pre>
2216 <pre width="8">Narrow screen goodies</pre>
2221 <pre> with forbidden attribute (bug 3202)
2223 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2225 <pre width="8">Narrow screen goodies</pre>
2230 Entities inside <pre>
2239 <pre> with forbidden attribute values (bug 3202)
2241 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2243 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2248 <nowiki> inside <pre> (bug 13238)
2256 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2264 <pre><nowiki>Foo</nowiki></pre>
2269 <nowiki> inside of #tag:pre
2271 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2273 <pre>Foo →bar</pre>
2276 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"#tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2280 <nowiki> and <pre> preference (first one wins)
2309 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2311 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2314 <p><span typeof="mw:Nowiki">
2323 </pre> inside nowiki
2325 <nowiki></pre></nowiki>
2331 # Parsoid doesn't strip empty tags, like Tidy does.
2333 Empty pre; pre inside other HTML tags (bug 54946)
2335 parsoid=wt2html,wt2wt
2366 HTML pre followed by indent-pre
2376 # Note that tidy removes the empty <p> tags from the start and end.
2377 # Parsoid does not, by design.
2381 <p><pre>foo</pre></p>
2387 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2391 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2399 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2409 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2421 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2442 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2446 {{echo| foo}}{{echo| bar}}
2451 {{echo|<!--cmt--> foo}}
2453 <!--cmt-->{{echo| foo}}
2455 {{echo|{{echo| }}bar}}
2473 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2510 Pres with newline attributes
2515 <pre class="one two">hi</pre>
2519 two" data-parsoid='{"stx":"html"}'>hi</pre>
2523 Things that look like <pre> tags aren't treated as such
2525 Barack Obama <President> of the United States
2526 <President></President>
2528 <p>Barack Obama <President> of the United States
2529 <President></President>
2534 Handle broken pre-like tags (bug 64025)
2538 {{echo|<pre <pre>x</pre>}}
2540 <table><pre </table>
2543 <table><pre </table>
2551 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2560 Parsoid: handle pre with space after attribute
2564 <pre style="width:50%;" >{{echo|foo}}</pre>
2566 <pre style="width:50%;">{{echo|foo}}</pre>
2569 <pre style="width:50%;">{{echo|foo}}</pre>
2572 # TODO / maybe: fix wt2wt for this
2574 Parsoid: Don't paragraph-wrap fosterable content
2600 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2628 #--------------------------------------------------------------------
2629 # Transclusion parameter whitespace stripping tests
2630 # Behavior is different for positional and named parameters
2631 #--------------------------------------------------------------------
2633 Templates: Strip leading and trailing whitespace from named-param values
2637 {{echo|1= {{echo|b}} }}
2650 <ul><li> d</li></ul>
2655 Templates: Don't strip whitespace from positional-param values
2659 {{echo|{{echo|b}} }}
2691 <ul><li> f</li></ul>
2699 Templates: Handle empty comment-and-ws-only lines correctly
2702 <!--should be ignored-->
2703 <!--should be ignored as well-->
2712 Templates: Handle comments in the target
2715 <!-- should be ignored -->
2718 {{echo<!-- should be ignored -->
2721 {{echo<!-- should be ignored -->|foo}}
2723 {{<!-- should be ignored -->echo|foo}}
2725 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2727 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2729 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2731 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2735 Templates: Handle comments in parameter names (bug 67657)
2738 <!-- should be ignored -->
2742 <!-- should be ignored -->
2745 {{echo|1<!-- should be ignored -->=foo}}
2747 {{echo|<!-- should be ignored -->1=foo}}
2749 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2751 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
2753 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2755 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
2759 Templates: Other wikitext in parameter names (bug 67657)
2763 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2769 #--------------------------------------------------------------------
2770 # Transclusion parameter escaping tests
2771 #--------------------------------------------------------------------
2773 Templates: Parsoid parameter escaping test 1
2775 {{echo|[foo]|{{echo|[bar]}}}}
2779 <p about="#mwt1" typeof="mw:Transclusion"
2780 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2784 Parsoid: Pipes in external links in template parameter
2786 {{echo|[{{echo|http://example.com}} link]}}
2788 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2790 <p><a rel="mw:ExtLink" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
2794 Parsoid: pipe in transclusion parameter
2796 {{echo|http://foo.com/a|b}}
2798 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2800 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2801 typeof="mw:Transclusion"
2802 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a|b</a></p>
2806 Parsoid: Pipe in external link target and content in template parameter
2808 parsoid=html2wt,wt2wt
2810 {{echo|[http://foo.com/a|b a|b]}}
2812 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2814 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2815 typeof="mw:Transclusion"
2816 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2817 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2821 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2825 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2827 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
2831 Templates: Don't escape already nowiki-escaped text in template parameters
2833 parsoid=html2wt,wt2wt
2835 {{echo|foo<nowiki>|</nowiki>bar}}
2836 {{echo|<nowiki><div></nowiki>}}
2837 {{echo|<nowiki></nowiki>}}
2839 <p>foo|bar <div></p>
2841 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
2842 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
2843 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
2849 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2851 parsoid=html2wt,wt2wt
2853 {{echo|{{echo|1=bar}}}}
2857 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
2862 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2868 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
2873 Templates: Preserve blank parameter names
2879 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2883 Templates: Preserve blank parameter names in other positions
2885 {{blank_param|bar|=foo}}
2889 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
2894 ### Parsoid-centric tests for testing RT edge cases for pre
2898 1a. Indent-Pre and Comments
2911 1b. Indent-Pre and Comments
2924 1c. Indent-Pre and Comments
2937 1d. Indent-Pre and Comments
2938 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2951 2a. Indent-Pre and tables
2972 2b. Indent-Pre and tables
2988 2c. Indent-Pre and tables (bug 42252)
3005 2d. Indent-Pre and tables
3022 <tbody><tr><td> b</td></tr>
3027 2e. Indent-Pre and table-line syntax
3040 2f. Indent-pre started by table-line syntax
3059 2g. Indented table markup mixed with indented pre content (proposed in bug 6200)
3064 Text that should be rendered preformatted
3072 <pre>Text that should be rendered preformatted
3081 3a. Indent-Pre and block tags (single-line html)
3085 c <blockquote> foo </blockquote>
3090 c <blockquote> foo </blockquote>
3091 <pre><span> foo </span>
3094 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3095 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3096 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3097 <pre><span> foo </span>
3114 3b. Indent-Pre and block tags (multi-line html)
3119 <pre>a <span>foo</span>
3124 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3125 b <div data-parsoid='{"stx":"html"}'> foo </div>
3135 3c. Indent-Pre and block tags (pre-content on separate line)
3199 4. Indent-Pre and extension tags
3210 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3214 Render paragraphs when indent-pre is suppressed in blocklevels
3231 4. Multiple spaces at start-of-line
3249 ## NOTE: the leading white-space chars on empty line are significant
3251 5a. White-space in indent-pre
3263 ## NOTE: the leading white-space chars on empty line are significant
3265 5b. White-space in indent-pre
3284 5c. White-space in indent-pre
3297 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3320 7a. Indent-pre and category links
3322 parsoid=wt2html,wt2wt
3324 [[Category:foo]] <!-- No pre-wrapping -->
3325 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3328 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3329 <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 -->
3332 ## We used to, but no longer wt2wt this test since the default serializer
3333 ## will normalize all categories to serialize on their own line.
3334 ## This wikitext usage is going to be fairly uncommon in production and
3335 ## selser will take care of preserving formatting in those scenarios.
3337 7b. Indent-pre and category links
3342 [[Category:foo]] {{echo|b}}
3344 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3345 <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>
3349 Indent-Pre: Newlines in comments shouldn't affect sol state
3363 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3367 HTML-pre: 1. embedded newlines
3402 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3404 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3408 <pre data-parsoid='{"stx":"html"}'>
3413 <pre data-parsoid='{"stx":"html"}'>
3421 HTML-pre: big spaces
3457 <pre data-parsoid='{"stx":"html"}'>
3476 HTML-pre: 2: indented text
3489 HTML-pre: 3: other wikitext
3508 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3517 ### Definition lists
3524 <dl><dt> name </dt>
3525 <dd> Definition</dd></dl>
3530 Definition list for indentation only
3534 <dl><dd> Indented text</dd></dl>
3539 Definition list with no space
3544 <dd>Definition</dd></dl>
3549 Definition list with URL link
3551 ; http://example.com/ : definition
3553 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3554 <dd> definition</dd></dl>
3559 Definition list with bracketed URL link
3561 ;[http://www.example.com/ Example]:Something about it
3563 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3564 <dd>Something about it</dd></dl>
3569 Definition list with wikilink containing colon
3571 ; [[Help:FAQ]]: The least-read page on Wikipedia
3573 <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>
3574 <dd> The least-read page on Wikipedia</dd></dl>
3578 # At Brion's and JeLuF's insistence... :)
3580 Definition list with news link containing colon
3582 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3584 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3585 <dd> This isn't even a real newsgroup!</dd></dl>
3588 <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>
3592 Malformed definition list with colon
3594 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3596 <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>
3601 Definition lists: colon in external link text
3603 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3605 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3606 <dd> OK, I made that up</dd></dl>
3611 Definition lists: colon in HTML attribute
3613 ;<b style="display: inline">bold</b>
3615 <dl><dt><b style="display: inline">bold</b></dt></dl>
3620 Definition lists: self-closed tag
3622 ;one<br/>two : two-line fun
3624 <dl><dt>one<br />two </dt>
3625 <dd> two-line fun</dd></dl>
3630 Bug 11748: Literal closing tags
3634 <dd>test test test test test</dd>
3636 <dd>test test test test test</dd>
3641 <dd>test test test test test</dd>
3643 <dd>test test test test test</dd>
3649 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3652 ; term : description
3657 <dl><dt> term </dt>
3658 <dd> description</dd></dl>
3659 <ul><li> unordered</li></ul>
3666 Definition list with empty definition and following paragraph
3678 Nested definition lists using html syntax
3687 Definition Lists: No nesting: Multiple dd's
3700 Definition Lists: Indentation: Regular
3708 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3713 Definition Lists: Indentation: Missing 1st level
3719 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3724 Definition Lists: Indentation: Multi-level indent
3728 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3733 Definition Lists: Hacky use to indent tables
3740 should be left alone
3742 <dl><dd><dl><dd><table>
3747 </td></tr></table></dd></dl></dd></dl>
3749 should be left alone
3754 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3762 should be left alone
3765 <dl><dd><dl><dd><table><tr>
3768 </tr></table><!-- bar --></dd></dl></dd></dl>
3770 should be left alone</p>
3774 Definition Lists: Hacky use to indent tables, with comment before table
3780 <dl><dd><dl><dd><!-- foo --><table><tr>
3782 </tr></table></dd></dl></dd></dl>
3785 # The trailing whitespace in this test is to catch a regression in
3786 # Parsoid after T54473.
3788 Definition Lists: Hacky use to indent tables (WS-insensitive)
3797 </td></tr></table></dd></dl>
3801 <tbody><tr><td>a</td></tr>
3802 </tbody></table> </dd></dl>
3805 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3806 ## as an empty dt item. It also ignores all but the last ";" when followed
3807 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3808 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3811 ## Ex: ";;t2 ::d2" is transformed into:
3823 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3824 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3835 ## All Parsoid only definition list tests have this difference.
3837 ## See also: https://phabricator.wikimedia.org/T8569
3838 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3841 Table / list interaction: indented table with lists in table contents
3856 <ul><li> b</li></ul>
3860 <ul><li> d</li></ul>
3861 </td></tr></table></dd></dl>
3866 Table / list interaction: lists nested in tables nested in indented lists
3889 </td></tr></table></dd></dl>
3896 Definition Lists: Nesting: Multi-level (Parsoid only)
3926 Definition Lists: Nesting: Test 2 (Parsoid only)
3953 Definition Lists: Nesting: Test 3 (Parsoid only)
3996 Definition Lists: Nesting: Test 4
4001 <dl><dd><dl><dd><dl><dt>t3</dt>
4002 <dd>d3</dd></dl></dd></dl></dd></dl>
4007 ## The Parsoid team believes the following three test exposes a
4008 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4009 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4010 ## It also exposes a "misfeature" in tidy, which doesn't like
4011 ## <dl> tags with a single <dt> child; it converts the <dt> into
4012 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4014 Definition Lists: Mixed Lists: Test 1
4020 <dl><dd><dl><dt><ul><li> foo</li>
4021 <li> bar</li></ul></dt></dl>
4022 <dl><dt> baz</dt></dl></dd></dl>
4057 Definition Lists: Mixed Lists: Test 2
4062 <ul><li><dl><dd> d1</dd>
4063 <dd> d2</dd></dl></li></ul>
4069 Definition Lists: Mixed Lists: Test 3
4074 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4075 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4081 Definition Lists: Mixed Lists: Test 4
4086 <ul><li><dl><dt>d1 </dt>
4089 <dd>d4</dd></dl></li></ul>
4095 Definition Lists: Mixed Lists: Test 5
4101 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4107 Definition Lists: Mixed Lists: Test 6
4112 <ol><li><ul><li><dl><dd>d1
4113 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4119 Definition Lists: Mixed Lists: Test 7
4124 <dl><dd><ul><li> d1</li>
4125 <li> d2</li></ul></dd></dl>
4131 Definition Lists: Mixed Lists: Test 8
4136 <dl><dd><ul><li> d1</li></ul>
4137 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4143 Definition Lists: Mixed Lists: Test 9
4147 <ul><li><dl><dt>foo </dt>
4148 <dd>bar</dd></dl></li></ul>
4154 Definition Lists: Mixed Lists: Test 10
4158 <ul><li><ol><li><dl><dt>foo </dt>
4159 <dd>bar</dd></dl></li></ol></li></ul>
4163 # The Parsoid team disagrees with the PHP parser's seemingly-random
4164 # rules regarding dd/dt on the next two tests. Parsoid is more
4165 # consistent, and recognizes the shared nesting and keeps the
4166 # still-open tags around until the nesting is complete.
4167 # (And tidy again converts <dt> to <dd> before 'bar'.)
4170 Definition Lists: Mixed Lists: Test 11
4175 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4176 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4177 <dl><dt>boo </dt>
4178 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4233 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4234 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4238 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4239 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4248 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4250 # * The test is wrong, there are two colons where there should be :;
4251 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4253 Definition Lists: Weird Ones: Test 1
4255 *#;*::;; foo : bar (who uses this?)
4257 <ul><li><ol><li><dl><dt> foo </dt>
4258 <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>
4277 <dt>bar (who uses this?)</dt>
4309 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4310 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4322 Definition Lists: colons occurring in tags
4340 <dt><span>a:b</span></dt>
4367 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4369 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4370 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4371 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4372 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4374 <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>
4375 <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>
4376 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4380 Definition Lists: colons and tables 1
4392 </td></tr></table></dd></dl>
4396 </td></tr></table></dd></dl>
4400 # Parsoid's output (as documented below) differs from php's in this case.
4401 # This is probably a bug. If we fixup parsoid to match php's output, the
4402 # above test should pass and the below test case can be removed. It is
4403 # unclear which output is more desirable.
4406 Definition Lists: colons and tables 2
4418 </td></tr></table></dd>
4422 </td></tr></table></dd></dl>
4426 Definition Lists: template interaction
4428 ::{{definition_list}}
4431 ::{{definition_list}}
4436 <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">
4437 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4439 <dl><dd data-parsoid='{}'>one
4440 <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">
4441 </span><dd about="#mwt2">two
4443 <dd>three</dd></dl></dd>
4444 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4452 External links: non-bracketed
4454 Non-bracketed: http://example.com
4456 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4460 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4462 External links: numbered
4464 Numbered: [http://example.com]
4465 Numbered: [http://example.net]
4466 Numbered: [http://example.com]
4468 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4469 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4470 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4473 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4474 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4475 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4479 External links: specified text
4481 Specified text: [http://example.com link]
4483 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4488 External links: trail
4490 Linktrails should not work for external links: [http://example.com link]s
4492 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4497 External links: dollar sign in URL
4499 http://example.com/1$2345
4501 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4505 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4507 External links: dollar sign in URL (autonumber)
4509 [http://example.com/1$2345]
4511 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4514 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4518 External links: open square bracket forbidden in URL (bug 4377)
4520 parsoid=wt2html,wt2wt,html2html
4522 http://example.com/1[2345
4524 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4527 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4531 External links: open square bracket forbidden in URL (named) (bug 4377)
4533 parsoid=wt2html,html2html
4535 [http://example.com/1[2345]
4537 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4540 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4543 # parsoid adds a space before the link name
4545 External links: open square bracket forbidden in URL (named) (bug 4377)
4548 [http://example.com/1 [2345]
4550 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4555 External links: nowiki in URL link text (bug 6230)
4557 [http://example.com/ <nowiki>''example site''</nowiki>]
4559 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4564 External links: newline forbidden in text (bug 6230 regression check)
4566 [http://example.com/ first
4569 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4575 External links: Pipe char between url and text
4577 [http://example.com | link]
4579 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4584 External links: protocol-relative URL in brackets
4586 [//example.com/ Test]
4588 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4592 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4594 External links: protocol-relative URL in brackets without text
4598 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4601 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4605 External links: protocol-relative URL in free text is left alone
4609 <p>//example.com/Foo
4614 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4616 foo//example.com/Foo
4618 <p>foo//example.com/Foo
4623 External links: with no contents
4625 [http://en.wikipedia.org/wiki/Foo]
4627 [[wikipedia:Foo|Bar]]
4629 [[wikipedia:Foo|<span>Bar</span>]]
4631 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4632 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4633 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4636 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4637 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4638 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4642 External links: Free with trailing punctuation
4652 http://example.com/url_with_(brackets)
4653 (http://example.com/url_without_brackets)
4654 http://example.com/url_with_entity&
4655 http://example.com/url_with_entity&
4656 http://example.com/url_with_entity&
4657 http://example.com/url_with_entity
4658 http://example.com/url_with_entity 
4659 http://example.com/url_with_entity 
4660 http://example.com/url_with_entity<
4661 http://example.com/url_with_entity<
4662 http://example.com/url_with_entity<
4664 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4665 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4666 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4667 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4668 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4669 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4670 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4671 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4672 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4673 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4674 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4675 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4676 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4677 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4678 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4679 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4680 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4681 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4682 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4685 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4686 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4687 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4688 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4689 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4690 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4691 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4692 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4693 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4694 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4695 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4696 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4697 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4698 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4699 <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>
4700 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4701 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4702 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4703 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
4707 External links: tricky Parsoid html2html case
4709 parsoid=wt2html,wt2wt,html2html
4711 http://example.com/url_with_entity&amp;
4713 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4716 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4720 External links: Free with trailing quotes (T113666)
4722 '''News:''' Stuff here
4726 <p><b>News:</b> Stuff here
4727 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4730 <p><b>News:</b> Stuff here</p>
4731 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4735 External links: Lone protocols are never linked (T105697)
4754 External links: No preceding word characters allowed (bug 65278)
4756 NOPEhttp://example.com
4757 N0http://example.com
4758 ok:http://example.com
4759 ok-http://example.com
4761 <p>NOPEhttp://example.com
4762 N0http://example.com
4763 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4764 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4769 External links: nofollow domain exception
4771 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4773 <p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>.
4780 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4782 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4787 External image from https
4789 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4791 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4796 External image (when not allowed)
4798 wgAllowExternalImages=0
4800 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4802 <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>
4807 Link to non-http image, no img tag
4809 Link to non-http image, no img tag: ftp://example.com/test.jpg
4811 <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>
4816 External links: terminating separator
4818 Terminating separator: http://example.com/thing,
4820 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4825 External links: intervening separator
4827 Intervening separator: http://example.com/1,2,3
4829 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4834 External links: old bug with URL in query
4836 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4838 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4843 External links: old URL-in-URL bug, mixed protocols
4845 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4847 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4851 # Since Parsoid is starting to emit canonical wikitext for links,
4852 # [http://example.com http://example.com] will not RT back to that
4855 External links: URL in text
4859 URL in text: [http://example.com http://example.com]
4861 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4864 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4868 External links: Clickable images
4870 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4872 <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>
4875 <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>
4879 External links: raw ampersand
4881 Old & use: http://x&y
4883 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4888 External links: encoded ampersand
4890 Old & use: http://x&y
4892 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4895 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4899 External links: encoded equals (bug 6102)
4901 http://example.com/?foo=bar
4903 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4906 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4910 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4911 ## does it number them. As discussed in bug 53505, we can identify
4912 ## autonumbered links via CSS.
4916 External links: [raw ampersand]
4918 Old & use: [http://x&y]
4920 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4923 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4926 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4927 # mode will return the [raw ampersand] wikitext
4929 External links: [encoded ampersand]
4931 parsoid=wt2html,wt2wt,html2html
4933 Old & use: [http://x&y]
4935 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4938 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4942 External links: [raw equals]
4944 [http://example.com/?foo=bar]
4946 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4949 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4952 # note that parsoid html is identical to [raw equals] case; so html2wt
4953 # mode will return the [raw equals] wikitext
4955 External links: [encoded equals] (bug 6102)
4957 parsoid=wt2html,wt2wt,html2html
4959 [http://example.com/?foo=bar]
4961 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4964 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4967 # xxx parsoid strips the IDN character, so the round-trip tests will
4968 # obviously fail and are disabled. --cscott
4970 External links: [IDN ignored character reference in hostname; strip it right off]
4972 parsoid=wt2html,wt2wt,html2html
4974 [http://e‌xample.com/]
4976 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4979 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4982 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4983 # Where an external link could easily circumvent the sanitization of the text of
4984 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4985 # test demands a higher standard. That's a bit strange.
4989 # http://example.com -> [http://example.com|http://example.com]
4990 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4992 # The first example is sanitized, but the second is not. Any security benefits
4993 # from this production are trivial to circumvent. Either remove this test and
4994 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4995 # the test accordingly.
4999 # xxx parsoid strips the IDN character, so the round-trip tests will
5000 # obviously fail and are disabled. --cscott
5002 External links: IDN ignored character reference in hostname; strip it right off
5004 parsoid=wt2html,html2html
5006 http://e‌xample.com/
5008 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5011 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5015 External links: www.jpeg.org (bug 554)
5019 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5023 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5025 External links: URL within URL (original bug 2)
5027 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5029 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5032 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5036 BUG 361: URL inside bracketed URL
5038 [http://www.example.com/foo http://www.example.com/bar]
5040 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5045 BUG 361: URL within URL, not bracketed
5047 http://www.example.com/foo?=http://www.example.com/bar
5049 <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>
5054 BUG 289: ">"-token in URL-tail
5056 http://www.example.com/<hello>
5058 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5063 BUG 289: literal ">"-token in URL-tail
5065 http://www.example.com/<b>html</b>
5067 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5070 <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>
5074 BUG 289: ">"-token in bracketed URL
5076 [http://www.example.com/<hello> stuff]
5078 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5083 BUG 289: literal ">"-token in bracketed URL
5085 [http://www.example.com/<b>html</b> stuff]
5087 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5092 BUG 289: literal double quote at end of URL
5094 http://www.example.com/"hello"
5096 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5101 BUG 289: literal double quote in bracketed URL
5103 [http://www.example.com/"hello" stuff]
5105 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5110 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5112 [http://www.example.com test]
5114 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5119 External links: link text with spaces
5121 [http://www.example.com a b c]
5122 [http://www.example.com ''a'' ''b'']
5124 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5125 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5130 External links: wiki links within external link (Bug 3695)
5132 parsoid=wt2html,html2html
5134 [http://example.com [[wikilink]] embedded in ext link]
5136 <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>
5139 <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>
5143 BUG 787: Links with one slash after the url protocol are invalid
5147 [http:/example.com title]
5149 <p>http:/example.com
5150 </p><p>[http:/example.com title]
5155 Bracketed external links with template-generated invalid target
5157 [{{echo|http:/example.com}} title]
5159 <p>[http:/example.com title]
5164 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5166 ''[http://example.com text'']
5167 [http://example.com '''text]'''
5168 ''Something [http://example.com in italic'']
5169 ''Something [http://example.com mixed''''', even bold]'''
5170 '''''Now [http://example.com both''''']
5172 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5173 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5174 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5175 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5176 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5182 Bug 4781: %26 in URL
5184 http://www.example.com/?title=AT%26T
5186 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5189 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5192 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5193 # % is actually legal in HTML5. Any change in output would need testing though.
5195 Bug 4781, 5267: %25 in URL
5197 http://www.example.com/?title=100%25_Bran
5199 <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>
5202 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5206 Bug 4781, 5267: %28, %29 in URL
5208 http://www.example.com/?title=Ben-Hur_%281959_film%29
5210 <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>
5213 <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>
5218 Bug 4781: %26 in autonumber URL
5220 [http://www.example.com/?title=AT%26T]
5222 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5225 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5229 Bug 4781, 5267: %26 in autonumber URL
5231 [http://www.example.com/?title=100%25_Bran]
5233 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5236 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5240 Bug 4781, 5267: %28, %29 in autonumber URL
5242 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5244 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5247 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5252 Bug 4781: %26 in bracketed URL
5254 [http://www.example.com/?title=AT%26T link]
5256 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5259 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5263 Bug 4781, 5267: %25 in bracketed URL
5265 [http://www.example.com/?title=100%25_Bran link]
5267 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5272 Bug 4781, 5267: %28, %29 in bracketed URL
5274 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5276 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5279 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5283 External link containing a period in the anchor. (bug 63947)
5285 [//foo.org/bar#baz. bang]
5287 [//foo.org/bar. bang]
5289 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5290 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5293 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5294 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5298 External link containing a single quote. (bug 63947)
5302 [//foo.org/bar'baz bang]
5304 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5305 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5308 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5309 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5313 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5315 Some [http://example.com/ pretty ''italics'' and stuff]!
5317 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5322 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5324 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5326 <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>
5331 External link containing double-single-quotes with no space separating the url from text in italics
5333 [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]].]
5335 <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>
5338 <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>
5340 <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>
5344 External link with comments in link text
5346 [http://www.google.com Google <!-- comment -->]
5348 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5351 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5355 External link to bare IPv4 address
5357 [http://192.168.0.1 Link]
5359 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5362 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5366 URL-encoding in URL functions (single parameter)
5368 {{localurl:Some page|amp=&}}
5370 <p>/index.php?title=Some_page&amp=&
5375 URL-encoding in URL functions (multiple parameters)
5377 {{localurl:Some page|q=?&=&}}
5379 <p>/index.php?title=Some_page&q=?&amp=&
5386 http://example.com/index.php?foozoid%5B%5D=bar
5388 http://example.com/index.php?foozoid[]=bar
5390 <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>
5391 </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>
5394 <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>
5396 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5400 IPv6 urls, autolink format (T23261)
5402 http://[2404:130:0:1000::187:2]/index.php
5404 Examples from RFC 2373, section 2.2:
5405 * http://[1080::8:800:200C:417A]/unicast
5406 * http://[FF01::101]/multicast
5407 * http://[::1]/loopback
5408 * http://[::]/unspecified
5409 * http://[::13.1.68.3]/ipv4compat
5410 * http://[::FFFF:129.144.52.38]/ipv4compat
5412 Examples from RFC 2732, section 2:
5413 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5414 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5415 * http://[3ffe:2a00:100:7031::1]
5416 * http://[1080::8:800:200C:417A]/foo
5417 * http://[::192.9.5.5]/ipng
5418 * http://[::FFFF:129.144.52.38]:80/index.html
5419 * http://[2010:836B:4179::836B:4179]
5422 <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>
5423 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5425 <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>
5426 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5427 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5428 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5429 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5430 <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>
5431 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5433 <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>
5434 <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>
5435 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5436 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5437 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5438 <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>
5439 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5442 <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>
5444 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5445 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5446 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5447 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5448 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5449 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5450 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5452 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5453 <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>
5454 <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>
5455 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5456 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5457 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5458 <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>
5459 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5463 IPv6 urls, bracketed format (T23261)
5465 [http://[2404:130:0:1000::187:2]/index.php test]
5467 Examples from RFC 2373, section 2.2:
5468 * [http://[1080::8:800:200C:417A] unicast]
5469 * [http://[FF01::101] multicast]
5470 * [http://[::1]/ loopback]
5471 * [http://[::] unspecified]
5472 * [http://[::13.1.68.3] ipv4compat]
5473 * [http://[::FFFF:129.144.52.38] ipv4compat]
5475 Examples from RFC 2732, section 2:
5476 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5477 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5478 * [http://[3ffe:2a00:100:7031::1] 3]
5479 * [http://[1080::8:800:200C:417A]/foo 4]
5480 * [http://[::192.9.5.5]/ipng 5]
5481 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5482 * [http://[2010:836B:4179::836B:4179] 7]
5485 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5486 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5488 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5489 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5490 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5491 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5492 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5493 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5494 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5496 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5497 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5498 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5499 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5500 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5501 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5502 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5505 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5507 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5508 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5509 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5510 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5511 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5512 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5513 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5515 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5516 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5517 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5518 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5519 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5520 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5521 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5522 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5526 Non-extlinks in brackets
5535 [{{echo|foo}} ''bar'']
5536 [{{echo|foo}}l's] errand
5537 [{{echo|foo}}l's errand]
5539 [url=http://example.com]
5540 [http:// bare protocols don't count]
5553 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5554 [http:// bare protocols don't count]
5562 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5563 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5564 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5565 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5566 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5567 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5568 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5569 [http:// bare protocols don't count]</p>
5573 Percent encoding in external links
5575 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5577 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5580 <p><a rel="mw:ExtLink"
5581 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5585 Use url link syntax for links where the content is equal the link target
5589 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5592 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5596 Parenthesis in external links, especially URL links
5600 http://example.com/test)
5602 http://example.com/(test)
5604 http://example.com/((test)
5606 (http://example.com/(test))
5608 (http://example.com/(test)))))
5610 http://example.com/a)b
5612 [http://example.com) foo]
5614 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</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/(test)))))">http://example.com/(test)))))</a>
5620 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5621 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5624 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</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/(test)))))">http://example.com/(test)))))</a></p>
5630 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5631 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5635 Parenthesis in external links, w/ transclusion or comment
5637 (http://example.com/{{echo|hi}})
5639 (http://example.com<!-- hi -->)
5641 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5642 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5645 <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>
5647 <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>
5651 Serialize <a> tags with invalid link targets as plain text
5653 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5655 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5656 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5657 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5658 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5661 <nowiki>*</nowiki>text
5662 <nowiki>[[foo]]</nowiki>
5663 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5667 mw:ExtLink -vs- mw:WikiLink (T94723)
5671 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5672 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5673 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5674 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5676 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5677 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5682 [[wikipedia:Foo|Bar]]
5683 [[wikipedia:Foo|Bar]]
5685 [[wikipedia:European_Robin|European Robin]]
5686 [[wikipedia:European_Robin|European Robin]]
5690 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5694 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5696 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5707 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5709 Normal text. '''''Bold italic text.''''' Normal text.
5711 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5712 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5717 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5718 # parser strips. The wikitext contains just the first half of the bold
5721 Unclosed and unmatched quotes
5723 '''''Bold italic text '''with bold deactivated''' in between.'''''
5725 '''''Bold italic text ''with italic deactivated'' in between.'''''
5729 ..spanning two paragraphs (should not work).'''
5731 '''Bold tag left open
5733 ''Italic tag left open
5737 <!-- Unmatching number of opening, closing tags: -->
5738 '''This year''''s election ''should'' beat '''last year''''s.
5740 ''Tom'''s car is bigger than ''Susan'''s.
5742 Plain ''italic'''s plain
5744 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5745 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5746 </p><p><b>Bold text..</b>
5747 </p><p>..spanning two paragraphs (should not work).
5748 </p><p><b>Bold tag left open</b>
5749 </p><p><i>Italic tag left open</i>
5751 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5752 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5753 </p><p>Plain <i>italic'</i>s plain
5756 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5757 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5758 </p><p><b>Bold text..</b>
5759 </p><p>..spanning two paragraphs (should not work).<b></b>
5760 </p><p><b>Bold tag left open</b>
5761 </p><p><i>Italic tag left open</i>
5764 <!-- Unmatching number of opening, closing tags: -->
5765 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5766 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5767 </p><p>Plain <i>italic'</i>s plain
5774 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5777 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5778 # is the bare minimum required by the spec, see:
5779 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5780 # Parsoid team replies: empty table tags are legal in HTML5
5782 A table with no data.
5795 A table with stray table end tags on start tag line (wt2html)
5799 {|style="color: red;"|}
5801 {|style="color: red;" |}
5805 {|style="color: red;"|} id="foo"
5809 {|style="color: red;" |} id="foo"
5813 <table style="color: red;"></table>
5815 <table style="color: red;">
5821 <table style="color: red;" id="foo">
5827 <table style="color: red;" id="foo">
5836 A table with no data (take 2)
5844 # A table with nothing but a caption is invalid XHTML, we might want to render
5845 # this as <p>caption</p>
5846 # Parsoid team replies: table with only a caption is legal in HTML5
5848 A table with nothing but a caption
5856 </caption><tr><td></td></tr></table>
5859 <table><caption> caption</caption></table>
5863 A table with caption with default-spaced attributes and a table row
5866 |+ style="color: red;" | caption1
5872 <caption style="color: red;"> caption1
5881 A table with captions with non-default spaced attributes and a table row
5884 |+style="color: red;"|caption2
5885 |+ style="color: red;"| caption3
5891 <caption style="color: red;">caption2
5893 <caption style="color: red;"> caption3
5902 Table td-cell syntax variations
5906 | foo bar foo || baz
5907 | style='color:red;' | baz
5908 | style='color:red;' || baz
5915 <td> foo bar foo </td>
5918 <td style="color:red;"> baz
5920 <td> style='color:red;' </td>
5948 Simple table but with multiple dashes for row wikitext
5967 Multiplication table
5969 {| border="1" cellpadding="2"
5970 |+Multiplication table
5972 ! × !! 1 !! 2 !! 3
5990 <table border="1" cellpadding="2">
5991 <caption>Multiplication table
6038 Accept "||" in table headings
6053 Accept "!!" in table data
6067 <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>
6072 Accept "||" in indented table headings
6082 </th></tr></table></dd></dl>
6087 Accept "!!" in templates
6101 <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>
6105 Accept "!!" in table headings after newline
6122 <p>b!!c</p></th></tr>
6127 Accept "!!" in table data of mixed wikitext / html syntax
6131 <tr><td>b!!c</td></tr>
6144 <tbody><tr><th>a</th></tr>
6145 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6150 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6167 Accept "| !" at start of line in tables (ignore !-attribute)
6171 | !style="color:red" | bar
6183 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 +/-
6187 |style='color:red;'|+1
6188 |style='color:blue;'|-1
6200 <td style="color:red;">+1
6202 <td style="color:blue;">-1
6226 |rowspan=2| Cell 2, row 1 (and 2)
6237 <td rowspan="2"> Cell 2, row 1 (and 2)
6255 {| bgcolor=#ABCDEF border=2
6260 |the original table again
6268 <table bgcolor="#ABCDEF" border="2">
6276 <td>the original table again
6282 Invalid attributes in table cell (bug 1830)
6296 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6300 | title="foo<nowiki>|</nowiki>" |bar
6301 | title="foo<nowiki>|</nowiki>" bar
6308 <td title="foo|">bar
6310 <td> title="foo|" bar
6315 <tbody><tr><td title="foo">bar</td>
6316 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6317 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6321 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6322 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6323 # *2wt modes will fail.
6325 Table security: embedded pipes
6327 parsoid=wt2html,html2html
6330 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6334 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6335 <td>]" onmouseover="alert(document.cookie)">test
6343 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6347 Element attributes with double ! should not be broken up by <th>
6350 ! hi <div class="!!">ha</div> ho
6355 <th> hi <div class="!!">ha</div> ho
6360 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6365 ! and || in element attributes should not be parsed as <th>/<td>
6368 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6373 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6378 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6382 # FIXME: The output seems broken. Filed as T110268.
6384 ! and || in td attributes should not be parsed as <th>/<td>
6389 | style="color: red !important;" data-contrived="put this here ||" | foo
6394 <td> style="color: red !important;" data-contrived="put this here </td>
6400 <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>
6405 Break on | in element attribute in template
6407 parsoid=wt2html,html2html
6409 {{echo|1=<div class="hi|ho">ha</div>}}
6411 <p>ho">ha</div>
6414 <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 ## We don't support roundtripping of these attributes in Parsoid.
6418 ## Selective serialization takes care of preventing dirty diffs.
6419 ## But, on edits, we dirty-diff the invalid attribute text.
6421 Invalid text in table attributes should be discarded
6425 {| <span>boo</span> style='border:1px solid black'
6426 | <span>boo</span> style='color:blue' | 1
6427 |<span>boo</span> style='color:blue'| 2
6430 <table style="border:1px solid black">
6432 <td style="color:blue"> 1
6434 <td style="color:blue"> 2
6438 <table style="border:1px solid black">
6440 <td style="color:blue"> 1</td>
6441 <td style="color:blue"> 2</td>
6447 Invalid text in table attributes should be preserved by selective serializer
6450 "modes": ["selser"],
6452 ["td:first-child", "text", "abc"],
6453 ["td + td", "text", "xyz"]
6457 {| <span>boo</span> style='border:1px solid black'
6458 | <span>boo</span> style='color:blue' | 1
6459 |<span>boo</span> style='color:blue'| 2
6462 {| <span>boo</span> style='border:1px solid black'
6463 | <span>boo</span> style='color:blue' |abc
6464 |<span>boo</span> style='color:blue'|xyz
6469 1. Template-generated table cell attributes and cell content
6474 || {{table_attribs_5}}
6475 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6476 |align=center {{table_attribs}}
6477 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6482 <td style="color:red;">Foo
6484 <td style="color:red;">Foo
6486 <td> style="color:red;"</td>
6489 <td style="color:red;">Foo
6491 <td align="center" style="color:red;">Foo
6493 <td align="center" style="color:red;">Foo
6499 2. Template-generated table cell attributes and cell content
6502 |{{table_attribs_2}}
6507 <td style="color:red;">Foo
6515 <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>
6516 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6521 3. Template-generated table cell attributes and cell content
6524 !align=center {{table_header_cells}}
6526 |align=center {{table_cells}}
6531 <th align="center" style="color:red;">Foo</th>
6532 <th style="color:red;"><i>Bar</i></th>
6533 <th style="color:brown;"><i>Foo</i> and Baz
6536 <td align="center" style="color:red;">Foo</td>
6537 <td style="color:red;"><i>Bar</i></td>
6538 <td style="color:brown;"><i>Foo</i> and Baz
6543 <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>
6544 <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>
6549 4. Template-generated table cell attributes and cell content inside a templated table
6552 !align=center {{table_header_cells}}
6554 |align=center {{table_cells}}
6559 <th align="center" style="color:red;">Foo</th>
6560 <th style="color:red;"><i>Bar</i></th>
6561 <th style="color:brown;"><i>Foo</i> and Baz
6564 <td align="center" style="color:red;">Foo</td>
6565 <td style="color:red;"><i>Bar</i></td>
6566 <td style="color:brown;"><i>Foo</i> and Baz
6570 <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}}]}'>
6571 <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>
6573 <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>
6577 ## Edge case fix to prevent future regressions
6579 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6582 |{{table_attribs_7}}
6587 <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>
6589 <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>
6593 Table with row followed by newlines and table heading
6595 parsoid=wt2html,html2html
6613 Table with empty line following the start tag
6615 parsoid=wt2html,html2html
6633 Table attributes with empty value
6635 parsoid=wt2html,html2html
6648 <tbody><tr><td style=""> hello</td></tr>
6653 Wikitext table with a lot of comments
6676 Wikitext table comments represented in parsoid dom
6678 {|<!--c1--><!--c2-->
6689 <table><!--c1--><!--c2-->
6690 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6691 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6696 Wikitext table with double-line table cell
6713 Table cell with a single comment
6730 Table-cell after a comment-only-empty-line
6747 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6749 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6755 Build table with {{!}}
6757 {{{!}} class="wikitable"
6760 {{!}}- style="color:red;"
6761 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6764 <table class="wikitable">
6770 <tr style="color:red;">
6772 <td style="color:red;"> second data
6778 Build table with pipe as data
6780 {| class="wikitable"
6783 |- style="color:red;"
6784 | data || style="color:red;" | second data
6786 | style="color:red;" | data with | || style="color:red;" | second data with |
6788 || data with | ||| second data with |
6791 <table class="wikitable">
6797 <tr style="color:red;">
6799 <td style="color:red;"> second data
6802 <td style="color:red;"> data with | </td>
6803 <td style="color:red;"> second data with |
6806 <td> data with | </td>
6807 <td> second data with |
6813 Build table with wikilink
6815 {| class="wikitable"
6816 ! header || second header
6817 |- style="color:red;"
6818 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6820 | data || second data [[Main Page|link|text with pipe]]
6823 <table class="wikitable">
6828 <tr style="color:red;">
6829 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6830 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6834 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6839 # The expected HTML structure in this test is debatable. The PHP parser does
6840 # not parse this kind of table at all. The main focus for Parsoid is on
6841 # round-tripping, so this output is ok for now. TODO: revisit!
6843 Wikitext table with html-syntax row
6853 <td>foo</td></tr></tbody></table>
6856 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6857 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6858 ## PHP parser, which tidy then compounds by fostering the content
6859 ## entirely out of the table. Parsoid recognizes the table context
6860 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6861 ## depends on PHP's treatment of broken table markup!
6863 Implicit <td> after a |-
6865 parsoid=wt2html,html2html
6885 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6887 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6889 parsoid=wt2html,html2html
6922 <tr><td><pre>a</pre></td></tr>
6923 <tr><td> b</td></tr>
6928 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6929 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6931 Lists should be recognized in an implicit <td> context
6933 parsoid=wt2html,html2html
6960 Table cells not properly parsed in an implicit-td context
6964 {{table_attribs_4}} || a || b
6969 <td style="background-color:#DC241f;" width="10px"></td>
6976 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6977 <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>
6982 Parsoid: Round-trip tables directly followed by content (bug 51219)
6984 parsoid=wt2html,wt2wt
7009 Parsoid: Default to a newline after tables in new content (bug 51219)
7014 <tr><td>foo</td></tr></tbody></table> bar
7016 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7021 <nowiki> </nowiki>bar
7029 Parsoid: newline inducing block nodes don't suppress <nowiki>
7041 Parsoid: Row-syntax table headings followed by comment & table cells
7043 parsoid=wt2html,wt2wt
7047 <!-- foo --> || baz || quux
7061 <tbody><tr><th> foo </th><th> bar
7062 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7067 Parsoid: Recover better from broken table attributes
7087 <p>foo</p></td></tr>
7092 Tables: Digest broken attributes on table and tr tag
7108 # T137406: Whitespace in the HTML
7110 1. Generate correct wikitext for tables with thead/tbody/tfoot
7115 <caption>Test</caption>
7156 <caption>Test</caption>
7176 # T137406: No whitespace in the HTML
7178 2. Generate correct wikitext for tables with thead/tbody/tfoot
7182 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7192 Testing serialization after deletion in references
7201 hi <ref><div id="x">ho</div></ref>
7211 Testing serialization after deletion of table cells
7214 "modes": ["wt2wt", "selser"],
7222 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7232 Testing selser after addition of new row before first row (T125419)
7235 "modes": ["wt2wt", "selser"],
7237 [ "tr", "before", "<tr><td>X</td></tr>" ]
7253 Serialize new table rows in a HTML table using HTML tags
7256 "modes": ["wt2wt", "selser"],
7258 [ "tr", "before", "<tr><td>X</td></tr>" ]
7262 <table><tr><td>a</td></tr></table>
7264 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7268 Serialize new table cells in a HTML row using HTML tags
7271 "modes": ["wt2wt", "selser"],
7273 [ "td", "before", "<td>X</td>" ]
7277 <table><tr><td>a</td></tr></table>
7279 <table><tr><td>X</td><td>a</td></tr></table>
7283 Wikitext tables can be nested inside HTML tables
7287 <table data-parsoid='{"stx":"html"}'>
7290 <tr><td>foo</td></tr>
7305 Serialize wikitext list items as HTML list items when embedded in a HTML list
7309 <ul data-parsoid='{"stx": "html"}'>
7310 <li data-parsoid='{}'>a</li>
7320 # SSS FIXME: Is this actually a good thing given the
7321 # odd nested list output that is generated by MW?
7322 # <ul><li>foo<ul>..</ul></li></ul> instead of
7323 # <ul><li>foo</li><ul>..</ul></ul>
7325 Wikitext lists can be nested inside HTML lists
7329 <ul data-parsoid='{"stx": "html"}'>
7330 <li data-parsoid='{"stx": "html"}'>a
7335 <ul data-parsoid='{"stx": "html"}'>
7358 Plain link, capitalized
7362 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7367 Plain link, uncapitalized
7371 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7378 [[Main Page|The Main Page]]
7380 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7385 Piped link with comment in link text
7387 [[Main Page|The Main<!--front--> Page]]
7389 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7394 Piped link with multiple pipe characters in link text
7396 [[Main Page||The|Main|Page|]]
7398 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7401 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7405 Piped link with no link text
7407 [[Thomas Bek (bishop of St David's)|]]
7409 <p>[[Thomas Bek (bishop of St David's)|]]
7412 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7420 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7425 Broken link with fragment
7427 [[Zigzagzogzagzig#zug]]
7429 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7434 Special page link with fragment
7436 [[Special:Version#anchor]]
7438 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7443 Nonexistent special page link with fragment
7445 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7447 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7454 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7456 <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>
7463 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7465 <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>!!!
7476 Bug 43661: Piped links with identical prefixes
7478 [[prefixed article|prefixed articles with spaces]]
7480 [[prefixed article|prefixed articlesaoeu]]
7482 [[Main Page|Main Page test]]
7484 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7485 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7486 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7492 Link with HTML entity in suffix / tail
7494 [[Main Page]]", [[Main Page]]a
7496 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7499 <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>
7503 Link with 3 brackets
7514 Link with 4 brackets
7518 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7523 Piped link with 3 brackets
7525 [[[main page|the main page]]]
7527 <p>[[[main page|the main page]]]
7532 Piped link with extlink-like text
7535 [[Main Page|This is a [bar]]]
7537 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7538 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7541 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7542 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7546 Link with multiple pipes
7548 [[Main Page|The|Main|Page]]
7550 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7554 # Note that parsoid does not munge anchor text; all non-space
7555 # characters are valid in HTML5 ids.
7557 Anchor containing a #. (bug 63430)
7559 [[Main Page#And#Link]]
7561 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7564 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7570 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7572 <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>
7577 Link with space in namespace
7579 [[User talk:Foo bar]]
7581 <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>
7586 MemoryAlpha:AlphaTest
7588 This is an article in the MemoryAlpha namespace
7589 (which shadows the memoryalpha interwiki link).
7593 Namespace takes precedence over interwiki link (bug 51680)
7595 [[MemoryAlpha:AlphaTest]]
7597 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7601 # The previous test doesn't work correctly in html2*, due to not recognizing the
7602 # link as an internal one. This one checks for the correct behavior.
7604 Link to namespace preferred over interwiki with correct rel attribute
7606 parsoid=html2wt,html2html
7608 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7610 [[MemoryAlpha:AlphaTest]]
7614 Piped link to namespace
7616 [[Meta:Disclaimers|The disclaimers]]
7618 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7625 [[Usually caused by a typo (oops}]]
7627 <p>[[Usually caused by a typo (oops}]]
7634 Just a test of an article title containing a percent.
7638 Link containing % (not as a hex sequence)
7641 [[7% Solution|7%25 Solution]]
7643 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7644 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7647 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7648 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7651 # note that the parsoid HTML is identical to the previous test output,
7652 # so the previous test ensures that the html2wt mode will generate the
7653 # "not as a hex sequence" wikitext.
7655 Link containing % as a single hex sequence interpreted to char
7657 parsoid=wt2wt,wt2html,html2html
7660 [[7%25 Solution|7%25 Solution]]
7662 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7663 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7666 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7667 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7671 Link containing % as a double hex sequence interpreted to hex sequence
7675 <p>[[7%2525 Solution]]
7679 # note that parsoid does not munge anchor text; all non-space
7680 # characters are valid in HTML5 anchors.
7682 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7683 Example for such a section: == < ==
7685 [[%23%3c]][[%23%3e]]
7687 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7690 <p><a rel="mw:WikiLink" href="./Main_Page#%3C" title="Main Page">#<</a><a rel="mw:WikiLink" href="./Main_Page#%3E" title="Main Page">#></a></p>
7694 Link containing "<#" and ">#" as a hex sequences
7696 [[%3c%23]][[%3e%23]]
7698 <p>[[%3c%23]][[%3e%23]]
7703 Link containing an equals sign
7705 [[Special:BookSources/isbn=4-00-026157-6]]
7707 <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>
7710 <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>
7716 Just a test of an article title containing a tilde.
7719 # note that links containing signatures, like [[Foo~~~~]], are
7720 # massaged by the pre-save transform (PST) and so the tildes are never
7721 # seen by the parser.
7723 Link containing a tilde
7727 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7730 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7734 Link containing double-single-quotes '' (bug 4598)
7736 [[Lista d''e paise d''o munno]]
7738 <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>
7741 <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>
7745 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7747 Some [[Link|pretty ''italics'' and stuff]]!
7749 <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>!
7752 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7756 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7758 ''Some [[Link|pretty ''italics'' and stuff]]!''
7760 <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>
7765 Link with double quotes in title part (literal) and alternate part (interpreted)
7767 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7771 [[''Pentecoste''|Pentecoste]]
7773 [[''Pentecoste''|''Pentecoste'']]
7775 <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>
7776 </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>
7777 </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>
7778 </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>
7781 <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>
7782 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7783 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7784 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7788 Broken image links with HTML captions (bug 39700)
7790 [[File:Nonexistent|<script></script>]]
7791 [[File:Nonexistent|100x100px|<script></script>]]
7792 [[File:Nonexistent|<]]
7793 [[File:Nonexistent|a<i>b</i>c]]
7795 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7796 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7797 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7798 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7801 <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>
7802 <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>
7803 <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>
7804 <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>
7810 [[http://www.example.com]]
7812 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7815 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7819 Plain link to URL with link text
7821 [[http://www.example.com Link text]]
7823 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7828 Plain link to protocol-relative URL
7830 [[//www.example.com]]
7832 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7835 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7839 Plain link to protocol-relative URL with link text
7841 [[//www.example.com Link text]]
7843 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7848 Plain link to page with question mark in title
7854 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7855 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7860 # I'm fairly sure the expected result here is wrong.
7861 # We want these to be URL links, not pseudo-pages with URLs for titles....
7862 # However the current output is also pretty screwy.
7865 # I'm changing it to match the current output--it arguably makes more
7866 # sense in the light of the test above. Old expected result was:
7867 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7869 # But I think this test is bordering on "garbage in, garbage out" anyway.
7874 Piped link to URL: [[http://www.example.com|an example URL]]
7876 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7879 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7883 BUG 2: [[page|http://url/]] should link to page, not http://url/
7885 [[Main Page|http://url/]]
7887 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7890 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7893 # Parsoid does not mark self-links, by design.
7895 BUG 337: Escaped self-links should be bold
7899 [[Bug462]] [[Bug462]]
7901 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7904 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7906 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7910 Self-link to section should not be bold
7914 [[Main Page#section]]
7916 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7927 Self-link to numeric title
7933 <p><strong class="selflink">0</strong>
7938 Link to numeric-equivalent title
7944 <p><a href="/wiki/00" title="00">00</a>
7949 <nowiki> inside a link
7951 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7953 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7958 Non-breaking spaces in title
7960 [[ Main Page ]]
7962 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7967 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7973 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7978 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7984 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7989 Internal link with en linktrail: no apostrophes (bug 27473)
7995 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8000 Internal link with ca linktrail with apostrophes (bug 27473)
8006 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8011 Internal link with kaa linktrail with apostrophes (bug 27473)
8017 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8022 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
8024 [[User:Foo/Test/63636:Bar|Test]]
8026 <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>
8029 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8032 ## Mainly a sanity check for Parsoid
8034 Handle title parsing for subpages
8043 ## FIXME: Add a working php section here
8045 Link to a subpage from a namespace other than main
8051 <p><a rel="mw:WikiLink" href="./User:Test/123" title="User:Test/123" data-parsoid='{"stx":"simple","a":{"href":"./User:Test/123"},"sa":{"href":"/123"}}'>/123</a></p>
8055 Ensure that transclusion titles are not url-decoded
8057 subpage title=[[Test]]
8060 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8062 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8065 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8069 Purely hash wikilink
8071 title=[[User:test/123]]
8075 <p><a href="#a">b</a>
8078 <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>
8082 1. Interaction of linktrail and template encapsulation
8088 <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>
8092 2. Interaction of linktrail and template encapsulation
8096 {{echo|Some [[Fool]]}}s
8098 <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>
8102 3. Interaction of linktrail and template encapsulation
8106 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8108 <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>
8118 Internal link with is link prefix
8122 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8124 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8135 Internal link with is link trail and link prefix
8139 [[mótmælendatrú|xxx]]ar
8141 mótmælenda[[söfnuður]]
8142 mótmælenda[[söfnuður|söfnuðir]]
8143 mótmælenda[[söfnuður|söfnuðir]]xxx
8145 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8146 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8147 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8148 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8149 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8154 Parsoid link trail escaping
8156 parsoid=html2wt,html2html
8158 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
8164 Parsoid link prefix escaping
8167 parsoid=html2wt,html2html
8169 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
8171 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8175 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8183 [http://wp.org ''foo'']
8185 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8186 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8187 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8188 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8193 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8197 [[Foo|{{echo|a}} b {{echo|c}}]]
8199 <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>
8203 Link with angle bracket after anchor
8207 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8210 <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>
8214 ### Interwiki links (see maintenance/interwiki.sql)
8218 Inline interwiki link
8220 parsoid=wt2html,wt2wt,html2html
8222 [[MeatBall:SoftSecurity]]
8224 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8227 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8231 Inline interwiki link with empty title (bug 2372)
8233 parsoid=wt2html,wt2wt,html2html
8237 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8240 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8244 Interwiki link encoding conversion (bug 1636)
8246 *[[Wikipedia:ro:Olteniţa]]
8247 *[[Wikipedia:ro:Olteniţa]]
8249 <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>
8250 <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>
8254 <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>
8255 <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>
8260 Interwiki link with fragment (bug 2130)
8262 [[MeatBall:SoftSecurity#foo]]
8264 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8268 # Ideally the wikipedia: prefix here should be proto-relative too
8269 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8270 # define the 'en' prefix, and originally the test used 'wikipedia',
8271 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8274 Different interwiki prefixes mapping to the same URL
8282 [[:wikipedia:Foo|Foo]]
8284 [[wikipedia:en:Foo]]
8286 [[:wikipedia:en:Foo]]
8290 <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>
8292 <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>
8294 <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>
8296 <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>
8298 <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>
8300 <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>
8302 <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>
8306 Interwiki links that cannot be represented in wiki syntax
8309 [[meatball:ok#foo|ok with fragment]]
8310 [[meatball:ok_as_well?|ok ending with ? mark]]
8311 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8312 [http://de.wikipedia.org/wiki/#foo is just fragment]
8315 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8316 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8317 <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>
8318 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8319 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8322 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8323 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8324 <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>
8325 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8326 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8330 Interwiki links: trail
8332 [[wikipedia:Foo|Ba]]r
8334 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8337 <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>
8341 Local interwiki link
8343 parsoid=wt2html,wt2wt,html2html
8345 [[local:Template:Foo]]
8347 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8350 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8353 # Parsoid does not mark self-links, by design.
8355 Local interwiki link: self-link to current page
8358 parsoid=wt2html,wt2wt,html2html
8362 <p><strong class="selflink">local:Main Page</strong>
8365 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8369 Local interwiki link: prefix only (bug 64167)
8371 parsoid=wt2html,wt2wt,html2html
8375 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8378 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8382 Local interwiki link: with additional interwiki prefix (bug 61357)
8384 parsoid=wt2html,wt2wt,html2html
8386 [[local:meatball:Hello]]
8388 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8391 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8395 Multiple local interwiki link prefixes
8397 [[local:local:local:local:mi:local:Foo]]
8399 parsoid=wt2html,wt2wt,html2html
8401 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8404 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8408 ### Interlanguage links
8409 ### Language links (so that searching for '### language' matches..)
8421 <p>Blah blah blah</p>
8422 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8425 ## parsoid html2wt will lose the space variations
8427 Interlanguage link with spacing
8429 parsoid=wt2html,wt2wt,html2html
8437 <p>Blah blah blah</p>
8438 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8442 Double interlanguage link
8451 <p>Blah blah blah</p>
8452 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8453 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8456 ## parsoid html2wt will lose the space variations
8458 Interlanguage link variations
8460 parsoid=wt2html,wt2wt,html2html
8470 <p>Blah blah blah</p>
8471 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8472 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8473 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8476 ## parsoid html2wt will normalize the space to _
8478 Space and question mark encoding in interlanguage links (T95473)
8480 parsoid=wt2html,wt2wt,html2html
8488 <p>Blah blah blah</p>
8489 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8493 Interlanguage link, with prefix links
8503 <p>Blah blah blah</p>
8504 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8508 Double interlanguage link, with prefix links (bug 8897)
8519 <p>Blah blah blah</p>
8520 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8521 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8525 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8533 <p>Blah blah blah</p>
8534 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8537 ## PHP parser tests script needs an update
8538 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8540 Language links render as inline links if $wgInterwikiMagic=false
8542 wgInterwikiMagic=false
8543 parsoid=wt2html,wt2wt,html2html
8548 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8551 ## PHP parser tests script needs an update
8552 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8554 Language links render as inline links in the Talk namespace
8557 parsoid=wt2html,wt2wt,html2html
8562 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8566 Parsoid-specific test: Wikilinks with should RT properly
8572 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8577 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8579 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8581 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8582 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8584 He&nbsp;llo [[Foo|He&nbsp;llo]]
8586 He&nbsp;llo He&nbsp;llo
8588 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8589 </p><p>He&nbsp;llo He&nbsp;llo
8593 # html2wt will fail because of title normalization without data-parsoid
8595 Parsoid: handle constructor well
8597 parsoid=wt2html,wt2wt
8603 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8604 </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>
8607 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8609 <p><a rel="mw:WikiLink" href="./Constructor:foo" title="Constructor:foo" data-parsoid='{"stx":"simple","a":{"href":"./Constructor:foo"},"sa":{"href":"constructor:foo"}}'>constructor:foo</a></p>
8618 # Note that `ko` isn't a known interlanguage prefix
8620 Parsoid: recognize interlanguage links without a target page
8630 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8632 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8635 # Note that `ko` isn't a known interwiki prefix
8637 Parsoid: recognize interwiki links without a target page
8639 parsoid=wt2html,wt2wt,html2html
8645 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8646 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8649 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8650 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8654 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8658 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8661 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8665 Interlanguage link with preceding local interwiki link (bug 68085)
8667 parsoid=wt2html,wt2wt,html2html
8670 [[local:es:Spanish]]
8673 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8677 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8681 Looks like an interlanguage link, but is actually a local interwiki
8683 parsoid=wt2html,wt2wt,html2html
8689 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8693 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8697 ### Redirects, Parsoid-only
8701 1. Simple redirect to page
8703 #REDIRECT [[Main Page]]
8705 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8709 2. Other redirect variants
8711 #REDIRECT [[Main_Page]]
8713 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8716 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8717 # This tests the Parsoid bail-out code.
8719 3. Other redirect variants
8721 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8723 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8727 4. Redirect to a templated destination
8729 #REDIRECT [[{{echo|Foo}}bar]]
8731 <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"}]]}'/>
8737 parsoid=wt2html,wt2wt
8742 <li>REDIRECT [[]]</li></ol>
8746 Optional colon in #REDIRECT
8748 # the colon is archaic syntax. we support it for wt2html, but we
8749 # don't care that it roundtrips back to the modern syntax.
8750 parsoid=wt2html,html2html
8752 #REDIRECT:[[Main Page]]
8754 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8758 Whitespace in #REDIRECT with optional colon
8760 # the colon and gratuitous whitespace is archaic syntax. we support
8761 # it for wt2html, but we don't care that it roundtrips back to the
8762 # modern syntax (without extra whitespace)
8763 parsoid=wt2html,html2html
8770 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8774 Piped link in #REDIRECT
8776 # content after piped link is ignored. we support this syntax,
8777 # but don't care that the piped link is lost when we roundtrip this.
8780 #REDIRECT [[Main Page|bar]]
8782 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8786 Redirect to category (T104502)
8788 parsoid=wt2html,wt2wt
8790 #REDIRECT [[Category:Foo]]
8792 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8796 Redirect to category with URL encoding (T104502)
8800 #REDIRECT [[Category%3AFoo]]
8802 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8806 Redirect to category page
8808 #REDIRECT [[:Category:Foo]]
8810 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8814 Redirect to image page (1)
8816 #REDIRECT [[File:Wiki.png]]
8818 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8822 Redirect to image page (2)
8824 #REDIRECT [[Image:Wiki.png]]
8826 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8829 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8830 # Next test confirms this.
8832 Redirect to language (1) (T104918)
8834 parsoid=wt2html,wt2wt,html2html
8836 #REDIRECT [[en:File:Wiki.png]]
8838 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8842 Redirect to language (2) (T104918)
8844 #REDIRECT [[:en:File:Wiki.png]]
8846 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8850 Redirect to interwiki (T104918)
8852 #REDIRECT [[meatball:File:Wiki.png]]
8854 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8858 Non-English #REDIRECT
8862 #TILVÍSUN [[Main Page]]
8864 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8868 Redirect syntax under text isn't considered a redirect
8871 #redirect [[Main Page]]
8874 <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>
8877 # FIXME: Should hoist the redirect to the top of the page and ensure there
8884 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8904 Broken br tag sanitization
8912 # TODO: Fix html2html mode (bug 51055)!
8914 Parsoid: Broken br tag recognition
8927 Incorrecly removing closing slashes from correctly formed XHTML
8929 <br style="clear:both;" />
8931 <p><br style="clear:both;" />
8936 Failing to transform badly formed HTML into correct XHTML
8938 <br style="clear: left;">
8939 <br style="clear: right;">
8940 <br style="clear: both;">
8942 <p><br style="clear: left;" />
8943 <br style="clear: right;" />
8944 <br style="clear: both;" />
8948 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8949 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8951 Handling html with a div self-closing tag
8960 <p><div title />
8964 <p><div title=bar />
8965 <div title=bar/>
8967 <div title="bar/"></div>
8971 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8972 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8973 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8974 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8975 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8976 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8980 Handling html with a br self-closing tag
9007 Horizontal ruler (should it add that extra space?)
9022 Horizontal ruler -- 4+ dashes render hr
9031 Horizontal ruler -- eats additional dashes on the same line
9040 Horizontal ruler -- does not collapse dashes on consecutive lines
9051 Horizontal ruler -- <4 dashes render as plain text
9060 Horizontal ruler -- Supports content following dashes on same line
9072 ### Block-level elements
9081 <ul><li>Common list</li>
9083 <li>item 3</li></ul>
9094 <ol><li>Numbered list</li>
9096 <li> item 3</li></ol>
9110 ***#Number on level 4
9112 **#Number on level 3
9113 **#Number on level 3
9117 #** Level 3, but ordered
9120 <ol><li> with numbers</li></ol>
9121 <ul><li> and bullets</li></ul>
9122 <ol><li> and numbers</li></ol></li>
9124 <ul><li>bullet level 2
9125 <ul><li>bullet level 3
9126 <ol><li>Number on level 4</li></ol></li></ul></li>
9128 <ol><li>Number on level 3</li>
9129 <li>Number on level 3</li></ol></li></ul>
9130 <ol><li>number level 2</li></ol></li>
9132 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9133 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9138 1. Nested mixed wikitext and html list
9141 * <ul><li>ho</li></ul>
9146 <li> <ul><li>ho</li></ul></li>
9148 <ul><li> ho</li></ul></li></ul>
9152 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9154 <ul><li> ho</li></ul></li></ul>
9158 2. Nested mixed wikitext and html list (incompatible)
9161 : {{echo|<li>ho</li>}}
9164 <dd> <li>ho</li></dd></dl>
9168 <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>
9178 <ul><li>bar</li></ul></li></ul>
9188 <ul><li><ul><li>foo</li></ul></li>
9194 Nested lists 3 (first element empty)
9200 <ul><li>bar</li></ul></li></ul>
9205 Nested lists 4 (first element empty)
9210 <ul><li><ul><li></li></ul></li>
9216 Nested lists 5 (both elements empty)
9221 <ul><li><ul><li></li></ul></li>
9227 Nested lists 6 (both elements empty)
9233 <ul><li></li></ul></li></ul>
9238 Nested lists 7 (skip initial nesting levels)
9242 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9247 Nested lists 8 (multiple nesting transitions)
9255 <ul><li><ul><li> bar</li></ul></li>
9256 <li> baz</li></ul></li>
9262 Nested lists 9 (extension interaction)
9268 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9272 1. Lists with start-of-line-transparent tokens before bullets: Comments
9285 2. Lists with start-of-line-transparent tokens before bullets: Template close
9290 <ul><li>foo bar</li>
9296 List items are not parsed correctly following a <pre> block (bug 785)
9302 <ul><li> <pre>foo</pre></li>
9303 <li> <pre>bar</pre></li>
9307 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9308 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9313 List items from template
9324 * notSOL{{inner list}}
9327 <ul><li> item 1</li>
9328 <li> item 2</li></ul>
9329 <ul><li> item 0</li>
9331 <li> item 2</li></ul>
9332 <ul><li> item 0</li>
9335 <li> item 2</li></ul>
9340 List interrupted by empty line or heading
9348 <ul><li> foo</li></ul>
9349 <ul><li><ul><li> bar</li></ul></li></ul>
9350 <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>
9351 <ul><li> Another list item</li></ul>
9356 Multiple list tags generated by templates
9377 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9380 <!--This line will NOT split the list-->
9382 <!--This line will NOT split the list either-->
9384 <!--foo--> <!----> <!--This line NOT split the list either-->
9395 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9398 <!--This line will NOT split the list-->
9400 <!--This line will NOT split the list either-->
9402 <!--foo--> <!----> <!--This line NOT split the list
9415 (The PHP parser relies on Tidy for the hack)
9417 parsoid=wt2html,wt2wt
9421 * {{echo|<li>templated li-hack}}
9422 * <!--foo--> <li> unsupported li-hack with preceding comments
9425 <li><li>not a li-hack
9432 <li>templated li-hack</li>
9433 <li>unsupported li-hack with preceding comments</li>
9436 <li>not a li-hack</li>
9441 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9468 Parsoid: Test of whitespace serialization with Templated bullets
9475 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9479 # ------------------------------------------------------------------------
9480 # The next set of tests are about Parsoid's ability to handle badly nested
9481 # tags (parse, minimize scope of fixup, and roundtrip back)
9482 # ------------------------------------------------------------------------
9485 Unbalanced closing block tags break a list
9486 (php parser relies on Tidy to fix up)
9504 # Parsoid fails this test, but it might be tricky to support properly.
9507 Unbalanced closing non-block tags don't break a list
9508 (php parser relies on Tidy to fix up)
9515 <li><span>a</span></li>
9516 <li><span>b</span></li>
9530 Unclosed formatting tags that straddle lists are closed and reopened
9531 (php parser relies on Tidy to fix up)
9533 parsoid=wt2html,wt2wt,html2html
9543 <ol><li> <s> a</s></li>
9544 <li><s> b </s></li></ol>
9549 1. List embedded in a formatting tag
9556 <li><small>foo</small></li>
9566 ## Ugly Parsoid output here
9567 ## Not sure what the right output is.
9569 2. List embedded in a formatting tag
9576 <li><small>a</small></li>
9577 <li><small>b</small></li>
9584 <li><small>b</small></li>
9588 # Ugly Parsoid and PHP parser output here
9589 # Not sure if we want to make this a test!
9592 ## 3. Unclosed formatting tags in list elements
9598 ## <li><small>a</small></li>
9599 ## <li><small><small>b</small></small></li>
9603 ## <li><small>a</small></li>
9605 ## <li><small>b</small></li>
9609 # This is a bug in the PHP parser + tidy combination.
9610 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9611 # and then fostered out of the table by tidy.)
9612 # We believe the Parsoid output to be correct.
9614 Table with missing opening <tr> tag
9616 parsoid=wt2html,wt2wt
9634 # Note that the current date is hard-coded as
9635 # 1970-01-01T00:02:03Z (a Thursday)
9636 # when running parser tests. The timezone is also fixed to GMT, so
9637 # local date will be identical to current date.
9640 Magic Word: {{CURRENTDAY}}
9649 Magic Word: {{CURRENTDAY2}}
9658 Magic Word: {{CURRENTDAYNAME}}
9667 Magic Word: {{CURRENTDOW}}
9676 Magic Word: {{CURRENTMONTH}}
9685 Magic Word: {{CURRENTMONTH1}}
9694 Magic Word: {{CURRENTMONTHABBREV}}
9696 {{CURRENTMONTHABBREV}}
9703 Magic Word: {{CURRENTMONTHNAME}}
9705 {{CURRENTMONTHNAME}}
9712 Magic Word: {{CURRENTMONTHNAMEGEN}}
9714 {{CURRENTMONTHNAMEGEN}}
9721 Magic Word: {{CURRENTTIME}}
9730 Magic Word: {{CURRENTHOUR}}
9739 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9748 Magic Word: {{CURRENTYEAR}}
9757 Magic Word: {{CURRENTTIMESTAMP}}
9759 {{CURRENTTIMESTAMP}}
9766 Magic Words LOCAL (UTC)
9770 * {{LOCALMONTHNAME}}
9771 * {{LOCALMONTHNAMEGEN}}
9772 * {{LOCALMONTHABBREV}}
9781 * {{LOCALTIMESTAMP}}
9796 <li> 19700101000203</li></ul>
9801 Magic Word: {{FULLPAGENAME}}
9803 title=[[User:Ævar Arnfjörð Bjarmason]]
9807 <p>User:Ævar Arnfjörð Bjarmason
9812 Magic Word: {{FULLPAGENAMEE}}
9814 title=[[User:Ævar Arnfjörð Bjarmason]]
9818 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9823 Magic Word: {{TALKSPACE}}
9825 title=[[User:Ævar Arnfjörð Bjarmason]]
9834 Magic Word: {{TALKSPACE}}, same namespace
9836 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9845 Magic Word: {{TALKSPACE}}, main namespace
9847 title=[[Parser Test]]
9856 Magic Word: {{TALKSPACEE}}
9858 title=[[User:Ævar Arnfjörð Bjarmason]]
9867 Magic Word: {{SUBJECTSPACE}}
9869 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9878 Magic Word: {{SUBJECTSPACE}}, same namespace
9880 title=[[User:Ævar Arnfjörð Bjarmason]]
9889 Magic Word: {{SUBJECTSPACE}}, main namespace
9891 title=[[Parser Test]]
9899 Magic Word: {{SUBJECTSPACEE}}
9901 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9910 Magic Word: {{NAMESPACE}}
9912 title=[[User:Ævar Arnfjörð Bjarmason]]
9921 Magic Word: {{NAMESPACEE}}
9923 title=[[User:Ævar Arnfjörð Bjarmason]]
9932 Magic Word: {{NAMESPACENUMBER}}
9934 title=[[User:Ævar Arnfjörð Bjarmason]]
9943 Magic Word: {{SUBPAGENAME}}
9945 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9954 Magic Word: {{SUBPAGENAMEE}}
9956 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9965 Magic Word: {{ROOTPAGENAME}}
9967 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9971 <p>Ævar Arnfjörð Bjarmason
9976 Magic Word: {{ROOTPAGENAMEE}}
9978 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9982 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9987 Magic Word: {{BASEPAGENAME}}
9989 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9993 <p>Ævar Arnfjörð Bjarmason
9998 Magic Word: {{BASEPAGENAMEE}}
10000 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10004 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10009 Magic Word: {{TALKPAGENAME}}
10011 title=[[User:Ævar Arnfjörð Bjarmason]]
10015 <p>User talk:Ævar Arnfjörð Bjarmason
10020 Magic Word: {{TALKPAGENAMEE}}
10022 title=[[User:Ævar Arnfjörð Bjarmason]]
10026 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10031 Magic Word: {{SUBJECTPAGENAME}}
10033 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10035 {{SUBJECTPAGENAME}}
10037 <p>User:Ævar Arnfjörð Bjarmason
10042 Magic Word: {{SUBJECTPAGENAMEE}}
10044 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10046 {{SUBJECTPAGENAMEE}}
10048 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10053 Magic Word: {{NUMBEROFFILES}}
10062 Magic Word: {{PAGENAME}}
10064 title=[[User:Ævar Arnfjörð Bjarmason]]
10068 <p>Ævar Arnfjörð Bjarmason
10073 Magic Word: {{PAGENAME}} with metacharacters
10075 title=[['foo & bar = baz']]
10079 <p><i>'foo & bar = baz'</i>
10082 <p><i>'foo & bar = baz'</i></p>
10086 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
10088 title=[[*RFC 1234 http://example.com/]]
10092 <p>*RFC 1234 http://example.com/
10095 <p>*RFC 1234 http://example.com/</p>
10099 Magic Word: {{PAGENAMEE}}
10101 title=[[User:Ævar Arnfjörð Bjarmason]]
10105 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10110 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
10112 title=[[*RFC 1234 http://example.com/]]
10116 <p>*RFC_1234_http://example.com/
10119 <p>*RFC_1234_http://example.com/</p>
10123 Magic Word: {{REVISIONID}}
10132 Magic Word: {{SCRIPTPATH}}
10140 Magic Word: {{STYLEPATH}}
10149 Magic Word: {{SERVER}}
10153 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10158 Magic Word: {{SERVERNAME}}
10167 Magic Word: {{SITENAME}}
10176 Case-sensitive magic words, when cased differently, should just be template transclusions
10183 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10184 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10185 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10186 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10191 Case-insensitive magic words should still work with weird casing.
10201 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10205 # From plwiki:PLOS_ONE
10207 Parsoid: Page property magic word with magic word contents
10209 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10211 <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>"}]]}'/>
10215 Parsoid: Template-generated DISPLAYTITLE
10217 {{{{echo|DISPLAYTITLE}}:Foo}}
10219 <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}}]}'/>
10223 Namespace 1 {{ns:1}}
10232 Namespace 1 {{ns:01}}
10241 Namespace 0 {{ns:0}} (bug 4783)
10249 Namespace 0 {{ns:00}} (bug 4783)
10257 Namespace -1 {{ns:-1}}
10266 Namespace User {{ns:User}}
10275 Namespace User talk {{ns:User_talk}}
10284 Namespace User talk {{ns:uSeR tAlK}}
10293 Namespace File {{ns:File}}
10302 Namespace File {{ns:Image}}
10311 Namespace (lang=de) Benutzer {{ns:User}}
10322 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10328 <p>Benutzer Diskussion
10336 {{urlencode:hi world?!}}
10337 {{urlencode:hi world?!|WIKI}}
10338 {{urlencode:hi world?!|PATH}}
10339 {{urlencode:hi world?!|QUERY}}
10349 Magic Word: prioritize type info over data-parsoid
10353 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10359 Magic Word: serialize on separate line (parsoid)
10361 parsoid=wt2wt,html2wt
10367 foo<meta property="mw:PageProp/notoc"/>bar
10371 Magic Word: rt non-english wikis
10378 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10382 __proto__ is treated as normal wikitext (T105997)
10394 Magic links: internal link to RFC (bug 479)
10398 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10401 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10405 Magic links: RFC (bug 479)
10409 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10412 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10416 Magic links: RFC (bug 65278)
10418 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10420 <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.
10423 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10427 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10429 RFC      822
10433 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10438 <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>
10444 Magic links: ISBN (bug 1937)
10448 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10451 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10455 Magic links: ISBN (bug 65278)
10457 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10459 <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.
10462 <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>
10466 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10468 ISBN      978 0 316 09811 3
10474 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10481 <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>
10489 Magic links: PMID incorrectly converts space to underscore
10493 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10496 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10500 Magic links: PMID (bug 65278)
10502 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10504 <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.
10507 <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>
10511 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10513 PMID      1234
10517 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10522 <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>
10527 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10528 # since these are ExtLinkText, not MagicLinkText
10530 Magic links: use appropriate serialization for "almost" magic links.
10532 X[[Special:BookSources/0978739256|foo]]
10534 X[//tools.ietf.org/html/rfc1234 foo]
10536 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10537 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10540 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10541 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10549 Nonexistent template
10551 {{thistemplatedoesnotexist}}
10553 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10558 Template with invalid target containing tags
10560 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10562 <p>{{a<b>b</b>|foo|a=b|a = b}}
10567 Template with invalid target containing unclosed tag
10569 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10571 <p>{{a<b>|foo|a=b|a = b}}</b>
10576 Template with invalid target containing wikilink
10580 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10583 <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>
10587 Template with just whitespace in it, bug #68421
10591 <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>
10597 This is a test template
10605 <p>This is a test template
10610 Template with explicit namespace
10614 <p>This is a test template
10622 This is a test template with parameter {{{param}}}
10628 {{paramtest|param=foo}}
10630 <p>This is a test template with parameter foo
10635 Template:paramtestnum
10637 [[{{{1}}}|{{{2}}}]]
10641 Template unnamed parameter
10643 {{paramtestnum|Main Page|the main page}}
10645 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10650 Template:templatesimple
10656 Template:templateredirect
10658 #redirect [[Template:templatesimple]]
10662 Template:templateasargtestnum
10668 Template:templateasargtest
10670 {{template{{{templ}}}}}
10674 Template:templateasargtest2
10680 Template with template name as unnamed argument
10682 {{templateasargtestnum|templatesimple}}
10689 Template with template name as argument
10691 {{templateasargtest|templ=simple}}
10698 Template with template name as argument (2)
10700 {{templateasargtest2|templ=templatesimple}}
10707 Template:templateasargtestdefault
10709 {{{{{templ|templatesimple}}}}}
10719 Template with default value
10721 {{templateasargtestdefault}}
10728 Template with default value (value set)
10730 {{templateasargtestdefault|templ=templa}}
10739 {{templateredirect}}
10744 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10748 Template with argument in separate line
10750 {{ templateasargtest |
10758 Template with complex template as argument
10761 param ={{ templateasargtest |
10762 templ = simple }}}}
10764 <p>This is a test template with parameter (test)
10769 Template with thumb image (with link in description)
10771 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10773 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>
10776 <p>This is a test template with parameter</p>
10777 <div class="thumb tright">
10778 <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>
10779 <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>
10783 <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>
10787 Template:complextemplate
10789 {{{1}}} {{paramtest|
10790 param ={{{param}}}}}
10794 Template with complex arguments
10797 param ={{ templateasargtest |
10798 templ = simple }}|[[Template:complextemplate|link]]}}
10800 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10805 BUG 553: link with two variables in a piped link
10808 |[[{{{1}}}|{{{2}}}]]
10813 <td>[[{{{1}}}|{{{2}}}]]
10818 <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>
10823 Abort table cell attribute parsing on wikilink
10826 | testing [[one|two]] | three || four
10827 | testing one two | three || four
10828 | testing="[[one|two]]" | three || four
10833 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10839 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10845 <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>
10846 <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>
10847 <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>
10852 Don't abort table cell attribute parsing if wikilink is found in template arg
10855 | Test {{#tag:ref|One two "[[three]]" four}}
10859 <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>
10864 Magic variable as template parameter
10866 {{paramtest|param={{SITENAME}}}}
10868 <p>This is a test template with parameter MediaWiki
10875 [[{{{param}}}|link]]
10879 Template parameter as link source
10881 {{linktest|param=Main Page}}
10883 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10888 Template:paramtest2
10890 including another template, {{paramtest|param={{{arg}}}}}
10894 Template passing argument to another template
10896 {{paramtest2|arg='hmm'}}
10898 <p>including another template, This is a test template with parameter 'hmm'
10909 Template as link source
10913 [[{{linktest2}}|Main Page]]
10915 [[{{linktest2}}]]Page
10917 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10918 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10919 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10937 Template infinite loop
10941 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10946 Template from main namespace
10965 BUG 529: Template with table, not included at beginning of line
10984 BUG 523: Template shouldn't eat newline (or add an extra one before table)
11004 BUG 41: Template parameters shown as broken links
11013 Template with targets containing wikilinks
11017 {{[[{{echo|foo}}]]}}
11019 {{{{echo|[[foo}}]]}}
11021 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11022 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11034 Templates: Double quotes as template target
11041 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11045 ## This test is about making sure Parsoid's data-mw is well formed in the
11046 ## face of multiple templates with intersecting and overlapping ranges. The
11047 ## wikitext itself is wretched.
11049 Templates with intersecting and overlapping ranges
11074 <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":""}]]}'>
11076 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11078 <tbody><tr><td>hi</td></tr>
11083 Template:MSGNW test
11085 ''None'' of '''this''' should be
11087 but rather passed unmodified
11095 # hmm, fix this or just deprecate msgnw and document its behavior?
11099 {{msgnw:MSGNW test}}
11101 <p>''None'' of '''this''' should be
11103  but rather passed unmodified
11104 {{test}}
11108 <!-- comment -->
11115 {{int:youhavenewmessages|lots of money|not!}}
11117 <p>You have lots of money (not!).
11122 int keyword - non-existing message
11133 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11137 <includeonly> and <noinclude> being included
11148 <onlyinclude>Foo</onlyinclude>bar
11152 <onlyinclude> being included
11164 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11168 <onlyinclude> and <includeonly> being included
11177 <includeonly> and <noinclude> on a page
11179 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11186 Un-closed <noinclude>
11193 <onlyinclude> on a page
11195 <onlyinclude>Foo</onlyinclude>bar
11202 Un-closed <onlyinclude>
11209 Self-closed noinclude, includeonly, onlyinclude tags
11220 Unbalanced includeonly and noinclude tags
11224 |b</noinclude></noinclude>
11225 |c</noinclude></includeonly>
11226 |d</includeonly></includeonly>
11235 <td>c</includeonly>
11237 <td>d</includeonly></includeonly>
11243 Template:Includeonly section
11246 ==Includeonly section==
11252 Bug 6563: Edit link generation for section shown by <includeonly>
11254 {{includeonly section}}
11256 <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>
11257 <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>
11261 # Uses same input as the contents of [[Template:Includeonly section]]
11263 Bug 6563: Section extraction for section shown by <includeonly>
11268 ==Includeonly section==
11276 Bug 6563: Edit link generation for section suppressed by <includeonly>
11279 ==Includeonly section==
11283 <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>
11288 Bug 6563: Section extraction for section suppressed by <includeonly>
11293 ==Includeonly section==
11301 Un-closed <includeonly>
11306 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11309 ## We used to, but no longer wt2wt this test since the default serializer
11310 ## will normalize the include directives to serialize on their own line.
11311 ## Selser will take care of preserving formatting in scenarios where they
11312 ## intermingled with other wikitext.
11314 Includes and comments at SOL
11316 parsoid=wt2html,html2html
11318 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11322 </noinclude>* stuff
11325 <includeonly>can have stuff</includeonly>=== here ===
11328 <h2><span class="mw-headline" id="hu">hu</span></h2>
11331 <ul><li> stuff</li>
11332 <li> here</li></ul>
11333 <h3><span class="mw-headline" id="here">here</span></h3>
11336 <!-- 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>
11338 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11340 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11341 <li> here</li></ul>
11343 <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>
11347 # TODO: test with DOM fragment reuse!
11349 Parsoid: DOM fragment reuse
11351 parsoid=wt2wt,wt2html
11353 a{{echo|b<table></table>c}}d
11365 <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>
11367 <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">
11368 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11369 </span><p about="#mwt2">cd</p>
11371 <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">
11373 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11375 </span><p about="#mwt3">b</p>
11379 Parsoid: Merge double tds (T52603)
11384 |{{echo|{{!}} foo}}
11388 <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>
11393 Parsoid: Merge double tds in nested transclusion content (T52603)
11399 |{{echo|{{!}} foo}}
11403 <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}}]}'>
11405 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11411 ### <includeonly> and <noinclude> in attributes
11414 0. includeonly around the entire attribute
11416 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11418 <p><span id="v2">bar</span>
11423 1. includeonly in html attr key
11425 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11427 <p><span id="foo">bar</span>
11432 2. includeonly in html attr value
11434 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11435 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11437 <p><span id="v1">bar</span>
11438 <span id="v1">bar</span>
11443 3. includeonly in part of an attr value
11445 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11447 <p><span style="color:red;">bar</span>
11452 4. includeonly in table attributes
11476 ### Token Stream Patcher tests
11478 ### These tests won't always pass wt2wt and other modes because
11479 ### on serialization, the table will be output on a new line.
11480 ### For now, we are blacklisting them, and using this to test selser.
11484 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11486 parsoid=wt2html,wt2wt
11488 {{echo|}}{| width = '100%'
11492 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11493 <tbody><tr><td>foo</td></tr>
11497 ## We used to, but no longer wt2wt this test since the default serializer
11498 ## will normalize the include directives to serialize on their own line.
11499 ## Selser will take care of preserving formatting in scenarios where they
11500 ## intermingled with other wikitext.
11502 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11506 <includeonly>a</includeonly>{| {{{b}}}
11510 <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":""}]]}'>
11511 <tbody><tr><td>c</td></tr>
11516 Table wikitext syntax outside wiki-tables
11520 ! not a table heading
11523 | class="foo bar" | baz
11531 ! not a table heading
11534 | class="foo bar" | baz
11543 ### Testing parsing of templates where a template arg
11544 ### has the same name as the template itself.
11550 {{{quote|{{{1}}}}}}
11554 Templates: Template Name/Arg clash: 1. Use of positional param
11563 Templates: Template Name/Arg clash: 2. Use of named param
11565 {{quote|quote=foo}}
11572 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11581 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11585 Templates: 1. Simple use
11594 Templates: 2. Inside a block tag
11596 <div>{{echo|Foo}}</div>
11597 <blockquote>{{echo|Foo}}</blockquote>
11600 <blockquote>Foo</blockquote>
11610 Templates: P-wrapping: 1a. Templates on consecutive lines
11621 Templates: P-wrapping: 1b. Templates on consecutive lines
11635 Templates: P-wrapping: 1c. Templates on consecutive lines
11638 {{echo|bar}} <div>baz</div>
11651 Templates: P-wrapping: 1d. Template preceded by comment-only line
11660 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11664 Templates: Inline Text: 1. Multiple template uses
11666 {{echo|Foo}}bar{{echo|baz}}
11673 Templates: Inline Text: 2. Back-to-back template uses
11675 {{echo|Foo}}{{echo|bar}}
11682 Templates: Block Tags: 1. Multiple template uses
11684 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11686 <div>Foo</div><div>bar</div><div>baz</div>
11691 Templates: Block Tags: 2. Back-to-back template uses
11693 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11695 <div>Foo</div><div>bar</div>
11699 # This is an edge case relating to paragraph wrapping.
11701 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11706 <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
11711 Templates: Links: 1. Simple example
11713 {{echo|[[Foo|bar]]}}
11715 <p><a href="/wiki/Foo" title="Foo">bar</a>
11720 Templates: Links: 2. Generation of link href
11722 [[{{echo|Foo}}|bar]]
11724 <p><a href="/wiki/Foo" title="Foo">bar</a>
11729 Templates: Links: 3. Generation of part of a link href
11731 [[Fo{{echo|o}}|bar]]
11733 [[Foo{{echo|bar}}]]
11735 [[Foo{{echo|bar}}baz]]
11737 [[Foo{{echo|bar}}|bar]]
11739 [[:Foo{{echo|bar}}]]
11741 [[:Foo{{echo|bar}}|bar]]
11743 <p><a href="/wiki/Foo" title="Foo">bar</a>
11744 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11745 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11746 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11747 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11748 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11753 Templates: Links: 4. Multiple templates generating link href
11755 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11757 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11762 Templates: Links: 5. Generation of link text
11764 [[Foo|{{echo|bar}}]]
11766 <p><a href="/wiki/Foo" title="Foo">bar</a>
11771 Templates: Links: 5. Nested templates (only outermost template should be marked)
11773 {{echo|[[{{echo|Foo}}|bar]]}}
11775 <p><a href="/wiki/Foo" title="Foo">bar</a>
11780 Templates: HTML Tag: 1. Generation of HTML attr. key
11782 <div {{echo|style}}="color:red;">foo</div>
11784 <div style="color:red;">foo</div>
11789 Templates: HTML Tag: 2. Generation of HTML attr. value
11791 <div style={{echo|'color:red;'}}>foo</div>
11793 <div style="color:red;">foo</div>
11798 Templates: HTML Tag: 3. Generation of HTML attr key and value
11800 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11802 <div style="color:red;">foo</div>
11807 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11809 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11811 <div title="This is a long title with just one piece templated">foo</div>
11816 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11818 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11820 <div title="This is a long title with just one piece templated">foo</div>
11825 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11827 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11829 <div title="This is a long title with just one piece templated">foo</div>
11833 # SSS FIXME: While it is great we added support for all this,
11834 # do we want to make this part of the spec? Maybe we want to
11835 # deprecate this kind of usage in the future?
11837 Templates: HTML Tag: 7. Generation of partial attribute key string
11839 <div st{{echo|yle}}="color:red;">foo</div>
11841 <div style="color:red;">foo</div>
11846 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11848 <div {{echo|1=id="v1"}}>bar</div>
11850 <div id="v1">bar</div>
11855 Templates: HTML Tag: 9. Multiple template-generated attributes
11857 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11859 <div id="v1" title="foo">bar</div>
11864 Templates: Support for templates generating attributes and content
11866 {| {{mixed_attr_content_template}}
11871 <table style="color:red;" title="T48811">
11881 <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|}"]}'>
11890 1. Entities and nowikis inside templated attributes should be handled correctly
11892 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11894 <div style="background:#f9f9f9;">foo</div>
11897 <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>
11901 2. Entities and nowikis inside templated attributes should be handled correctly
11904 |{{table_attribs_3}}
11909 <td style="background:#f9f9f9;">Foo
11914 <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>
11919 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11922 |{{table_attribs_3}}
11927 <td style="background:#f9f9f9;">Foo
11931 <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}}]}'>
11932 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11938 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11941 | {{table_attribs_6}} hi
11946 <td style="background: red;"> hi
11951 <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>
11956 Templates: HTML Tables: 1. Generating start of a HTML table
11958 {{echo|<table><tr><td>foo</td>}}</tr></table>
11960 <table><tr><td>foo</td></tr></table>
11965 Templates: HTML Tables: 2a. Generating middle of a HTML table
11967 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11969 <table><tr><td>foo</td></tr></table>
11974 Templates: HTML Tables: 2b. Generating middle of a HTML table
11976 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11978 <table><tr><td>foo</td></tr></table>
11983 Templates: HTML Tables: 3. Generating end of a HTML table
11985 <table><tr>{{echo|<td>foo</td></tr></table>}}
11987 <table><tr><td>foo</td></tr></table>
11992 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11994 {{echo|<table>}}<tr><td>foo</td></tr></table>
11996 <table><tr><td>foo</td></tr></table>
12001 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12003 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12005 <table><tr><td>foo</td></tr></table>
12010 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12012 <table><tr>{{echo|<td>}}foo</td></tr></table>
12014 <table><tr><td>foo</td></tr></table>
12019 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12021 <table><tr><td>foo{{echo|</td>}}</tr></table>
12023 <table><tr><td>foo</td></tr></table>
12028 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12030 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12032 <table><tr><td>foo</td></tr></table>
12037 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12039 <table><tr><td>foo</td></tr>{{echo|</table>}}
12041 <table><tr><td>foo</td></tr></table>
12046 Templates: HTML Tables: 5. Proper fostering of categories from inside
12048 parsoid=wt2html,wt2wt
12050 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12051 <!--Two categories (Bug 50330)-->
12052 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12054 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12055 <!--Two categories (Bug 50330)-->
12056 <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>
12060 Templates: Wiki Tables: 1a. Fostering of entire template content
12068 <tr><td></td></tr></table>
12080 Templates: Wiki Tables: 1b. Fostering of entire template content
12093 <tr><td></td></tr></table>
12107 Templates: Wiki Tables: 2. Fostering of partial template content
12117 <tr><td></td></tr></table>
12130 Templates: Wiki Tables: 3. td-content via multiple templates
12133 {{echo|{{pipe}}a}}{{echo|b}}
12144 Templates: Wiki Tables: 4. Templated tags, no content
12150 <tr><td></td></tr></table>
12155 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12169 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12182 ## This test case is very specific to Parsoid's internals
12183 ## and is hence only tested for Parsoid's code. Parsoid uses
12184 ## a <meta> marker tag for <ref> tags and they are expanded
12185 ## much later. We are verifying that this <meta> tag usage
12186 ## doesn't prevent foster parenting.
12188 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12190 {{PartialTable}}<ref>foo</ref>
12195 <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">
12199 <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>
12203 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12213 <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{{!}}}"]}'>
12214 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12218 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12223 Templates: Lists: Multi-line list-items via templates
12225 *{{echo|a {{nonexistent|
12227 *{{echo|b {{nonexistent|
12230 <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>
12231 <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>
12236 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12238 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12240 <p><i>ab</i>c<i>d</i>e
12245 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12246 (PHP parser generates misnested html)
12248 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12250 <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>
12254 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12255 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12257 parsoid=wt2html,wt2wt
12259 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12261 <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>
12262 <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>
12263 <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>
12267 Templates: Ugly nesting: 4. Divs opened/closed across templates
12269 a<div>b{{echo|c</div>d}}e
12280 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12286 |{{echo|foo</table>}}
12290 <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|}"]}'>
12294 <td>foo</td></tr></tbody></table><span about="#mwt1">
12295 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12300 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12310 <td>1. {{echo|foo </table>}}</td>
12312 <td>2. {{echo|baz </table>}}</td>
12325 <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>"]}'>
12330 <td>1. foo </td></tr></tbody></table></td>
12332 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12333 </span><span about="#mwt2">
12334 </span><span about="#mwt2">
12335 </span><span about="#mwt2">abc</span><span about="#mwt2">
12336 </span><span about="#mwt2">
12337 </span><span about="#mwt2">
12338 </span><span about="#mwt2">
12339 </span><span about="#mwt2">
12340 </span><span about="#mwt2">
12341 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12342 </span><span about="#mwt2">
12347 Templates: Ugly templates: 3. newline-only template parameter
12356 # This looks like a bug: a single newline triggers p/br for some reason.
12358 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12367 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12368 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12370 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12376 <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
12377 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12381 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12382 # that are "identical" and generate nesting cycles in the algorithm
12384 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12386 {{echo|<table><tr><td><table>}}
12390 <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"}'>
12391 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12392 </table></td></tr></tbody></table>
12396 Templates: Parameters substituted at the top-level
12398 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12400 <p><i>who</i> me? <b>never!</b>
12403 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12407 Parser Functions: 1. Simple example
12416 Parser Functions: 2. Nested use (only outermost should be marked up)
12425 ### Pre-save transform tests
12428 pre-save transform: subst:
12434 This is a test template
12438 pre-save transform: normal template
12448 pre-save transform: nonexistent template
12452 {{thistemplatedoesnotexist}}
12454 {{thistemplatedoesnotexist}}
12458 pre-save transform: subst magic variables
12467 # This is bug 89, which I fixed. -- wtm
12469 pre-save transform: subst: templates with parameters
12473 {{subst:paramtest|param="something else"}}
12475 This is a test template with parameter "something else"
12479 Template:nowikitest
12481 <nowiki>'''not wiki'''</nowiki>
12485 pre-save transform: nowiki in subst (bug 1188)
12489 {{subst:nowikitest}}
12491 <nowiki>'''not wiki'''</nowiki>
12495 Template:commenttest
12497 This template has <!-- a comment --> in it.
12501 pre-save transform: comment in subst (bug 1936)
12505 {{subst:commenttest}}
12507 This template has <!-- a comment --> in it.
12511 pre-save transform: unclosed tag
12515 <nowiki>'''not wiki'''
12517 <nowiki>'''not wiki'''
12521 pre-save transform: mixed tag case
12525 <NOwiki>'''not wiki'''</noWIKI>
12527 <NOwiki>'''not wiki'''</noWIKI>
12531 pre-save transform: unclosed comment in <nowiki>
12535 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12537 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12540 # Leading @ in this template definition works around a limitation
12541 # in parsoid's parserTests which otherwise strips the <span> from the
12542 # result (confusing it for a template wrapper)
12546 @<span onmouseover="alert('crap')">Oh no</span>
12550 (confirming safety of fix for subst bug 1936)
12552 {{Template:dangerous}}
12554 <p>@<span>Oh no</span>
12559 pre-save transform: comment containing gallery (bug 5024)
12563 <!-- <gallery>data</gallery> -->
12565 <!-- <gallery>data</gallery> -->
12569 pre-save transform: comment containing extension
12573 <!-- <tag>data</tag> -->
12575 <!-- <tag>data</tag> -->
12579 pre-save transform: comment containing nowiki
12583 <!-- <nowiki>data</nowiki> -->
12585 <!-- <nowiki>data</nowiki> -->
12589 pre-save transform: <noinclude> in subst (bug 3298)
12599 pre-save transform: <onlyinclude> in subst (bug 3298)
12603 {{subst:Includes2}}
12611 {{<includeonly>subst:</includeonly>Includes}}
12615 Template:SafeSubstTest
12617 {{<includeonly>safesubst:</includeonly>Includes}}
12621 bug 22297: safesubst: works during PST
12625 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12631 bug 22297: safesubst: works during normal parse
12640 subst: does not work during normal parse
12644 <p>{{subst:Includes}}
12649 pre-save transform: context links ("pipe trick")
12653 [[Article (context)|]]
12656 [[Bar:Article (context)|]]
12657 [[:Bar:Article (context)|]]
12659 [[|Article (context)]]
12663 [[Article (context)|Article]]
12664 [[Bar:Article|Article]]
12665 [[:Bar:Article|Article]]
12666 [[Bar:Article (context)|Article]]
12667 [[:Bar:Article (context)|Article]]
12669 [[Article (context)]]
12670 [[Bar:X (Y) Z|X (Y) Z]]
12671 [[:Bar:X (Y) Z|X (Y) Z]]
12675 pre-save transform: context links ("pipe trick") with interwiki prefix
12679 [[interwiki:Article|]]
12680 [[:interwiki:Article|]]
12681 [[interwiki:Bar:Article|]]
12682 [[:interwiki:Bar:Article|]]
12684 [[interwiki:Article|Article]]
12685 [[:interwiki:Article|Article]]
12686 [[interwiki:Bar:Article|Bar:Article]]
12687 [[:interwiki:Bar:Article|Bar:Article]]
12691 pre-save transform: context links ("pipe trick") with parens in title
12693 pst title=[[Somearticle (context)]]
12697 [[Article (context)|Article]]
12701 pre-save transform: context links ("pipe trick") with comma in title
12703 pst title=[[Someplace, Somewhere]]
12706 [[Otherplace, Elsewhere|]]
12707 [[Otherplace, Elsewhere, Anywhere|]]
12709 [[Otherplace, Somewhere|Otherplace]]
12710 [[Otherplace, Elsewhere|Otherplace]]
12711 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12715 pre-save transform: context links ("pipe trick") with parens and comma
12717 pst title=[[Someplace (IGNORED), Somewhere]]
12720 [[Otherplace (place), Elsewhere|]]
12722 [[Otherplace, Somewhere|Otherplace]]
12723 [[Otherplace (place), Elsewhere|Otherplace]]
12727 pre-save transform: context links ("pipe trick") with comma and parens
12729 pst title=[[Who, me? (context)]]
12732 [[Me, Myself, and I (1937 song)|]]
12734 [[Yes, you. (context)|Yes, you.]]
12735 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12739 pre-save transform: context links ("pipe trick") with namespace
12741 pst title=[[Ns:Somearticle]]
12745 [[Ns:Article|Article]]
12749 pre-save transform: context links ("pipe trick") with namespace and parens
12751 pst title=[[Ns:Somearticle (context)]]
12755 [[Ns:Article (context)|Article]]
12759 pre-save transform: context links ("pipe trick") with namespace and comma
12761 pst title=[[Ns:Somearticle, Context, Whatever]]
12765 [[Ns:Article, Context, Whatever|Article]]
12769 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12771 pst title=[[Ns:Somearticle, Context (context)]]
12775 [[Ns:Article (context)|Article]]
12779 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12781 pst title=[[Ns:Somearticle (IGNORED), Context]]
12785 [[Ns:Article, Context|Article]]
12789 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12793 [[Article(context)|]]
12794 [[Bar:Article(context)|]]
12795 [[:Bar:Article(context)|]]
12796 [[|Article(context)]]
12800 [[Article(context)|Article]]
12801 [[Bar:Article(context)|Article]]
12802 [[:Bar:Article(context)|Article]]
12803 [[Article(context)]]
12804 [[Bar:X(Y)Z|X(Y)Z]]
12805 [[:Bar:X(Y)Z|X(Y)Z]]
12809 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12813 [[Article (context)|]]
12814 [[Bar:Article (context)|]]
12815 [[:Bar:Article (context)|]]
12816 [[|Article (context)]]
12820 [[Article (context)|Article]]
12821 [[Bar:Article (context)|Article]]
12822 [[:Bar:Article (context)|Article]]
12823 [[Article (context)]]
12824 [[Bar:X (Y) Z|X (Y) Z]]
12825 [[:Bar:X (Y) Z|X (Y) Z]]
12829 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12833 [[Article(context)|]]
12834 [[Bar:Article(context)|]]
12835 [[:Bar:Article(context)|]]
12836 [[|Article(context)]]
12840 [[Article(context)|Article]]
12841 [[Bar:Article(context)|Article]]
12842 [[:Bar:Article(context)|Article]]
12843 [[Article(context)]]
12844 [[Bar:X(Y)Z|X(Y)Z]]
12845 [[:Bar:X(Y)Z|X(Y)Z]]
12849 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12853 [[Article (context), context|]]
12854 [[Article (context),context|]]
12855 [[Bar:Article (context), context|]]
12856 [[Bar:Article (context),context|]]
12857 [[:Bar:Article (context), context|]]
12858 [[:Bar:Article (context),context|]]
12860 [[Article (context), context|Article]]
12861 [[Article (context),context|Article]]
12862 [[Bar:Article (context), context|Article]]
12863 [[Bar:Article (context),context|Article]]
12864 [[:Bar:Article (context), context|Article]]
12865 [[:Bar:Article (context),context|Article]]
12869 pre-save transform: trim trailing empty lines
12873 Empty lines are trimmed
12879 Empty lines are trimmed
12883 pre-save transform: Signature expansion
12888 * <noinclude>~~~</noinclude>
12889 * <includeonly>~~~</includeonly>
12890 * <onlyinclude>~~~</onlyinclude>
12892 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12893 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12894 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12895 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12900 pre-save transform: Signature expansion in nowiki tags (bug 93)
12906 <nowiki>~~~~</nowiki>
12908 <includeonly><nowiki>~~~~</nowiki></includeonly>
12910 <noinclude><nowiki>~~~~</nowiki></noinclude>
12912 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12914 {{subst:Foo}} shall be converted to FOO
12916 As well as inside noinclude/onlyinclude
12917 <noinclude>{{subst:Foo}}</noinclude>
12918 <onlyinclude>{{subst:Foo}}</onlyinclude>
12920 But not inside includeonly
12921 <includeonly>{{subst:Foo}}</includeonly>
12925 <nowiki>~~~~</nowiki>
12927 <includeonly><nowiki>~~~~</nowiki></includeonly>
12929 <noinclude><nowiki>~~~~</nowiki></noinclude>
12931 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12933 FOO shall be converted to FOO
12935 As well as inside noinclude/onlyinclude
12936 <noinclude>FOO</noinclude>
12937 <onlyinclude>FOO</onlyinclude>
12939 But not inside includeonly
12940 <includeonly>{{subst:Foo}}</includeonly>
12944 Parsoid: Recognize nowiki with trailing space in tags
12948 <nowiki ><div>[[foo]]</nowiki >
12956 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12963 Parsoid: Recognize nowiki with odd capitalization
12967 <noWikI ><div>[[foo]]</Nowiki >
12969 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12974 Parsoid: Escape nowiki with trailing space in tags
12978 <p><nowiki > foo </nowiki ></p>
12979 <p>a<nowiki />b</p>
12980 <p>c<nowiki/ >d</p>
12982 <nowiki > foo </nowiki >
12990 Parsoid: Escape weird noWikI capitalizations
12994 <p><noWikI > foo </NoWikI ></p>
12996 <noWikI > foo </NoWikI >
13000 ### Message transform tests
13003 message transform: magic variables
13013 message transform: should not transform wiki markup
13023 message transform: <noinclude> in transcluded template (bug 4926)
13033 message transform: <onlyinclude> in transcluded template (bug 4926)
13043 {{#special:}} page name, known
13047 {{#special:Recentchanges}}
13049 Special:RecentChanges
13053 {{#special:}} page name with subpage, known
13057 {{#special:Recentchanges/param}}
13059 Special:RecentChanges/param
13063 {{#special:}} page name, unknown
13067 {{#special:foobar nonexistent}}
13069 Special:Foobar nonexistent
13073 {{#speciale:}} page name, known
13077 {{#speciale:Recentchanges}}
13079 Special:RecentChanges
13083 {{#speciale:}} page name with subpage, known
13087 {{#speciale:Recentchanges/param}}
13089 Special:RecentChanges/param
13093 {{#speciale:}} page name, unknown
13097 {{#speciale:foobar nonexistent}}
13099 Special:Foobar_nonexistent
13105 ### For Parsoid-specific tests, see
13106 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13111 parsoid=wt2html,wt2wt,html2html
13113 [[Image:foobar.jpg]]
13115 <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>
13118 <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>
13122 Simple image (using File: namespace, now canonical)
13124 [[File:Foobar.jpg]]
13126 <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>
13129 <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>
13133 Right-aligned image
13135 [[File:Foobar.jpg|right]]
13137 <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>
13140 <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>
13146 [[File:Foobar.jpg|right|Caption text]]
13148 <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>
13151 <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>
13155 Image with caption, bug 53312 #1
13157 [[File:Foobar.jpg|right|Caption page stuff]]
13159 <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>
13162 <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>
13166 Image with caption, bug 53312 #2
13168 [[File:Foobar.jpg|right|Caption page=]]
13170 <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>
13173 <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>
13177 Image with caption, bug 53312 #3
13179 [[File:Foobar.jpg|right|Caption page=stuff]]
13181 <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>
13184 <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>
13188 Allow empty links in image captions (Bug 60753)
13192 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13197 <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>
13200 <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>
13202 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13203 </figcaption></figure>
13207 Titles in unlinked images (T23454)
13209 [[File:Foobar.jpg|link=|stuff]]
13211 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13216 Link with empty target
13225 Image with link trail
13227 Linktrails should not work for images: [[File:Foobar.jpg]]s
13229 <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
13232 <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>
13236 Image with empty attribute
13238 parsoid=wt2html,wt2wt,html2html
13240 [[File:Foobar.jpg|right||Caption text]]
13242 <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>
13245 <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>
13249 1. Block image with individual attributes from templates
13251 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13253 <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>
13256 <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>
13260 2. Block Image with individual attributes from templates
13262 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13264 <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>
13267 <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>
13271 3. Inline image with individual attributes from templates
13273 [[File:Foobar.jpg|{{echo|50px}}]]
13275 <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>
13278 <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>
13281 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13282 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13284 Image with multiple attributes from the same template
13286 [[File:Foobar.jpg|{{image_attribs}}]]
13288 <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>
13291 <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>
13295 Image with link tails
13299 123[[File:Foobar.jpg]]456
13300 123[[File:Foobar.jpg|right]]456
13301 123[[File:Foobar.jpg|thumb]]456
13303 <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
13305 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
13306 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
13309 <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>
13311 <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>
13313 <div class="thumb tright">
13314 <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>
13315 <div class="thumbcaption">
13316 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13322 <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>
13323 <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>
13324 <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>
13328 Image with multiple captions -- only last one is accepted
13330 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13332 <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>
13335 <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>
13339 Image with multiple widths -- use last
13341 [[File:Foobar.jpg|200px|300px|caption]]
13343 <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>
13346 <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>
13350 Image with multiple alignments -- use first (bug 48664)
13354 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13356 [[File:Foobar.jpg|middle|text-top|caption]]
13358 <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>
13359 <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>
13362 <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>
13363 <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>
13367 Image with width attribute at different positions
13369 [[File:Foobar.jpg|200px|right|Caption]]
13370 [[File:Foobar.jpg|right|200px|Caption]]
13371 [[File:Foobar.jpg|right|Caption|200px]]
13373 <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>
13374 <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>
13375 <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>
13378 <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>
13379 <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>
13380 <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>
13383 # a sad bit of backward-compatibility
13385 Image with size specified with pxpx (bug 13500, 51628)
13387 parsoid=wt2html,wt2wt,html2html
13389 [[File:Foobar.jpg|20pxpx]]
13390 [[File:Foobar.jpg|200x20pxpx]]
13392 <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>
13393 <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>
13396 <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>
13400 Image with link parameter, wiki target
13402 [[File:Foobar.jpg|link=Main Page]]
13404 <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>
13407 <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>
13410 # parsoid bug 49293 (part 1)
13412 Image with link parameter, URL target
13414 [[File:Foobar.jpg|link=http://example.com/]]
13416 <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>
13419 <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>
13422 # parsoid bug 49293 (part 2)
13424 Image with link parameter, protocol-less URL target
13426 [[File:Foobar.jpg|link=//example.com/]]
13428 <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>
13431 <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>
13435 Escaping non-block captions (T107435)
13438 "modes": ["wt2wt"],
13440 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13444 [[Image:Foobar.jpg|caption]]
13446 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13449 # wgExternalLinkTarget not supported by Parsoid
13451 Image with link parameter, wgExternalLinkTarget
13453 [[Image:foobar.jpg|link=http://example.com/]]
13455 wgExternalLinkTarget='foobar'
13457 <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>
13462 Image with link parameter, wgNoFollowLinks set to false
13464 [[Image:foobar.jpg|link=http://example.com/]]
13466 wgNoFollowLinks=false
13468 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13473 Image with link parameter, wgNoFollowDomainExceptions
13475 [[Image:foobar.jpg|link=http://example.com/]]
13477 wgNoFollowDomainExceptions='example.com'
13479 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13483 # wgExternalLinkTarget not supported by Parsoid
13485 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13487 [[Image:foobar.jpg|link=http://example.com/|Title]]
13489 wgExternalLinkTarget='foobar'
13491 <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>
13496 Image with empty link parameter
13498 [[File:Foobar.jpg|link=]]
13500 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13503 <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>
13507 Image with link parameter (wiki target) and unnamed parameter
13509 [[File:Foobar.jpg|link=Main_Page|Title]]
13511 <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>
13514 <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>
13518 Image with link parameter (URL target) and unnamed parameter
13520 [[File:Foobar.jpg|link=http://example.com/|Title]]
13522 <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>
13525 <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>
13529 Thumbnail image with link parameter
13532 parsoid=wt2html,wt2wt,html2html
13534 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13536 <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>
13539 <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>
13543 Manually-specified thumbnail image
13547 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13549 <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>
13552 <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>
13556 Manually-specified thumbnail image with explicit link to wiki page
13559 parsoid=wt2html,wt2wt,html2html
13561 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13563 <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>
13566 <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>
13570 Manually-specified thumbnail image with explicit link to url
13573 parsoid=wt2html,wt2wt,html2html
13575 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13577 <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>
13580 <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>
13584 Manually-specified thumbnail image with explicit no link
13587 parsoid=wt2html,wt2wt,html2html
13589 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13591 <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>
13594 <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>
13598 Manually-specified thumbnail image with explicit link and alt text
13601 parsoid=wt2html,wt2wt,html2html
13603 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13605 <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>
13608 <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>
13612 Image with frame and link
13614 parsoid=wt2html,wt2wt,html2html
13616 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13618 <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>
13621 <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>
13625 Image with frame and link and explicit alt
13627 parsoid=wt2html,wt2wt,html2html
13629 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13631 <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>
13634 <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>
13638 Image with wiki markup in implicit alt
13640 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13642 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13644 <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>
13645 </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>
13648 <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>
13650 <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>
13654 Alt image option should handle most kinds of wikitext without barfing
13656 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13658 <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>
13661 <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>
13664 ###################
13665 # Conflicting image format options.
13666 # First option specified should 'win'.
13667 # All three cases in each test should be identical.
13670 Image with 'frameless' first.
13672 parsoid=wt2html,wt2wt,html2html
13674 [[File:Foobar.jpg|frameless|caption]]
13676 [[File:Foobar.jpg|frameless|frame|caption]]
13678 [[File:Foobar.jpg|frameless|thumb|caption]]
13680 <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>
13681 </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>
13682 </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>
13685 <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>
13686 <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>
13687 <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>
13691 Image with 'frame' first.
13693 parsoid=wt2html,wt2wt,html2html
13695 [[File:Foobar.jpg|frame|caption]]
13696 [[File:Foobar.jpg|frame|frameless|caption]]
13697 [[File:Foobar.jpg|frame|thumb|caption]]
13699 <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>
13700 <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>
13701 <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>
13704 <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>
13705 <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>
13706 <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>
13710 Image with 'thumb' first.
13712 parsoid=wt2html,wt2wt,html2html
13714 [[File:Foobar.jpg|thumb|caption]]
13715 [[File:Foobar.jpg|thumb|frameless|caption]]
13716 [[File:Foobar.jpg|thumb|frame|caption]]
13718 <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>
13719 <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>
13720 <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>
13723 <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>
13724 <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>
13725 <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>
13728 ###################
13730 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13731 # and https://phabricator.wikimedia.org/T64258
13732 # Foobar has actual size of 1941x220
13733 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13734 # a scalable format.
13735 # 2. Framed images always ignore size options; always render at default size.
13736 # 3. "Unspecified format" and border are the only types which can be
13740 Image: "unspecified format" and border enlarge
13742 parsoid=wt2html,wt2wt,html2html
13744 [[File:Foobar.jpg|2000px]]
13746 [[File:Foobar.jpg|border|2000px]]
13748 <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>
13749 </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>
13752 <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>
13753 <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>
13757 Image: "unspecified format" and border reduce
13759 parsoid=wt2html,wt2wt,html2html
13761 [[File:Foobar.jpg|1000px]]
13763 [[File:Foobar.jpg|border|1000px]]
13765 <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>
13766 </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>
13769 <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>
13770 <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>
13774 Image: thumbs reduce
13776 parsoid=wt2html,wt2wt,html2html
13778 [[File:Foobar.jpg|thumb|50px]]
13780 <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>
13783 <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>
13787 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13789 parsoid=wt2html,wt2wt,html2html
13791 [[File:Foobar.jpg|thumb|2000px]]
13793 [[File:Foobar.svg|thumb|2000px]]
13795 <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>
13796 <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>
13799 <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>
13800 <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>
13804 Image: frameless can reduce in size
13806 parsoid=wt2html,wt2wt,html2html
13808 [[File:Foobar.jpg|frameless|50px]]
13810 <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>
13813 <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>
13817 Image: bitmap frameless can't be enlarged past original size, but vector can
13819 parsoid=wt2html,wt2wt,html2html
13821 [[File:Foobar.jpg|frameless|2000px]]
13823 [[File:Foobar.svg|frameless|2000px]]
13825 <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>
13826 </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>
13829 <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>
13830 <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>
13834 Image: framed images are always unscaled.
13836 parsoid=wt2html,wt2wt,html2html
13838 [[File:Foobar.jpg|frame]]
13840 [[File:Foobar.jpg|frame|50px]]
13842 [[File:Foobar.jpg|frame|50x50px]]
13844 [[File:Foobar.jpg|frame|2000px]]
13846 <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>
13847 <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>
13848 <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>
13849 <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>
13852 <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>
13853 <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>
13854 <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>
13855 <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>
13858 ###################
13861 Link to image page- image page normally doesn't exists, hence edit link
13862 Add test with existing image page
13863 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13867 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13872 bug 18784 Link to non-existent image page with caption should use caption as link text
13874 [[:Image:test|caption]]
13876 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13881 Frameless image caption with a free URL
13883 [[File:Foobar.jpg|http://example.com]]
13885 <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>
13888 <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>
13892 Thumbnail image caption with a free URL
13896 [[File:Foobar.jpg|thumb|http://example.com]]
13898 <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>
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><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
13905 Thumbnail image caption with a free URL and explicit alt
13908 parsoid=wt2html,wt2wt,html2html
13910 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13912 <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>
13915 <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>
13919 SVG thumbnails with no language set
13922 [[File:Foobar.svg|thumb|caption]]
13924 <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>
13927 <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>
13931 SVG thumbnails with language de
13933 parsoid=wt2html,wt2wt,html2html
13935 [[File:Foobar.svg|thumb|caption|lang=de]]
13937 <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>
13940 <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>
13944 SVG thumbnails with invalid language code
13946 parsoid=wt2html,wt2wt,html2html
13948 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13950 <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>
13953 <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>
13957 BUG 1887: A ISBN with a thumbnail
13959 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13961 <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>
13964 <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>
13968 BUG 1887: A RFC with a thumbnail
13970 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13972 <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>
13975 <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>
13979 BUG 1887: A mailto link with a thumbnail
13981 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13983 <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>
13986 <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>
13989 # Pending resolution to bug 368
13991 BUG 648: Frameless image caption with a link
13993 [[File:Foobar.jpg|text with a [[link]] in it]]
13995 <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>
13998 <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>
14002 BUG 648: Frameless image caption with a link (suffix)
14004 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14006 <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>
14009 <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>
14013 BUG 648: Frameless image caption with an interwiki link
14015 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14017 <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>
14020 <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>
14024 BUG 648: Frameless image caption with a piped interwiki link
14026 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14028 <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>
14031 <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>
14035 T107474: Frameless image caption with <nowiki>
14037 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14039 <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>
14043 Escape HTML special chars in image alt text
14045 [[File:Foobar.jpg|& < > "]]
14047 <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>
14050 <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>
14054 Entities in file name and attributes
14056 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14058 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14061 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"manualthumb=7%25 solution.gif"},{"ck":"link","ak":"link=7%25 solution"},{"ck":"caption","ak":"[[7%25 solution]]"}]}' data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./7%25_solution\" title=\"7% solution\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./7%25_solution\"},\"sa\":{\"href\":\"7%25 solution\"},\"dsr\":[74,91,2,2]}'>7% solution</a>"}'><a href="./7%25_solution" data-parsoid='{"a":{"href":"./7%25_solution"},"sa":{"href":"link=7%25 solution"}}'><img resource="./File:7%25_solution.gif" src="./Special:FilePath/7%25_solution.gif" height="220" width="220" data-parsoid='{"a":{"resource":"./File:7%25_solution.gif","height":"220","width":"220"},"sa":{"resource":"File:7%25 solution.gif"}}'/></a></span></p>
14065 BUG 499: Alt text should have Ӓ, not &1234;
14067 [[File:Foobar.jpg|♀]]
14069 <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>
14072 <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>
14076 Broken image caption with link
14078 parsoid=wt2html,wt2wt,html2html
14080 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14082 <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.
14085 <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>
14089 Image caption containing another image
14091 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14093 <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>
14096 <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>
14100 Image: caption containing a newline
14102 [[File:Foobar.jpg|This
14105 <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>
14108 <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>
14112 Image: caption containing leading space
14113 (The leading space should not trigger nowiki escaping in wt2wt mode)
14115 [[File:Foobar.jpg|thumb| bar]]
14117 <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>
14120 <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>
14124 Image: caption containing a table
14126 parsoid=wt2html,wt2wt,html2html
14128 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14134 and some more text.]]
14136 <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>
14139 <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
14142 <tr><th>Foo </th><th>Bar</th></tr>
14145 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14149 Bug 3090: External links other than http: in image captions
14151 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14153 <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>
14156 <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>
14162 parsoid=wt2html,wt2wt,html2html
14164 [[Image:foobar.jpg|a|class=b]]
14166 <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>
14169 <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>
14173 Localized image handling (1).
14175 parsoid=wt2html,wt2wt,html2html
14178 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14180 <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>
14183 <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>
14187 Localized image handling (2).
14190 parsoid=wt2html,wt2wt,html2html
14193 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14195 <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>
14198 <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>
14202 Localized image handling (3).
14207 <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>
14209 [[File:Foobar.jpg|بندانگشتی]]
14213 "border", "frameless" and "class" attributes on an image.
14216 parsoid=wt2html,wt2wt,html2html
14218 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14220 <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>
14223 <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>
14226 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14228 Invalid image attributes (bug 62500)
14231 parsoid=wt2html,wt2wt,html2html
14233 [[File:Foobar.jpg|thumb|float|left|caption]]
14235 [[File:Foobar.jpg|thumb|righ|caption]]
14237 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14239 <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>
14240 <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>
14241 <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>
14244 <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>
14245 <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>
14246 <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>
14252 #REDIRECT [[File:Barfoo.jpg]]
14255 # FIXME: Parsoid should run this test -- but we'd need to teach the
14256 # mockAPI about the redirected Barfoo.jpg image.
14260 [[Image:Barfoo.jpg]]
14262 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14267 Missing image with uploads disabled
14271 [[File:Foobaz.jpg]]
14273 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14276 <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>
14279 # Parsoid-specific testing for images
14280 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14281 # Currently imperfect due to a flaw in the Parsoid testrunner
14283 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14287 Parsoid-specific image handling - simple image with size and middle alignment
14289 [[File:Foobar.jpg|middle|50px]]
14291 <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>
14295 Parsoid-specific image handling - simple image with size, middle alignment,
14296 non-standard namespace alias
14298 parsoid=wt2wt,wt2html,html2html
14300 [[Image:Foobar.jpg|middle|50px]]
14302 <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>
14306 Parsoid-specific image handling - simple image with size and middle alignment
14309 [[File:Foobar.jpg|50px|middle]]
14311 <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>
14315 Parsoid-specific image handling - simple image with size and middle alignment
14316 and non-standard namespace name
14318 parsoid=wt2html,wt2wt,html2html
14320 [[Image:Foobar.jpg|50px|middle]]
14322 <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>
14326 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14328 [[File:Foobar.jpg|500x10px|baseline|caption]]
14330 <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>
14334 Parsoid-specific image handling - simple image with border and size spec
14336 [[File:Foobar.jpg|50px|border|caption]]
14338 <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>
14342 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14344 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14346 <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>
14350 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14353 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14355 <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>
14359 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14361 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14363 <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>
14367 Parsoid-specific image handling - thumbnail with specific size, halign,
14368 valign, and caption (existing content)
14370 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14372 <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>
14376 Parsoid-specific image handling - framed image with specific size and caption
14379 parsoid=wt2html,wt2wt,html2html
14381 [[File:Foobar.jpg|frame|500x50px|caption]]
14383 <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>
14387 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14390 parsoid=wt2html,wt2wt,html2html
14392 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14394 <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>
14398 Parsoid-specific image handling - frameless image with specific size, border, and caption
14400 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14402 <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>
14406 Parsoid-specific image handling - simple image with a formatted caption
14408 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14410 <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>
14414 Parsoid-specific image handling - caption with a template in it
14416 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14418 <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>
14422 Parsoid-specific image handling - caption with unbalanced tags in it
14424 parsoid=wt2html,wt2wt,html2html
14427 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14431 <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>
14436 Parsoid-specific image handling - empty caption (1)
14438 parsoid=wt2html,wt2wt
14440 [[File:Foobar.jpg|thumb|]]
14442 <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>
14445 # empty captions don't get serialized unless we're in the "round trip" case
14447 Parsoid-specific image handling - empty caption (2)
14451 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14452 <a href="./File:Foobar.jpg">
14453 <img resource="./File:Foobar.jpg"
14454 src="//example.com/images/3/3a/Foobar.jpg"
14455 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14456 height="25" width="220"/>
14458 <figcaption></figcaption>
14461 [[File:Foobar.jpg|thumb]]
14465 Parsoid-specific image handling - whitespace caption
14467 [[File:Foobar.jpg|thumb| ]]
14469 <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>
14473 Parsoid-specific image handling - lang option
14476 [[File:Foobar.svg|lang=de|caption]]
14480 <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>
14484 ## Edge case bugs in Parsoid from T93580
14486 T93580: 1. Templated <ref> inside block images
14488 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14492 <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>
14494 <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>
14498 T93580: 2. <ref> inside inline images
14500 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14504 <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>
14506 <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>
14510 T93580: 3. Templated <ref> inside inline images
14512 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14516 <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>
14518 <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>
14525 Subpage test/subpage
14533 subpage title=[[Subpage test]]
14537 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14542 Subpage noslash link
14544 subpage title=[[Subpage test]]
14548 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14553 Subpage test/1/2/subpage
14559 Relative subpage noslash link
14561 parsoid=wt2wt,wt2html,html2html
14562 subpage title=[[Subpage test/1/2/3/4]]
14568 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14569 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14572 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14573 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14577 Parsoid: dot-slash prefixed wikilinks
14587 </p><p>[[././baz/]]
14592 </p><p>[[././baz/]]
14597 Render invalid page names as plain text (bug 51090)
14610 [[{{echo|./../foo}}|bar]]
14611 [[{{echo|foo/.}}|bar]]
14612 [[{{echo|foo/..}}|bar]]
14613 [[{{echo|foo~~~~bar}}]]
14614 [[{{echo|foo>bar}}]]
14615 [[{{echo|foo././bar}}]]
14616 [[{{echo|foo{bar}}]]
14617 [[{{echo|foo}bar}}]]
14618 [[{{echo|foo[bar}}]]
14619 [[{{echo|foo]bar}}]]
14620 [[{{echo|foo<bar}}]]
14622 <p>[[./../foo|bar]]
14632 </p><p>[[./../foo|bar]]
14645 <p>[[./../foo|bar]]
14656 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14657 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14658 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14659 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14660 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14661 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14662 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14663 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14664 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14665 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14666 [[<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>
14674 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14679 BUG 561: {{/Subpage}}
14681 subpage title=[[Page]]
14685 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14693 Category:MediaWiki User's Guide
14701 [[:Category:MediaWiki User's Guide]]
14703 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14712 [[Category:MediaWiki User's Guide]]
14714 cat=MediaWiki_User's_Guide sort=
14718 PAGESINCATEGORY invalid title fatal (r33546 fix)
14720 {{PAGESINCATEGORY:<bogus>}}
14727 Category with different sort key
14731 [[Category:MediaWiki User's Guide|Foo]]
14733 cat=MediaWiki_User's_Guide sort=Foo
14737 Category with identical sort key
14741 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14743 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
14747 Category with empty sort key
14752 [[Category:MediaWiki User's Guide|]]
14754 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14758 Category with empty sort key and parentheses
14763 [[Category:Foo (bar)|]]
14765 [[Category:Foo (bar)|Foo]]
14768 ## We used to, but no longer wt2wt this test since the default serializer
14769 ## will normalize all categories to serialize on their own line.
14770 ## This wikitext usage is going to be fairly uncommon in production and
14771 ## selser will take care of preserving formatting in those scenarios.
14773 Category with link tail
14779 123[[Category:Foo]]456
14781 123[[Category:Foo]]456
14783 <p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
14787 Category with template
14792 [[Category:{{echo|Foo}}]]
14794 [[Category:{{echo|Foo}}]]
14798 Category with template in sort key
14803 [[Category:Foo|{{echo|Bar}}]]
14805 [[Category:Foo|{{echo|Bar}}]]
14809 Category with template in sort key and title
14814 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14816 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14819 ## We used to, but no longer wt2wt this test since the default serializer
14820 ## will normalize all categories to serialize on their own line.
14821 ## This wikitext usage is going to be fairly uncommon in production and
14822 ## selser will take care of preserving formatting in those scenarios.
14824 Category / paragraph interactions
14828 Foo [[Category:Baz]] Bar
14830 Foo [[Category:Baz]]
14838 [[Category:Baz]] Bar
14851 {{echo|[[Category:Baz]]}}
14864 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14865 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14866 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14867 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14868 <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>
14869 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14872 ## We used to, but no longer wt2wt this test since the default serializer
14873 ## will normalize all categories to serialize on their own line.
14874 ## This wikitext usage is going to be fairly uncommon in production and
14875 ## selser will take care of preserving formatting in those scenarios.
14877 ## The whitespace on the empty line is part of the test. Please do not delete
14879 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14885 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14887 {{echo|[[Category:Foo]] and so should this!}}
14889 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14894 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14896 <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>
14899 ## Parsoid will not try to wt2wt this while preserving newlines because
14900 ## it suppresses excess newlines within list items -- and we don't want to
14901 ## introduce a special case just for categories, which is, in reality somewhat
14902 ## odd behavior -- categories are unlikely to be used in list items like this
14903 ## in top-level pages and are only likely to show up in template-generated
14904 ## list items where this RT-ing is a non-issue.
14906 ## The whitespace on the empty line is part of the test. Please do not delete
14908 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14914 [[Category:Foo]] and this should be part of the same list item
14917 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14919 <ul><li>This and this should be part of the same list item</li>
14920 <li>So should this and this should be part of the same list item</li></ul>
14923 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14924 <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>
14928 ## Newlines and categories that follow the last item of a list
14929 ## are treated differently because this (list followed by categories)
14930 ## is an extremely common pattern on wikis.
14932 3. Categories and newlines: newline suppression for last list item should RT properly
14945 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14947 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14948 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14952 4. Categories and newlines: newline suppression for last list item should RT properly
14960 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14962 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14965 ## only wt2html for this to make sure the algo only applies to the rightmost path
14967 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14980 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14982 <ul><li> d</li></ul></li></ul>
14983 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14986 ## We used to, but no longer wt2wt this test since the default serializer
14987 ## will normalize all categories to serialize on their own line.
14988 ## This wikitext usage is going to be fairly uncommon in production and
14989 ## selser will take care of preserving formatting in those scenarios.
14991 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14995 * a [[Category:Foo]]
14997 <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>
15000 # This test also demonstrates because of newline+category tunneling
15001 # through the list hander, template wrapping doesn't expand to the
15002 # containing list when the list item swallows the category.
15004 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15009 <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
15010 </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>
15014 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15018 {{echo|[[Category:Foo]]
15022 <ul><li> a</li></ul>
15024 <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">
15025 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15026 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15030 Category links with multiple namespaces
15032 [[Category:Project:Foo]]
15034 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15038 Parsoid: Serialize link to category page with colon escape
15044 [[:Category:Foo|Bar]]
15047 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15048 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15052 # We used to, but no longer wt2wt this test since the default serializer
15053 # will normalize all categories to serialize on their own line.
15054 # This wikitext usage is going to be fairly uncommon in production and
15055 # selser will take care of preventing whitespace insertion if this
15056 # occurs in an article.
15058 # html2html disabled for the same reason (whitespace insertion between
15061 # html2wt disabled because it localizes the "Category" namespace.
15063 Link prefix/suffixes aren't applied to category links
15073 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15077 Parsoid: Serialize link to file page with colon escape
15083 [[:File:Foo.png|Bar]]
15086 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15087 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15092 Parsoid: Serialize a genuine category link without colon escape
15097 [[Category:Foo|Bar]]
15099 <link rel="mw:PageProp/Category" href="./Category:Foo">
15100 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15104 Normalize hrefs properly before testing for invalid link targets (bug 70894)
15108 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15110 [[Category:Toxine bactérienne]]
15114 Parsoid: Defaultsort
15116 {{DEFAULTSORT:Foo}}
15118 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15122 Parsoid: Defaultsort (template-generated)
15124 {{{{echo|DEFAULTSORT}}:Foo}}
15126 <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}}]}'/>
15130 ### Inter-language links
15133 Interlanguage links
15141 es:Alimento fr:Nourriture zh:食品
15143 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15144 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15145 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15149 Duplicate interlanguage links (bug 24502)
15160 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15161 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15162 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15163 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15170 Basic section headings
15177 ===Smaller headline===
15180 <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>
15183 <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>
15186 <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>
15192 Section headings with TOC
15195 === Subheadline 1 ===
15196 ===== Skipping a level =====
15197 ====== Skipping a level ======
15201 ===Another headline===
15203 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15205 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15207 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15209 <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>
15211 <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>
15218 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15220 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15226 <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>
15227 <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>
15228 <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>
15229 <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>
15230 <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>
15233 <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>
15238 TOC anchors don't collide
15246 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15248 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15249 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15250 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15251 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15255 <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>
15256 <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>
15257 <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>
15258 <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>
15262 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15264 Handling of sections up to level 6 and beyond
15267 == Level 2 Heading==
15268 === Level 3 Heading===
15269 ==== Level 4 Heading====
15270 ===== Level 5 Heading=====
15271 ====== Level 6 Heading======
15272 ======= Level 7 Heading=======
15273 ======== Level 8 Heading========
15274 ========= Level 9 Heading=========
15275 ========== Level 10 Heading==========
15277 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15279 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15281 <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>
15283 <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>
15285 <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>
15287 <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>
15289 <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>
15290 <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>
15291 <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>
15292 <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>
15293 <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>
15307 <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>
15308 <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>
15309 <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>
15310 <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>
15311 <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>
15312 <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>
15313 <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>
15314 <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>
15315 <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>
15316 <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>
15321 TOC regression (T11764)
15325 ==== title 1.1.1 ====
15330 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15332 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15334 <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>
15336 <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>
15339 <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>
15342 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15344 <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>
15350 <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>
15351 <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>
15352 <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>
15353 <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>
15354 <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>
15355 <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>
15360 TOC for heading containing <span id="..."></span> (T96153)
15363 ==<span id="old-anchor"></span>New title==
15365 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15367 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15371 <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>
15376 TOC with wgMaxTocLevel=3 (bug 6204)
15382 ==== title 1.1.1 ====
15387 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15389 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15391 <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>
15392 <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>
15395 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15397 <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>
15403 <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>
15404 <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>
15405 <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>
15406 <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>
15407 <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>
15408 <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>
15413 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15419 ====Section 1.1.1====
15420 ====Section 1.1.1.1====
15423 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15425 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15427 <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>
15430 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15434 <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>
15435 <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>
15436 <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>
15437 <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>
15438 <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>
15444 Resolving duplicate section names
15449 <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>
15450 <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>
15455 Resolving duplicate section names with differing case (bug 10721)
15460 <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>
15461 <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>
15473 Template with sections, __NOTOC__
15480 <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>
15481 <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>
15482 <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>
15483 <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>
15488 __NOEDITSECTION__ keyword
15494 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15495 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15500 Link inside a section heading
15502 ==Section with a [[Main Page|link]] in it==
15504 <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>
15509 TOC regression (T14077)
15516 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15518 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15520 <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>
15523 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15527 <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>
15528 <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>
15529 <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>
15534 BUG 1219 URL next to image (good)
15536 http://example.com [[File:Foobar.jpg]]
15538 <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>
15541 <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>
15545 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15548 The line above must have a trailing space!
15551 But just in case it doesn't...
15553 <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>
15554 <p>The line above must have a trailing space!
15556 <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>
15557 <p>But just in case it doesn't...
15562 Header with special characters (bug 25462)
15564 The tooltips shall not show entities to the user (ie. be double escaped)
15581 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15583 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15585 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15586 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15587 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15588 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15589 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15593 <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>
15596 <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>
15599 <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>
15602 <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>
15605 <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>
15611 Header with space, plus and underscore as entity
15613 Id should not contain + for spaces
15615 == Space between Text ==
15618 == Space-Entity between Text ==
15621 == Plus+between+Text ==
15624 == Plus-Entity+between+Text ==
15627 == Underscore_between_Text ==
15630 == Underscore-Entity_between_Text ==
15633 [[#Space between Text]]
15634 [[#Space-Entity between Text]]
15635 [[#Plus+between+Text]]
15636 [[#Plus-Entity+between+Text]]
15637 [[#Underscore_between_Text]]
15638 [[#Underscore-Entity_between_Text]]
15640 <p>Id should not contain + for spaces
15642 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15644 <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>
15645 <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>
15646 <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>
15647 <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>
15648 <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>
15649 <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>
15653 <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>
15656 <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>
15659 <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>
15662 <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>
15665 <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>
15668 <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>
15670 </p><p><a href="#Space_between_Text">#Space between Text</a>
15671 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15672 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15673 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15674 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15675 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15680 Headers with excess '=' characters
15681 (Are similar tests necessary beyond the 1st level?)
15685 =''italic'' heading==
15686 ==''italic'' heading=
15688 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15690 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15691 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15692 <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>
15693 <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>
15697 <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>
15698 <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>
15699 <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>
15700 <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>
15705 HTML headers vs TOC (bug 23393)
15706 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15718 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15720 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15722 <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>
15723 <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>
15726 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15728 <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>
15729 <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>
15735 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15736 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15737 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15738 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15739 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15740 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15745 Single-line or multiline-comments can follow headings
15747 parsoid=wt2html,wt2wt
15755 <h2><span class="mw-headline" id="foo">foo</span></h2>
15756 <h2><span class="mw-headline" id="bar">bar</span></h2>
15757 <h2><span class="mw-headline" id="baz">baz</span></h2>
15762 BUG 1219 URL next to image (broken)
15764 http://example.com[[File:Foobar.jpg]]
15766 <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>
15769 <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>
15773 Bug 1186 news: in the middle of text
15775 http://en.wikinews.org/wiki/Wikinews:Workplace
15777 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15783 Namespaced link must have a title
15792 Namespaced link must have a title (bad fragment version)
15794 [[Project:#fragment]]
15796 <p>[[Project:#fragment]]
15802 ### HTML tags and HTML attributes
15806 div with no attributes
15808 <div>HTML rocks</div>
15810 <div>HTML rocks</div>
15815 div with double-quoted attribute
15817 <div id="rock">HTML rocks</div>
15819 <div id="rock">HTML rocks</div>
15824 div with single-quoted attribute
15826 <div id='rock'>HTML rocks</div>
15828 <div id="rock">HTML rocks</div>
15833 div with unquoted attribute
15835 <div id=rock>HTML rocks</div>
15837 <div id="rock">HTML rocks</div>
15842 div with illegal double attributes
15844 <div id="a" id="b">HTML rocks</div>
15846 <div id="b">HTML rocks</div>
15851 div with empty attribute value, space before equals
15853 parsoid=wt2html,html2html
15855 <div class =>HTML rocks</div>
15857 <div class="">HTML rocks</div>
15860 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15864 div with multiple empty attribute values
15866 parsoid=wt2html,html2html
15868 <div id= title=>HTML rocks</div>
15870 <div id="title.3D">HTML rocks</div>
15873 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15877 table with multiple empty attribute values
15879 parsoid=wt2html,html2html
15885 <table title="id=">
15891 <table title="id=">
15892 <tbody><tr><td> hi</td></tr>
15897 div with braces in attribute value
15899 <div title="{}">Foo</div>
15901 <div title="{}">Foo</div>
15904 <div title="{}">Foo</div>
15908 div with empty attribute value, no space before equals
15910 parsoid=wt2html,html2html
15912 <div class=>HTML rocks</div>
15914 <div class="">HTML rocks</div>
15917 <div class="">HTML rocks</div>
15921 HTML multiple attributes correction
15923 <p class="error" class="awesome">Awesome!</p>
15925 <p class="awesome">Awesome!</p>
15930 Table multiple attributes correction
15933 !+ class="error" class="awesome"| status
15938 <th class="awesome"> status
15946 <DIV ID="x">HTML ROCKS</DIV>
15948 <div id="x">HTML ROCKS</div>
15953 Non-ASCII pseudo-tags are rendered as text
15962 Pseudo-tag with URL 'name' renders as url link
15964 <http://example.com/>
15966 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15971 text with amp in the middle of nowhere
15975 <p>Remember AT&T?
15980 text with character entity: eacute
15982 I always thought é was a cute letter.
15984 <p>I always thought é was a cute letter.
15987 <p>I always thought é was a cute letter.</p>
15991 text with entity-escaped character entity-like string: eacute
15993 I always thought &eacute; was a cute letter.
15995 <p>I always thought &eacute; was a cute letter.
16000 text with undefined character entity: xacute
16002 I always thought &xacute; was a cute letter.
16004 <p>I always thought &xacute; was a cute letter.
16011 <data value="5">five</data>
16012 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16013 <mark>This highlighted text</mark>
16015 <p><data value="5">five</data>
16016 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16017 <mark>This highlighted text</mark>
16022 HTML tag with leading space is parsed as text
16026 <p>< div>foo< /div>
16031 ### Nesting tests (see bug 41545, 50604, 51081)
16034 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
16035 # Note that html2wt is considerably more difficult if we use <b> in
16036 # the test case, instead of <big>
16038 Ensure that HTML adoption agency algorithm is properly implemented.
16040 <big>X<big>Y</big>Z</big>
16042 <p><big>X<big>Y</big>Z</big>
16046 # This was bug 41545 in the PHP parser.
16047 # Note that tidy doesn't handle this correctly.
16051 <kbd>X<kbd>Y</kbd>Z</kbd>
16053 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16057 # The following cases were bug 51081 in the PHP parser.
16058 # Note that there are some other nestable tags (b, i, etc) which are
16059 # not covered; see bug 51081 for discussion.
16061 # Note that tidy doesn't handle this correctly.
16065 <em>X<em>Y</em>Z</em>
16067 <p><em>X<em>Y</em>Z</em>
16071 # Note that tidy doesn't handle this correctly.
16073 Nesting of <strong>
16075 <strong>X<strong>Y</strong>Z</strong>
16077 <p><strong>X<strong>Y</strong>Z</strong>
16086 <p><q>X<q>Y</q>Z</q></p>
16089 # Note that tidy doesn't handle this correctly.
16093 <ruby>X<ruby>Y</ruby>Z</ruby>
16095 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16099 # Note that tidy doesn't handle this correctly.
16103 <bdo>X<bdo>Y</bdo>Z</bdo>
16105 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16117 [[Media:Foobar.jpg]]
16119 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16124 Media link with text
16126 [[Media:Foobar.jpg|A neat file to look at]]
16128 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16132 # FIXME: this is still bad HTML tag nesting
16133 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16135 Media link with nasty text
16137 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16139 <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>
16142 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16143 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16147 Media link to nonexistent file (bug 1702)
16149 [[Media:No such.jpg]]
16151 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16156 Image link to nonexistent file (bug 1850 - good)
16158 [[File:No_such.jpg]]
16160 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16163 <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>
16167 :Image link to nonexistent file (bug 1850 - bad)
16169 [[:Image:No such.jpg]]
16171 <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>
16174 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16180 Character reference normalization in link text (bug 1938)
16182 [[Main Page|this&that]]
16184 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16191 Test for unicode normalization
16193 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16197 (bug 19451) Links should refer to the normalized form.
16205 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16206 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16207 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16208 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16209 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16214 Empty attribute crash test (bug 2067)
16216 <font color="">foo</font>
16218 <p><font color="">foo</font>
16223 Empty attribute crash test single-quotes (bug 2067)
16225 <font color=''>foo</font>
16227 <p><font color="">foo</font>
16232 Attribute test: equals, then nothing
16234 parsoid=wt2html,html2html
16236 <font color=>foo</font>
16238 <p><font color="">foo</font>
16241 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16245 Attribute test: unquoted value
16247 parsoid=wt2html,html2html
16249 <font color=x>foo</font>
16251 <p><font color="x">foo</font>
16254 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16258 Attribute test: unquoted but illegal value (hash)
16260 <font color=#x>foo</font>
16262 <p><font color="#x">foo</font>
16266 # Parsoid does not serialize to empty attribute syntax,
16267 # so wt2wt and html2wt cases are skipped
16269 Attribute test: no value (T54330)
16271 parsoid=wt2html,html2html
16273 <font color>foo</font>
16275 <p><font color="">foo</font>
16278 <p><font color="">foo</font></p>
16282 Bug 2095: link with three closing brackets
16286 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16289 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16293 Bug 2095: link with pipe and three closing brackets
16295 [[Main Page|link]]]
16297 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16300 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16304 Bug 2095: link with pipe and three closing brackets, version 2
16306 [[Main Page|[http://example.com/]]]
16308 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16311 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16320 Template:Dangerous attribute
16322 " onmouseover="alert(document.cookie)
16326 Template:Dangerous style attribute
16328 border-size: expression(alert(document.cookie))
16334 <div style="float: right; {{{1}}}">Magic div</div>
16338 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16340 <div title="{{test}}"></div>
16342 <div title="This is a test template"></div>
16346 # Parsoid has enough context to handle this case
16348 Bug 2304: HTML attribute safety (dangerous template; 2309)
16350 <div title="{{dangerous attribute}}"></div>
16352 <div title=""></div>
16355 <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>
16359 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16361 <div style="{{dangerous style attribute}}"></div>
16363 <div style="/* insecure input */"></div>
16368 Bug 2304: HTML attribute safety (safe parameter; 2309)
16370 {{div style|width: 200px}}
16372 <div style="float: right; width: 200px">Magic div</div>
16377 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16379 {{div style|width: expression(alert(document.cookie))}}
16381 <div style="/* insecure input */">Magic div</div>
16386 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16388 {{div style|"><script>alert(document.cookie)</script>}}
16390 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16395 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16397 {{div style|" ><script>alert(document.cookie)</script>}}
16399 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16404 Bug 2304: HTML attribute safety (link)
16406 <div title="[[Main Page]]"></div>
16408 <div title="[[Main Page]]"></div>
16413 Bug 2304: HTML attribute safety (italics)
16415 <div title="''foobar''"></div>
16417 <div title="''foobar''"></div>
16422 Bug 2304: HTML attribute safety (bold)
16424 <div title="'''foobar'''"></div>
16426 <div title="'''foobar'''"></div>
16432 Bug 2304: HTML attribute safety (ISBN)
16434 <div title="ISBN 1234567890"></div>
16436 <div title="ISBN 1234567890"></div>
16441 Bug 2304: HTML attribute safety (RFC)
16443 <div title="RFC 1234"></div>
16445 <div title="RFC 1234"></div>
16450 Bug 2304: HTML attribute safety (PMID)
16452 <div title="PMID 1234567890"></div>
16454 <div title="PMID 1234567890"></div>
16459 Bug 2304: HTML attribute safety (web link)
16461 <div title="http://example.com/"></div>
16463 <div title="http://example.com/"></div>
16468 Bug 2304: HTML attribute safety (named web link)
16470 <div title="[http://example.com/ link]"></div>
16472 <div title="[http://example.com/ link]"></div>
16477 Bug 3244: HTML attribute safety (extension; safe)
16479 <div style="<nowiki>background:blue</nowiki>"></div>
16481 <div style="background:blue"></div>
16486 Bug 3244: HTML attribute safety (extension; unsafe)
16488 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16490 <div style="/* insecure input */"></div>
16494 # More MSIE fun discovered by Tom Gilder
16497 MSIE CSS safety test: spurious slash
16499 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16501 <div style="/* insecure input */">evil</div>
16506 MSIE CSS safety test: hex code
16508 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16510 <div style="/* insecure input */">evil</div>
16515 MSIE CSS safety test: comment in url
16517 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16519 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16524 MSIE CSS safety test: comment in expression
16526 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16528 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16533 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16535 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16537 <p style="/* invalid control char */">A</p>
16542 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16544 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16545 <div style="top:EXPRESSION(alert())">B</div>
16547 <p style="/* insecure input */">A</p>
16548 <div style="/* insecure input */">B</div>
16553 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16555 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16556 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16558 <div style="/* insecure input */">A</div>
16559 <p style="/* insecure input */">B</p>
16564 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16566 <div style="background-image:url⁽javascript:alert())">A</div>
16567 <div style="background-image:url₍javascript:alert())">B</div>
16568 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16570 <div style="/* insecure input */">A</div>
16571 <div style="/* insecure input */">B</div>
16572 <p style="/* insecure input */">C</p>
16576 # FIXME: Parsoid fails to sanitize this! See T58846.
16581 title="data:text/html,<img src=1 onerror=alert(1)>"
16582 style="-o-link:attr(title);-o-link-source:current">X</div>
16584 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16589 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16591 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16592 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16593 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16594 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16595 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16596 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16597 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16599 <p style="/* insecure input */">A</p>
16600 <p style="/* insecure input */">B</p>
16601 <p style="/* insecure input */">C</p>
16602 <p style="/* insecure input */">D</p>
16603 <p style="/* insecure input */">E</p>
16604 <p style="/* insecure input */">F</p>
16605 <p style="/* insecure input */">G</p>
16610 Table attribute legitimate extension
16613 !+ style="<nowiki>color:blue</nowiki>"| status
16618 <th style="color:blue"> status
16624 Table attribute safety
16627 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16632 <th style="/* insecure input */"> status
16638 CSS line continuation 1
16640 <div style="background-image: u\ rl(test.jpg);"></div>
16642 <div style="/* insecure input */"></div>
16647 CSS line continuation 2
16649 <div style="background-image: u\ rl(test.jpg); "></div>
16651 <div style="/* invalid control char */"></div>
16662 Expansion of multi-line templates in attribute values (bug 6255)
16664 <div style="background: {{identity|#00FF00}}">-</div>
16666 <div style="background: #00FF00">-</div>
16672 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16674 <div style="background:
16677 <div style="background: #00FF00">-</div>
16680 <div style="background:
16685 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16687 <div style="background: #00FF00">-</div>
16689 <div style="background: #00FF00">-</div>
16694 evil <math>-wiki-tags without Extension:Math enabled
16696 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16698 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16702 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16705 Parser hook: empty input
16716 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16719 ## Don't expect parsoid to rt this form.
16721 Parser hook: empty input using terminated empty elements
16723 parsoid=wt2html,html2html
16734 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16738 Parser hook: empty input using terminated empty elements (space before)
16749 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16753 Parser hook: basic input
16764 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16767 ## Don't expect parsoid to rt this form.
16769 Parser hook: case insensitive
16771 parsoid=wt2html,html2html
16782 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16785 ## Don't expect parsoid to rt this form.
16787 Parser hook: case insensitive, redux
16789 parsoid=wt2html,html2html
16800 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16804 Parser hook: nested tags
16806 <tag><tag></tag></tag>
16815 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16819 Parser hook: basic arguments
16821 <tag width="200" height="100" depth="50" square=""></tag>
16834 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16837 ## Don't expect parsoid to rt this form.
16839 Parser hook: basic arguments, variations
16841 parsoid=wt2html,html2html
16843 <tag width=200 height = "100" depth = '50' square></tag>
16856 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16860 Parser hook: argument containing a forward slash (bug 5344)
16862 <tag filename="/tmp/bla"></tag>
16867 'filename' => '/tmp/bla',
16872 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16875 ## Don't expect parsoid to rt this form.
16877 Parser hook: empty input using terminated empty elements (bug 2374)
16879 parsoid=wt2html,html2html
16891 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16894 ## </tag> should be output literally since there is no matching tag that begins it
16895 ## Don't expect parsoid to rt this form.
16897 Parser hook: basic arguments using terminated empty elements (bug 2374)
16901 <tag width=200 height = "100" depth = '50' square/>
16918 <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
16922 ## Don't expect parsoid to rt this form.
16924 Parser hook: Don't allow unclosed extension tags
16930 this is a '''test'''
16932 <p>test <tag>123
16933 </p><p>this is a <b>test</b>
16936 <p>test <tag>123</p>
16938 <p>this is a <b>test</b></p>
16942 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16946 Parser hook: static parser hook not inside a comment
16948 <statictag>hello, world</statictag>
16950 <statictag action="flush" />
16956 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16957 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
16961 Parser hook: static parser hook inside a comment
16963 <!-- <statictag>hello, world</statictag> -->
16964 <statictag action="flush" />
16969 <!-- <statictag>hello, world</statictag> -->
16970 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
16973 # Nested template calls; this case was broken by Parser.php rev 1.506,
16977 Template:One-parameter
16979 (My parameter is: {{{1}}})
16983 Template:Map-one-parameter
16985 {{{{{1}}}|{{{2}}}}}
16989 Nested template calls
16991 {{Map-one-parameter|One-parameter|param}}
16993 <p>(My parameter is: param)
17002 # HTML+Tidy effectively strips out the empty tags completely
17003 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17004 # which Tidy would have done for the PHP parser had there been content inside it.
17006 Sanitizer: Closing of open tags
17008 <s></s><table></table>
17010 <s></s><table></table>
17013 <p><s></s></p><table></table>
17017 Sanitizer: Closing of open but not closed tags
17026 Sanitizer: Closing of closed but not open tags
17036 Sanitizer: Closing of closed but not open table tags
17040 Table not started</td></tr></table>
17042 <p>Table not started</p>
17044 <p>Table not started</p>
17048 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17050 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17052 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17056 # In HTML5, the restrictions are that id must contain at least one character,
17057 # and must not contain any space characters.
17059 Sanitizer: Validating the contents of the id attribute (bug 4515)
17063 <br id="" /><br id="a space" />
17068 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17070 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
17074 <br id="foo" /><br id="foo" />
17076 Something need to be done. foo-2 ?
17080 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17083 <meta itemprop="hello" content="world">
17084 <meta http-equiv="refresh" content="5">
17085 <meta itemprop="hello" http-equiv="refresh" content="5">
17086 <link itemprop="hello" href="{{SERVER}}">
17087 <link rel="stylesheet" href="{{SERVER}}">
17088 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17092 <p> <meta itemprop="hello" content="world" />
17093 <meta http-equiv="refresh" content="5">
17094 <meta itemprop="hello" content="5" />
17096 <link itemprop="hello" href="http://example.org" />
17097 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17098 <link itemprop="hello" href="http://example.org" />
17104 Language converter: output gets cut off unexpectedly (bug 5757)
17108 this bit is safe: }-
17110 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17112 then we get cut off here: }-
17114 all additional text is vanished
17116 <p>this bit is safe: }-
17117 </p><p>but if we add a conversion instance: xxx
17118 </p><p>then we get cut off here: }-
17119 </p><p>all additional text is vanished
17124 Self closed html pairs (bug 5487)
17127 <center><font id="bug" />Centered text</center>
17128 <div><font id="bug2" />In div text</div>
17130 <center><font id="bug" />Centered text</center>
17131 <div><font id="bug2" />In div text</div>
17140 Punctuation: nbsp before exclamation
17144 <p>C'est grave !
17149 Punctuation: CSS !important (bug 11874)
17151 <div style="width:50% !important">important</div>
17153 <div style="width:50% !important">important</div>
17158 Punctuation: CSS ! important (bug 11874; with space after)
17160 <div style="width:50% ! important">important</div>
17162 <div style="width:50% ! important">important</div>
17167 HTML bullet list, closed tags (bug 5497)
17180 <ul data-parsoid='{"stx":"html"}'>
17181 <li data-parsoid='{"stx":"html"}'>One</li>
17182 <li data-parsoid='{"stx":"html"}'>Two</li>
17188 HTML bullet list, unclosed tags (bug 5497)
17200 <ul data-parsoid='{"stx":"html"}'>
17201 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17202 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17208 HTML ordered list, closed tags (bug 5497)
17221 <ol data-parsoid='{"stx":"html"}'>
17222 <li data-parsoid='{"stx":"html"}'>One</li>
17223 <li data-parsoid='{"stx":"html"}'>Two</li>
17229 HTML ordered list, unclosed tags (bug 5497)
17242 <ol data-parsoid='{"stx":"html"}'>
17243 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17244 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17250 HTML nested bullet list, closed tags (bug 5497)
17273 <ul data-parsoid='{"stx":"html"}'>
17274 <li data-parsoid='{"stx":"html"}'>One</li>
17275 <li data-parsoid='{"stx":"html"}'>Two:
17276 <ul data-parsoid='{"stx":"html"}'>
17277 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17278 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17285 HTML nested bullet list, open tags (bug 5497)
17322 HTML nested ordered list, closed tags (bug 5497)
17347 HTML nested ordered list, open tags (bug 5497)
17384 HTML ordered list item with parameters oddity
17386 <ol><li id="fragment">One</li>
17389 <ol><li id="fragment">One</li>
17394 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17396 bug 5918: autonumbering
17398 [http://first/] [http://second] [ftp://ftp]
17402 [mailto:enclosed@mail.tld With target]
17404 [mailto:enclosed@mail.tld]
17406 mailto:inline@mail.tld
17408 <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>
17409 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17410 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17411 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17412 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17415 <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>
17416 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17417 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17418 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17419 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17424 # Security and HTML correctness
17425 # From Nick Jenkins' fuzz testing
17429 Fuzz testing: Parser13
17444 Fuzz testing: Parser14
17449 <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>
17450 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17452 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17458 <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>
17460 <div id="toc" class="toc">
17461 <div id="toctitle">
17465 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17472 Fuzz testing: Parser14-table
17474 parsoid=wt2html,html2html
17479 <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>
17480 <table style="__TOC__">
17485 <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>
17486 <table style="__TOC__">
17493 <table style="__TOC__"></table>
17496 # Known to produce bogus xml (extra </td>)
17498 Fuzz testing: Parser16
17525 Fuzz testing: Parser21
17528 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17533 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17543 Fuzz testing: Parser22
17545 http://===r:::https://b
17549 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17557 # Known to produce bad XML for now
17559 Fuzz testing: Parser24
17564 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17565 <br style="onmouseover='alert(document.cookie);' " />
17567 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17572 <u class="|">}}}} >
17573 <br style="onmouseover='alert(document.cookie);'" />
17575 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17584 # Note: the current result listed for this is not what the original one was,
17585 # but the original bug was JavaScript injection, which is fixed in any case.
17586 # It's not clear that the original result listed was any more correct than the
17587 # current one. Original result:
17590 # <li class="||">
17591 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17593 Fuzz testing: Parser25 (bug 6055)
17599 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17601 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17606 Fuzz testing: URL adjacent extension (with space, clean)
17608 http://example.com <nowiki>junk</nowiki>
17610 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17613 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17617 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17619 http://example.com<nowiki>junk</nowiki>
17621 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17624 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17628 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17630 http://example.com<pre>junk</pre>
17632 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17635 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17640 <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>
17644 Fuzz testing: image with bogus manual thumbnail
17646 [[Image:foobar.jpg|thumbnail= ]]
17648 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17651 <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>
17655 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17657 <pre dir=" "></pre>
17659 <pre dir=" "></pre>
17664 Parsing optional HTML elements (Bug 6171)
17669 <td> Some tabular data</td>
17670 <td> More tabular data ...
17671 <td> And yet som tabular data</td>
17677 <td> Some tabular data</td>
17678 <td> More tabular data ...
17679 </td><td> And yet som tabular data</td>
17686 Correct handling of <td>, <tr> (Bug 6171)
17691 <td> Some tabular data</td>
17692 <td> More tabular data ...</td>
17693 <td> And yet som tabular data</td>
17699 <td> Some tabular data</td>
17700 <td> More tabular data ...</td>
17701 <td> And yet som tabular data</td>
17709 Parsing crashing regression (fr:JavaScript)
17713 <p></body></x>
17718 Inline wiki vs wiki block nesting
17724 <p><b>Bold paragraph</b>
17725 </p><p>New wiki paragraph
17729 # FIXME: The current php output is documented
17730 # and desired output is the parsoid target.
17732 Inline HTML vs wiki block nesting
17738 <p><b>Bold paragraph
17739 </p><p>New wiki paragraph</b>
17742 <p><b>Bold paragraph</b>
17743 </p><p>New wiki paragraph
17747 # Original result was this:
17748 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17750 # While that might be marginally more intuitive, maybe, the six-apostrophe
17751 # construct is clearly pathological and the result stated here (which is what
17752 # the parser actually does) is about as reasonable as anything.
17754 Mixing markup for italics and bold
17757 '''bold''''''bold''bolditalics'''''
17759 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17767 Article for special page transclusion test
17771 Special page transclusion
17774 {{Special:Prefixindex/Xyzzyx}}
17776 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17782 Special page transclusion twice (bug 5021)
17785 {{Special:Prefixindex/Xyzzyx}}
17786 {{Special:Prefixindex/Xyzzyx}}
17788 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17790 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17796 Transclusion of default MediaWiki message
17798 {{MediaWiki:Mainpage}}
17805 Transclusion of nonexistent MediaWiki message
17807 {{MediaWiki:Mainpagexxx}}
17809 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17814 Transclusion of MediaWiki message with underscore
17816 {{MediaWiki:history_short}}
17823 Transclusion of MediaWiki message with space
17825 {{MediaWiki:history short}}
17832 Invalid header with following text
17842 Section extraction test (section 0)
17862 Section extraction test (section 1)
17884 Section extraction test (section 2)
17905 Section extraction test (section 3)
17925 Section extraction test (section 4)
17949 Section extraction test (section 5)
17969 Section extraction test (section 6)
17990 Section extraction test (section 7)
18010 Section extraction test (section 8)
18030 Section extraction test (section 9)
18051 Section extraction test (section 10)
18071 Section extraction test (nonexistent section 11)
18090 Section extraction test with bogus heading (section 1)
18095 ==bogus== not a legal section
18099 ==bogus== not a legal section
18103 Section extraction test with bogus heading (section 2)
18108 ==bogus== not a legal section
18115 Section extraction test with comment after heading (section 1)
18127 Section extraction test with comment after heading (section 2)
18139 Section extraction test with bogus <nowiki> heading (section 1)
18144 ==bogus== <nowiki>not a legal section</nowiki>
18148 ==bogus== <nowiki>not a legal section</nowiki>
18152 Section extraction test with bogus <nowiki> heading (section 2)
18157 ==bogus== <nowiki>not a legal section</nowiki>
18163 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
18164 # instead of respecting commented sections
18166 Section extraction prefixed by comment (section 1)
18177 Section extraction prefixed by comment (section 2)
18187 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
18188 # instead of respecting HTML-style headings
18190 Section extraction, mixed wiki and html (section 1)
18206 Section extraction, mixed wiki and html (section 2)
18222 # Formerly testing for bug 3342
18224 Section extraction, heading surrounded by <noinclude>
18228 <noinclude>==unmarked==</noinclude>
18234 # Test behavior of bug 19910
18236 Sectiion with all-equals
18241 The line above must have a trailing space
18244 But just in case it doesn't...
18248 But just in case it doesn't...
18252 Section replacement test (section 0)
18283 Section replacement test (section 1)
18312 Section replacement test (section 2)
18342 Section replacement test (section 3)
18373 Section replacement test (section 4)
18400 Section replacement test (section 5)
18431 Section replacement test (section 6)
18461 Section replacement test (section 7)
18492 Section replacement test (section 8)
18523 Section replacement test (section 9)
18552 Section replacement test (section 10)
18582 Section replacement test with initial whitespace (bug 13728)
18586 Preformatted initial line
18590 Preformatted initial line
18597 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18609 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18622 Section extraction, <pre> around bogus header (bug 10309)
18639 Section replacement, <pre> around bogus header (bug 10309)
18661 Handling of 
 in URLs
18665 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18668 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18670 a</a></li></ul></li></ul>
18674 Handling of %0A in URLs
18678 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18681 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18685 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18687 5 quotes, code coverage +1 line
18694 <p><b><i></i></b></p>
18697 # same html as previous, but wikitext adjusted to match parsoid html2wt
18698 # note that wt2html and html2html will put the <i> before the <b>
18700 5 quotes, code coverage +1 line w/ nowiki (1)
18702 parsoid=wt2wt,html2wt
18704 '''''<nowiki/>'''''
18709 <p><b><i></i></b></p>
18712 # same as previous, just swapping the <i> and <b>
18714 5 quotes, code coverage +1 line w/ nowiki (2)
18716 '''''<nowiki/>'''''
18721 <p><i><b></b></i></p>
18725 Special:Search page linking.
18729 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18734 {{!}} is a magic word
18736 {{!}} is a magic word there and {{!}} is still a magic word here
18737 | is not a magic word here but {{!}} is still a magic word here
18739 <p>| is a magic word there and | is still a magic word here
18740 | is not a magic word here but | is still a magic word here
18743 <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
18744 | 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>
18751 title=[[Parser test]]
18756 * {{FULLPAGENAMEE}}
18758 * {{BASEPAGENAMEE}}
18762 * {{ROOTPAGENAMEE}}
18764 * {{TALKPAGENAMEE}}
18765 * {{SUBJECTPAGENAME}}
18766 * {{SUBJECTPAGENAMEE}}
18769 * {{NAMESPACENUMBER}}
18773 * {{SUBJECTSPACEE}}
18774 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18776 <ul><li> Parser test</li>
18777 <li> Parser_test</li>
18778 <li> Parser test</li>
18779 <li> Parser_test</li>
18780 <li> Parser test</li>
18781 <li> Parser_test</li>
18782 <li> Parser test</li>
18783 <li> Parser_test</li>
18784 <li> Parser test</li>
18785 <li> Parser_test</li>
18786 <li> Talk:Parser test</li>
18787 <li> Talk:Parser_test</li>
18788 <li> Parser test</li>
18789 <li> Parser_test</li>
18797 <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>
18800 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18810 image4 |300px| centre
18811 image5.svg| http://///////
18816 <ul class="gallery mw-gallery-traditional">
18817 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18818 <div class="thumb" style="height: 150px;">Image1.png</div>
18819 <div class="gallerytext">
18822 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18823 <div class="thumb" style="height: 150px;">Image2.gif</div>
18824 <div class="gallerytext">
18827 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18828 <div class="thumb" style="height: 150px;">Image3</div>
18829 <div class="gallerytext">
18832 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18833 <div class="thumb" style="height: 150px;">Image4</div>
18834 <div class="gallerytext">
18839 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18840 <div class="thumb" style="height: 150px;">Image5.svg</div>
18841 <div class="gallerytext">
18842 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18846 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18847 <div class="thumb" style="height: 150px;">* image6</div>
18848 <div class="gallerytext">
18856 Gallery (with options)
18858 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18859 File:Nonexistent.jpg|caption
18860 File:Nonexistent.jpg
18861 image:foobar.jpg|some '''caption''' [[Main Page]]
18863 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18866 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18867 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18868 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18869 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18870 <div class="gallerytext">
18875 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18876 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18877 <div class="gallerytext">
18880 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18881 <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>
18882 <div class="gallerytext">
18883 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18887 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18888 <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>
18889 <div class="gallerytext">
18892 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18893 <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>
18894 <div class="gallerytext">
18904 Gallery with link that has fragment
18907 image:foobar.jpg|link=Main_Page
18908 image:foobar.jpg|link=Main_Page#section
18909 image:foobar.jpg|link=Main Page#section|caption
18912 <ul class="gallery mw-gallery-traditional">
18913 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18914 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
18915 <div class="gallerytext">
18918 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18919 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
18920 <div class="gallerytext">
18923 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18924 <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>
18925 <div class="gallerytext">
18935 Gallery with wikitext inside caption
18938 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18939 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18942 <ul class="gallery mw-gallery-traditional">
18943 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18944 <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>
18945 <div class="gallerytext">
18946 <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>
18950 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18951 <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>
18952 <div class="gallerytext">
18953 <p>This is a test template
18962 gallery (with showfilename option)
18964 <gallery showfilename>
18965 File:Nonexistent.jpg|caption
18966 File:Nonexistent.jpg
18967 image:foobar.jpg|some '''caption''' [[Main Page]]
18971 <ul class="gallery mw-gallery-traditional">
18972 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18973 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18974 <div class="gallerytext">
18975 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
18980 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18981 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18982 <div class="gallerytext">
18983 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
18987 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18988 <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>
18989 <div class="gallerytext">
18990 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
18991 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18995 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18996 <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>
18997 <div class="gallerytext">
18998 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19007 Gallery (with namespace-less filenames)
19010 File:Nonexistent.jpg
19016 <ul class="gallery mw-gallery-traditional">
19017 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19018 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19019 <div class="gallerytext">
19022 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19023 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19024 <div class="gallerytext">
19027 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19028 <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>
19029 <div class="gallerytext">
19032 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19033 <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>
19034 <div class="gallerytext">
19042 HTML Hex character encoding (spells the word "JavaScript")
19044 parsoid=wt2html,wt2wt,html2html
19046 JavaScript
19048 <p>JavaScript
19053 <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>
19057 HTML Hex character encoding bogus encoding (bug 26437 regression check)
19061 <p>&#xsee;&#XSEE;
19064 <p>&#xsee;&#XSEE;</p>
19068 HTML Hex character encoding mixed case
19070 parsoid=wt2html,wt2wt,html2html
19079 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19082 # See: http://www.w3.org/TR/html5/syntax.html#character-references
19083 # Note that U+000C (form feed) is not a valid XML character, so
19084 # it is banned even though allowed in HTML5.
19086 Illegal character references (T106578)
19091 ; Control (low): 
19092 ; Control (high):  Ÿ
19093 ; Surrogate: ��
19094 ; This is an okay astral character: 💩
19103 <dt>Control (low)</dt>
19105 <dt>Control (high)</dt>
19106 <dd>&#x7F; &#x9F;</dd>
19108 <dd>&#xD83D;&#xDCA9;</dd>
19109 <dt>This is an okay astral character</dt>
19115 __FORCETOC__ override
19127 ISBN 978-0-1234-56 789
19129 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19132 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19134 <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>
19138 ISBN followed by 5 spaces
19149 ISBN ISBN 1234567890
19151 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19154 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19157 # Uppercase X and lowercase x as well
19168 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19169 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19170 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19171 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19172 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19173 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19176 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19177 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19178 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19179 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19180 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19181 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19185 ISBN with empty prefix (parsoid test)
19189 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19192 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19196 Bug 22905: <abbr> followed by ISBN followed by </a>
19198 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19200 <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>
19203 <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>
19211 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19216 Double RFC with a wiki link
19220 <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>
19229 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19232 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19236 Centre-aligned image
19238 [[Image:foobar.jpg|centre]]
19240 <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>
19247 [[Image:foobar.jpg|none]]
19249 <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>
19254 Width + Height sized image (using px) (height is ignored)
19256 [[Image:foobar.jpg|640x480px]]
19258 <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>
19263 Width-sized image (using px, no following whitespace)
19265 [[Image:foobar.jpg|640px]]
19267 <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>
19272 Width-sized image (using px, with following whitespace - test regression from r39467)
19274 [[Image:foobar.jpg|640px ]]
19276 <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>
19281 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19283 [[Image:foobar.jpg| 640px]]
19285 <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>
19290 Image with page parameter
19294 [[File:LoremIpsum.djvu|page=2]]
19296 <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>
19299 <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>
19303 Another italics / bold test
19311 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19317 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19320 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19325 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19327 Images with the "|" character in the comment
19329 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19331 <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>
19334 <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>
19338 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19340 <html><script>alert(1);</script></html>
19342 <p><html><script>alert(1);</script></html>
19347 HTML with raw HTML ($wgRawHtml==true)
19351 <html><script>alert(1);</script></html>
19353 <p><script>alert(1);</script>
19358 Parents of subpages, one level up
19360 subpage title=[[Subpage test/L1/L2/L3]]
19364 <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>
19370 Parents of subpages, one level up, not named
19372 subpage title=[[Subpage test/L1/L2/L3]]
19376 <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>
19383 Parents of subpages, two levels up
19385 subpage title=[[Subpage test/L1/L2/L3]]
19391 <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
19392 </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>
19397 Parents of subpages, two levels up, without trailing slash or name.
19399 subpage title=[[Subpage test/L1/L2/L3]]
19408 Parents of subpages, two levels up, with lots of extra trailing slashes.
19410 subpage title=[[Subpage test/L1/L2/L3]]
19414 <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>
19419 Subpage test/L1/L2/L3Sibling
19425 Transclusion of a sibling page (one level up)
19427 subpage title=[[Subpage test/L1/L2/L3]]
19436 Transclusion of a child page
19438 subpage title=[[Subpage test/L1/L2]]
19446 # This is wt2html only in Parsoid because we add <nowiki>
19447 # because of {{..}} and we don't expect to fix that to
19448 # eliminate the nowikis selective for {{..}} markup.
19450 Non-transclusion because of too many up levels
19452 subpage title=[[Subpage test/L1/L2/L3]]
19455 {{../../../../More than parent}}
19457 <p>{{../../../../More than parent}}
19460 <p>{{../../../../More than parent}}</p>
19464 Definition list code coverage
19470 <dl><dt> title  </dt>
19472 <dt> title </dt>
19478 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19479 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19480 <dt>title</dt><dd> def</dd></dl>
19484 Don't fall for the self-closing div
19486 <div>hello world</div/>
19488 <div>hello world</div>
19497 <p>[[:Template:Msg]]
19506 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19510 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19512 Always escape literal '>' in output, not just after '<'
19526 <p>This is a test template
19527 This is a test template
19539 Inclusion of !userCanEdit() content
19543 <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>
19549 Out-of-order TOC heading levels
19558 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19560 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19562 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19563 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19566 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19568 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19569 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19575 <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>
19576 <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>
19577 <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>
19578 <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>
19579 <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>
19580 <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>
19586 ISBN with a dummy number
19596 ISBN with space-delimited number
19600 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19606 ISBN with multiple spaces, no number
19625 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19626 </p><p>ISBN 12345678901
19632 ISBN with trailing year (bug 8110)
19634 ISBN 1-234-56789-0 - 2006
19636 ISBN 1 234 56789 0 - 2006
19638 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19639 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19647 {{anchorencode:foo bar©#%n}}
19649 <p>foo_bar.C2.A9.23.25n
19654 anchorencode trims spaces
19656 {{anchorencode: __pretty__please__}}
19663 anchorencode deals with links
19665 {{anchorencode: [[hello|world]] [[hi]]}}
19672 anchorencode deals with templates
19674 {{anchorencode: {{Foo}} }}
19681 anchorencode encodes like the TOC generator: (bug 18431)
19683 === _ +:.3A%3A&&]] ===
19684 {{anchorencode: _ +:.3A%3A&&]] }}
19687 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19688 <p>.2B:.3A.253A.26.26.5D.5D
19693 Bug 6200: blockquotes and paragraph formatting
19714 Bug 8293: Use of center tag ruins paragraph formatting
19735 Parsing of overlapping (improperly nested) inline html tags
19737 <span><s>x</span></s>
19739 <p><span><s>x</span></s></span>
19742 <p><span><s>x</s></span>
19747 ### Language variants related tests
19750 Self-link in language variants
19752 title=[[Dunav]] language=sr
19754 Both [[Dunav]] and [[Дунав]] are names for this river.
19756 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19767 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19769 title=[[Duna]] language=sr
19771 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19773 <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.
19778 Link to a section of a variant of this title shouldn't be parsed as self-link
19780 title=[[Duna]] language=sr
19782 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19784 <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.
19789 Link to pages in language variants
19793 Main Page can be written as [[Маин Паге]]
19795 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19801 Multiple links to pages in language variants
19805 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19807 <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>.
19813 Simple template in language variants
19819 <p>This is a test template
19825 Template with explicit namespace in language variants
19831 <p>This is a test template
19837 Basic test for template parameter in language variants
19841 {{парамтест|param=foo}}
19843 <p>This is a test template with parameter foo
19849 Simple category in language variants
19853 [[Category:МедиаWики Усер'с Гуиде]]
19855 cat=МедиаWики_Усер'с_Гуиде sort=
19871 ## We used to, but no longer wt2wt this test since the default serializer
19872 ## will normalize all categories to serialize on their own line.
19873 ## This wikitext usage is going to be fairly uncommon in production and
19874 ## selser will take care of preserving formatting in those scenarios.
19876 Don't convert blue categorylinks to another variant (bug 33210)
19882 [[A]][[Category:分类]]
19886 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19887 <link rel="mw:PageProp/Category" href="Category:分类"/>
19891 Stripping -{}- tags (language variants)
19895 Latin proverb: -{Ne nuntium necare}-
19897 <p>Latin proverb: Ne nuntium necare
19903 Prevent conversion with -{}- tags (language variants)
19905 language=sr variant=sr-ec
19907 Latinski: -{Ne nuntium necare}-
19909 <p>Латински: Ne nuntium necare
19915 Prevent conversion of text with -{}- tags (language variants)
19917 language=sr variant=sr-ec
19919 Latinski: -{Ne nuntium necare}-
19921 <p>Латински: Ne nuntium necare
19927 Prevent conversion of links with -{}- tags (language variants)
19929 language=sr variant=sr-ec
19933 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19939 -{}- tags within headlines (within html for parserConvert())
19941 language=sr variant=sr-ec
19945 <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>
19951 Explicit definition of language variant alternatives
19953 language=zh variant=zh-tw
19955 -{zh:China;zh-tw:Taiwan}-, not China
19957 <p>Taiwan, not China
19963 Conversion around HTML tags
19965 language=sr variant=sr-ec
19967 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19968 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19971 <span title="ЛаCтин">ски</span>
19977 Explicit session-wise language variant mapping (A flag and - flag)
19979 language=zh variant=zh-tw
19981 Taiwan is not China.
19982 But -{A|zh:China;zh-tw:Taiwan}- is China,
19983 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19984 and -{China}- is China.
19986 <p>Taiwan is not China.
19987 But Taiwan is Taiwan,
19988 (This should be stripped!)
19989 and China is China.
19994 Explicit session-wise language variant mapping (H flag for hide)
19996 language=zh variant=zh-tw
19998 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20001 <p>(This should be stripped!)
20007 Adding explicit conversion rule for title (T flag)
20009 language=zh variant=zh-tw showtitle
20011 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20014 <p>Should be stripped!
20019 Testing that changing the language variant here in the tests actually works
20021 language=zh variant=zh showtitle
20023 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20026 <p>Should be stripped!
20031 Recursive conversion of alt and title attrs shouldn't clear converter state
20033 language=zh variant=zh-cn showtitle
20035 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20036 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20040 Should be stripped<span title="Exclamation">!</span>
20045 Bug 24072: more test on conversion rule for title
20047 language=zh variant=zh-tw showtitle
20049 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20050 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20053 <p>This should be stripped!
20054 This won't take interferes with the title rule.
20059 Partly disable title conversion if variant == main language code
20061 language=zh variant=zh title=[[ZH]] showtitle
20063 -{T|zh-cn:CN;zh-tw:TW}-
20071 Partly disable title conversion if variant == main language code, more
20073 language=zh variant=zh title=[[ZH]] showtitle
20083 Raw output of variant escape tags (R flag)
20085 language=zh variant=zh-tw
20087 Raw: -{R|zh:China;zh-tw:Taiwan}-
20089 <p>Raw: zh:China;zh-tw:Taiwan
20094 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20096 language=zh variant=zh-cn
20098 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20105 Conversion rules from [numeric-only string] to [something else] (T48634)
20107 language=zh variant=zh-cn
20109 -{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
20116 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20118 language=zh variant=zh-cn
20120 -{H|zh-cn:foo;zh-tw:;}-foobar
20127 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20129 language=zh variant=zh-cn
20131 -{H|=>zh-cn:foo;}-foobar
20138 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20140 language=zh variant=zh-cn
20149 Nested using of manual convert syntax
20151 language=zh variant=zh-hk
20153 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20155 <p>Nested: Hello Hong Kong!
20159 # Since Parsoid is starting to emit canonical wikitext for links,
20160 # [http://example.com http://example.com] will not RT back to that
20163 Proper conversion of text in external links
20165 language=sr variant=sr-ec
20168 http://www.google.com
20169 gopher://www.google.com
20170 [http://www.google.com http://www.google.com]
20171 [gopher://www.google.com gopher://www.google.com]
20172 [https://www.google.com irc://www.google.com]
20173 [ftp://www.google.com www.google.com/ftp://dir]
20174 [//www.google.com www.google.com]
20176 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20177 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20178 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20179 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20180 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20181 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20182 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20185 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20186 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20187 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20188 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20189 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20190 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20191 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20195 Do not convert roman numbers to language variants
20197 language=sr variant=sr-ec
20201 <p>Фридрих IV је цар.
20206 Unclosed language converter markup "-{"
20217 Don't convert raw rule "-{R|=>}-" to "=>"
20228 Don't break link parsing if language converter markup is in the caption.
20230 language=sr variant=sr-ec
20232 [[Main Page|-{R|main page}-]]
20234 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20238 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20240 Don't break image parsing if language converter markup is in the caption.
20244 [[File:Foobar.jpg|-{R|caption}-]]
20246 <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>
20250 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20252 Don't break list handling if language converter markup is in the item.
20254 language=zh variant=zh-cn
20256 ;-{zh-cn:AAA;zh-tw:BBB}-
20258 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
20265 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20267 Don't break table handling if language converter markup is in the cell.
20269 language=sr variant=sr-ec
20292 Bug 529: Uncovered bullet
20301 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20302 # Templates in Wikipedia rely on this behavior, as tidy has always been
20303 # enabled there. These tests are normally run *without* tidy, so specify the
20304 # full output here.
20305 # To test realistic parsing behavior, apply a tidy-like transformation to both
20306 # the expected output and your parser's output.
20308 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
20310 ******* Foo {{bullet}}
20312 <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>
20318 Bug 529: Uncovered table already at line-start
20341 Bug 529: Uncovered bullet in parser function result
20343 * Foo {{lc:{{bullet}} }}
20351 Bug 5678: Double-parsed template argument
20353 {{lc:{{{1}}}|hello}}
20360 Bug 5678: Double-parsed template invocation
20362 {{lc:{{paramtest {{!}} param = hello }} }}
20364 <p>{{paramtest | param = hello }}
20369 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20372 title=[[Main Page]]
20374 {{PRVNÍVELKÉ:ěščř}}
20375 {{prvnívelké:ěščř}}
20395 Morwen/13: Unclosed link followed by heading
20402 <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>
20407 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20414 <h1><span class="mw-headline" id="heading">heading</span></h1>
20419 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20426 <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>
20441 Paragraphs inside divs (no extra line breaks)
20453 Paragraphs inside divs (extra line break on open)
20468 Paragraphs inside divs (extra line break on close)
20483 Paragraphs inside divs (extra line break on open and close)
20500 Nesting tags, paragraphs on lines which begin with <div>
20502 <div></div><strong>A
20505 <p><strong>A</strong></p>
20506 <p><strong>B</strong></p>
20514 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20516 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20518 <blockquote>Line one
20520 Line two</blockquote>
20522 <blockquote>Line one
20523 Line two</blockquote>
20527 <p>Line one Line two</p>
20532 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20537 Line two</blockquote>
20542 Line two</blockquote>
20547 Line two</blockquote>
20551 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20553 <blockquote>Line one
20558 <blockquote>Line one
20571 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20593 Paragraphs inside blockquotes/divs (no extra line breaks)
20595 <blockquote><div>Line one
20597 Line two</div></blockquote>
20599 <blockquote><div>Line one
20600 Line two</div></blockquote>
20605 Paragraphs inside blockquotes/divs (extra line break on open)
20610 Line two</div></blockquote>
20615 Line two</div></blockquote>
20620 Paragraphs inside blockquotes/divs (extra line break on close)
20622 <blockquote><div>Line one
20625 </div></blockquote>
20627 <blockquote><div>Line one
20630 </div></blockquote>
20635 Paragraphs inside blockquotes/divs (extra line break on open and close)
20641 </div></blockquote>
20647 </div></blockquote>
20652 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20654 wgLinkHolderBatchSize=0
20660 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20661 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20662 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20667 Free external link invading image caption
20669 [[Image:Foobar.jpg|thumb|http://x|hello]]
20671 <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>
20676 Bug 15196: localised external link numbers
20680 [http://en.wikipedia.org/]
20682 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20685 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20689 Multibyte character in padleft
20691 {{padleft:-Hello|7|Æ}}
20698 Multibyte character in padright
20700 {{padright:Hello-|7|Æ}}
20707 formatdate parser function
20709 {{#formatdate:2009-03-24}}
20711 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20716 formatdate parser function, with default format
20718 {{#formatdate:2009-03-24|mdy}}
20720 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20725 Spacing of numbers in formatted dates
20727 {{#formatdate:January 15}}
20729 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20734 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
20736 language=nl title=[[MediaWiki:Common.css]]
20738 {{#formatdate:2009-03-24|dmy}}
20740 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20753 Edit comment with link
20757 I like the [[Main Page]] a lot
20759 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20763 Edit comment with link and link text
20767 I like the [[Main Page|best pages]] a lot
20769 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20773 Edit comment with link and link text with suffix
20777 I like the [[Main Page|best page]]s a lot
20779 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20783 Edit comment with section link (non-local, eg in history list)
20785 comment title=[[Main Page]]
20787 /* External links */ removed bogus entries
20789 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20793 Edit comment with section link and text before it (non-local, eg in history list)
20795 comment title=[[Main Page]]
20797 pre-comment text /* External links */ removed bogus entries
20799 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>
20803 Edit comment with section link (local, eg in diff view)
20805 comment local title=[[Main Page]]
20807 /* External links */ removed bogus entries
20809 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20813 Edit comment with subpage link (bug 14080)
20817 title=[[Subpage test]]
20819 Poked at a [[/subpage]] here...
20821 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20825 Edit comment with subpage link and link text (bug 14080)
20829 title=[[Subpage test]]
20831 Poked at a [[/subpage|neat little page]] here...
20833 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20837 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20840 title=[[Subpage test]]
20842 Poked at a [[/subpage]] here...
20844 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20848 Edit comment with bare anchor link (local, as on diff)
20852 title=[[Main Page]]
20856 <a href="#section">#section</a>
20860 Edit comment with bare anchor link (non-local, as on history)
20863 title=[[Main Page]]
20867 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20871 Anchor starting with underscore
20877 <p><a href="#_ref">One</a>
20880 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20884 Id starting with underscore
20886 <div id="_ref"></div>
20888 <div id="_ref"></div>
20893 Space normalisation on autocomment (bug 22784)
20896 title=[[Main Page]]
20898 /* __hello__world__ */
20900 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20904 percent-encoding and + signs in comments (Bug 26410)
20908 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20910 <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>
20913 # Parsoid doesn't support this yet: see bug 73581
20914 # but it *should* omit the 'src' attribute if the image is bad.
20915 # PHP side of tests was disabled in
20916 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20917 # because of issues in the PHP parserTests infrastructure
20918 # (but the output below is indeed what the PHP side emits)
20920 Bad images - basic functionality
20923 !! DISABLED/html/php
20925 <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>
20929 Bad images - bug 16039: text after bad image disappears
20934 !! DISABLED/html/php
20940 <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>
20945 Verify that displaytitle works (bug #22501) no displaytitle
20949 wgAllowDisplayTitle=true
20950 wgRestrictDisplayTitle=false
20952 this is not the the title
20955 <p>this is not the the title
20960 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20965 wgAllowDisplayTitle=true
20966 wgRestrictDisplayTitle=false
20968 this is not the the title
20969 {{DISPLAYTITLE:whatever}}
20972 <p>this is not the the title
20977 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20982 wgAllowDisplayTitle=true
20983 wgRestrictDisplayTitle=true
20985 this is not the the title
20986 {{DISPLAYTITLE:whatever}}
20989 <p>this is not the the title
20994 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20999 wgAllowDisplayTitle=true
21000 wgRestrictDisplayTitle=true
21002 this is not the the title
21003 {{DISPLAYTITLE:screen}}
21006 <p>this is not the the title
21011 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
21016 wgAllowDisplayTitle=false
21018 this is not the the title
21019 {{DISPLAYTITLE:screen}}
21022 <p>this is not the the title
21023 <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>
21028 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
21033 wgAllowDisplayTitle=false
21035 this is not the the title
21038 <p>this is not the the title
21043 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
21048 wgAllowDisplayTitle=true
21049 wgRestrictDisplayTitle=true
21051 this is not the the title
21052 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21054 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21055 <p>this is not the the title
21060 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
21065 wgAllowDisplayTitle=true
21066 wgRestrictDisplayTitle=true
21068 this is not the the title
21069 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21071 <span style="color: red;">s</span>creen
21072 <p>this is not the the title
21077 Page status indicators: Empty name is invalid
21081 <indicator name=" "></indicator>
21082 <indicator></indicator>
21084 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21085 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21090 Page status indicators: Weird syntaxes that are okay
21094 <indicator name="empty" />
21095 <indicator name="name"></indicator>
21104 Page status indicators: Torture test
21108 <indicator name="01">hello world</indicator>
21109 <indicator name="02">[[Main Page]]</indicator>
21110 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21111 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21112 <indicator name="05">* foo
21114 <indicator name="06"><nowiki>foo</nowiki></indicator>
21115 <indicator name="07"> Preformatted</indicator>
21116 <indicator name="08"><div>Broken tag</indicator>
21117 <indicator name="09">{| class=wikitable
21120 <indicator name="10">Two
21122 paragraphs</indicator>
21125 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21126 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" />
21127 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>
21128 05=<ul><li> foo</li>
21132 07=<pre>Preformatted
21134 08=<div>Broken tag</div>
21136 09=<table class="wikitable">
21153 preload: check <noinclude> and <includeonly>
21157 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21163 preload: check <onlyinclude>
21167 Goodbye <onlyinclude>Hello world</onlyinclude>
21173 preload: can pass tags through if we want to
21177 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21179 <includeonly>Hello world</includeonly>
21183 preload: check that it doesn't try to do tricks
21187 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21189 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21193 Play a bit with r67090 and bug 3158
21195 <div style="width:50% !important"> </div>
21196 <div style="width:50% !important"> </div>
21197 <div style="width:50% !important"> </div>
21198 <div style="border : solid;"> </div>
21200 <div style="width:50% !important"> </div>
21201 <div style="width:50% !important"> </div>
21202 <div style="width:50% !important"> </div>
21203 <div style="border : solid;"> </div>
21206 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21207 <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>
21208 <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>
21209 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21214 HTML5 data attributes
21216 <span data-foo="bar">Baz</span>
21217 <p data-abc-def_hij="">Quuz</p>
21219 <p><span data-foo="bar">Baz</span>
21221 <p data-abc-def_hij="">Quuz</p>
21224 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21225 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21229 Strip reserved data attributes
21231 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21233 <div data-ok="fred">d</div>
21236 <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>
21240 percent-encoding and + signs in internal links (Bug 26410)
21242 [[User:+%]] [[Page+title%]]
21243 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21244 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21245 [[%33%45]] [[%33%45+]]
21247 <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>
21248 <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>
21249 <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>
21250 <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>
21253 <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>
21254 <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>
21255 <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>
21256 <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>
21260 Special characters in embedded file links (bug 27679)
21262 [[File:Contains & ampersand.jpg]]
21263 [[File:Does not exist.jpg|Title with & ampersand]]
21265 <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>
21266 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21269 <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>
21270 <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>
21274 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21276 Text's been normalized?
21278 <p>Text's been normalized?
21283 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21285 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
21287 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
21292 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
21294 [http://www.example.org/ ideograms]
21296 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
21301 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
21303 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
21305 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21329 Bug 31098 Template which includes system messages which includes the template
21333 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21334 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21339 Bug31490 Turkish: ucfirst 'blah'
21350 Bug31490 Turkish: ucfirst 'ix'
21361 Bug31490 Turkish: lcfirst 'BLAH'
21372 Bug31490 Turkish: ucfırst (with a dotless i)
21378 <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>
21383 Bug31490 ucfırst (with a dotless i) with English language
21389 <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>
21394 Bug 26375: TOC with italics
21396 title=[[Main Page]]
21399 == ''Lost'' episodes ==
21401 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21403 <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>
21407 <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>
21412 Bug 26375: TOC with bold
21414 title=[[Main Page]]
21417 == '''should be bold''' then normal text ==
21419 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21421 <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>
21425 <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>
21430 Bug 33845: Headings become cursive in TOC when they contain an image
21432 title=[[Main Page]]
21435 == Image [[Image:foobar.jpg]] ==
21437 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21439 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21443 <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>
21448 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21450 title=[[Main Page]]
21453 == <blockquote>Quote</blockquote> ==
21455 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21457 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21461 <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>
21465 <div id="toc" class="toc">
21466 <div id="toctitle">
21470 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21474 <h2><span class="mw-headline" id="Quote"></span></h2>
21476 <p><span class="mw-headline" id="Quote">Quote</span></p>
21478 <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>
21482 Unclosed tags in TOC
21484 title=[[Main Page]]
21488 <small>Hanc marginis exiguitas non caperet.</small>
21491 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21493 <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>
21497 <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>
21498 <p><small>Hanc marginis exiguitas non caperet.</small>
21504 Multiple tags in TOC
21507 == <i>Foo</i> <b>Bar</b> ==
21509 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21511 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21513 <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>
21514 <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>
21518 <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>
21519 <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>
21523 <div id="toc" class="toc">
21524 <div id="toctitle">
21528 <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>
21529 <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>
21533 <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>
21534 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21536 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21538 <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>
21541 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21542 # html5 tag parsing.
21544 Tags with parameters in TOC
21549 == <sup class="in-h2">Hello</sup> ==
21551 == <sup class="a > b">Evilbye</sup> ==
21553 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21555 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21556 <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>
21560 <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>
21561 <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>
21564 <meta property="mw:PageProp/toc" />
21565 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21567 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21571 span tags with directionality in TOC
21574 == <span dir="ltr">C++</span> ==
21576 == <span dir="rtl">זבנג!</span> ==
21578 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21580 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21582 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21584 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21586 <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>
21587 <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>
21588 <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>
21589 <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>
21590 <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>
21594 <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>
21595 <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>
21596 <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>
21597 <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>
21598 <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>
21603 Bug 72884: bdi element in ToC
21606 == <bdi>test</bdi> ==
21608 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21610 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21614 <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>
21618 # Note that the html output does not have the <p></p>, but the
21619 # html+tidy output *does*. This is because the empty <p></p> is
21620 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21622 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21627 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21629 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21633 <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>
21637 <div id="toc" class="toc">
21638 <div id="toctitle">
21642 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21646 <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>
21652 == {{int:headline_sample}} ==
21656 Bug 32057: Title needed when expanding <h> nodes.
21658 title=[[Main Page]]
21662 <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>
21667 Strip marker in urlencode
21669 {{urlencode:x<nowiki/>y}}
21670 {{urlencode:x<nowiki/>y|wiki}}
21671 {{urlencode:x<nowiki/>y|path}}
21672 {{urlencode:x<pre id="one">two</pre>y}}
21700 Strip marker in formatNum
21702 {{formatnum:1<nowiki/>2}}
21703 {{formatnum:1<nowiki/>2|R}}
21711 Check noCommafy in formatNum
21715 {{formatnum:123456.78}}
21716 {{formatnum:123456.78|NOSEP}}
21724 Wrong option for formatNum (bug 56199)
21726 {{formatnum:1,234.56|Random}}
21727 {{formatnum:1,234.56|EVERYTHING}}
21728 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21737 Strip marker in grammar
21741 {{grammar:elative|foo<nowiki/>bar}}
21748 Strip marker in padleft
21750 {{padleft:|2|x<nowiki/>y}}
21757 Strip marker in padright
21759 {{padright:|2|x<nowiki/>y}}
21766 Strip marker in anchorencode
21768 {{anchorencode:x<nowiki/>y}}
21775 nowiki inside link inside heading (bug 18295)
21777 ==[[foo|x<nowiki>y</nowiki>z]]==
21779 <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>
21784 new support for bdi element (bug 31817)
21786 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21788 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21793 Ignore pipe between table row attributes
21797 |- id=foo | style='color: red'
21805 <tr id="foo" style="color: red">
21812 Gallery override link with WikiLink (bug 34852)
21815 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21818 <ul class="gallery mw-gallery-traditional">
21819 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21820 <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>
21821 <div class="gallerytext">
21831 Gallery override link with absolute external link (bug 34852)
21834 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21837 <ul class="gallery mw-gallery-traditional">
21838 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21839 <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>
21840 <div class="gallerytext">
21850 Gallery override link with malicious javascript (bug 34852)
21853 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21856 <ul class="gallery mw-gallery-traditional">
21857 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21858 <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>
21859 <div class="gallerytext">
21869 Gallery with invalid title as link (bug 43964)
21872 File:foobar.jpg|link=<
21875 <ul class="gallery mw-gallery-traditional">
21876 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21877 <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>
21878 <div class="gallerytext">
21886 Language parser function
21895 Padleft and padright as substr
21897 {{padleft:|3|abcde}}
21898 {{padright:|3|abcde}}
21906 Special parser function
21908 {{#special:RandomPage}}
21909 {{#special:BaDtItLe}}
21910 {{#special:Foobar}}
21919 Bug 34939 - Case insensitive link parsing ([HttP://])
21921 [HttP://MediaWiki.Org/]
21923 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21926 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21930 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21932 [HttP://MediaWiki.Org/ MediaWiki]
21934 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21939 Bug 34939 - Case insensitive link parsing (HttP://)
21941 HttP://MediaWiki.Org/
21943 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21946 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21964 <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>
21965 <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>
21966 <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>
21967 <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>
21968 <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>
21974 ### Parsoid-specific tests
21975 ### Parsoid-PHP parser incompatibilities
21978 1. SOL-sensitive wikitext tokens as template-args
21980 parsoid=wt2html,wt2wt
21986 <span about="#mwt1" typeof="mw:Transclusion">
21987 </span><ul about="#mwt1"><li>a</li>
21989 <span about="#mwt2" typeof="mw:Transclusion">
21990 </span><ol about="#mwt2"><li>a</li>
21992 <span about="#mwt3" typeof="mw:Transclusion">
21993 </span><dl about="#mwt3"><dd>a</dd>
21997 #### -----------------------------------------------------------------
21998 #### Parsoid-specific functionality tests
21999 #### -----------------------------------------------------------------
22001 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
22002 # We know wt2wt will fail, but we expect selser to pass.
22003 # Due to the nature of our testing, wt2wt and selser tests will enter the
22004 # blacklist and we'll catch selser regressions based on changes to the
22005 # blacklist entries for selser tests.
22007 1. Bad treebuilder fixup of formatting elt is cleaned up
22009 parsoid=wt2html,wt2wt
22014 [[Image:Foobar.jpg|right|Test]]
22021 <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>
22028 2. Bad treebuilder fixup of formatting elt is cleaned up
22030 parsoid=wt2html,wt2wt
22032 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22034 <small>[[Image:Foobar.jpg|right|300px]]</small>
22038 <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>
22040 <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>
22044 3. Bad treebuilder fixup of formatting elt is cleaned up
22046 parsoid=wt2html,wt2wt
22048 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22050 <p><small><b>foo</b></small></p>
22051 <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>
22052 <p><small><b>bar</b></small></p>
22056 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22058 parsoid=wt2html,wt2wt
22060 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22062 <p><b><small></small></b></p>
22063 <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>
22067 #### ----------------------------------------------------------------
22068 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
22069 #### tags. Parsoid's output for these tags differs from that of the
22071 #### ----------------------------------------------------------------
22074 Ref: 1. ref-location should be replaced with an index span
22077 B <ref name="x">foo</ref>
22081 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
22082 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>
22083 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>
22084 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22085 <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>
22086 <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>
22087 <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>
22092 Ref: 2. ref-tags with identical names should all get the same index
22094 A <ref name="x">foo</ref>
22098 <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>
22099 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>
22100 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22101 <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>
22106 Ref: 3. spaces in ref-names should be ignored
22108 A <ref name="x">foo</ref>
22109 B <ref name=" x " />
22113 <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>
22114 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>
22115 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>
22116 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22117 <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>
22121 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
22123 Ref: 4. 'constructor' should be accepted as a valid ref-name
22125 A <ref name="constructor">foo</ref>
22128 <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>
22129 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22130 <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>
22135 Ref: 5. body should accept generic wikitext
22138 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
22143 <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>
22145 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22146 <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>
22152 Ref: 6. indent-pres should not be output in ref-body
22162 <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>
22164 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22165 <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
22173 Ref: 7. No p-wrapping in ref-body
22190 <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>
22192 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22193 <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
22208 Ref: 8. transclusion wikitext has lower precedence
22210 A <ref> foo {{echo|</ref> B C}}
22214 <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>
22215 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22216 <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>
22221 Ref: 9. unclosed comments should not leak out of ref-body
22223 A <ref> foo <!--</ref> B C
22226 <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>
22227 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22228 <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>
22233 Ref: 10. Unclosed HTML tags should not leak out of ref-body
22235 A <ref> <b> foo </ref> B C
22239 <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>
22242 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22243 <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>
22248 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22254 <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
22255 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>
22256 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22257 <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>
22258 <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>
22263 Ref: 12. ref-tags act as trailing newline migration barrier
22265 <!--the newline at the end of this line moves out of the p tag-->a
22267 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22273 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22276 <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>
22277 <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>
22280 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22281 <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>
22282 <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>
22286 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22293 <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
22294 <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>
22295 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22296 <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>
22297 <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
22303 Ref: 14. A nested ref-tag should be emitted as plain text
22305 <ref>foo <ref>bar</ref> baz</ref>
22309 <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>
22311 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22312 <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>
22317 Ref: 15. ref-tags with identical names should get identical indexes
22319 A1 <ref name="a">foo</ref> A2 <ref name="a" />
22320 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
22324 <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>
22325 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>
22327 <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>
22331 ## We don't bother wt2wt-ing non-standard whitespace
22333 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22341 <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>
22342 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22343 <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>
22347 Ref: 17. Generate valid HTML5 id/about attributes
22349 <ref name="a b">foo</ref>
22353 <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>
22356 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22357 <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>
22362 Ref: 18. T58916: Extension attributes should be parsed as plain text
22364 <ref name="{{echo|a}}">foo</ref>
22368 <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>
22371 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22372 <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>
22377 Ref: 19. ref-tags with identical name encodings should get identical indexes
22379 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22383 <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>
22385 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22386 <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>
22391 Ref: 20. ref-tags with identical names but different content should keep it
22393 A <ref name="foo">Foo one</ref>
22394 B <ref name="foo">Foo two</ref>
22395 C <ref name="foo" />
22399 <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>
22400 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>
22401 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>
22403 <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>
22408 References: 1. references tag without any refs should be handled properly
22412 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22416 References: 2. references tag with group only outputs references from that group
22418 A <ref group="a">foo</ref>
22419 B <ref group="b">bar</ref>
22422 <references group="a" />
22424 <references group="b" />
22426 <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>
22427 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>
22428 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>
22430 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22431 <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>
22433 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22434 <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>
22436 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22437 <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>
22442 References: 3. ref list should be cleared after processing references
22452 <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>
22454 <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>
22457 <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>
22459 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22460 <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>
22465 References: 4. only referenced group should be cleared after processing references
22467 A <ref group="a">afoo</ref>
22470 <references group="a" />
22476 <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>
22477 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>
22479 <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>
22482 <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>
22484 <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>
22488 ## Don't expect this to rt since we're dropping content
22490 References: 5. ref tags in references should be processed while ignoring all other content
22492 parsoid=wt2html,html2html
22495 B <ref name="b">bar</ref>
22498 <ref name="a">foo</ref>
22499 This should just get lost.
22502 <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>
22503 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>
22506 <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>
22511 References: 6. <references /> from a transclusion
22513 <ref>Foo</ref> {{echo|<references />}}
22515 <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>
22520 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22522 A <ref>foo bar for a</ref>
22523 B <ref group="X" name="b" />
22527 <references group="X">
22528 <ref name="b">foo</ref>
22531 <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>
22532 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>
22535 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22536 <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>
22539 <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"}}'>
22540 <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>
22545 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22547 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22550 <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>
22551 <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>
22555 # This test only works in wt2html now as the <references /> are always generated
22556 # unless selser is active. Once T72722 is fixed, we should add a changes test
22557 # here to ensure that unrelated changes don't add the new <references />
22558 # when selser is active.
22560 References: 9. Generate missing references list at the end
22563 B <ref group="inexistent">bar</ref>
22565 <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>
22566 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
22567 <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>
22569 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
22570 <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>
22575 References: 10. New <references/> shouldn't be added for unrelated edits.
22578 "modes": ["selser"],
22579 "changes": [["#x", "remove"]],
22583 Unrelated text<span id="x"> that's going to disappear</span>.
22591 Entities in ref name
22593 <ref name="test & me">hi</ref>
22596 <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>
22597 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22598 <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>
22602 ## The output here may look funny, but it's what the php parser will do. The
22603 ## unclosed references tag becomes escaped text, and then a new references
22604 ## tag is auto-generated. The test is wt2html only because it roundtrips with
22605 ## nowiki tags, and the auto-generated references tag is only dropped in
22608 Generate references for unclosed references tag
22616 <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>
22618 <p><references></p>
22619 <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>
22623 New reference serializes on its own line
22625 parsoid=wt2wt,html2wt
22630 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22633 #### ----------------------------------------------------------------
22634 #### Parsoid-only testing of Parsoid's impl of LST
22635 #### Not implemented yet, see
22636 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22637 #### ----------------------------------------------------------------
22640 LST Sections: 1. Simple section start and end
22642 parsoid={ "suppressErrors": true }
22644 <section begin="2011-05-16" />
22645 <section end="2014-04-10 (MW 1.23wmf22)" />
22647 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22648 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22651 #--------- Test stripping of empty nodes in template content ----------
22653 Empty LI and TR nodes should be stripped from template content
22658 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22662 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22675 Empty LI and TR nodes should not be stripped from top-level content
22702 Empty TR nodes should not be stripped if they have any attributes set
22704 {{EmptyTRWithHTMLAttrTest}}
22706 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22707 <tr align="center"></tr>
22708 <tr><td>foo</td></tr>
22709 <tr align="center"></tr>
22710 <tr><td>bar</td></tr>
22714 #### ----------------------------------------------------------------
22715 #### The following section of tests are primarily to test
22716 #### wikitext escaping capabilities of Parsoid. Given that
22717 #### escaping can be done any number of ways, the wikitext (input)
22718 #### is always adjusted to reflect how Parsoid adds nowiki
22721 #### We are marking several tests as parsoid-only since the
22722 #### HTML in the result section is different from what the
22723 #### PHP parser generates for it.
22724 #### ----------------------------------------------------------------
22727 #### --------------- Headings ---------------
22729 #### 1. Nested inside html <h1>=foo=</h1>
22730 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22731 #### 3. Nested inside html with wikitext split by html tags
22732 #### 4. No escape needed
22733 #### 5. Empty headings <h1></h1>
22734 #### 6. Heading chars in SOL context
22735 #### ----------------------------------------
22737 Headings: 0. Unnested
22747 <p>=foo<i>a</i>=</p>
22749 <nowiki>=foo=</nowiki>
22751 <nowiki> </nowiki>=foo=
22753 <nowiki>=foo=</nowiki>
22755 =foo''a''<nowiki>=</nowiki>
22758 # New headings and existing headings are handled differently
22760 Headings: 1. Nested inside html
22768 <h1 data-parsoid=''>=foo=</h1>
22769 <h2 data-parsoid=''>=foo=</h2>
22770 <h3 data-parsoid=''>=foo=</h3>
22771 <h4 data-parsoid=''>=foo=</h4>
22772 <h5 data-parsoid=''>=foo=</h5>
22773 <h6 data-parsoid=''>=foo=</h6>
22781 =<nowiki>=foo=</nowiki>=
22782 ==<nowiki>=foo=</nowiki>==
22783 ===<nowiki>=foo=</nowiki>===
22784 ====<nowiki>=foo=</nowiki>====
22785 =====<nowiki>=foo=</nowiki>=====
22786 ======<nowiki>=foo=</nowiki>======
22791 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22800 <nowiki>*</nowiki>bar
22806 <nowiki>=bar=</nowiki>
22810 Headings: 3. Nested inside html with wikitext split by html tags
22814 <h1>=<b>bold</b>foo=</h1>
22816 = ='''bold'''foo= =
22820 Headings: 4a. No escaping needed (testing just h1 and h2)
22831 <h1><i>=</i>foo=</h1>
22851 Headings: 4b. No escaping needed (inside p-tags)
22866 Headings: 5. Empty headings
22870 <h1 data-parsoid='{}'></h1>
22872 <h2 data-parsoid='{}'></h2>
22874 <h3 data-parsoid='{}'></h3>
22876 <h4 data-parsoid='{}'></h4>
22878 <h5 data-parsoid='{}'></h5>
22880 <h6 data-parsoid='{}'></h6>
22890 =====<nowiki/>=====
22892 ======<nowiki/>======
22896 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22906 <nowiki>=a=</nowiki>
22908 <nowiki>=a=</nowiki>
22910 <nowiki>=a=</nowiki>
22914 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22927 <nowiki>=a=</nowiki>
22930 <nowiki>=a=</nowiki>
22933 <nowiki>=a=</nowiki>
22938 Headings: 6c. Heading chars in SOL context (leading newline break)
22946 <nowiki>=b=</nowiki>
22950 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22954 <!--c0--><p>=a=</p>
22956 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22958 <!--c0--><nowiki>=a=</nowiki>
22960 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22964 Headings: 6d. Heading chars in SOL context (No escaping needed)
22974 Headings: 7. Insert a newline between new content and headings
22980 <h2 data-parsoid='{}'>A</h2>
22981 <p data-parsoid='{}'>a</p>
22991 #### --------------- Lists ---------------
22992 #### 0. Outside nests (*foo, etc.)
22993 #### 1. Nested inside html <ul><li>*foo</li></ul>
22994 #### 2. Inside definition lists
22995 #### 3. Only bullets at start should be escaped
22996 #### 4. No escapes needed
22997 #### 5. No unnecessary escapes
22998 #### 6. Escape bullets in SOL position
22999 #### 7. Escape bullets in a multi-line context
23000 #### ----------------------------------------
23003 Lists: 0. Outside nests
23013 <nowiki>*</nowiki>foo
23015 <nowiki>#</nowiki>foo
23017 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23020 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23021 ## to test wikitext escaping, and insignificant whitespace diffs
23022 ## cause PHP parser tests to barf
23024 Lists: 1. Nested inside html (No unnecessary escapes)
23033 <li data-parsoid='{}'>*foo</li>
23034 <li data-parsoid='{}'>#foo</li>
23035 <li data-parsoid='{}'>:foo</li>
23036 <li data-parsoid='{}'>;foo</li>
23044 <li data-parsoid='{}'>*foo</li>
23045 <li data-parsoid='{}'>#foo</li>
23046 <li data-parsoid='{}'>:foo</li>
23047 <li data-parsoid='{}'>;foo</li>
23054 *<nowiki>*foo</nowiki>
23055 *<nowiki>#foo</nowiki>
23056 *<nowiki>:foo</nowiki>
23057 *<nowiki>;foo</nowiki>
23063 #<nowiki>*foo</nowiki>
23064 #<nowiki>#foo</nowiki>
23065 #<nowiki>:foo</nowiki>
23066 #<nowiki>;foo</nowiki>
23070 Lists: 2. Inside definition lists
23074 <dl><dt>;foo</dt></dl>
23075 <dl><dt>:foo</dt></dl>
23078 <dl><dd>:foo</dd></dl>
23082 ; <nowiki>:foo</nowiki>
23084 ; <nowiki>:foo</nowiki>
23091 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23097 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23101 *<nowiki>*foo</nowiki>''it''*bar
23105 Lists: 4. No escapes needed
23118 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23122 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23136 Lists: 5. No unnecessary escapes
23140 <ul><li> bar <span>[[foo]]</span></li></ul>
23141 <ul><li> =bar <span>[[foo]]</span></li></ul>
23142 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23143 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23144 <ul><li> =bar <span>foo]]</span>=</li></ul>
23145 <ul><li> <s></s>: a</li></ul>
23146 <ul><li> <i>* foo</i></li></ul>
23149 * bar <span><nowiki>[[foo]]</nowiki></span>
23151 * =bar <span><nowiki>[[foo]]</nowiki></span>
23153 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23155 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23157 * =bar <span>foo]]</span>=
23165 Lists: 6. Escape bullets in SOL position
23169 <p><!--cmt-->*foo</p>
23171 <!--cmt--><nowiki>*</nowiki>foo
23175 Lists: 7. Escape bullets in a multi-line context
23184 <nowiki>*</nowiki>b
23188 Lists: 8. Escape colons only if not present in tags
23192 <dl><dt>a:b<i>c:d</i></dt></dl>
23194 ; <nowiki>a:b</nowiki>''c:d''
23197 #### --------------- HRs ---------------
23198 #### 1. Single line
23199 #### -----------------------------------
23202 HRs: 1. Single line
23210 ----<nowiki>----</nowiki>
23215 #### --------------- Tables ---------------
23216 #### 1a. Simple example
23217 #### 1b. No escaping needed (!foo)
23218 #### 1c. No escaping needed (|foo)
23219 #### 1d. No escaping needed (|}foo)
23221 #### 2a. Nested in td (<td>foo|bar</td>)
23222 #### 2b. Nested in td (<td>foo||bar</td>)
23223 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23225 #### 3a. Nested in th (<th>foo!bar</th>)
23226 #### 3b. Nested in th (<th>foo!!bar</th>)
23227 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23231 #### 4c. No escaping needed
23232 #### --------------------------------------
23235 Tables: 1a. Simple example
23243 <nowiki>{|</nowiki>
23248 Tables: 1b. No escaping needed
23259 Tables: 1c. No escaping needed
23270 Tables: 1d. No escaping needed
23281 Tables: 2a. Nested in td
23286 <td>foo|bar</td></tr>
23287 <tr><td>x<div>a|b</div></td>
23291 |<nowiki>foo|bar</nowiki>
23293 |x<div><nowiki>a|b</nowiki></div>
23309 Tables: 2b. Nested in td
23315 <td>a<i>b||c</i></td>
23316 <td>a<i><div>b||c</div></i></td>
23317 </tr></tbody></table>
23320 |<nowiki>foo||bar</nowiki>
23321 |a''<nowiki>b||c</nowiki>''
23322 |a''<div><nowiki>b||c</nowiki></div>''
23331 <td>a<i><div>b||c</div></i>
23337 Tables: 2c. Nested in td -- no escaping needed
23353 Tables: 3a. Nested in th
23369 Tables: 3b. Nested in th
23374 <tr><th>foo!!bar</th>
23375 <th><i>foo|bar</i></th>
23376 <th><i>foo!!bar</i></th>
23377 <th><i><span>foo!!bar</span></i></th>
23378 </tr></tbody></table>
23381 !<nowiki>foo!!bar</nowiki>
23382 !''<nowiki>foo|bar</nowiki>''
23383 !''<nowiki>foo!!bar</nowiki>''
23384 !''<span><nowiki>foo!!bar</nowiki></span>''
23393 <th><i>foo!!bar</i>
23395 <th><i><span>foo!!bar</span></i>
23401 Tables: 3c. Nested in th
23406 <tr><th>foo||bar</th>
23407 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23408 </tr></tbody></table>
23411 !<nowiki>foo||bar</nowiki>
23412 !<nowiki>foo||bar</nowiki>
23425 Tables: 4a. Escape -
23441 |<nowiki>-bar</nowiki>
23446 Tables: 4b. Escape +
23462 |<nowiki>+bar</nowiki>
23467 Tables: 4c. No escaping needed
23472 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23473 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23479 <div>a|b</div></td>
23524 Tables: 4d. No escaping needed
23529 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23530 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23531 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23542 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23552 T97430: Don't emit empty nowiki pairs around marker meta tags
23556 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23557 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23559 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23560 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23564 Unclosed xmlish element in table line shouldn't eat end delimiters
23569 <tbody><tr><td> <foo</td>
23570 <td> bar></td></tr>
23587 #### --------------- Links ----------------
23588 #### 1. Quote marks in link text
23589 #### 2. Wikilinks: Escapes needed
23590 #### 3. Wikilinks: No escapes needed
23591 #### 4. Extlinks: Escapes needed
23592 #### 5. Extlinks: No escapes needed
23593 #### --------------------------------------
23595 Links 1. WikiLinks: No escapes needed
23599 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23600 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23601 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23605 [[Foo|x [Foobar] x]]
23607 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23608 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23609 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23614 Links 2. WikiLinks: Escapes needed
23618 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23619 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23620 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23621 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23622 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23623 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23624 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23625 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23626 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23627 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23629 [[Foo|<nowiki>Foobar]</nowiki>]]
23630 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23631 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23632 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23633 [[Foo|<nowiki>|Bar</nowiki>]]
23634 [[Foo|<nowiki>]]bar</nowiki>]]
23635 [[Foo|<nowiki>[[bar</nowiki>]]
23636 [[Foo|<nowiki>x [[ y</nowiki>]]
23637 [[Foo|<nowiki>x ]] y</nowiki>]]
23638 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23640 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23641 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23642 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23643 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23644 <a href="/wiki/Foo" title="Foo">|Bar</a>
23645 <a href="/wiki/Foo" title="Foo">]]bar</a>
23646 <a href="/wiki/Foo" title="Foo">[[bar</a>
23647 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23648 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23649 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23654 Links 3. WikiLinks: No escapes needed
23658 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23659 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23664 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23665 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23670 Links 4. ExtLinks: Escapes needed
23674 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23675 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23676 <p>[http://google.com]</p>
23677 <p>[http://google.com google]</p>
23678 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23679 <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>
23681 [http://google.com <nowiki>[google]</nowiki>]
23682 [http://google.com <nowiki>google]</nowiki>]
23684 <nowiki>[http://google.com]</nowiki>
23686 <nowiki>[http://google.com google]</nowiki>
23688 [http://google.com<nowiki>]</nowiki>
23690 [{{echo|http://google.com}}<nowiki>]</nowiki>
23692 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23693 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23694 </p><p>[http://google.com]
23695 </p><p>[http://google.com google]
23696 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23697 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23702 Links 5. ExtLinks: No escapes needed
23706 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23707 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23709 [http://google.com [google]
23711 [[http://google.com]]
23713 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23714 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23719 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23723 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23724 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23725 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23726 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23727 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23728 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23729 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23730 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23731 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23732 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23733 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23734 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23735 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23738 x<nowiki/>http://example.com<nowiki/>y
23739 http://example.com<nowiki/>?x
23740 http://example.com<nowiki/>&x
23741 http://example.com<nowiki/>'x
23742 http://example.com<nowiki/>,x
23743 http://example.com<nowiki/>.x
23744 http://example.com<nowiki/>;x
23745 http://example.com<nowiki/>:x
23746 http://example.com<nowiki/>;x
23747 http://example.com<nowiki/>!x
23748 http://example.com<nowiki/>=x
23749 http://example.com<nowiki/>(x)
23750 http://example.com(x<nowiki/>)
23754 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23759 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23761 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23762 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23763 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23764 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23765 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23771 "http://example.com"
23772 (http://example.com)
23773 (http://example.com) foo
23774 http://example.com,
23775 http://example.com, foo
23778 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23780 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23781 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23782 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23783 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23784 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23789 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23793 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23794 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23796 http://example.com.,;:!?\
23797 -http://example.com:
23799 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23800 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23805 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23809 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23810 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23811 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23815 X<nowiki/>RFC 123<nowiki/>y
23819 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23823 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23824 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23825 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23832 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23833 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23834 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23839 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23843 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23844 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23845 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23849 X<nowiki/>PMID 123<nowiki/>y
23853 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23857 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23858 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23859 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23866 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23867 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23868 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23873 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23877 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23878 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23879 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23882 ISBN 1234567890<nowiki/>1
23883 ISBN 1234567890<nowiki/>x
23884 a<nowiki/>ISBN 1234567890<nowiki/>b
23888 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23892 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23896 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23901 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23905 <p>this is not a link: http://example.com
23908 this is not a link: <nowiki>http://example.com</nowiki>
23912 Links 15. Link trails can't become link prefixes.
23917 <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>
23919 [[Söfnuður]]-[[00]]
23921 <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>
23925 #### --------------- Quotes ---------------
23926 #### 1. Quotes inside <b> and <i>
23927 #### 2. Link fragments separated by <i> and <b> tags
23928 #### 3. Link fragments inside <i> and <b>
23929 #### 4. No escaping needed
23930 #### --------------------------------------
23932 1a. Quotes inside <b> and <i>
23943 <b>foo'<i>bar'</i>baz</b>
23952 <i>fools'<span> errand</span></i>
23953 <i><span>fool</span>'s errand</i>
23954 '<i>foo</i> bar '<i>baz</i>
23955 a|!*#-:;+-~[]{}b'<i>x</i>
23959 ''<nowiki>''foo''</nowiki>''
23960 ''<nowiki>'''foo'''</nowiki>''
23962 '''<nowiki/>'foo''''
23963 '''<nowiki>''foo''</nowiki>'''
23964 '''<nowiki>'''foo'''</nowiki>'''
23965 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23966 '''foo'''<nowiki/>'s
23972 '''foo'''<nowiki/>'
23973 ''''foo'''<nowiki/>'
23974 ''fools'<span> errand</span>''
23975 ''<span>fool</span>'s errand''
23976 '<nowiki/>''foo'' bar '''baz''
23977 a|!*#-:;+-~[]{}b'''x''
23981 1b. Quotes inside <b> and <i> with other tags on same line
23985 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23986 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23987 <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>
23988 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23989 '<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>
23990 '<i>foo</i> <div title="name">test</div>
23991 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23992 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23993 <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>
23996 '''a'' foo ''[[bar]]''
23997 ''a''' foo ''[[bar]]''
23998 ''a''' foo '''{{echo|[[bar]]}}'''
23999 [[foo]] x'''[[bar]]''
24000 '''foo'' <ref>test</ref>
24001 '''foo'' <div title="name">test</div>
24002 '''foo'' and <br> bar
24007 2. Link fragments separated by <i> and <b> tags
24011 <p>[[<i>foo</i>hello]]</p>
24012 <p>[[<b>foo</b>hello]]</p>
24014 [[''foo''<nowiki>hello]]</nowiki>
24016 [['''foo'''<nowiki>hello]]</nowiki>
24019 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24020 # this is one of the shortcomings of this format
24022 3. Link fragments inside <i> and <b>
24026 <p><i>[[foo</i>]]</p>
24027 <p><b>[[foo</b>]]</p>
24029 ''[[foo''<nowiki>]]</nowiki>
24031 '''[[foo'''<nowiki>]]</nowiki>
24035 4. No escaping needed
24039 <p>'<span><i>bar</i></span>'
24040 '<span><b>bar</b></span>'
24044 '<span>''bar''</span>'
24045 '<span>'''bar'''</span>'
24049 #### ----------- Paragraphs ---------------
24050 #### 1. No unnecessary escapes
24051 #### --------------------------------------
24054 1. No unnecessary escapes
24058 <p>bar <span>[[foo]]</span>
24059 </p><p>=bar <span>[[foo]]</span>
24060 </p><p>[[bar <span>[[foo]]</span>
24061 </p><p>]]bar <span>[[foo]]</span>
24062 </p><p>=bar <span>foo]]</span>=
24065 bar <span><nowiki>[[foo]]</nowiki></span>
24067 =bar <span><nowiki>[[foo]]</nowiki></span>
24069 [[bar <span><nowiki>[[foo]]</nowiki></span>
24071 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24073 =bar <span>foo]]</span><nowiki>=</nowiki>
24076 #### ----------------------- PRE --------------------------
24077 #### 1. Leading whitespace in SOL context should be escaped
24078 #### ------------------------------------------------------
24080 1. Leading whitespace in SOL context should be escaped
24103 <nowiki> </nowiki>a
24105 <nowiki> </nowiki> a
24109 <nowiki> </nowiki> a
24111 <nowiki> </nowiki>a
24114 <nowiki> </nowiki>b
24137 2. Leading whitespace in non-indent-pre contexts should not be escaped
24141 <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>
24142 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24143 <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>
24153 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24172 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24176 <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>
24178 [[File:Foobar.jpg|thumb|caption]]
24182 5. Nowiki escaping should account for indent-pres
24192 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24205 #### --------------- Behavior Switches --------------------
24208 1. Valid behavior switches should be escaped
24215 <nowiki>__TOC__</nowiki>
24216 ''<nowiki>__TOC__</nowiki>''
24220 2. Invalid behavior switches should not be escaped
24231 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24233 Behavior switches should be SOL-transparent
24237 <meta property="mw:PageProp/toc" />
24239 <!-- this one's bogus -->
24242 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24244 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24248 <!-- this one's bogus -->
24257 #### --------------- HTML tags ---------------
24260 #### 3. multi-line html tag
24261 #### 4. extension tags
24262 #### -----------------------------------------
24268 <a href="http://google.com">google</a>
24270 <a href="http://google.com">google</a>
24278 <ul><li> <div>foo</div></li>
24279 <li> <div style="color:red">foo</div></li>
24280 <li> <td></li></ul>
24283 * <nowiki><div>foo</div></nowiki>
24284 * <nowiki><div style="color:red">foo</div></nowiki>
24285 * <nowiki><td></nowiki>
24289 3. multi-line html tag
24308 <p><ref>foo</ref>
24309 </p><p><ref>bar
24310 </p><p>baz</ref>
24313 <nowiki><ref>foo</ref></nowiki>
24315 <nowiki><ref>bar</nowiki>
24317 baz<nowiki></ref></nowiki>
24320 #### --------------- Others ---------------
24326 <p><nowiki>foo</nowiki>
24329 <nowiki>foo</nowiki>
24332 ## The quote-char in the input is necessary for triggering the bug
24334 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24343 #----------- End of wikitext escaping tests --------------
24347 Tag-like HTML structures are passed through as text
24369 </p><p>1<d e>f
24374 HTML tag with necessary entities in attributes
24376 <span title="&amp;">foo</span>
24378 <p><span title="&amp;">foo</span>
24383 HTML tag with 'unnecessary' entity encoding in attributes
24385 <span title="&">foo</span>
24387 <p><span title="&">foo</span>
24392 HTML tag with broken attribute value quoting
24394 parsoid=wt2html,html2html
24396 <span title="Hello world>Foo</span>
24398 <p><span title="Hello world">Foo</span>
24401 <p><span title="Hello world">Foo</span></p>
24405 Self-closed tag with broken attribute value quoting
24407 parsoid=wt2html,html2html
24409 <div title="Hello world />Foo
24411 <div title="Hello world"></div>
24414 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24418 Table with broken attribute value quoting
24420 parsoid=wt2html,html2html
24423 | title="Hello world|Foo
24428 <td title="Hello world">Foo
24434 <td title="Hello world">Foo
24440 Table with broken attribute value quoting on consecutive lines
24442 parsoid=wt2html,html2html
24445 | title="Hello world|Foo
24446 | style="color:red|Bar
24451 <td title="Hello world">Foo
24453 <td style="color:red">Bar
24459 <td title="Hello world">Foo
24460 </td><td style="color: red">Bar
24461 </td></tr></tbody></table>
24466 Accept empty td cell attribute
24469 | align="center" | foo || |
24474 <td align="center"> foo </td>
24481 Non-empty attributes in th-cells
24484 ! Foo !! style="color: red" | Bar
24490 <th style="color: red"> Bar
24496 Accept empty attributes in th-cells
24511 Empty table rows go away
24532 ### Parsoid-centric tests for testing RTing of inter-element separators
24533 ### Edge cases not tested by existing parser tests and specific to
24534 ### Parsoid-specific serialization strategies.
24538 RT-ed inter-element separators should be valid separators
24550 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24554 # Parsoid-only since PHP parser relies on Tidy for correct output
24556 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24570 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24571 <p>bar</p></small></td></tr>
24575 <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>
24579 # Note that the "style" attribute is really a template parameter here.
24580 # The = would have to be {{=}} if you wanted the literal.
24582 Empty TD followed by TD with tpl-generated attribute
24587 |{{echo|style='color:red'}}|foo
24601 Indented table with an empty td
24619 ## We have some newline diffs RT-ing this edge case
24620 ## and it is not important enough -- we seem to be emitting
24621 ## at most 2 newlines after a </tr> and this is unrelated to
24622 ## the issue from T85627 that this is testing.
24624 Indented table with blank lines in between (T85627)
24643 Indented block & table
24657 <div data-parsoid='{"stx":"html"}'>foo</div>
24659 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24664 Indent and comment before table row
24679 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24680 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24684 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24686 Empty TR followed by a template-generated TR
24692 {{echo|<tr><td>foo</td></tr>}}
24698 <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}}]}'>
24703 ## PHP and parsoid output differ for this, and since this is primarily
24704 ## for testing Parsoid's serializer, marking this Parsoid only
24706 Empty TR followed by mixed-ws-comment line should RT correctly
24722 <!--c--> </tr><!--d-->
24728 Multi-line image caption generated by templates with/without trailing newlines
24730 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24731 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24733 <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>
24734 <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>
24738 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24742 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24744 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24746 <includeonly>foo</includeonly>
24754 ## PHP emits broken html for this, and since this is primarily
24755 ## a Parsoid serializer test, marking this Parsoid only
24757 Improperly nested inline or quotes tags with whitespace in between
24759 <span> <s>x</span> </s>
24762 <p><span> <s>x</s></span><s> </s>
24763 <b> <i>x</i></b><i> </i>
24768 Encapsulate protected attributes from wt
24770 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24772 <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>
24776 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24777 ## Having nested or stray pre tags results in the attempt to add duplicates,
24778 ## causing an assertion fail. This test tries to prevent that situation.
24780 Ensure ParagraphWrapper can deal with stray closing pre tags
24790 1. Ensure fostered text content is wrapped in element nodes
24794 <table>hi</table><table>ho</table>
24803 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24805 parsoid=wt2html,wt2wt
24814 <tbody><tr><td> a</td></tr>
24819 Encapsulation properly handles null DSR information from foster box
24821 parsoid=wt2html,wt2wt
24823 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24825 <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>
24829 1. Encapsulate foster-parented transclusion content
24831 parsoid=wt2wt,wt2html
24833 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24835 <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>
24845 2. Encapsulate foster-parented transclusion content
24847 parsoid=wt2wt,wt2html
24849 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24851 <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>
24862 3. Encapsulate foster-parented transclusion content
24864 parsoid=wt2wt,wt2html
24866 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24868 <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>"]}">
24881 4. Encapsulate foster-parented transclusion content
24883 parsoid=wt2wt,wt2html
24885 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24887 <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>"]}">
24900 5. Encapsulate foster-parented transclusion content
24902 parsoid=wt2wt,wt2html
24904 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24906 <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>
24921 6. Encapsulate foster-parented transclusion content
24923 parsoid=wt2wt,wt2html
24925 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24927 <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>
24943 7. Encapsulate foster-parented transclusion content
24945 parsoid=wt2wt,wt2html
24947 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24949 <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>
24959 # Note that the wt is broken on purpose: the = should be {{=}} if you
24960 # don't want it to be a template parameter key.
24962 8. Encapsulate foster-parented transclusion content
24964 parsoid=wt2wt,wt2html
24967 }}{|{{echo|style='color:red'}}
24972 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24974 <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>
24985 9. Encapsulate foster-parented transclusion content
24987 parsoid=wt2wt,wt2html
24989 <table>{{echo|hi</table>hello}}
24991 <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>
24995 Table in fosterable position
25006 <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">
25008 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25014 # Parsoid only for bug 64747
25016 Properly encapsulate empty-content transclusions in fosterable positions
25024 <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"}]]}'>
25030 Always encapsulate foster box when template range is expanded to table
25043 T115289: Unclosed table
25045 {{echo|<table>}}<!--c-->[[Category:Two]]
25047 <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>
25051 T115289: Don't migrate newlines out of tables with fostered content
25053 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25055 <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>
25059 T73074: More fostering fun
25061 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25063 <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>
25067 Support <object> element with .data attribute
25071 <object data="test.swf"></object>
25073 <object data="test.swf"></object>
25077 Don't block XML namespace declaration
25079 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25081 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25084 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25087 # -----------------------------------------------------------------
25088 # The following section of tests are primarily to spec requirements
25089 # around Parsoid's serialization (old, new, edited content)
25091 # All these tests are marked Parsoid html2wt and html2html only
25092 # ----------------------------------------------------------------
25095 Ignore rel attribute in a-tags during serialization to url-links
25099 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25100 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25101 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25103 http://en.wikipedia.org/wiki/Foobar
25104 http://en.wikipedia.org/wiki/Foobar
25105 http://en.wikipedia.org/wiki/Foobar
25108 # 'mi' is a localinterwiki prefix as well as a language
25110 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
25114 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25121 New wikilinks should be serialized properly
25125 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25126 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25127 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25128 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25129 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25133 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25134 http://en.wikipedia.org/wiki/Foo
25135 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25139 New wiki links (href variations)
25143 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25144 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25145 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25146 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25151 [[Toxine bactérienne]]
25155 New wiki links (content string variations)
25159 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25160 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25161 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25165 [[Foo_bar|./Foo_bar]]
25169 New category links (href variations)
25173 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25174 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25175 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25177 [[Category:Toxine bactérienne]]
25178 [[Category:Toxine bactérienne]]
25179 [[Category:Toxine bactérienne]]
25183 New sol transparent links don't need indent-pre nowiki protection
25188 <link rel="mw:PageProp/redirect" href="./Main_Page">
25189 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25190 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25192 #WEITERLEITUNG [[Main Page]]
25193 <!-- this is good --> [[Category:Good]]
25194 <!-- this is great --> [[Kategorie:Great]]
25198 New interlanguage links (href variations)
25202 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25203 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25204 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25206 [[es:Toxine bactérienne]]
25207 [[es:Toxine_bactérienne]]
25208 [[es:Toxine_bactérienne]]
25212 Image: Modifying size of an image (1)
25215 "modes": ["wt2wt"],
25217 ["img[height]", "attr", "height", "22"],
25218 ["img[width]", "attr", "width", "200"]
25222 [[Image:Foobar.jpg|230x230px]]
25224 [[Image:Foobar.jpg|200x200px]]
25228 Image: Modifying size of an image (2)
25231 "modes": ["wt2wt"],
25233 ["img[height]", "attr", "height", "100"],
25234 ["img[width]", "attr", "width", "500"]
25238 [[Image:Foobar.jpg|230x230px]]
25240 [[Image:Foobar.jpg|500x500px]]
25243 # Change in size is ignored so long as class='mw-default-size'
25245 Image: Modifying size of an image (3)
25248 "modes": ["wt2wt"],
25250 ["figure[class]", "removeClass", "mw-default-size"],
25251 ["figure img", "attr", "height", "19"],
25252 ["figure img", "attr", "width", "170"]
25256 [[Image:Foobar.jpg|thumb]]
25258 [[Image:Foobar.jpg|thumb|170x170px]]
25262 Image: Modifying alignment of an image (bug 48665)
25265 "modes": ["wt2wt"],
25267 ["figure[class]", "removeClass", "mw-halign-right"],
25268 ["figure[class]", "addClass", "mw-halign-left"]
25272 [[Image:Foobar.jpg|thumb|caption|right]]
25274 [[Image:Foobar.jpg|thumb|caption|left]]
25278 Image: Modifying mw-default-size of an frameless image (bug 62805)
25281 "modes": ["wt2wt"],
25283 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25287 [[Image:Foobar.jpg|frameless|right]]
25289 [[Image:Foobar.jpg|frameless|right|220x220px]]
25293 Image: Modifying valign of an image (bug 49221)
25296 "modes": ["wt2wt"],
25298 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25299 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25303 [[File:Foobar.jpg|20px|middle]]
25305 [[File:Foobar.jpg|20px|text-top]]
25309 Image: Modifying alt attribute of an image (bug 56400)
25312 "modes": ["wt2wt"],
25314 ["img[alt]", "attr", "alt", "some alternate edited text"]
25318 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25320 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25324 Image: Modifying caption of an image
25327 "modes": ["wt2wt"],
25329 ["figcaption", "text", "new caption"]
25333 [[Image:Foobar.jpg|thumb|original caption]]
25335 [[Image:Foobar.jpg|thumb|new caption]]
25339 Image: empty alt attribute (bug 48924)
25343 [[File:Foobar.jpg|thumb|alt=|bar]]
25345 <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>
25349 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25355 <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>
25357 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25361 Image: Block level image should have \n before and after
25364 [[File:Foobar.jpg|right|thumb|150x150px]]
25368 <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>
25373 Image: New block level image should have \n before and after (existing content)
25376 [[File:Foobar.jpg|right|thumb|150x150px]]
25380 <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>
25385 Image: upright option (parsoid)
25387 [[File:Foobar.jpg|thumb|upright|caption]]
25388 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25389 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25391 <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>
25392 <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>
25393 <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>
25397 Image: upright option is ignored on inline and frame images (parsoid)
25399 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25401 <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>
25405 Image: from basic HTML (1)
25409 <span typeof="mw:Image">
25410 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25413 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25417 Image: from basic HTML (2)
25421 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25423 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25427 Image: from basic HTML (3)
25431 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25433 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25437 Image: from basic HTML (4)
25441 <img src="./File:Foobar.jpg">
25443 [[File:Foobar.jpg|link=]]
25447 Image: Invalid title as link
25449 [[File:Foobar.jpg|link=<]]
25451 <p><a href="/wiki/File:Foobar.jpg" class="image" title="link=<"><img alt="link=<" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
25454 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=<"}]}' data-mw='{"caption":"link=&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>
25458 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25463 <li><p>foo</p></li>
25470 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25474 <ul> <li>foo</li></ul>
25480 Don't strip leading whitespace when handling indent-pre suppressing tags
25485 <tr><td> indented row</td></tr>
25488 <b>This is very bold of you!</b>
25491 indented cell (no pre-wrapping!)
25501 '''This is very bold of you!'''
25505 indented cell (no pre-wrapping!)
25513 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25535 <nowiki> </nowiki></span>bar2
25538 <nowiki> </nowiki><span>bar</span>
25541 <nowiki> </nowiki><span>foo</span>
25546 Lists: Dont insert newlines in a serialized list item.
25550 <ul><li>a<br>b</li><li>c</li></ul>
25557 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25560 "modes": ["html2wt"],
25561 "scrubWikitext": false
25564 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25565 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25567 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25568 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25570 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25572 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25574 == hello there [[Category:A1]] ==
25576 == [[Category:A2]] hi pal ==
25578 == <!--foo--> [[Category:A3]] how goes it ==
25580 == it goes well [[Category:A4]] <!--bar--> ==
25582 ==howdy [[Category:A5]]==
25588 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25591 "modes": ["html2wt"],
25592 "scrubWikitext": true
25595 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25596 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25598 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25599 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25601 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25609 <!--foo--> [[Category:A3]]
25614 [[Category:A4]] <!--bar-->
25622 Headings: Don't hoist metas that come from templates
25625 "modes": ["html2wt"],
25626 "scrubWikitext": true
25629 <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>
25631 == {{echo|foo [[Category:Foo]]}} ==
25635 Headings: Category in ref isn't hoisted
25638 "modes": ["html2wt"],
25639 "scrubWikitext": true
25642 <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>
25644 <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>
25647 [[Category:Baz]] </ref> ==
25653 Parsoid: Serialize positional parameters with = in them as named parameter
25657 <p about="#mwt1" typeof="mw:Transclusion"
25658 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25660 <p about="#mwt1" typeof="mw:Transclusion"
25661 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25663 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25664 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25665 <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>
25669 {{echo|1=f=oo|2=bar}}
25671 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25672 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25673 {{echo|<nowiki>f=oo</nowiki>|bar}}
25677 Parsoid: Serialize positional parameters with = in extlink as named parameter
25681 <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>
25683 {{echo|1=http://stuff?is=ok}}
25687 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25691 <div>a<p>b</p></div>
25712 Substrings resembling wikitext in hrefs should not get nowiki escapes
25716 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25722 Enforce single-line context in the serializer
25729 <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">
25730 </span><span about="#mwt1">you</span> </h2>
25732 <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>
25734 <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
25735 there</span></li></ol>
25747 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25754 </tbody></table></dd></dl>
25758 == hi {{bogus|there
25769 * foo '''bar''' baz
25781 Serialize new placeholder space without spans
25785 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25787 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25789 <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>
25795 <ref>foo : bar</ref>ok
25799 #-----------------------
25800 # Tag minimization tests
25801 #-----------------------
25804 1. I/B quote minimization: wikitext-only tags should be combined
25808 <p><i>A</i><i>B</i></p>
25809 <p><b>A</b><b>B</b></p>
25810 <p><i>A</i><b><i>B</i></b></p>
25811 <p><b>A</b><i><b>B</b></i></p>
25812 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25813 <p><i><b>A</b></i><i><b>B</b></i></p>
25814 <p><i><b>A</b></i><b><i>B</i></b></p>
25815 <p><b><i>A</i></b><i><b>B</b></i></p>
25835 2. I/B quote minimization: wikitext and html tags should not be combined
25839 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25840 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25844 ''A''<nowiki/>'''<i>B</i>'''
25848 3. I/B quote minimization: templated content stops minimization
25852 <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>
25853 <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>
25855 ''A''{{echo|''B''}}
25857 ''A''{{echo|'''''B'''''}}
25861 4. I/B quote minimization: new content should be mimimized with adjacent old content
25865 <p><i>A</i><i>B</i></p>
25866 <p><b>A</b><b>B</b></p>
25867 <p><i>A</i><b><i>B</i></b></p>
25877 5a. Merge adjacent quote nodes if they've been edited
25880 "modes": ["wt2wt", "selser"],
25882 ["p", "contents", "remove", ":contains('b')"]
25892 5b. Merge adjacent quote nodes if they've been edited
25895 "modes": ["wt2wt", "selser"],
25901 ''a''<span id="x">b</span>''c''
25907 1. Merge adjacent link nodes as long as at least one element is new
25910 "modes": ["html2wt"],
25911 "scrubWikitext": true
25914 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25915 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25916 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25920 [[Football|Foot]][[Football|ball]]
25924 2. Merge adjacent link nodes and enable additional normalizations
25927 "modes": ["html2wt"],
25928 "scrubWikitext": true
25931 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25933 [[Football|''Football'']]
25937 3. Don't merge adjacent link nodes if scrubWikitext is false
25940 "modes": ["html2wt"],
25941 "scrubWikitext": false
25944 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25946 [[Football|Foot]][[Football|ball]]
25949 #------------------------------
25950 # End of tag minimization tests
25951 #------------------------------
25954 Bug 54262: New entities
25958 <span typeof="mw:Entity"> </span>
25963 ## Note that there is no wikitext output for 'unknownproperty' ##
25964 ## Unknown magic words are silently dropped ##
25971 <meta property='mw:PageProp/toc' />
25972 <meta property='mw:PageProp/notoc' />
25973 <meta property='mw:PageProp/forcetoc' />
25974 <meta property='mw:PageProp/index' />
25975 <meta property='mw:PageProp/noindex' />
25976 <meta property='mw:PageProp/nogallery' />
25977 <meta property='mw:PageProp/noeditsection' />
25978 <meta property='mw:PageProp/notitleconvert' />
25979 <meta property='mw:PageProp/nocontentconvert' />
25980 <meta property='mw:PageProp/unknownproperty' />
25990 __NOCONTENTCONVERT__
25994 Consecutive <pre>s should not get merged
25996 parsoid=html2wt,html2html
25998 <pre>a</pre><pre>b</pre>
26026 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26030 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26032 [[Special:BookSources/1234567890|ISBN 1234567895]]
26036 Edited RFC links not serializable as RFC links should serialize as extlinks
26040 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26042 [//tools.ietf.org/html/rfc123 New RFC]
26046 Edited PMID links not serializable as PMID links should serialize as extlinks
26050 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26052 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26056 WTS of autolinks with trailing/surrounding context
26060 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26061 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26062 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26063 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26064 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26065 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26067 http://cscott.net'''foo'''
26069 http://cscott.net<b>foo</b>
26071 '''http://cscott.net'''
26073 '''http://cscott.net '''
26075 '''http://cscott.net<nowiki/>x'''
26077 http://cscott.net<nowiki/>x
26081 WTS of autolinks with nowikis (round-trip)
26083 x<nowiki/>http://cscott.net<nowiki/>x
26085 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26088 # this is the "easy" test because it leaves in place all the
26089 # data-parsoid information indicating this is an autolink
26091 WTS of autolinks with escapes (editing)
26094 "modes": ["wt2wt"],
26096 [ "meta", "remove" ]
26100 x<nowiki/>http://cscott.net<nowiki/>x
26102 x<nowiki/>http://cscott.net<nowiki/>x
26106 WTS of edited autolink-like text (T103364)
26109 "modes": ["wt2wt"],
26111 [ "span[typeof]", "removeAttr", "typeof" ]
26115 Not a link: <nowiki>http://example.com</nowiki>.
26117 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26121 WTS of newly-authored autolink-like text (T103364)
26125 <p>http://example.com is not a link.</p>
26127 <nowiki>http://example.com</nowiki> is not a link.
26131 WTS of autolink-like text after an autolink (T108563)
26135 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26137 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26141 Magic links inside links (not autolinked)
26143 [[Foo|http://example.com]]
26146 [[Foo|ISBN 123456789x]]
26148 [http://foo.com http://example.com]
26149 [http://foo.com RFC 1234]
26150 [http://foo.com PMID 1234]
26151 [http://foo.com ISBN 123456789x]
26153 <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>
26154 <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>
26156 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26157 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26158 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26159 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26161 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26162 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26163 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26164 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26168 Magic links inside image captions (autolinked)
26170 [[File:Foobar.jpg|thumb|http://example.com]]
26171 [[File:Foobar.jpg|thumb|RFC 1234]]
26172 [[File:Foobar.jpg|thumb|PMID 1234]]
26173 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26175 <div class="thumb tright">
26176 <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>
26177 <div class="thumbcaption">
26178 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26179 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26182 <div class="thumb tright">
26183 <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>
26184 <div class="thumbcaption">
26185 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26186 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26189 <div class="thumb tright">
26190 <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>
26191 <div class="thumbcaption">
26192 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26193 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26196 <div class="thumb tright">
26197 <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>
26198 <div class="thumbcaption">
26199 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26200 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26204 <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>
26205 <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>
26206 <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>
26207 <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>
26211 WTS of magic word text (T109371)
26216 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26217 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26219 <nowiki>RFC 1234</nowiki>
26221 [http://foo.com RFC 1234]
26227 Edited Redirect link should emit a non-piped wikitext link
26231 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26237 T75121: Infer extension name from typeOf if data-mw is not present
26239 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26241 <div typeOf="mw:Extension/foo"></div>
26246 # Note that the <p> wrapping isn't present in PHP parser output
26247 # The important thing for this test is that P-wrapping doesn't
26248 # interfere with the <nowiki> protection for leading - in <td>
26249 # (which isn't necessary for <th>).
26251 T88318: p-wrapped dash in table.
26253 parsoid=html2wt,wt2wt
26256 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26257 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26258 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26265 |<nowiki>-</nowiki>
26266 |<nowiki>- </nowiki>
26285 <td><small>-</small></td>
26297 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26302 <td id='mwAc'>foo</td>
26303 <td id='serialize-this'>bar</td>
26308 | id="serialize-this" |bar
26313 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26317 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26319 <div id="hello">ok</div>
26326 "modes": ["wt2wt"],
26328 [ "#xyz", "before", "<b>before</b> stuff " ],
26329 [ "#xyz", "after", " stuff <i>after</i>" ],
26330 [ "#xyz", "html", "x <b>y</b> z" ]
26334 <span id="xyz">hello</span>
26336 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26340 Never serialize a-tag as html, regardless of what data-parsoid has to say
26342 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26344 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26349 ## SSS FIXME: This is broken output nevertheless.
26350 ## What might be a reasonable non-broken output for this?
26351 ## This is an edge case unlikely to be seen in production
26352 ## that I am not wasting more time on this right now.
26354 Never serialize a-tag as html, no matter what attributes it has
26356 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26358 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26360 [http://boo.org http://boohoo.org]
26363 # Misnested is an indication that selser can reuse the source but these have
26364 # shown to sneak through on occasion. See T101768.
26365 # The original wikitext here is: [http://test.com [[one]] two three]
26367 Strip span tags added to mark misnested links
26371 <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>
26373 [http://test.com][[one]] two three
26377 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26381 <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|}"]}'>
26393 ## This test verifies the presence and computation of this attribute indirectly
26394 ## by making an edit and ensuring that the serialization is correct (which it would be
26395 ## only if firstWikitextNode is properly set).
26397 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26400 "modes": ["wt2wt"],
26402 [ "div#x", "remove" ],
26403 [ "div", "before", "<div>new</div>" ]
26407 <div id="x">foo</div>
26409 {{echo|<div>boo</div>
26417 {{echo|<div>boo</div>
26423 # --------------------------------------------
26424 # Tests spec'ing wikitext serialization norms |
26425 # --------------------------------------------
26428 1. Categories should always be serialized on their own line
26432 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26440 2. Categories that are part of templates should not introduce a line break
26442 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26444 <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>
26447 # Careful while editing these next 2 tests. There are \u200f characters
26448 # before and after the <link> tags in the HTML and following some
26449 # of the categories in wikitext
26450 # Do not remove these characters in edits.
26452 # As part of the serialization, these bidi characters will get stripped.
26454 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26457 "modes": ["html2wt"],
26458 "scrubWikitext": true
26461 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26462 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26465 [[קטגוריה: שיטות משפט]]
26469 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26472 "modes": ["html2wt"],
26473 "scrubWikitext": true
26476 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26483 Lists: Add space after bullets
26490 <li><span> baz</span></li>
26495 * <span> baz</span>
26499 1. Headings: Add space before/after == (T53744)
26506 <h2><span> baz</span></h2>
26514 == <span> baz</span> ==
26518 2. Headings: Add space before/after == even after hoisted content
26521 "modes": ["html2wt"],
26522 "scrubWikitext": true
26525 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26533 1. Headings: suppress newly created empty headings
26536 "modes": ["html2wt"],
26537 "scrubWikitext": true
26545 2. Headings: don't suppress empty headings if scrubWikitext is false
26555 3. Headings: suppress empty headings on edits
26558 "modes": ["selser"],
26559 "scrubWikitext": true,
26565 ==<span id="x">foo</span>==
26570 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26573 "modes": ["html2wt"],
26574 "scrubWikitext": true
26577 <h2>foo<br/>bar</h2>
26578 <h2>foo <span><br/>bar</span> baz</h2>
26582 == foo <span> bar</span> baz ==
26586 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26589 "modes": ["html2wt"],
26590 "scrubWikitext": false
26593 <h2>foo<br/>bar</h2>
26599 1. WT Quote Tags: suppress newly created empty style tags
26602 "modes": ["html2wt"],
26603 "scrubWikitext": true
26611 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26617 ''<nowiki/>'''''<nowiki/>'''
26621 3. WT Quote Tags: suppress empty style tags on edits
26624 "modes": ["selser"],
26625 "scrubWikitext": true,
26631 '''<span id="x">foo</span>'''
26636 1. Anchors: suppress newly created empty anchors
26639 "modes": ["html2wt"],
26640 "scrubWikitext": true
26643 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26648 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26651 "modes": ["html2wt"],
26652 "scrubWikitext": false
26655 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26661 3. Anchors: suppress empty anchors on edits
26664 "modes": ["selser"],
26665 "scrubWikitext": true,
26671 [[Test|<span id="x">foo</span>]]
26676 3a. Anchors: do not suppress numbered extlinks
26679 "modes": ["wt2wt"],
26680 "scrubWikitext": true
26685 <a rel="mw:ExtLink" href="http://foo.com"></a>
26689 3b. Anchors: do not suppress numbered extlinks
26692 "modes": ["wt2wt"],
26693 "scrubWikitext": true,
26699 [http://foo.com <span id="x">foo</span>]
26705 Normalizations should be restricted to edited content
26708 "modes": ["selser"],
26709 "scrubWikitext": true,
26711 [ "h1", "before", "<i></i>"]
26725 1. Multiple normalizations (html2wt)
26728 "modes": ["html2wt"],
26729 "scrubWikitext": true
26733 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26734 </a><b><i></i></b>x</p>
26743 2. Multiple normalizations (selser)
26746 "modes": ["selser"],
26747 "scrubWikitext": true,
26749 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26753 <span id="x">foo</span>
26755 <span id="x">foo</span>
26761 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26764 "modes": ["html2wt"],
26765 "scrubWikitext": true
26777 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26784 <nowiki> </nowiki>hi
26786 <nowiki> </nowiki> hello
26790 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26793 "modes": ["html2wt"],
26794 "scrubWikitext": true
26803 baz bang</td></tr></table>
26809 bar<span>boo</span></p>
26825 bar<span>boo</span>
26829 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26832 "modes": ["selser"],
26833 "scrubWikitext": true,
26835 [ "p", "html", " a\n b" ]
26846 1. New links that end in spaces
26849 "modes": ["html2wt"],
26850 "scrubWikitext": false
26853 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26854 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26855 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26857 [[Berlin ]]<nowiki/>is the capital of Germany.
26861 [[Boston ]] is a city.
26865 2. New links that end in spaces
26868 "modes": ["html2wt"],
26869 "scrubWikitext": true
26872 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26873 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26874 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26876 [[Berlin]] is the capital of Germany.
26880 [[Boston]] is a city.
26884 1. Table cells with escapable prefixes
26887 "modes": ["html2wt"],
26888 "scrubWikitext": false
26892 <tr><td>a</td></tr>
26893 <tr><td>-</td></tr>
26894 <tr><td>+</td></tr>
26900 |<nowiki>-</nowiki>
26902 |<nowiki>+</nowiki>
26907 2. Table cells with escapable prefixes
26910 "modes": ["html2wt"],
26911 "scrubWikitext": true
26915 <tr><td>a</td></tr>
26916 <tr><td>-</td></tr>
26917 <tr><td>+</td></tr>
26930 3a. Table cells with escapable prefixes after edits
26933 "modes": ["selser"],
26934 "scrubWikitext": true,
26936 [ "table tbody tr:first-child td:first-child", "remove"]
26950 3b. Table cells with escapable prefixes after edits
26953 "modes": ["selser"],
26954 "scrubWikitext": true,
26956 [ "table tbody tr:first-child td:first-child", "html", "-" ],
26963 |<span id="x">foo</span>+
26972 # FIXME: This test will fail because
26973 # normalization doesn't realize that the id attribute
26974 # will eliminate the escapable scenario
26976 4a. Table cells without escapable prefixes after edits
26979 "modes": ["selser"],
26980 "scrubWikitext": true,
26982 [ "#x", "html", "-" ]
26995 ## This tests normalizer's ability to discriminate between
26996 ## cells having identical content.
26998 4b. Table cells without escapable prefixes after edits
27001 "modes": ["selser"],
27002 "scrubWikitext": true,
27004 [ "td", "html", "-" ]
27017 ## This tests normalizer's ability to not be tripped by
27018 ## comments (and whitespace)
27020 4c. Table cells without escapable prefixes after edits
27023 "modes": ["selser"],
27024 "scrubWikitext": true,
27026 [ "table tbody tr td:first-child", "remove" ]
27041 ## This tests normalizer's ability to handle HTML cells
27043 4d. Table cells without escapable prefixes after edits
27046 "modes": ["selser"],
27047 "scrubWikitext": true,
27049 [ "td", "html", "-" ]
27054 <tr><td>a</td></tr>
27058 <tr><td>-</td></tr>
27062 ## T111151 Remove font elements without attributes
27064 5a. font tags without attributes should be dropped in scrubWikitext mode
27067 "modes": ["html2wt"],
27068 "scrubWikitext": true
27072 <font><font>bar</font></font>
27073 <font class="x">boo</font>
27077 <font class="x">boo</font>
27081 5b. font tags should not be dropped without scrubWikitext being enabled
27084 "modes": ["html2wt"],
27085 "scrubWikitext": false
27094 Escape nowiki DOM elements
27098 <nowiki><i>foo</i></nowiki>
27100 <nowiki>''foo''</nowiki>
27103 # This is meant to be an interim fix while we go about figuring out
27104 # how to not introduce these trailing <nowiki/>s in the first place.
27106 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27110 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27112 <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>
27113 <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>
27126 # ---------------------------------------------------
27127 # End of tests spec'ing wikitext serialization norms |
27128 # ---------------------------------------------------
27132 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27140 <td><b>c</b><p>d</p></td>
27158 # -----------------------------------------------------------------
27159 # End of section for Parsoid-only html2wt tests for serialization
27161 # -----------------------------------------------------------------
27163 # -----------------------------------------------------------------
27164 # The following section of tests are primarily to spec behavior of
27165 # the selective serializer. All these tests have manual selser
27166 # changes. The automated selser changes for all tests handle the
27167 # wide variation of changes, but these tests here capture specs
27168 # deterministically.
27169 # ----------------------------------------------------------------
27173 Selser: New comments should not be lost
27176 "modes": ["selser"],
27178 [ "#a", "after", "<!--c1-->" ],
27179 [ "#b", "before", "<!--c2-->" ]
27183 <span id="a">a</span>
27185 <span id="b">b</span>
27187 <span id="a">a</span><!--c1-->
27189 <!--c2--><span id="b">b</span>
27194 Selser: Check for validity of DSR before using it
27197 "modes": ["selser"],
27199 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27203 <span id="a">a</span>
27205 {{DISPLAYTITLE:foo}}
27206 <span id="a">a</span>
27210 1. DOMDiff: Changes to <ref> content should be looked up using id
27213 "modes": ["selser"],
27215 ["#X", "after", "bar"],
27216 ["#Y", "after", "baz"]
27220 X <ref><span id="X">foo</span></ref>
27223 <ref name="a"><span id="Y">foo</span></ref>
27226 X <ref><span id="X">foo</span>bar</ref>
27229 <ref name="a"><span id="Y">foo</span>baz</ref>
27234 2. DOMDiff: Changes to <ref> content should be looked up using id
27237 "modes": ["selser"],
27239 ["#Z", "after", "bar"]
27243 A <ref>foo bar for a</ref>
27244 B <ref group="X" name="b" />
27248 <references group="X">
27249 <ref name="b"><span id="Z">foo</span></ref>
27252 A <ref>foo bar for a</ref>
27253 B <ref group="X" name="b" />
27257 <references group="X">
27258 <ref name="b"><span id="Z">foo</span>bar</ref>
27263 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27266 "modes": ["selser"],
27268 [ "div:first-child", "text", "bar" ]
27272 <div style="{{1x|color:red;}}%">foo</div>
27274 <div style="{{1x|color:red;}}%">bar</div>
27287 <li class="mw-empty-elt"></li>
27288 <li class="mw-empty-elt"></li>
27296 [[File:Thumb.png|thumb]]
27298 <div class="thumb tright">
27299 <div class="thumbinner" style="width:137px;"><a href="/wiki/File:Thumb.png" class="image"><img alt="Thumb.png" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a>
27300 <div class="thumbcaption">
27301 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27308 unclosed internal link XSS (T137264)
27310 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27312 <p>[[#<script>alert(1)</script>|
27315 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>