1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
36 # You can also set the following parser properties via test options:
37 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
38 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic
40 # For testing purposes, temporary articles can created:
41 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
42 # where '/' denotes a newline.
44 # This is the standard article assumed to exist.
81 MediaWiki:bad image list
83 * [[File:Bad.jpg]] except [[Nasty page]]
111 Template:echo_with_span
117 Template:echo_with_div
130 Template:table_attribs
133 |</noinclude>style="color:red;"|Foo
137 Template:table_attribs_2
140 |</noinclude>style="color:red;"|Foo
145 Template:table_attribs_3
148 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
152 Template:table_attribs_4
154 | style="background-color:#DC241f;" width="10px" |
158 Template:table_attribs_5
161 |</noinclude>style="color:red;"||Bar
165 Template:table_attribs_6
167 style="background: <nowiki>
174 Template:table_attribs_7
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
181 Template:table_header_cells
183 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
189 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
193 Template:PartialTable
200 Template:image_attribs
203 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
206 ## See T48811 for details
208 Template:mixed_attr_content_template
210 style="color:red;" title="T48811"
216 Template:definition_list
263 Template:EmptyTRWithHTMLAttrTest
266 <tr align="center"></tr>
267 <tr><td>foo</td></tr>
268 <tr align="center"></tr>
269 <tr><td>bar</td></tr>
286 This is a simple paragraph.
288 <p>This is a simple paragraph.
293 Paragraphs with extra newline spacing
316 Paragraphs with newline spacing with comment lines in between
324 <!--foo--><!--More than 1 comment, still stripped-->
328 <!--foo--> <!----> <!-- bar -->
389 Paragraphs with newline spacing with non-empty white-space lines in between
416 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
424 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
463 Extra newlines: More paragraphs with indented comment
478 Extra newlines followed by heading
493 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
494 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
497 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
502 Extra newlines between heading and content are swallowed
510 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
511 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
518 http://fr.wikipedia.org/wiki/🍺
519 <!-- EasterEgg we love beer, better be able be able to link to it -->
521 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
525 # Note that the html+tidy output removes the spaces after the <li>,
526 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
527 # This is an issue for all tests with lists. We intentionally do
528 # *not* add html+tidy clauses for these, as we don't want to
529 # document/test the broken behavior. (Parsoid matches the non-tidy
530 # output in these cases.)
539 <li> Item 2</li></ul>
547 * plain''italic''plain
548 * plain''italic''plain''italic''plain
549 * plain'''bold'''plain
550 * plain'''bold'''plain'''bold'''plain
551 * plain''italic''plain'''bold'''plain
552 * plain'''bold'''plain''italic''plain
553 * plain''italic'''bold-italic'''italic''plain
554 * plain'''bold''bold-italic''bold'''plain
555 * plain'''''bold-italic'''italic''plain
556 * plain'''''bold-italic''bold'''plain
557 * plain''italic'''bold-italic'''''plain
558 * plain'''bold''bold-italic'''''plain
559 * plain l'''italic''plain
560 * plain l''''bold''' plain
563 <li> plain<i>italic</i>plain</li>
564 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
565 <li> plain<b>bold</b>plain</li>
566 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
567 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
568 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
569 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
570 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
571 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
572 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
573 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
574 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
575 <li> plain l'<i>italic</i>plain</li>
576 <li> plain l'<b>bold</b> plain</li></ul>
580 # this example taken from the [[simple:Moon]] article (bug 47326)
582 Italics and possessives (1)
584 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
586 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
590 # this example taken from [[en:Flaming Pie]] (bug 49926)
592 Italics and possessives (2)
594 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
596 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
600 # this example taken from [[en:Dictionary]] (bug 49926)
602 Italics and possessives (3)
604 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
606 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
612 ### 2-quote opening sequence tests
615 Italics and bold: 2-quote opening sequence: (2,2)
624 Italics and bold: 2-quote opening sequence: (2,3)
633 Italics and bold: 2-quote opening sequence: (2,4)
643 # same html as previous, but wikitext adjusted to match parsoid html2wt
645 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
647 ''foo<nowiki>''</nowiki>''
653 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
655 Italics and bold: 2-quote opening sequence: (2,5)
668 # same html as previous, but wikitext adjusted to match parsoid html2wt
670 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
672 ''foo'''''<nowiki/>'''
683 ### 3-quote opening sequence tests
687 Italics and bold: 3-quote opening sequence: (3,2)
696 Italics and bold: 3-quote opening sequence: (3,3)
705 Italics and bold: 3-quote opening sequence: (3,4)
713 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
715 Italics and bold: 3-quote opening sequence: (3,5)
728 # same html as previous, but wikitext adjusted to match parsoid html2wt
730 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
732 '''foo'''''<nowiki/>''
743 ### 4-quote opening sequence tests
747 Italics and bold: 4-quote opening sequence: (4,2)
757 # same html as previous, but wikitext adjusted to match parsoid html2wt
759 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
761 <nowiki>''</nowiki>''foo''
768 Italics and bold: 4-quote opening sequence: (4,3)
777 Italics and bold: 4-quote opening sequence: (4,4)
787 # same html as previous, but wikitext adjusted to match parsoid html2wt
789 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
797 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
799 Italics and bold: 4-quote opening sequence: (4,5)
808 <p>'<b>foo</b><i></i>
812 # same html as previous, but wikitext adjusted to match parsoid html2wt
814 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
816 '<nowiki/>'''foo'''''<nowiki/>''
821 <p>'<b>foo</b><i></i>
827 ### 5-quote opening sequence tests
831 Italics and bold: 5-quote opening sequence: (5,2)
841 # same html as previous, but wikitext adjusted to match parsoid html2wt
843 Italics and bold: 5-quote opening sequence: (5,2+3)
852 Italics and bold: 5-quote opening sequence: (5,3)
862 # same html as previous, but wikitext adjusted to match parsoid html2wt
864 Italics and bold: 5-quote opening sequence: (5,3+2)
873 Italics and bold: 5-quote opening sequence: (5,4)
879 <p><i><b>foo'</b></i>
884 Italics and bold: 5-quote opening sequence: (5,5)
893 Italics and bold: 5-quote opening sequence: (5,6)
897 <p><i><b>foo'</b></i>
902 ### multiple quote sequences in a line
905 Italics and bold: multiple quote sequences: (2,4,2)
911 <p><i>foo'<b>bar</b></i>
916 # same html as previous, but wikitext adjusted to match parsoid html2wt
918 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
920 ''foo'<nowiki/>'''bar'''''
922 <p><i>foo'<b>bar</b></i>
928 Italics and bold: multiple quote sequences: (2,4,3)
934 <p><i>foo'<b>bar</b></i>
939 # same html as previous, but wikitext adjusted to match parsoid html2wt
941 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
943 ''foo'<nowiki/>'''bar'''''
945 <p><i>foo'<b>bar</b></i>
951 Italics and bold: multiple quote sequences: (2,4,4)
957 <p><i>foo'<b>bar'</b></i>
962 # same html as previous, but wikitext adjusted to match parsoid html2wt
964 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
966 ''foo'<nowiki/>'''bar'<nowiki/>'''''
968 <p><i>foo'<b>bar'</b></i>
973 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
975 Italics and bold: multiple quote sequences: (3,4,2)
984 <p><b>foo'</b>bar<i></i>
988 # same html as previous, but wikitext adjusted to match parsoid html2wt
990 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
994 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
999 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1004 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1006 Italics and bold: multiple quote sequences: (3,4,3)
1015 <p><b>foo'</b>bar<b></b>
1019 # same html as previous, but wikitext adjusted to match parsoid html2wt
1021 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1023 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1028 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1033 ### other quote tests
1036 Italics and bold: other quote tests: (2,3,5)
1038 ''this is about '''foo's family'''''
1040 <p><i>this is about <b>foo's family</b></i>
1046 Italics and bold: other quote tests: (2,(3,3),2)
1048 ''this is about '''foo's''' family''
1050 <p><i>this is about <b>foo's</b> family</i>
1056 Italics and bold: other quote tests: (3,2,3,2)
1060 '''this is about ''foo'''s family''
1062 <p><b>this is about <i>foo</i></b><i>s family</i>
1067 # same html as previous, but wikitext adjusted to match parsoid html2wt
1069 Italics and bold: other quote tests: (3,2,3+2+2,2)
1071 '''this is about ''foo'''''<nowiki/>''s family''
1073 <p><b>this is about <i>foo</i></b><i>s family</i>
1079 Italics and bold: other quote tests: (3,2,3,3)
1081 '''this is about ''foo'''s family'''
1083 <p>'<i>this is about </i>foo<b>s family</b>
1089 Italics and bold: other quote tests: (3,(2,2),3)
1091 '''this is about ''foo's'' family'''
1093 <p><b>this is about <i>foo's</i> family</b>
1099 Italicized possessive
1101 The ''[[Main Page]]'''s talk page.
1103 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1106 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1110 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1111 (Requires tidy for PHP parser output to be fixed up)
1113 parsoid=wt2html,wt2wt
1130 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1131 <td><i>a</i></td><td><i>b</i></td></tr>
1140 Non-html5 tags should be accepted
1142 <center>''foo''</center>
1144 <font>''foo''</font>
1145 <strike>''foo''</strike>
1148 <center><i>foo</i></center>
1149 <p><big><i>foo</i></big>
1150 <font><i>foo</i></font>
1151 <strike><i>foo</i></strike>
1157 <wbr> is valid wikitext (bug 52468)
1165 # <strike> is HTML4, <s> is HTML4/5.
1167 <s> or <strike> for strikethrough
1169 <strike>strike</strike>
1173 <p><strike>strike</strike>
1181 Text-level semantic html elements in wikitext
1184 <strong>text</strong>
1200 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1207 <strong>text</strong>
1223 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1231 # test cases taken from
1232 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1234 Ruby markup (W3C-style)
1236 ; Mono-ruby for individual base characters
1237 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1239 : <ruby>今日<rt>きょう</rt></ruby>
1241 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1243 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1245 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1247 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1248 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1249 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1252 <dl><dt> Mono-ruby for individual base characters</dt>
1253 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1254 <dt> Group ruby</dt>
1255 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1256 <dt> Jukugo ruby</dt>
1257 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1258 <dt> Inline ruby</dt>
1259 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1260 <dt> Double-sided ruby</dt>
1261 <dd> <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1263 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1264 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1265 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1270 # The next two test different paths in the sanitizer.
1272 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1274 <blockquote|>a</blockquote>
1276 <b→> doesn't terminate </b→>
1278 <bä> doesn't terminate </bä>
1280 <boo> doesn't terminate </boo>
1282 <s.foo> doesn't terminate </s.foo>
1286 <p><blockquote|>a</blockquote>
1287 </p><p><b→> doesn't terminate </b→>
1288 </p><p><bä> doesn't terminate </bä>
1289 </p><p><boo> doesn't terminate </boo>
1290 </p><p><s.foo> doesn't terminate </s.foo>
1291 </p><p><sub-ID#1>
1295 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1296 # If the non-word-character tag made it through the sanitizer, tidy
1297 # would munge it up.
1299 Non-word characters don't terminate tag names + tidy
1301 <blockquote|>a</blockquote>
1303 <b→> doesn't terminate </b→>
1305 <bä> doesn't terminate </bä>
1307 <boo> doesn't terminate </boo>
1309 <s.foo> doesn't terminate </s.foo>
1313 <p><blockquote|>a</p>
1314 <p><b→> doesn't terminate </b→></p>
1315 <p><bä> doesn't terminate </bä></p>
1316 <p><boo> doesn't terminate </boo></p>
1317 <p><s.foo> doesn't terminate </s.foo></p>
1318 <p><sub-ID#1></p>
1322 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1323 ### This checks that HTML5 tags (with non-word characters in the tag
1324 ### name) make it safely through the parser -- the Sanitizer will
1325 ### munge them later, as it should.
1328 Non-word characters are valid in extension tags (T19663)
1339 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1343 Isolated close tags should be treated as literal text (bug 52760)
1351 <p><s.foo>s</p>
1353 <p><s.foo>s</p>
1357 ### Special characters
1361 Bare pipe character (bug 52363)
1370 Bare pipe character from a template (bug 52363)
1379 ### <nowiki> test cases
1383 <nowiki> unordered list
1385 <nowiki>* This is not an unordered list item.</nowiki>
1387 <p>* This is not an unordered list item.
1390 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1396 <nowiki>Lorem ipsum dolor
1404 <p>Lorem ipsum dolor
1413 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1425 :There is not nowiki.
1426 :There is <nowiki>nowiki</nowiki>.
1428 #There is not nowiki.
1429 #There is <nowiki>nowiki</nowiki>.
1431 *There is not nowiki.
1432 *There is <nowiki>nowiki</nowiki>.
1434 <dl><dd>There is not nowiki.</dd>
1435 <dd>There is nowiki.</dd></dl>
1436 <ol><li>There is not nowiki.</li>
1437 <li>There is nowiki.</li></ol>
1438 <ul><li>There is not nowiki.</li>
1439 <li>There is nowiki.</li></ul>
1442 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1443 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1445 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1446 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1448 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1449 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1453 Entities inside <nowiki>
1455 <nowiki><</nowiki>
1462 Entities inside template parameters
1468 <p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&ndash;"}},"i":0}}]}'>–</span></p>
1472 Properly escape nowiki when combined with other wiki markup
1476 <p>* </nowiki> tag</p>
1478 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1482 T93824: Put escaped HTML tags inside nowiki
1486 <p><h2>foo</h2></p>
1488 <nowiki><h2>foo</h2></nowiki>
1492 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1496 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1497 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1498 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1500 This text: L'[[Foo]]
1501 This text: L<nowiki>''</nowiki>[[Foo]]
1502 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1505 # This test fails because wikitext whitespace is not normalized before comparing.
1507 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1511 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1514 This text : L<nowiki>''</nowiki>[[Foo]]
1517 # This test and the next one are html2wt only as they test that incorrect wikitext
1518 # passed in template arguments gets escaped or wrapped in nowikis where required.
1520 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1524 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar"}},"i":0}}]}" about="#mwt1"></span>
1525 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1527 {{echo|foo{{!}}bar}}
1528 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1532 T53961: Output correct nowikis in template arguments
1536 <p><span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [ b"}},"i":0}}]}" about="#mwt1"></span>
1537 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1538 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1539 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1540 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1543 {{echo|<nowiki>a }} b</nowiki>}}
1544 {{echo|<nowiki>a [[ b</nowiki>}}
1545 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1546 {{echo|a <nowiki>}</nowiki>}}
1550 Cases where "!!" needs nowiki protection
1555 <tr><th>this needs protection !! here</th></tr>
1559 <tr><th>this does not need
1560 protection !! here</th></tr>
1564 !<nowiki>this needs protection !! here</nowiki>
1577 Comments and Indent-Pre
1579 <!-- comment 1 --> asdf
1581 <!-- comment 1 --> asdf
1584 <!-- comment 1 --> asdf
1585 <!-- comment 2 -->xyz
1587 <!-- comment 1 --> asdf
1588 <!-- comment 2 --> xyz
1644 asdf<!-- comment 1 -->jkl
1654 <!-- foo --> b <!-- bar -->
1668 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1674 Comment semantics and delimiters
1676 <!-- --><!----><!-----><!------>
1680 <!-- --><!----><!-----><!------>
1684 Comment semantics and delimiters, redux
1686 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1687 -- foo -- funky huh? ... -->
1691 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1692 -- foo -- funky huh? ... -->
1696 Comment semantics and delimiters: directors cut
1698 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1699 everything starting with < followed by !-- until the first -- and > we see,
1700 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1706 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1707 everything starting with < followed by !-- until the first -- and > we see,
1708 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1713 Comment semantics: nesting
1715 <!--<!-- no, we're not going to do anything fancy here -->-->
1720 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1723 # Parsoid closes the unclosed comment, even if it means a slight
1726 Comment semantics: unclosed comment at end
1728 parsoid=wt2html,html2html
1730 <!--This comment will run out to the end of the document
1734 <!--This comment will run out to the end of the document-->
1738 Comment semantics: normalize comments to play nice with XML and browsers
1740 <!-- Browsers --!> think this is closed -->
1741 <!--> This would normally be text -->
1742 <!---> As would this -->
1743 <!-- XML doesn't like trailing dashes -------->
1744 <!-- Nor doubled hyphens -- anywhere in the data -->
1745 But this is not a comment.
1747 <p>But this is not a comment.
1750 <!-- Browsers --!> think this is closed -->
1751 <!--> This would normally be text -->
1752 <!---> As would this -->
1753 <!-- XML doesn't like trailing dashes -------->
1754 <!-- Nor doubled hyphens -- anywhere in the data -->
1755 <p>But this is not a comment.</p>
1759 Comment semantics: round-trip even text which contains encoded -->
1761 <!-- hello & goodbye - > --> --&gt; --&xx -->
1763 <!-- hello & goodbye - > --> --&gt; --&xx -->
1767 Comment in template title
1776 Comment on its own line post-expand
1788 Comment on its own line post-expand with non-significant whitespace
1800 Multiple comments should still parse as SOL-transparent
1802 parsoid=wt2html,wt2wt
1805 <!--c2--><!--c3--><!--c4-->*b
1814 <!--c2--><!--c3--><!--c4-->
1821 ### paragraph wrapping tests
1836 Block tag on one line (<div>)
1852 Block tag on one line (<blockquote>)
1854 a <blockquote>foo</blockquote>
1858 a <blockquote>foo</blockquote>
1870 Block tag on both lines (<div>)
1887 Block tag on both lines (<blockquote>)
1889 a <blockquote>foo</blockquote>
1891 b <blockquote>foo</blockquote>
1893 a <blockquote>foo</blockquote>
1894 b <blockquote>foo</blockquote>
1908 Multiple lines without block tags
1932 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1933 # So, we have a separate section for Parsoid. We don't want
1934 # to mimic this stripping behavior in Parsoid. It affects
1935 # editing experience and also requires us to maintain additional
1938 Empty lines between lines with block tags
1976 <div data-parsoid='{"stx":"html"}'></div>
1979 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1982 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1984 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1987 <div data-parsoid='{"stx":"html"}'>e</div>
1990 ## PHP parser emits output which is broken
1992 Unclosed HTML p-tags should be handled properly
2005 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2010 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2011 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2014 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2018 a [[Category:A1]] [[Category:A2]]
2023 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2027 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2033 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2037 ### Preformatted text
2046 And a [[Main Page|link]]
2052 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2057 Tabs don't trigger preformatted text
2061 This is preformatted text.
2067 <pre>This is preformatted text.
2072 preformatted text.</p>
2073 <pre>This is preformatted text.
2078 Space before tab needs nowiki pre protection
2084 <nowiki> </nowiki> a
2088 Ident preformatting with inline content
2099 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2116 Regression with preformatted in <center>
2130 Bug 52763: Preformatted in <blockquote>
2136 indented cell (no pre-wrapping!)
2146 <p> indented cell (no pre-wrapping!)
2154 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2171 Bug 15491: <ins>/<del> in blockquote
2174 Foo <del>bar</del> <ins>baz</ins> quux
2178 <p>Foo <del>bar</del> <ins>baz</ins> quux
2184 # Note that the p-wrapping is newline sensitive, which could be
2185 # considered a bug: tidy will wrap only the 'Foo' in the example
2186 # below in a <p> tag. (see comment 23-25 of bug #6200)
2188 Bug 15491: <ins>/<del> in blockquote (2)
2190 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2193 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2199 <del>bar</del> <ins>baz</ins> quux</blockquote>
2203 <pre> with attributes (bug 3202)
2205 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2207 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2212 <pre> with width attribute (bug 3202)
2214 <pre width="8">Narrow screen goodies</pre>
2216 <pre width="8">Narrow screen goodies</pre>
2221 <pre> with forbidden attribute (bug 3202)
2223 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2225 <pre width="8">Narrow screen goodies</pre>
2230 Entities inside <pre>
2239 <pre> with forbidden attribute values (bug 3202)
2241 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2243 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2248 <nowiki> inside <pre> (bug 13238)
2256 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2264 <pre><nowiki>Foo</nowiki></pre>
2269 <nowiki> inside of #tag:pre
2271 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2273 <pre>Foo →bar</pre>
2276 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"#tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2280 <nowiki> and <pre> preference (first one wins)
2309 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2311 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2314 <p><span typeof="mw:Nowiki">
2323 </pre> inside nowiki
2325 <nowiki></pre></nowiki>
2331 # Parsoid doesn't strip empty tags, like Tidy does.
2333 Empty pre; pre inside other HTML tags (bug 54946)
2335 parsoid=wt2html,wt2wt
2366 HTML pre followed by indent-pre
2376 # Note that tidy removes the empty <p> tags from the start and end.
2377 # Parsoid does not, by design.
2381 <p><pre>foo</pre></p>
2387 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2391 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2399 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2409 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2421 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2442 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2446 {{echo| foo}}{{echo| bar}}
2451 {{echo|<!--cmt--> foo}}
2453 <!--cmt-->{{echo| foo}}
2455 {{echo|{{echo| }}bar}}
2473 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2510 Pres with newline attributes
2515 <pre class="one two">hi</pre>
2519 two" data-parsoid='{"stx":"html"}'>hi</pre>
2523 Things that look like <pre> tags aren't treated as such
2525 Barack Obama <President> of the United States
2526 <President></President>
2528 <p>Barack Obama <President> of the United States
2529 <President></President>
2534 Handle broken pre-like tags (bug 64025)
2538 {{echo|<pre <pre>x</pre>}}
2540 <table><pre </table>
2543 <table><pre </table>
2551 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2560 Parsoid: handle pre with space after attribute
2564 <pre style="width:50%;" >{{echo|foo}}</pre>
2566 <pre style="width:50%;">{{echo|foo}}</pre>
2569 <pre style="width:50%;">{{echo|foo}}</pre>
2572 # TODO / maybe: fix wt2wt for this
2574 Parsoid: Don't paragraph-wrap fosterable content
2600 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2628 #--------------------------------------------------------------------
2629 # Transclusion parameter whitespace stripping tests
2630 # Behavior is different for positional and named parameters
2631 #--------------------------------------------------------------------
2633 Templates: Strip leading and trailing whitespace from named-param values
2637 {{echo|1= {{echo|b}} }}
2650 <ul><li> d</li></ul>
2655 Templates: Don't strip whitespace from positional-param values
2659 {{echo|{{echo|b}} }}
2691 <ul><li> f</li></ul>
2699 Templates: Handle empty comment-and-ws-only lines correctly
2702 <!--should be ignored-->
2703 <!--should be ignored as well-->
2712 Templates: Handle comments in the target
2715 <!-- should be ignored -->
2718 {{echo<!-- should be ignored -->
2721 {{echo<!-- should be ignored -->|foo}}
2723 {{<!-- should be ignored -->echo|foo}}
2725 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2727 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2729 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo<!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2731 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2735 Templates: Handle comments in parameter names (bug 67657)
2738 <!-- should be ignored -->
2742 <!-- should be ignored -->
2745 {{echo|1<!-- should be ignored -->=foo}}
2747 {{echo|<!-- should be ignored -->1=foo}}
2749 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2751 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
2753 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1<!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
2755 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"<!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
2759 Templates: Other wikitext in parameter names (bug 67657)
2763 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2769 #--------------------------------------------------------------------
2770 # Transclusion parameter escaping tests
2771 #--------------------------------------------------------------------
2773 Templates: Parsoid parameter escaping test 1
2775 {{echo|[foo]|{{echo|[bar]}}}}
2779 <p about="#mwt1" typeof="mw:Transclusion"
2780 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2784 Parsoid: Pipes in external links in template parameter
2786 {{echo|[{{echo|http://example.com}} link]}}
2788 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2790 <p><a rel="mw:ExtLink" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
2794 Parsoid: pipe in transclusion parameter
2796 {{echo|http://foo.com/a|b}}
2798 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2800 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2801 typeof="mw:Transclusion"
2802 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&#124;b"}},"i":0}}]}'>http://foo.com/a|b</a></p>
2806 Parsoid: Pipe in external link target and content in template parameter
2808 parsoid=html2wt,wt2wt
2810 {{echo|[http://foo.com/a|b a|b]}}
2812 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2814 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2815 typeof="mw:Transclusion"
2816 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2817 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2821 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2825 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2827 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
2831 Templates: Don't escape already nowiki-escaped text in template parameters
2833 parsoid=html2wt,wt2wt
2835 {{echo|foo<nowiki>|</nowiki>bar}}
2836 {{echo|<nowiki><div></nowiki>}}
2837 {{echo|<nowiki></nowiki>}}
2839 <p>foo|bar <div></p>
2841 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
2842 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&lt;div&gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity"><</span>div<span typeof="mw:Entity">></span></span>
2843 <span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
2849 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2851 parsoid=html2wt,wt2wt
2853 {{echo|{{echo|1=bar}}}}
2857 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
2862 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2868 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
2873 Templates: Preserve blank parameter names
2879 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2883 Templates: Preserve blank parameter names in other positions
2885 {{blank_param|bar|=foo}}
2889 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
2894 ### Parsoid-centric tests for testing RT edge cases for pre
2898 1a. Indent-Pre and Comments
2911 1b. Indent-Pre and Comments
2924 1c. Indent-Pre and Comments
2937 1d. Indent-Pre and Comments
2938 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2951 2a. Indent-Pre and tables
2972 2b. Indent-Pre and tables
2988 2c. Indent-Pre and tables (bug 42252)
3005 2d. Indent-Pre and tables
3022 <tbody><tr><td> b</td></tr>
3027 2e. Indent-Pre and table-line syntax
3040 2f. Indent-pre started by table-line syntax
3059 3a. Indent-Pre and block tags (single-line html)
3063 c <blockquote> foo </blockquote>
3068 c <blockquote> foo </blockquote>
3069 <pre><span> foo </span>
3072 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3073 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3074 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3075 <pre><span> foo </span>
3092 3b. Indent-Pre and block tags (multi-line html)
3097 <pre>a <span>foo</span>
3102 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3103 b <div data-parsoid='{"stx":"html"}'> foo </div>
3113 3c. Indent-Pre and block tags (pre-content on separate line)
3177 4. Indent-Pre and extension tags
3188 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3192 Render paragraphs when indent-pre is suppressed in blocklevels
3209 4. Multiple spaces at start-of-line
3227 ## NOTE: the leading white-space chars on empty line are significant
3229 5a. White-space in indent-pre
3241 ## NOTE: the leading white-space chars on empty line are significant
3243 5b. White-space in indent-pre
3262 5c. White-space in indent-pre
3275 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3298 7a. Indent-pre and category links
3300 parsoid=wt2html,wt2wt
3302 [[Category:foo]] <!-- No pre-wrapping -->
3303 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3306 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3307 <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 -->
3310 ## We used to, but no longer wt2wt this test since the default serializer
3311 ## will normalize all categories to serialize on their own line.
3312 ## This wikitext usage is going to be fairly uncommon in production and
3313 ## selser will take care of preserving formatting in those scenarios.
3315 7b. Indent-pre and category links
3320 [[Category:foo]] {{echo|b}}
3322 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3323 <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>
3327 Indent-Pre: Newlines in comments shouldn't affect sol state
3341 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3345 HTML-pre: 1. embedded newlines
3380 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3382 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3386 <pre data-parsoid='{"stx":"html"}'>
3391 <pre data-parsoid='{"stx":"html"}'>
3399 HTML-pre: big spaces
3435 <pre data-parsoid='{"stx":"html"}'>
3454 HTML-pre: 2: indented text
3467 HTML-pre: 3: other wikitext
3486 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3495 ### Definition lists
3502 <dl><dt> name </dt>
3503 <dd> Definition</dd></dl>
3508 Definition list for indentation only
3512 <dl><dd> Indented text</dd></dl>
3517 Definition list with no space
3522 <dd>Definition</dd></dl>
3527 Definition list with URL link
3529 ; http://example.com/ : definition
3531 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3532 <dd> definition</dd></dl>
3537 Definition list with bracketed URL link
3539 ;[http://www.example.com/ Example]:Something about it
3541 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3542 <dd>Something about it</dd></dl>
3547 Definition list with wikilink containing colon
3549 ; [[Help:FAQ]]: The least-read page on Wikipedia
3551 <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>
3552 <dd> The least-read page on Wikipedia</dd></dl>
3556 # At Brion's and JeLuF's insistence... :)
3558 Definition list with news link containing colon
3560 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3562 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3563 <dd> This isn't even a real newsgroup!</dd></dl>
3566 <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>
3570 Malformed definition list with colon
3572 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3574 <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>
3579 Definition lists: colon in external link text
3581 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3583 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3584 <dd> OK, I made that up</dd></dl>
3589 Definition lists: colon in HTML attribute
3591 ;<b style="display: inline">bold</b>
3593 <dl><dt><b style="display: inline">bold</b></dt></dl>
3598 Definition lists: self-closed tag
3600 ;one<br/>two : two-line fun
3602 <dl><dt>one<br />two </dt>
3603 <dd> two-line fun</dd></dl>
3608 Bug 11748: Literal closing tags
3612 <dd>test test test test test</dd>
3614 <dd>test test test test test</dd>
3619 <dd>test test test test test</dd>
3621 <dd>test test test test test</dd>
3627 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3630 ; term : description
3635 <dl><dt> term </dt>
3636 <dd> description</dd></dl>
3637 <ul><li> unordered</li></ul>
3644 Definition list with empty definition and following paragraph
3656 Nested definition lists using html syntax
3665 Definition Lists: No nesting: Multiple dd's
3678 Definition Lists: Indentation: Regular
3686 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3691 Definition Lists: Indentation: Missing 1st level
3697 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3702 Definition Lists: Indentation: Multi-level indent
3706 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3711 Definition Lists: Hacky use to indent tables
3718 should be left alone
3720 <dl><dd><dl><dd><table>
3725 </td></tr></table></dd></dl></dd></dl>
3727 should be left alone
3732 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3740 should be left alone
3743 <dl><dd><dl><dd><table><tr>
3746 </tr></table><!-- bar --></dd></dl></dd></dl>
3748 should be left alone</p>
3752 Definition Lists: Hacky use to indent tables, with comment before table
3758 <dl><dd><dl><dd><!-- foo --><table><tr>
3760 </tr></table></dd></dl></dd></dl>
3763 # The trailing whitespace in this test is to catch a regression in
3764 # Parsoid after T54473.
3766 Definition Lists: Hacky use to indent tables (WS-insensitive)
3775 </td></tr></table></dd></dl>
3779 <tbody><tr><td>a</td></tr>
3780 </tbody></table> </dd></dl>
3783 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3784 ## as an empty dt item. It also ignores all but the last ";" when followed
3785 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3786 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3789 ## Ex: ";;t2 ::d2" is transformed into:
3801 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3802 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3813 ## All Parsoid only definition list tests have this difference.
3815 ## See also: https://phabricator.wikimedia.org/T8569
3816 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3819 Table / list interaction: indented table with lists in table contents
3834 <ul><li> b</li></ul>
3838 <ul><li> d</li></ul>
3839 </td></tr></table></dd></dl>
3844 Table / list interaction: lists nested in tables nested in indented lists
3867 </td></tr></table></dd></dl>
3874 Definition Lists: Nesting: Multi-level (Parsoid only)
3904 Definition Lists: Nesting: Test 2 (Parsoid only)
3931 Definition Lists: Nesting: Test 3 (Parsoid only)
3974 Definition Lists: Nesting: Test 4
3979 <dl><dd><dl><dd><dl><dt>t3</dt>
3980 <dd>d3</dd></dl></dd></dl></dd></dl>
3985 ## The Parsoid team believes the following three test exposes a
3986 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3987 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3988 ## It also exposes a "misfeature" in tidy, which doesn't like
3989 ## <dl> tags with a single <dt> child; it converts the <dt> into
3990 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3992 Definition Lists: Mixed Lists: Test 1
3998 <dl><dd><dl><dt><ul><li> foo</li>
3999 <li> bar</li></ul></dt></dl>
4000 <dl><dt> baz</dt></dl></dd></dl>
4035 Definition Lists: Mixed Lists: Test 2
4040 <ul><li><dl><dd> d1</dd>
4041 <dd> d2</dd></dl></li></ul>
4047 Definition Lists: Mixed Lists: Test 3
4052 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4053 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4059 Definition Lists: Mixed Lists: Test 4
4064 <ul><li><dl><dt>d1 </dt>
4067 <dd>d4</dd></dl></li></ul>
4073 Definition Lists: Mixed Lists: Test 5
4079 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4085 Definition Lists: Mixed Lists: Test 6
4090 <ol><li><ul><li><dl><dd>d1
4091 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4097 Definition Lists: Mixed Lists: Test 7
4102 <dl><dd><ul><li> d1</li>
4103 <li> d2</li></ul></dd></dl>
4109 Definition Lists: Mixed Lists: Test 8
4114 <dl><dd><ul><li> d1</li></ul>
4115 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4121 Definition Lists: Mixed Lists: Test 9
4125 <ul><li><dl><dt>foo </dt>
4126 <dd>bar</dd></dl></li></ul>
4132 Definition Lists: Mixed Lists: Test 10
4136 <ul><li><ol><li><dl><dt>foo </dt>
4137 <dd>bar</dd></dl></li></ol></li></ul>
4141 # The Parsoid team disagrees with the PHP parser's seemingly-random
4142 # rules regarding dd/dt on the next two tests. Parsoid is more
4143 # consistent, and recognizes the shared nesting and keeps the
4144 # still-open tags around until the nesting is complete.
4145 # (And tidy again converts <dt> to <dd> before 'bar'.)
4148 Definition Lists: Mixed Lists: Test 11
4153 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4154 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4155 <dl><dt>boo </dt>
4156 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4211 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4212 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4216 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4217 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4226 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4228 # * The test is wrong, there are two colons where there should be :;
4229 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4231 Definition Lists: Weird Ones: Test 1
4233 *#;*::;; foo : bar (who uses this?)
4235 <ul><li><ol><li><dl><dt> foo </dt>
4236 <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>
4255 <dt>bar (who uses this?)</dt>
4287 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4288 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4300 Definition Lists: colons occurring in tags
4318 <dt><span>a:b</span></dt>
4345 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4347 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4348 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4349 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4350 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4352 <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>
4353 <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>
4354 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4358 Definition Lists: colons and tables 1
4370 </td></tr></table></dd></dl>
4374 </td></tr></table></dd></dl>
4378 # Parsoid's output (as documented below) differs from php's in this case.
4379 # This is probably a bug. If we fixup parsoid to match php's output, the
4380 # above test should pass and the below test case can be removed. It is
4381 # unclear which output is more desirable.
4384 Definition Lists: colons and tables 2
4396 </td></tr></table></dd>
4400 </td></tr></table></dd></dl>
4404 Definition Lists: template interaction
4406 ::{{definition_list}}
4409 ::{{definition_list}}
4414 <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">
4415 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4417 <dl><dd data-parsoid='{}'>one
4418 <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">
4419 </span><dd about="#mwt2">two
4421 <dd>three</dd></dl></dd>
4422 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4430 External links: non-bracketed
4432 Non-bracketed: http://example.com
4434 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4438 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4440 External links: numbered
4442 Numbered: [http://example.com]
4443 Numbered: [http://example.net]
4444 Numbered: [http://example.com]
4446 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4447 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4448 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4451 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4452 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4453 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4457 External links: specified text
4459 Specified text: [http://example.com link]
4461 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4466 External links: trail
4468 Linktrails should not work for external links: [http://example.com link]s
4470 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4475 External links: dollar sign in URL
4477 http://example.com/1$2345
4479 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4483 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4485 External links: dollar sign in URL (autonumber)
4487 [http://example.com/1$2345]
4489 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4492 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4496 External links: open square bracket forbidden in URL (bug 4377)
4498 parsoid=wt2html,wt2wt,html2html
4500 http://example.com/1[2345
4502 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4505 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4509 External links: open square bracket forbidden in URL (named) (bug 4377)
4511 parsoid=wt2html,html2html
4513 [http://example.com/1[2345]
4515 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4518 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4521 # parsoid adds a space before the link name
4523 External links: open square bracket forbidden in URL (named) (bug 4377)
4526 [http://example.com/1 [2345]
4528 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4533 External links: nowiki in URL link text (bug 6230)
4535 [http://example.com/ <nowiki>''example site''</nowiki>]
4537 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4542 External links: newline forbidden in text (bug 6230 regression check)
4544 [http://example.com/ first
4547 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4553 External links: Pipe char between url and text
4555 [http://example.com | link]
4557 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4562 External links: protocol-relative URL in brackets
4564 [//example.com/ Test]
4566 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4570 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4572 External links: protocol-relative URL in brackets without text
4576 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4579 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4583 External links: protocol-relative URL in free text is left alone
4587 <p>//example.com/Foo
4592 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4594 foo//example.com/Foo
4596 <p>foo//example.com/Foo
4601 External links: with no contents
4603 [http://en.wikipedia.org/wiki/Foo]
4605 [[wikipedia:Foo|Bar]]
4607 [[wikipedia:Foo|<span>Bar</span>]]
4609 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4610 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4611 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4614 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4615 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4616 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4620 External links: Free with trailing punctuation
4630 http://example.com/url_with_(brackets)
4631 (http://example.com/url_without_brackets)
4632 http://example.com/url_with_entity&
4633 http://example.com/url_with_entity&
4634 http://example.com/url_with_entity&
4635 http://example.com/url_with_entity
4636 http://example.com/url_with_entity 
4637 http://example.com/url_with_entity 
4638 http://example.com/url_with_entity<
4639 http://example.com/url_with_entity<
4640 http://example.com/url_with_entity<
4642 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4643 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4644 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4645 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4646 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4647 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4648 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4649 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4650 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4651 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4652 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4653 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4654 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4655 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4656 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4657 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4658 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4659 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4660 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4663 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4664 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4665 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4666 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4667 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4668 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4669 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4670 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4671 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4672 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4673 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4674 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4675 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4676 <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>
4677 <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>
4678 <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>
4679 <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>
4680 <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>
4681 <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>
4685 External links: tricky Parsoid html2html case
4687 parsoid=wt2html,wt2wt,html2html
4689 http://example.com/url_with_entity&amp;
4691 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4694 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4698 External links: Free with trailing quotes (T113666)
4700 '''News:''' Stuff here
4704 <p><b>News:</b> Stuff here
4705 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4708 <p><b>News:</b> Stuff here</p>
4709 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4713 External links: Lone protocols are never linked (T105697)
4732 External links: No preceding word characters allowed (bug 65278)
4734 NOPEhttp://example.com
4735 N0http://example.com
4736 ok:http://example.com
4737 ok-http://example.com
4739 <p>NOPEhttp://example.com
4740 N0http://example.com
4741 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4742 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4747 External links: nofollow domain exception
4749 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4751 <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>.
4758 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4760 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4765 External image from https
4767 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4769 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4774 External image (when not allowed)
4776 wgAllowExternalImages=0
4778 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4780 <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>
4785 Link to non-http image, no img tag
4787 Link to non-http image, no img tag: ftp://example.com/test.jpg
4789 <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>
4794 External links: terminating separator
4796 Terminating separator: http://example.com/thing,
4798 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4803 External links: intervening separator
4805 Intervening separator: http://example.com/1,2,3
4807 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4812 External links: old bug with URL in query
4814 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4816 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4821 External links: old URL-in-URL bug, mixed protocols
4823 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4825 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4829 # Since Parsoid is starting to emit canonical wikitext for links,
4830 # [http://example.com http://example.com] will not RT back to that
4833 External links: URL in text
4837 URL in text: [http://example.com http://example.com]
4839 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4842 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4846 External links: Clickable images
4848 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4850 <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>
4853 <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>
4857 External links: raw ampersand
4859 Old & use: http://x&y
4861 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4866 External links: encoded ampersand
4868 Old & use: http://x&y
4870 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4873 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4877 External links: encoded equals (bug 6102)
4879 http://example.com/?foo=bar
4881 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4884 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4888 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4889 ## does it number them. As discussed in bug 53505, we can identify
4890 ## autonumbered links via CSS.
4894 External links: [raw ampersand]
4896 Old & use: [http://x&y]
4898 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4901 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4904 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4905 # mode will return the [raw ampersand] wikitext
4907 External links: [encoded ampersand]
4909 parsoid=wt2html,wt2wt,html2html
4911 Old & use: [http://x&y]
4913 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4916 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4920 External links: [raw equals]
4922 [http://example.com/?foo=bar]
4924 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4927 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4930 # note that parsoid html is identical to [raw equals] case; so html2wt
4931 # mode will return the [raw equals] wikitext
4933 External links: [encoded equals] (bug 6102)
4935 parsoid=wt2html,wt2wt,html2html
4937 [http://example.com/?foo=bar]
4939 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4942 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4945 # xxx parsoid strips the IDN character, so the round-trip tests will
4946 # obviously fail and are disabled. --cscott
4948 External links: [IDN ignored character reference in hostname; strip it right off]
4950 parsoid=wt2html,wt2wt,html2html
4952 [http://e‌xample.com/]
4954 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4957 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4960 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4961 # Where an external link could easily circumvent the sanitization of the text of
4962 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4963 # test demands a higher standard. That's a bit strange.
4967 # http://example.com -> [http://example.com|http://example.com]
4968 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4970 # The first example is sanitized, but the second is not. Any security benefits
4971 # from this production are trivial to circumvent. Either remove this test and
4972 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4973 # the test accordingly.
4977 # xxx parsoid strips the IDN character, so the round-trip tests will
4978 # obviously fail and are disabled. --cscott
4980 External links: IDN ignored character reference in hostname; strip it right off
4982 parsoid=wt2html,html2html
4984 http://e‌xample.com/
4986 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4989 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4993 External links: www.jpeg.org (bug 554)
4997 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5001 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5003 External links: URL within URL (original bug 2)
5005 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5007 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5010 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5014 BUG 361: URL inside bracketed URL
5016 [http://www.example.com/foo http://www.example.com/bar]
5018 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5023 BUG 361: URL within URL, not bracketed
5025 http://www.example.com/foo?=http://www.example.com/bar
5027 <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>
5032 BUG 289: ">"-token in URL-tail
5034 http://www.example.com/<hello>
5036 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5041 BUG 289: literal ">"-token in URL-tail
5043 http://www.example.com/<b>html</b>
5045 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5048 <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>
5052 BUG 289: ">"-token in bracketed URL
5054 [http://www.example.com/<hello> stuff]
5056 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5061 BUG 289: literal ">"-token in bracketed URL
5063 [http://www.example.com/<b>html</b> stuff]
5065 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5070 BUG 289: literal double quote at end of URL
5072 http://www.example.com/"hello"
5074 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5079 BUG 289: literal double quote in bracketed URL
5081 [http://www.example.com/"hello" stuff]
5083 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5088 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5090 [http://www.example.com test]
5092 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5097 External links: link text with spaces
5099 [http://www.example.com a b c]
5100 [http://www.example.com ''a'' ''b'']
5102 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5103 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5108 External links: wiki links within external link (Bug 3695)
5110 parsoid=wt2html,html2html
5112 [http://example.com [[wikilink]] embedded in ext link]
5114 <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>
5117 <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>
5121 BUG 787: Links with one slash after the url protocol are invalid
5125 [http:/example.com title]
5127 <p>http:/example.com
5128 </p><p>[http:/example.com title]
5133 Bracketed external links with template-generated invalid target
5135 [{{echo|http:/example.com}} title]
5137 <p>[http:/example.com title]
5142 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5144 ''[http://example.com text'']
5145 [http://example.com '''text]'''
5146 ''Something [http://example.com in italic'']
5147 ''Something [http://example.com mixed''''', even bold]'''
5148 '''''Now [http://example.com both''''']
5150 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5151 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5152 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5153 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5154 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5160 Bug 4781: %26 in URL
5162 http://www.example.com/?title=AT%26T
5164 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5167 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5170 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5171 # % is actually legal in HTML5. Any change in output would need testing though.
5173 Bug 4781, 5267: %25 in URL
5175 http://www.example.com/?title=100%25_Bran
5177 <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>
5180 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5184 Bug 4781, 5267: %28, %29 in URL
5186 http://www.example.com/?title=Ben-Hur_%281959_film%29
5188 <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>
5191 <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>
5196 Bug 4781: %26 in autonumber URL
5198 [http://www.example.com/?title=AT%26T]
5200 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5203 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5207 Bug 4781, 5267: %26 in autonumber URL
5209 [http://www.example.com/?title=100%25_Bran]
5211 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5214 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5218 Bug 4781, 5267: %28, %29 in autonumber URL
5220 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5222 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5225 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5230 Bug 4781: %26 in bracketed URL
5232 [http://www.example.com/?title=AT%26T link]
5234 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5237 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5241 Bug 4781, 5267: %25 in bracketed URL
5243 [http://www.example.com/?title=100%25_Bran link]
5245 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5250 Bug 4781, 5267: %28, %29 in bracketed URL
5252 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5254 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5257 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5261 External link containing a period in the anchor. (bug 63947)
5263 [//foo.org/bar#baz. bang]
5265 [//foo.org/bar. bang]
5267 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5268 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5271 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5272 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5276 External link containing a single quote. (bug 63947)
5280 [//foo.org/bar'baz bang]
5282 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5283 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5286 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5287 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5291 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5293 Some [http://example.com/ pretty ''italics'' and stuff]!
5295 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5300 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5302 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5304 <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>
5309 External link containing double-single-quotes with no space separating the url from text in italics
5311 [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]].]
5313 <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>
5316 <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>
5318 <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>
5322 External link with comments in link text
5324 [http://www.google.com Google <!-- comment -->]
5326 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5329 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5333 External link to bare IPv4 address
5335 [http://192.168.0.1 Link]
5337 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5340 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5344 URL-encoding in URL functions (single parameter)
5346 {{localurl:Some page|amp=&}}
5348 <p>/index.php?title=Some_page&amp=&
5353 URL-encoding in URL functions (multiple parameters)
5355 {{localurl:Some page|q=?&=&}}
5357 <p>/index.php?title=Some_page&q=?&amp=&
5364 http://example.com/index.php?foozoid%5B%5D=bar
5366 http://example.com/index.php?foozoid[]=bar
5368 <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>
5369 </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>
5372 <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>
5374 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5378 IPv6 urls, autolink format (T23261)
5380 http://[2404:130:0:1000::187:2]/index.php
5382 Examples from RFC 2373, section 2.2:
5383 * http://[1080::8:800:200C:417A]/unicast
5384 * http://[FF01::101]/multicast
5385 * http://[::1]/loopback
5386 * http://[::]/unspecified
5387 * http://[::13.1.68.3]/ipv4compat
5388 * http://[::FFFF:129.144.52.38]/ipv4compat
5390 Examples from RFC 2732, section 2:
5391 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5392 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5393 * http://[3ffe:2a00:100:7031::1]
5394 * http://[1080::8:800:200C:417A]/foo
5395 * http://[::192.9.5.5]/ipng
5396 * http://[::FFFF:129.144.52.38]:80/index.html
5397 * http://[2010:836B:4179::836B:4179]
5400 <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>
5401 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5403 <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>
5404 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5405 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5406 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5407 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5408 <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>
5409 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5411 <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>
5412 <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>
5413 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5414 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5415 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5416 <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>
5417 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5420 <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>
5422 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5423 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5424 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5425 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5426 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5427 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5428 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5430 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5431 <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>
5432 <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>
5433 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5434 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5435 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5436 <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>
5437 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5441 IPv6 urls, bracketed format (T23261)
5443 [http://[2404:130:0:1000::187:2]/index.php test]
5445 Examples from RFC 2373, section 2.2:
5446 * [http://[1080::8:800:200C:417A] unicast]
5447 * [http://[FF01::101] multicast]
5448 * [http://[::1]/ loopback]
5449 * [http://[::] unspecified]
5450 * [http://[::13.1.68.3] ipv4compat]
5451 * [http://[::FFFF:129.144.52.38] ipv4compat]
5453 Examples from RFC 2732, section 2:
5454 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5455 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5456 * [http://[3ffe:2a00:100:7031::1] 3]
5457 * [http://[1080::8:800:200C:417A]/foo 4]
5458 * [http://[::192.9.5.5]/ipng 5]
5459 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5460 * [http://[2010:836B:4179::836B:4179] 7]
5463 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5464 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5466 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5467 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5468 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5469 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5470 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5471 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5472 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5474 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5475 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5476 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5477 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5478 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5479 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5480 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5483 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5485 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5486 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5487 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5488 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5489 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5490 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5491 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5493 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5494 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5495 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5496 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5497 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5498 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5499 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5500 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5504 Non-extlinks in brackets
5513 [{{echo|foo}} ''bar'']
5514 [{{echo|foo}}l's] errand
5515 [{{echo|foo}}l's errand]
5517 [url=http://example.com]
5518 [http:// bare protocols don't count]
5531 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5532 [http:// bare protocols don't count]
5540 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5541 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5542 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5543 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5544 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5545 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5546 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5547 [http:// bare protocols don't count]</p>
5551 Percent encoding in external links
5553 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5555 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5558 <p><a rel="mw:ExtLink"
5559 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5563 Use url link syntax for links where the content is equal the link target
5567 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5570 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5574 Parenthesis in external links, especially URL links
5578 http://example.com/test)
5580 http://example.com/(test)
5582 http://example.com/((test)
5584 (http://example.com/(test))
5586 (http://example.com/(test)))))
5588 http://example.com/a)b
5590 [http://example.com) foo]
5592 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5593 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5594 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5595 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5596 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5597 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5598 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5599 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5602 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5603 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5604 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5605 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5606 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5607 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5608 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5609 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5613 Parenthesis in external links, w/ transclusion or comment
5615 (http://example.com/{{echo|hi}})
5617 (http://example.com<!-- hi -->)
5619 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5620 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5623 <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>
5625 <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>
5629 Serialize <a> tags with invalid link targets as plain text
5631 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5633 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5634 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5635 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5636 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5639 <nowiki>*</nowiki>text
5640 <nowiki>[[foo]]</nowiki>
5641 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5645 mw:ExtLink -vs- mw:WikiLink (T94723)
5649 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5650 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5651 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5652 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5654 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5655 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5660 [[wikipedia:Foo|Bar]]
5661 [[wikipedia:Foo|Bar]]
5663 [[wikipedia:European_Robin|European Robin]]
5664 [[wikipedia:European_Robin|European Robin]]
5668 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5672 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5674 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5685 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5687 Normal text. '''''Bold italic text.''''' Normal text.
5689 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5690 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5695 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5696 # parser strips. The wikitext contains just the first half of the bold
5699 Unclosed and unmatched quotes
5701 '''''Bold italic text '''with bold deactivated''' in between.'''''
5703 '''''Bold italic text ''with italic deactivated'' in between.'''''
5707 ..spanning two paragraphs (should not work).'''
5709 '''Bold tag left open
5711 ''Italic tag left open
5715 <!-- Unmatching number of opening, closing tags: -->
5716 '''This year''''s election ''should'' beat '''last year''''s.
5718 ''Tom'''s car is bigger than ''Susan'''s.
5720 Plain ''italic'''s plain
5722 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5723 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5724 </p><p><b>Bold text..</b>
5725 </p><p>..spanning two paragraphs (should not work).
5726 </p><p><b>Bold tag left open</b>
5727 </p><p><i>Italic tag left open</i>
5729 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5730 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5731 </p><p>Plain <i>italic'</i>s plain
5734 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5735 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5736 </p><p><b>Bold text..</b>
5737 </p><p>..spanning two paragraphs (should not work).<b></b>
5738 </p><p><b>Bold tag left open</b>
5739 </p><p><i>Italic tag left open</i>
5742 <!-- Unmatching number of opening, closing tags: -->
5743 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5744 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5745 </p><p>Plain <i>italic'</i>s plain
5752 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5755 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5756 # is the bare minimum required by the spec, see:
5757 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5758 # Parsoid team replies: empty table tags are legal in HTML5
5760 A table with no data.
5773 A table with stray table end tags on start tag line (wt2html)
5777 {|style="color: red;"|}
5779 {|style="color: red;" |}
5783 {|style="color: red;"|} id="foo"
5787 {|style="color: red;" |} id="foo"
5791 <table style="color: red;"></table>
5793 <table style="color: red;">
5799 <table style="color: red;" id="foo">
5805 <table style="color: red;" id="foo">
5814 A table with no data (take 2)
5822 # A table with nothing but a caption is invalid XHTML, we might want to render
5823 # this as <p>caption</p>
5824 # Parsoid team replies: table with only a caption is legal in HTML5
5826 A table with nothing but a caption
5834 </caption><tr><td></td></tr></table>
5837 <table><caption> caption</caption></table>
5841 A table with caption with default-spaced attributes and a table row
5844 |+ style="color: red;" | caption1
5850 <caption style="color: red;"> caption1
5859 A table with captions with non-default spaced attributes and a table row
5862 |+style="color: red;"|caption2
5863 |+ style="color: red;"| caption3
5869 <caption style="color: red;">caption2
5871 <caption style="color: red;"> caption3
5880 Table td-cell syntax variations
5884 | foo bar foo || baz
5885 | style='color:red;' | baz
5886 | style='color:red;' || baz
5893 <td> foo bar foo </td>
5896 <td style="color:red;"> baz
5898 <td> style='color:red;' </td>
5926 Simple table but with multiple dashes for row wikitext
5945 Multiplication table
5947 {| border="1" cellpadding="2"
5948 |+Multiplication table
5950 ! × !! 1 !! 2 !! 3
5968 <table border="1" cellpadding="2">
5969 <caption>Multiplication table
6016 Accept "||" in table headings
6031 Accept "!!" in table data
6045 <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>
6050 Accept "||" in indented table headings
6060 </th></tr></table></dd></dl>
6065 Accept "!!" in templates
6079 <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>
6083 Accept "!!" in table headings after newline
6100 <p>b!!c</p></th></tr>
6105 Accept "!!" in table data of mixed wikitext / html syntax
6109 <tr><td>b!!c</td></tr>
6122 <tbody><tr><th>a</th></tr>
6123 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6128 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6145 Accept "| !" at start of line in tables (ignore !-attribute)
6149 | !style="color:red" | bar
6161 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 +/-
6165 |style='color:red;'|+1
6166 |style='color:blue;'|-1
6178 <td style="color:red;">+1
6180 <td style="color:blue;">-1
6204 |rowspan=2| Cell 2, row 1 (and 2)
6215 <td rowspan="2"> Cell 2, row 1 (and 2)
6233 {| bgcolor=#ABCDEF border=2
6238 |the original table again
6246 <table bgcolor="#ABCDEF" border="2">
6254 <td>the original table again
6260 Invalid attributes in table cell (bug 1830)
6274 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6278 | title="foo<nowiki>|</nowiki>" |bar
6279 | title="foo<nowiki>|</nowiki>" bar
6286 <td title="foo|">bar
6288 <td> title="foo|" bar
6293 <tbody><tr><td title="foo">bar</td>
6294 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6295 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6299 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6300 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6301 # *2wt modes will fail.
6303 Table security: embedded pipes
6305 parsoid=wt2html,html2html
6308 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6312 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6313 <td>]" onmouseover="alert(document.cookie)">test
6321 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6325 Element attributes with double ! should not be broken up by <th>
6328 ! hi <div class="!!">ha</div> ho
6333 <th> hi <div class="!!">ha</div> ho
6338 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6343 ! and || in element attributes should not be parsed as <th>/<td>
6346 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6351 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6356 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6360 # FIXME: The output seems broken. Filed as T110268.
6362 ! and || in td attributes should not be parsed as <th>/<td>
6367 | style="color: red !important;" data-contrived="put this here ||" | foo
6372 <td> style="color: red !important;" data-contrived="put this here </td>
6378 <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>
6383 Break on | in element attribute in template
6385 parsoid=wt2html,html2html
6387 {{echo|1=<div class="hi|ho">ha</div>}}
6389 <p>ho">ha</div>
6392 <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>
6396 Indented table markup mixed with indented pre content (proposed in bug 6200)
6401 Text that should be rendered preformatted
6409 <pre>Text that should be rendered preformatted
6418 1. Template-generated table cell attributes and cell content
6423 || {{table_attribs_5}}
6424 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6425 |align=center {{table_attribs}}
6426 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6431 <td style="color:red;">Foo
6433 <td style="color:red;">Foo
6435 <td> style="color:red;"</td>
6438 <td style="color:red;">Foo
6440 <td align="center" style="color:red;">Foo
6442 <td align="center" style="color:red;">Foo
6448 2. Template-generated table cell attributes and cell content
6451 |{{table_attribs_2}}
6456 <td style="color:red;">Foo
6464 <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>
6465 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6470 3. Template-generated table cell attributes and cell content
6473 !align=center {{table_header_cells}}
6475 |align=center {{table_cells}}
6480 <th align="center" style="color:red;">Foo</th>
6481 <th style="color:red;"><i>Bar</i></th>
6482 <th style="color:brown;"><i>Foo</i> and Baz
6485 <td align="center" style="color:red;">Foo</td>
6486 <td style="color:red;"><i>Bar</i></td>
6487 <td style="color:brown;"><i>Foo</i> and Baz
6492 <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>
6493 <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>
6498 4. Template-generated table cell attributes and cell content inside a templated table
6501 !align=center {{table_header_cells}}
6503 |align=center {{table_cells}}
6508 <th align="center" style="color:red;">Foo</th>
6509 <th style="color:red;"><i>Bar</i></th>
6510 <th style="color:brown;"><i>Foo</i> and Baz
6513 <td align="center" style="color:red;">Foo</td>
6514 <td style="color:red;"><i>Bar</i></td>
6515 <td style="color:brown;"><i>Foo</i> and Baz
6519 <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}}]}'>
6520 <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>
6522 <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>
6526 ## Edge case fix to prevent future regressions
6528 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6531 |{{table_attribs_7}}
6536 <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>
6538 <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>
6542 Table with row followed by newlines and table heading
6544 parsoid=wt2html,html2html
6562 Table with empty line following the start tag
6564 parsoid=wt2html,html2html
6582 Table attributes with empty value
6584 parsoid=wt2html,html2html
6597 <tbody><tr><td style=""> hello</td></tr>
6602 Wikitext table with a lot of comments
6625 Wikitext table comments represented in parsoid dom
6627 {|<!--c1--><!--c2-->
6638 <table><!--c1--><!--c2-->
6639 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6640 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6645 Wikitext table with double-line table cell
6662 Table cell with a single comment
6679 Table-cell after a comment-only-empty-line
6696 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6698 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6704 Build table with {{!}}
6706 {{{!}} class="wikitable"
6709 {{!}}- style="color:red;"
6710 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6713 <table class="wikitable">
6719 <tr style="color:red;">
6721 <td style="color:red;"> second data
6727 Build table with pipe as data
6729 {| class="wikitable"
6732 |- style="color:red;"
6733 | data || style="color:red;" | second data
6735 | style="color:red;" | data with | || style="color:red;" | second data with |
6737 || data with | ||| second data with |
6740 <table class="wikitable">
6746 <tr style="color:red;">
6748 <td style="color:red;"> second data
6751 <td style="color:red;"> data with | </td>
6752 <td style="color:red;"> second data with |
6755 <td> data with | </td>
6756 <td> second data with |
6762 Build table with wikilink
6764 {| class="wikitable"
6765 ! header || second header
6766 |- style="color:red;"
6767 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6769 | data || second data [[Main Page|link|text with pipe]]
6772 <table class="wikitable">
6777 <tr style="color:red;">
6778 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6779 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6783 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6788 # The expected HTML structure in this test is debatable. The PHP parser does
6789 # not parse this kind of table at all. The main focus for Parsoid is on
6790 # round-tripping, so this output is ok for now. TODO: revisit!
6792 Wikitext table with html-syntax row
6802 <td>foo</td></tr></tbody></table>
6805 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6806 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6807 ## PHP parser, which tidy then compounds by fostering the content
6808 ## entirely out of the table. Parsoid recognizes the table context
6809 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6810 ## depends on PHP's treatment of broken table markup!
6812 Implicit <td> after a |-
6814 parsoid=wt2html,html2html
6834 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6836 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6838 parsoid=wt2html,html2html
6871 <tr><td><pre>a</pre></td></tr>
6872 <tr><td> b</td></tr>
6877 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6878 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6880 Lists should be recognized in an implicit <td> context
6882 parsoid=wt2html,html2html
6909 Table cells not properly parsed in an implicit-td context
6913 {{table_attribs_4}} || a || b
6918 <td style="background-color:#DC241f;" width="10px"></td>
6925 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6926 <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>
6931 Parsoid: Round-trip tables directly followed by content (bug 51219)
6933 parsoid=wt2html,wt2wt
6958 Parsoid: Default to a newline after tables in new content (bug 51219)
6963 <tr><td>foo</td></tr></tbody></table> bar
6965 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6970 <nowiki> </nowiki>bar
6978 Parsoid: newline inducing block nodes don't suppress <nowiki>
6990 Parsoid: Row-syntax table headings followed by comment & table cells
6992 parsoid=wt2html,wt2wt
6996 <!-- foo --> || baz || quux
7010 <tbody><tr><th> foo </th><th> bar
7011 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7016 Parsoid: Recover better from broken table attributes
7036 <p>foo</p></td></tr>
7041 Tables: Digest broken attributes on table and tr tag
7057 # T137406: Whitespace in the HTML
7059 1. Generate correct wikitext for tables with thead/tbody/tfoot
7064 <caption>Test</caption>
7105 <caption>Test</caption>
7125 # T137406: No whitespace in the HTML
7127 2. Generate correct wikitext for tables with thead/tbody/tfoot
7131 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7141 Testing serialization after deletion in references
7150 hi <ref><div id="x">ho</div></ref>
7160 Testing serialization after deletion of table cells
7163 "modes": ["wt2wt", "selser"],
7171 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7181 Testing selser after addition of new row before first row (T125419)
7184 "modes": ["wt2wt", "selser"],
7186 [ "tr", "before", "<tr><td>X</td></tr>" ]
7202 Serialize new table rows in a HTML table using HTML tags
7205 "modes": ["wt2wt", "selser"],
7207 [ "tr", "before", "<tr><td>X</td></tr>" ]
7211 <table><tr><td>a</td></tr></table>
7213 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7217 Serialize new table cells in a HTML row using HTML tags
7220 "modes": ["wt2wt", "selser"],
7222 [ "td", "before", "<td>X</td>" ]
7226 <table><tr><td>a</td></tr></table>
7228 <table><tr><td>X</td><td>a</td></tr></table>
7232 Wikitext tables can be nested inside HTML tables
7236 <table data-parsoid='{"stx":"html"}'>
7239 <tr><td>foo</td></tr>
7254 Serialize wikitext list items as HTML list items when embedded in a HTML list
7258 <ul data-parsoid='{"stx": "html"}'>
7259 <li data-parsoid='{}'>a</li>
7269 # SSS FIXME: Is this actually a good thing given the
7270 # odd nested list output that is generated by MW?
7271 # <ul><li>foo<ul>..</ul></li></ul> instead of
7272 # <ul><li>foo</li><ul>..</ul></ul>
7274 Wikitext lists can be nested inside HTML lists
7278 <ul data-parsoid='{"stx": "html"}'>
7279 <li data-parsoid='{"stx": "html"}'>a
7284 <ul data-parsoid='{"stx": "html"}'>
7307 Plain link, capitalized
7311 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7316 Plain link, uncapitalized
7320 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7327 [[Main Page|The Main Page]]
7329 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7334 Piped link with comment in link text
7336 [[Main Page|The Main<!--front--> Page]]
7338 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7343 Piped link with multiple pipe characters in link text
7345 [[Main Page||The|Main|Page|]]
7347 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7350 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7354 Piped link with no link text
7356 [[Thomas Bek (bishop of St David's)|]]
7358 <p>[[Thomas Bek (bishop of St David's)|]]
7361 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7369 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7374 Broken link with fragment
7376 [[Zigzagzogzagzig#zug]]
7378 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7383 Special page link with fragment
7385 [[Special:Version#anchor]]
7387 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7392 Nonexistent special page link with fragment
7394 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7396 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7403 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7405 <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>
7412 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7414 <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>!!!
7425 Bug 43661: Piped links with identical prefixes
7427 [[prefixed article|prefixed articles with spaces]]
7429 [[prefixed article|prefixed articlesaoeu]]
7431 [[Main Page|Main Page test]]
7433 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7434 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7435 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7441 Link with HTML entity in suffix / tail
7443 [[Main Page]]", [[Main Page]]a
7445 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7448 <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>
7452 Link with 3 brackets
7463 Link with 4 brackets
7467 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7472 Piped link with 3 brackets
7474 [[[main page|the main page]]]
7476 <p>[[[main page|the main page]]]
7481 Piped link with extlink-like text
7484 [[Main Page|This is a [bar]]]
7486 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7487 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7490 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7491 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7495 Link with multiple pipes
7497 [[Main Page|The|Main|Page]]
7499 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7503 # Note that parsoid does not munge anchor text; all non-space
7504 # characters are valid in HTML5 ids.
7506 Anchor containing a #. (bug 63430)
7508 [[Main Page#And#Link]]
7510 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7513 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7519 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7521 <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>
7526 Link with space in namespace
7528 [[User talk:Foo bar]]
7530 <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>
7535 MemoryAlpha:AlphaTest
7537 This is an article in the MemoryAlpha namespace
7538 (which shadows the memoryalpha interwiki link).
7542 Namespace takes precedence over interwiki link (bug 51680)
7544 [[MemoryAlpha:AlphaTest]]
7546 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7550 # The previous test doesn't work correctly in html2*, due to not recognizing the
7551 # link as an internal one. This one checks for the correct behavior.
7553 Link to namespace preferred over interwiki with correct rel attribute
7555 parsoid=html2wt,html2html
7557 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7559 [[MemoryAlpha:AlphaTest]]
7563 Piped link to namespace
7565 [[Meta:Disclaimers|The disclaimers]]
7567 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7574 [[Usually caused by a typo (oops}]]
7576 <p>[[Usually caused by a typo (oops}]]
7583 Just a test of an article title containing a percent.
7587 Link containing % (not as a hex sequence)
7590 [[7% Solution|7%25 Solution]]
7592 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7593 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7596 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7597 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7600 # note that the parsoid HTML is identical to the previous test output,
7601 # so the previous test ensures that the html2wt mode will generate the
7602 # "not as a hex sequence" wikitext.
7604 Link containing % as a single hex sequence interpreted to char
7606 parsoid=wt2wt,wt2html,html2html
7609 [[7%25 Solution|7%25 Solution]]
7611 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7612 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7615 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7616 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7620 Link containing % as a double hex sequence interpreted to hex sequence
7624 <p>[[7%2525 Solution]]
7628 # note that parsoid does not munge anchor text; all non-space
7629 # characters are valid in HTML5 anchors.
7631 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7632 Example for such a section: == < ==
7634 [[%23%3c]][[%23%3e]]
7636 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7639 <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>
7643 Link containing "<#" and ">#" as a hex sequences
7645 [[%3c%23]][[%3e%23]]
7647 <p>[[%3c%23]][[%3e%23]]
7652 Link containing an equals sign
7654 [[Special:BookSources/isbn=4-00-026157-6]]
7656 <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>
7659 <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>
7665 Just a test of an article title containing a tilde.
7668 # note that links containing signatures, like [[Foo~~~~]], are
7669 # massaged by the pre-save transform (PST) and so the tildes are never
7670 # seen by the parser.
7672 Link containing a tilde
7676 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7679 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7683 Link containing double-single-quotes '' (bug 4598)
7685 [[Lista d''e paise d''o munno]]
7687 <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>
7690 <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>
7694 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7696 Some [[Link|pretty ''italics'' and stuff]]!
7698 <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>!
7701 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7705 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7707 ''Some [[Link|pretty ''italics'' and stuff]]!''
7709 <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>
7714 Link with double quotes in title part (literal) and alternate part (interpreted)
7716 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7720 [[''Pentecoste''|Pentecoste]]
7722 [[''Pentecoste''|''Pentecoste'']]
7724 <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>
7725 </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>
7726 </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>
7727 </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>
7730 <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>
7731 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7732 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7733 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7737 Broken image links with HTML captions (bug 39700)
7739 [[File:Nonexistent|<script></script>]]
7740 [[File:Nonexistent|100x100px|<script></script>]]
7741 [[File:Nonexistent|<]]
7742 [[File:Nonexistent|a<i>b</i>c]]
7744 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7745 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7746 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7747 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7750 <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>
7751 <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>
7752 <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>
7753 <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>
7759 [[http://www.example.com]]
7761 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7764 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7768 Plain link to URL with link text
7770 [[http://www.example.com Link text]]
7772 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7777 Plain link to protocol-relative URL
7779 [[//www.example.com]]
7781 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7784 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7788 Plain link to protocol-relative URL with link text
7790 [[//www.example.com Link text]]
7792 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7797 Plain link to page with question mark in title
7803 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7804 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7809 # I'm fairly sure the expected result here is wrong.
7810 # We want these to be URL links, not pseudo-pages with URLs for titles....
7811 # However the current output is also pretty screwy.
7814 # I'm changing it to match the current output--it arguably makes more
7815 # sense in the light of the test above. Old expected result was:
7816 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7818 # But I think this test is bordering on "garbage in, garbage out" anyway.
7823 Piped link to URL: [[http://www.example.com|an example URL]]
7825 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7828 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7832 BUG 2: [[page|http://url/]] should link to page, not http://url/
7834 [[Main Page|http://url/]]
7836 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7839 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7842 # Parsoid does not mark self-links, by design.
7844 BUG 337: Escaped self-links should be bold
7848 [[Bug462]] [[Bug462]]
7850 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7853 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7855 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7859 Self-link to section should not be bold
7863 [[Main Page#section]]
7865 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7876 Self-link to numeric title
7882 <p><strong class="selflink">0</strong>
7887 Link to numeric-equivalent title
7893 <p><a href="/wiki/00" title="00">00</a>
7898 <nowiki> inside a link
7900 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7902 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7907 Non-breaking spaces in title
7909 [[ Main Page ]]
7911 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7916 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7922 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7927 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7933 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7938 Internal link with en linktrail: no apostrophes (bug 27473)
7944 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7949 Internal link with ca linktrail with apostrophes (bug 27473)
7955 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7960 Internal link with kaa linktrail with apostrophes (bug 27473)
7966 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7971 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7973 [[User:Foo/Test/63636:Bar|Test]]
7975 <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>
7978 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7981 ## Mainly a sanity check for Parsoid
7983 Handle title parsing for subpages
7992 ## FIXME: Add a working php section here
7994 Link to a subpage from a namespace other than main
8000 <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>
8004 Purely hash wikilink
8006 title=[[User:test/123]]
8010 <p><a href="#a">b</a>
8013 <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>
8017 1. Interaction of linktrail and template encapsulation
8023 <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>
8027 2. Interaction of linktrail and template encapsulation
8031 {{echo|Some [[Fool]]}}s
8033 <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>
8037 3. Interaction of linktrail and template encapsulation
8041 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8043 <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>
8053 Internal link with is link prefix
8057 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8059 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8070 Internal link with is link trail and link prefix
8074 [[mótmælendatrú|xxx]]ar
8076 mótmælenda[[söfnuður]]
8077 mótmælenda[[söfnuður|söfnuðir]]
8078 mótmælenda[[söfnuður|söfnuðir]]xxx
8080 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8081 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8082 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8083 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8084 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8089 Parsoid link trail escaping
8091 parsoid=html2wt,html2html
8093 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
8099 Parsoid link prefix escaping
8102 parsoid=html2wt,html2html
8104 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
8106 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8110 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8118 [http://wp.org ''foo'']
8120 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8121 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8122 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8123 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8128 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8132 [[Foo|{{echo|a}} b {{echo|c}}]]
8134 <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>
8138 Link with angle bracket after anchor
8142 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8145 <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>
8149 ### Interwiki links (see maintenance/interwiki.sql)
8153 Inline interwiki link
8155 parsoid=wt2html,wt2wt,html2html
8157 [[MeatBall:SoftSecurity]]
8159 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8162 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8166 Inline interwiki link with empty title (bug 2372)
8168 parsoid=wt2html,wt2wt,html2html
8172 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8175 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8179 Interwiki link encoding conversion (bug 1636)
8181 *[[Wikipedia:ro:Olteniţa]]
8182 *[[Wikipedia:ro:Olteniţa]]
8184 <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>
8185 <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>
8189 <li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8190 <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>
8195 Interwiki link with fragment (bug 2130)
8197 [[MeatBall:SoftSecurity#foo]]
8199 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8203 # Ideally the wikipedia: prefix here should be proto-relative too
8204 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8205 # define the 'en' prefix, and originally the test used 'wikipedia',
8206 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8209 Different interwiki prefixes mapping to the same URL
8217 [[:wikipedia:Foo|Foo]]
8219 [[wikipedia:en:Foo]]
8221 [[:wikipedia:en:Foo]]
8225 <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>
8227 <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>
8229 <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>
8231 <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>
8233 <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>
8235 <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>
8237 <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>
8241 Interwiki links that cannot be represented in wiki syntax
8244 [[meatball:ok#foo|ok with fragment]]
8245 [[meatball:ok_as_well?|ok ending with ? mark]]
8246 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8247 [http://de.wikipedia.org/wiki/#foo is just fragment]
8250 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8251 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8252 <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>
8253 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8254 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8257 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8258 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8259 <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>
8260 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8261 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8265 Interwiki links: trail
8267 [[wikipedia:Foo|Ba]]r
8269 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8272 <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>
8276 Local interwiki link
8278 parsoid=wt2html,wt2wt,html2html
8280 [[local:Template:Foo]]
8282 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8285 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8288 # Parsoid does not mark self-links, by design.
8290 Local interwiki link: self-link to current page
8293 parsoid=wt2html,wt2wt,html2html
8297 <p><strong class="selflink">local:Main Page</strong>
8300 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8304 Local interwiki link: prefix only (bug 64167)
8306 parsoid=wt2html,wt2wt,html2html
8310 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8313 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8317 Local interwiki link: with additional interwiki prefix (bug 61357)
8319 parsoid=wt2html,wt2wt,html2html
8321 [[local:meatball:Hello]]
8323 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8326 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8330 Multiple local interwiki link prefixes
8332 [[local:local:local:local:mi:local:Foo]]
8334 parsoid=wt2html,wt2wt,html2html
8336 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8339 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8343 ### Interlanguage links
8344 ### Language links (so that searching for '### language' matches..)
8356 <p>Blah blah blah</p>
8357 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8360 ## parsoid html2wt will lose the space variations
8362 Interlanguage link with spacing
8364 parsoid=wt2html,wt2wt,html2html
8372 <p>Blah blah blah</p>
8373 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8377 Double interlanguage link
8386 <p>Blah blah blah</p>
8387 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8388 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8391 ## parsoid html2wt will lose the space variations
8393 Interlanguage link variations
8395 parsoid=wt2html,wt2wt,html2html
8405 <p>Blah blah blah</p>
8406 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8407 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8408 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8411 ## parsoid html2wt will normalize the space to _
8413 Space and question mark encoding in interlanguage links (T95473)
8415 parsoid=wt2html,wt2wt,html2html
8423 <p>Blah blah blah</p>
8424 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8428 Interlanguage link, with prefix links
8438 <p>Blah blah blah</p>
8439 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8443 Double interlanguage link, with prefix links (bug 8897)
8454 <p>Blah blah blah</p>
8455 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8456 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8460 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8468 <p>Blah blah blah</p>
8469 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8472 ## PHP parser tests script needs an update
8473 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8475 Language links render as inline links if $wgInterwikiMagic=false
8477 wgInterwikiMagic=false
8478 parsoid=wt2html,wt2wt,html2html
8483 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8486 ## PHP parser tests script needs an update
8487 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8489 Language links render as inline links in the Talk namespace
8492 parsoid=wt2html,wt2wt,html2html
8497 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8501 Parsoid-specific test: Wikilinks with should RT properly
8507 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8512 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8514 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8516 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8517 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8519 He&nbsp;llo [[Foo|He&nbsp;llo]]
8521 He&nbsp;llo He&nbsp;llo
8523 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8524 </p><p>He&nbsp;llo He&nbsp;llo
8528 # html2wt will fail because of title normalization without data-parsoid
8530 Parsoid: handle constructor well
8532 parsoid=wt2html,wt2wt
8538 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8539 </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>
8542 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8544 <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>
8553 # Note that `ko` isn't a known interlanguage prefix
8555 Parsoid: recognize interlanguage links without a target page
8565 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8567 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8570 # Note that `ko` isn't a known interwiki prefix
8572 Parsoid: recognize interwiki links without a target page
8574 parsoid=wt2html,wt2wt,html2html
8580 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8581 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8584 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8585 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8589 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8593 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8596 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8600 Interlanguage link with preceding local interwiki link (bug 68085)
8602 parsoid=wt2html,wt2wt,html2html
8605 [[local:es:Spanish]]
8608 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8612 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8616 Looks like an interlanguage link, but is actually a local interwiki
8618 parsoid=wt2html,wt2wt,html2html
8624 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8628 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8632 ### Redirects, Parsoid-only
8636 1. Simple redirect to page
8638 #REDIRECT [[Main Page]]
8640 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8644 2. Other redirect variants
8646 #REDIRECT [[Main_Page]]
8648 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8651 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8652 # This tests the Parsoid bail-out code.
8654 3. Other redirect variants
8656 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8658 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8662 4. Redirect to a templated destination
8664 #REDIRECT [[{{echo|Foo}}bar]]
8666 <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"}]]}'/>
8672 parsoid=wt2html,wt2wt
8677 <li>REDIRECT [[]]</li></ol>
8681 Optional colon in #REDIRECT
8683 # the colon is archaic syntax. we support it for wt2html, but we
8684 # don't care that it roundtrips back to the modern syntax.
8685 parsoid=wt2html,html2html
8687 #REDIRECT:[[Main Page]]
8689 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8693 Whitespace in #REDIRECT with optional colon
8695 # the colon and gratuitous whitespace is archaic syntax. we support
8696 # it for wt2html, but we don't care that it roundtrips back to the
8697 # modern syntax (without extra whitespace)
8698 parsoid=wt2html,html2html
8705 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8709 Piped link in #REDIRECT
8711 # content after piped link is ignored. we support this syntax,
8712 # but don't care that the piped link is lost when we roundtrip this.
8715 #REDIRECT [[Main Page|bar]]
8717 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8721 Redirect to category (T104502)
8723 parsoid=wt2html,wt2wt
8725 #REDIRECT [[Category:Foo]]
8727 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8731 Redirect to category with URL encoding (T104502)
8735 #REDIRECT [[Category%3AFoo]]
8737 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8741 Redirect to category page
8743 #REDIRECT [[:Category:Foo]]
8745 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8749 Redirect to image page (1)
8751 #REDIRECT [[File:Wiki.png]]
8753 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8757 Redirect to image page (2)
8759 #REDIRECT [[Image:Wiki.png]]
8761 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8764 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8765 # Next test confirms this.
8767 Redirect to language (1) (T104918)
8769 parsoid=wt2html,wt2wt,html2html
8771 #REDIRECT [[en:File:Wiki.png]]
8773 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8777 Redirect to language (2) (T104918)
8779 #REDIRECT [[:en:File:Wiki.png]]
8781 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8785 Redirect to interwiki (T104918)
8787 #REDIRECT [[meatball:File:Wiki.png]]
8789 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8793 Non-English #REDIRECT
8797 #TILVÍSUN [[Main Page]]
8799 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8803 Redirect syntax under text isn't considered a redirect
8806 #redirect [[Main Page]]
8809 <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>
8812 # FIXME: Should hoist the redirect to the top of the page and ensure there
8819 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8839 Broken br tag sanitization
8847 # TODO: Fix html2html mode (bug 51055)!
8849 Parsoid: Broken br tag recognition
8862 Incorrecly removing closing slashes from correctly formed XHTML
8864 <br style="clear:both;" />
8866 <p><br style="clear:both;" />
8871 Failing to transform badly formed HTML into correct XHTML
8873 <br style="clear: left;">
8874 <br style="clear: right;">
8875 <br style="clear: both;">
8877 <p><br style="clear: left;" />
8878 <br style="clear: right;" />
8879 <br style="clear: both;" />
8883 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8884 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8886 Handling html with a div self-closing tag
8895 <p><div title />
8899 <p><div title=bar />
8900 <div title=bar/>
8902 <div title="bar/"></div>
8906 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8907 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8908 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8909 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8910 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8911 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8915 Handling html with a br self-closing tag
8942 Horizontal ruler (should it add that extra space?)
8957 Horizontal ruler -- 4+ dashes render hr
8966 Horizontal ruler -- eats additional dashes on the same line
8975 Horizontal ruler -- does not collapse dashes on consecutive lines
8986 Horizontal ruler -- <4 dashes render as plain text
8995 Horizontal ruler -- Supports content following dashes on same line
9007 ### Block-level elements
9016 <ul><li>Common list</li>
9018 <li>item 3</li></ul>
9029 <ol><li>Numbered list</li>
9031 <li> item 3</li></ol>
9045 ***#Number on level 4
9047 **#Number on level 3
9048 **#Number on level 3
9052 #** Level 3, but ordered
9055 <ol><li> with numbers</li></ol>
9056 <ul><li> and bullets</li></ul>
9057 <ol><li> and numbers</li></ol></li>
9059 <ul><li>bullet level 2
9060 <ul><li>bullet level 3
9061 <ol><li>Number on level 4</li></ol></li></ul></li>
9063 <ol><li>Number on level 3</li>
9064 <li>Number on level 3</li></ol></li></ul>
9065 <ol><li>number level 2</li></ol></li>
9067 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9068 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9073 1. Nested mixed wikitext and html list
9076 * <ul><li>ho</li></ul>
9081 <li> <ul><li>ho</li></ul></li>
9083 <ul><li> ho</li></ul></li></ul>
9087 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9089 <ul><li> ho</li></ul></li></ul>
9093 2. Nested mixed wikitext and html list (incompatible)
9096 : {{echo|<li>ho</li>}}
9099 <dd> <li>ho</li></dd></dl>
9103 <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>
9113 <ul><li>bar</li></ul></li></ul>
9123 <ul><li><ul><li>foo</li></ul></li>
9129 Nested lists 3 (first element empty)
9135 <ul><li>bar</li></ul></li></ul>
9140 Nested lists 4 (first element empty)
9145 <ul><li><ul><li></li></ul></li>
9151 Nested lists 5 (both elements empty)
9156 <ul><li><ul><li></li></ul></li>
9162 Nested lists 6 (both elements empty)
9168 <ul><li></li></ul></li></ul>
9173 Nested lists 7 (skip initial nesting levels)
9177 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9182 Nested lists 8 (multiple nesting transitions)
9190 <ul><li><ul><li> bar</li></ul></li>
9191 <li> baz</li></ul></li>
9197 Nested lists 9 (extension interaction)
9203 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9207 1. Lists with start-of-line-transparent tokens before bullets: Comments
9220 2. Lists with start-of-line-transparent tokens before bullets: Template close
9225 <ul><li>foo bar</li>
9231 List items are not parsed correctly following a <pre> block (bug 785)
9237 <ul><li> <pre>foo</pre></li>
9238 <li> <pre>bar</pre></li>
9242 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
9243 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
9248 List items from template
9259 * notSOL{{inner list}}
9262 <ul><li> item 1</li>
9263 <li> item 2</li></ul>
9264 <ul><li> item 0</li>
9266 <li> item 2</li></ul>
9267 <ul><li> item 0</li>
9270 <li> item 2</li></ul>
9275 List interrupted by empty line or heading
9283 <ul><li> foo</li></ul>
9284 <ul><li><ul><li> bar</li></ul></li></ul>
9285 <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>
9286 <ul><li> Another list item</li></ul>
9291 Multiple list tags generated by templates
9312 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9315 <!--This line will NOT split the list-->
9317 <!--This line will NOT split the list either-->
9319 <!--foo--> <!----> <!--This line NOT split the list either-->
9330 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9333 <!--This line will NOT split the list-->
9335 <!--This line will NOT split the list either-->
9337 <!--foo--> <!----> <!--This line NOT split the list
9350 (The PHP parser relies on Tidy for the hack)
9352 parsoid=wt2html,wt2wt
9356 * {{echo|<li>templated li-hack}}
9357 * <!--foo--> <li> unsupported li-hack with preceding comments
9360 <li><li>not a li-hack
9367 <li>templated li-hack</li>
9368 <li>unsupported li-hack with preceding comments</li>
9371 <li>not a li-hack</li>
9376 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9403 Parsoid: Test of whitespace serialization with Templated bullets
9410 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9414 # ------------------------------------------------------------------------
9415 # The next set of tests are about Parsoid's ability to handle badly nested
9416 # tags (parse, minimize scope of fixup, and roundtrip back)
9417 # ------------------------------------------------------------------------
9420 Unbalanced closing block tags break a list
9421 (php parser relies on Tidy to fix up)
9439 # Parsoid fails this test, but it might be tricky to support properly.
9442 Unbalanced closing non-block tags don't break a list
9443 (php parser relies on Tidy to fix up)
9450 <li><span>a</span></li>
9451 <li><span>b</span></li>
9465 Unclosed formatting tags that straddle lists are closed and reopened
9466 (php parser relies on Tidy to fix up)
9468 parsoid=wt2html,wt2wt,html2html
9478 <ol><li> <s> a</s></li>
9479 <li><s> b </s></li></ol>
9484 1. List embedded in a formatting tag
9491 <li><small>foo</small></li>
9501 ## Ugly Parsoid output here
9502 ## Not sure what the right output is.
9504 2. List embedded in a formatting tag
9511 <li><small>a</small></li>
9512 <li><small>b</small></li>
9519 <li><small>b</small></li>
9523 # Ugly Parsoid and PHP parser output here
9524 # Not sure if we want to make this a test!
9527 ## 3. Unclosed formatting tags in list elements
9533 ## <li><small>a</small></li>
9534 ## <li><small><small>b</small></small></li>
9538 ## <li><small>a</small></li>
9540 ## <li><small>b</small></li>
9544 # This is a bug in the PHP parser + tidy combination.
9545 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9546 # and then fostered out of the table by tidy.)
9547 # We believe the Parsoid output to be correct.
9549 Table with missing opening <tr> tag
9551 parsoid=wt2html,wt2wt
9569 # Note that the current date is hard-coded as
9570 # 1970-01-01T00:02:03Z (a Thursday)
9571 # when running parser tests. The timezone is also fixed to GMT, so
9572 # local date will be identical to current date.
9575 Magic Word: {{CURRENTDAY}}
9584 Magic Word: {{CURRENTDAY2}}
9593 Magic Word: {{CURRENTDAYNAME}}
9602 Magic Word: {{CURRENTDOW}}
9611 Magic Word: {{CURRENTMONTH}}
9620 Magic Word: {{CURRENTMONTH1}}
9629 Magic Word: {{CURRENTMONTHABBREV}}
9631 {{CURRENTMONTHABBREV}}
9638 Magic Word: {{CURRENTMONTHNAME}}
9640 {{CURRENTMONTHNAME}}
9647 Magic Word: {{CURRENTMONTHNAMEGEN}}
9649 {{CURRENTMONTHNAMEGEN}}
9656 Magic Word: {{CURRENTTIME}}
9665 Magic Word: {{CURRENTHOUR}}
9674 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9683 Magic Word: {{CURRENTYEAR}}
9692 Magic Word: {{CURRENTTIMESTAMP}}
9694 {{CURRENTTIMESTAMP}}
9701 Magic Words LOCAL (UTC)
9705 * {{LOCALMONTHNAME}}
9706 * {{LOCALMONTHNAMEGEN}}
9707 * {{LOCALMONTHABBREV}}
9716 * {{LOCALTIMESTAMP}}
9731 <li> 19700101000203</li></ul>
9736 Magic Word: {{FULLPAGENAME}}
9738 title=[[User:Ævar Arnfjörð Bjarmason]]
9742 <p>User:Ævar Arnfjörð Bjarmason
9747 Magic Word: {{FULLPAGENAMEE}}
9749 title=[[User:Ævar Arnfjörð Bjarmason]]
9753 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9758 Magic Word: {{TALKSPACE}}
9760 title=[[User:Ævar Arnfjörð Bjarmason]]
9769 Magic Word: {{TALKSPACE}}, same namespace
9771 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9780 Magic Word: {{TALKSPACE}}, main namespace
9782 title=[[Parser Test]]
9791 Magic Word: {{TALKSPACEE}}
9793 title=[[User:Ævar Arnfjörð Bjarmason]]
9802 Magic Word: {{SUBJECTSPACE}}
9804 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9813 Magic Word: {{SUBJECTSPACE}}, same namespace
9815 title=[[User:Ævar Arnfjörð Bjarmason]]
9824 Magic Word: {{SUBJECTSPACE}}, main namespace
9826 title=[[Parser Test]]
9834 Magic Word: {{SUBJECTSPACEE}}
9836 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9845 Magic Word: {{NAMESPACE}}
9847 title=[[User:Ævar Arnfjörð Bjarmason]]
9856 Magic Word: {{NAMESPACEE}}
9858 title=[[User:Ævar Arnfjörð Bjarmason]]
9867 Magic Word: {{NAMESPACENUMBER}}
9869 title=[[User:Ævar Arnfjörð Bjarmason]]
9878 Magic Word: {{SUBPAGENAME}}
9880 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9889 Magic Word: {{SUBPAGENAMEE}}
9891 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9900 Magic Word: {{ROOTPAGENAME}}
9902 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9906 <p>Ævar Arnfjörð Bjarmason
9911 Magic Word: {{ROOTPAGENAMEE}}
9913 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9917 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9922 Magic Word: {{BASEPAGENAME}}
9924 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9928 <p>Ævar Arnfjörð Bjarmason
9933 Magic Word: {{BASEPAGENAMEE}}
9935 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9939 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9944 Magic Word: {{TALKPAGENAME}}
9946 title=[[User:Ævar Arnfjörð Bjarmason]]
9950 <p>User talk:Ævar Arnfjörð Bjarmason
9955 Magic Word: {{TALKPAGENAMEE}}
9957 title=[[User:Ævar Arnfjörð Bjarmason]]
9961 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9966 Magic Word: {{SUBJECTPAGENAME}}
9968 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9972 <p>User:Ævar Arnfjörð Bjarmason
9977 Magic Word: {{SUBJECTPAGENAMEE}}
9979 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9981 {{SUBJECTPAGENAMEE}}
9983 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9988 Magic Word: {{NUMBEROFFILES}}
9997 Magic Word: {{PAGENAME}}
9999 title=[[User:Ævar Arnfjörð Bjarmason]]
10003 <p>Ævar Arnfjörð Bjarmason
10008 Magic Word: {{PAGENAME}} with metacharacters
10010 title=[['foo & bar = baz']]
10014 <p><i>'foo & bar = baz'</i>
10017 <p><i>'foo & bar = baz'</i></p>
10021 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
10023 title=[[*RFC 1234 http://example.com/]]
10027 <p>*RFC 1234 http://example.com/
10030 <p>*RFC 1234 http://example.com/</p>
10034 Magic Word: {{PAGENAMEE}}
10036 title=[[User:Ævar Arnfjörð Bjarmason]]
10040 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10045 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
10047 title=[[*RFC 1234 http://example.com/]]
10051 <p>*RFC_1234_http://example.com/
10054 <p>*RFC_1234_http://example.com/</p>
10058 Magic Word: {{REVISIONID}}
10067 Magic Word: {{SCRIPTPATH}}
10075 Magic Word: {{STYLEPATH}}
10084 Magic Word: {{SERVER}}
10088 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10093 Magic Word: {{SERVERNAME}}
10102 Magic Word: {{SITENAME}}
10111 Case-sensitive magic words, when cased differently, should just be template transclusions
10118 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10119 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10120 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10121 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10126 Case-insensitive magic words should still work with weird casing.
10136 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10140 # From plwiki:PLOS_ONE
10142 Parsoid: Page property magic word with magic word contents
10144 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10146 <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>"}]]}'/>
10150 Parsoid: Template-generated DISPLAYTITLE
10152 {{{{echo|DISPLAYTITLE}}:Foo}}
10154 <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}}]}'/>
10158 Namespace 1 {{ns:1}}
10167 Namespace 1 {{ns:01}}
10176 Namespace 0 {{ns:0}} (bug 4783)
10184 Namespace 0 {{ns:00}} (bug 4783)
10192 Namespace -1 {{ns:-1}}
10201 Namespace User {{ns:User}}
10210 Namespace User talk {{ns:User_talk}}
10219 Namespace User talk {{ns:uSeR tAlK}}
10228 Namespace File {{ns:File}}
10237 Namespace File {{ns:Image}}
10246 Namespace (lang=de) Benutzer {{ns:User}}
10257 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10263 <p>Benutzer Diskussion
10271 {{urlencode:hi world?!}}
10272 {{urlencode:hi world?!|WIKI}}
10273 {{urlencode:hi world?!|PATH}}
10274 {{urlencode:hi world?!|QUERY}}
10284 Magic Word: prioritize type info over data-parsoid
10288 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10294 Magic Word: serialize on separate line (parsoid)
10296 parsoid=wt2wt,html2wt
10302 foo<meta property="mw:PageProp/notoc"/>bar
10306 Magic Word: rt non-english wikis
10313 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10317 __proto__ is treated as normal wikitext (T105997)
10329 Magic links: internal link to RFC (bug 479)
10333 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10336 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10340 Magic links: RFC (bug 479)
10344 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10347 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10351 Magic links: RFC (bug 65278)
10353 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10355 <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.
10358 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10362 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10364 RFC      822
10368 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10373 <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>
10379 Magic links: ISBN (bug 1937)
10383 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10386 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10390 Magic links: ISBN (bug 65278)
10392 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10394 <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.
10397 <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>
10401 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10403 ISBN      978 0 316 09811 3
10409 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10416 <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>
10424 Magic links: PMID incorrectly converts space to underscore
10428 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10431 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10435 Magic links: PMID (bug 65278)
10437 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10439 <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.
10442 <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>
10446 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10448 PMID      1234
10452 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10457 <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>
10462 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10463 # since these are ExtLinkText, not MagicLinkText
10465 Magic links: use appropriate serialization for "almost" magic links.
10467 X[[Special:BookSources/0978739256|foo]]
10469 X[//tools.ietf.org/html/rfc1234 foo]
10471 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10472 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10475 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10476 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10484 Nonexistent template
10486 {{thistemplatedoesnotexist}}
10488 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10493 Template with invalid target containing tags
10495 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10497 <p>{{a<b>b</b>|foo|a=b|a = b}}
10502 Template with invalid target containing unclosed tag
10504 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10506 <p>{{a<b>|foo|a=b|a = b}}</b>
10511 Template with invalid target containing wikilink
10515 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10518 <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>
10522 Template with just whitespace in it, bug #68421
10526 <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>
10532 This is a test template
10540 <p>This is a test template
10545 Template with explicit namespace
10549 <p>This is a test template
10557 This is a test template with parameter {{{param}}}
10563 {{paramtest|param=foo}}
10565 <p>This is a test template with parameter foo
10570 Template:paramtestnum
10572 [[{{{1}}}|{{{2}}}]]
10576 Template unnamed parameter
10578 {{paramtestnum|Main Page|the main page}}
10580 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10585 Template:templatesimple
10591 Template:templateredirect
10593 #redirect [[Template:templatesimple]]
10597 Template:templateasargtestnum
10603 Template:templateasargtest
10605 {{template{{{templ}}}}}
10609 Template:templateasargtest2
10615 Template with template name as unnamed argument
10617 {{templateasargtestnum|templatesimple}}
10624 Template with template name as argument
10626 {{templateasargtest|templ=simple}}
10633 Template with template name as argument (2)
10635 {{templateasargtest2|templ=templatesimple}}
10642 Template:templateasargtestdefault
10644 {{{{{templ|templatesimple}}}}}
10654 Template with default value
10656 {{templateasargtestdefault}}
10663 Template with default value (value set)
10665 {{templateasargtestdefault|templ=templa}}
10674 {{templateredirect}}
10679 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10683 Template with argument in separate line
10685 {{ templateasargtest |
10693 Template with complex template as argument
10696 param ={{ templateasargtest |
10697 templ = simple }}}}
10699 <p>This is a test template with parameter (test)
10704 Template with thumb image (with link in description)
10706 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10708 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>
10711 <p>This is a test template with parameter</p>
10712 <div class="thumb tright">
10713 <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>
10714 <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>
10718 <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>
10722 Template:complextemplate
10724 {{{1}}} {{paramtest|
10725 param ={{{param}}}}}
10729 Template with complex arguments
10732 param ={{ templateasargtest |
10733 templ = simple }}|[[Template:complextemplate|link]]}}
10735 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10740 BUG 553: link with two variables in a piped link
10743 |[[{{{1}}}|{{{2}}}]]
10748 <td>[[{{{1}}}|{{{2}}}]]
10753 <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>
10758 Abort table cell attribute parsing on wikilink
10761 | testing [[one|two]] | three || four
10762 | testing one two | three || four
10763 | testing="[[one|two]]" | three || four
10768 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10774 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
10780 <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>
10781 <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>
10782 <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>
10787 Don't abort table cell attribute parsing if wikilink is found in template arg
10790 | Test {{#tag:ref|One two "[[three]]" four}}
10794 <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>
10799 Magic variable as template parameter
10801 {{paramtest|param={{SITENAME}}}}
10803 <p>This is a test template with parameter MediaWiki
10810 [[{{{param}}}|link]]
10814 Template parameter as link source
10816 {{linktest|param=Main Page}}
10818 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10823 Template:paramtest2
10825 including another template, {{paramtest|param={{{arg}}}}}
10829 Template passing argument to another template
10831 {{paramtest2|arg='hmm'}}
10833 <p>including another template, This is a test template with parameter 'hmm'
10844 Template as link source
10848 [[{{linktest2}}|Main Page]]
10850 [[{{linktest2}}]]Page
10852 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10853 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10854 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10872 Template infinite loop
10876 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10881 Template from main namespace
10900 BUG 529: Template with table, not included at beginning of line
10919 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10939 BUG 41: Template parameters shown as broken links
10948 Template with targets containing wikilinks
10952 {{[[{{echo|foo}}]]}}
10954 {{{{echo|[[foo}}]]}}
10956 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10957 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10969 Templates: Double quotes as template target
10976 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
10980 ## This test is about making sure Parsoid's data-mw is well formed in the
10981 ## face of multiple templates with intersecting and overlapping ranges. The
10982 ## wikitext itself is wretched.
10984 Templates with intersecting and overlapping ranges
11009 <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":""}]]}'>
11011 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11013 <tbody><tr><td>hi</td></tr>
11018 Template:MSGNW test
11020 ''None'' of '''this''' should be
11022 but rather passed unmodified
11030 # hmm, fix this or just deprecate msgnw and document its behavior?
11034 {{msgnw:MSGNW test}}
11036 <p>''None'' of '''this''' should be
11038  but rather passed unmodified
11039 {{test}}
11043 <!-- comment -->
11050 {{int:youhavenewmessages|lots of money|not!}}
11052 <p>You have lots of money (not!).
11057 int keyword - non-existing message
11068 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11072 <includeonly> and <noinclude> being included
11083 <onlyinclude>Foo</onlyinclude>bar
11087 <onlyinclude> being included
11099 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11103 <onlyinclude> and <includeonly> being included
11112 <includeonly> and <noinclude> on a page
11114 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11121 Un-closed <noinclude>
11128 <onlyinclude> on a page
11130 <onlyinclude>Foo</onlyinclude>bar
11137 Un-closed <onlyinclude>
11144 Self-closed noinclude, includeonly, onlyinclude tags
11155 Unbalanced includeonly and noinclude tags
11159 |b</noinclude></noinclude>
11160 |c</noinclude></includeonly>
11161 |d</includeonly></includeonly>
11170 <td>c</includeonly>
11172 <td>d</includeonly></includeonly>
11178 Template:Includeonly section
11181 ==Includeonly section==
11187 Bug 6563: Edit link generation for section shown by <includeonly>
11189 {{includeonly section}}
11191 <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>
11192 <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>
11196 # Uses same input as the contents of [[Template:Includeonly section]]
11198 Bug 6563: Section extraction for section shown by <includeonly>
11203 ==Includeonly section==
11211 Bug 6563: Edit link generation for section suppressed by <includeonly>
11214 ==Includeonly section==
11218 <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>
11223 Bug 6563: Section extraction for section suppressed by <includeonly>
11228 ==Includeonly section==
11236 Un-closed <includeonly>
11241 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11244 ## We used to, but no longer wt2wt this test since the default serializer
11245 ## will normalize the include directives to serialize on their own line.
11246 ## Selser will take care of preserving formatting in scenarios where they
11247 ## intermingled with other wikitext.
11249 Includes and comments at SOL
11251 parsoid=wt2html,html2html
11253 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11257 </noinclude>* stuff
11260 <includeonly>can have stuff</includeonly>=== here ===
11263 <h2><span class="mw-headline" id="hu">hu</span></h2>
11266 <ul><li> stuff</li>
11267 <li> here</li></ul>
11268 <h3><span class="mw-headline" id="here">here</span></h3>
11271 <!-- 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>
11273 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11275 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11276 <li> here</li></ul>
11278 <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>
11282 # TODO: test with DOM fragment reuse!
11284 Parsoid: DOM fragment reuse
11286 parsoid=wt2wt,wt2html
11288 a{{echo|b<table></table>c}}d
11300 <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>
11302 <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">
11303 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11304 </span><p about="#mwt2">cd</p>
11306 <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">
11308 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11310 </span><p about="#mwt3">b</p>
11314 Parsoid: Merge double tds (T52603)
11319 |{{echo|{{!}} foo}}
11323 <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>
11328 Parsoid: Merge double tds in nested transclusion content (T52603)
11334 |{{echo|{{!}} foo}}
11338 <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}}]}'>
11340 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11346 ### <includeonly> and <noinclude> in attributes
11349 0. includeonly around the entire attribute
11351 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11353 <p><span id="v2">bar</span>
11358 1. includeonly in html attr key
11360 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11362 <p><span id="foo">bar</span>
11367 2. includeonly in html attr value
11369 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11370 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11372 <p><span id="v1">bar</span>
11373 <span id="v1">bar</span>
11378 3. includeonly in part of an attr value
11380 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11382 <p><span style="color:red;">bar</span>
11387 4. includeonly in table attributes
11411 ### Token Stream Patcher tests
11413 ### These tests won't always pass wt2wt and other modes because
11414 ### on serialization, the table will be output on a new line.
11415 ### For now, we are blacklisting them, and using this to test selser.
11419 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11421 parsoid=wt2html,wt2wt
11423 {{echo|}}{| width = '100%'
11427 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11428 <tbody><tr><td>foo</td></tr>
11432 ## We used to, but no longer wt2wt this test since the default serializer
11433 ## will normalize the include directives to serialize on their own line.
11434 ## Selser will take care of preserving formatting in scenarios where they
11435 ## intermingled with other wikitext.
11437 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11441 <includeonly>a</includeonly>{| {{{b}}}
11445 <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":""}]]}'>
11446 <tbody><tr><td>c</td></tr>
11451 Table wikitext syntax outside wiki-tables
11455 ! not a table heading
11458 | class="foo bar" | baz
11466 ! not a table heading
11469 | class="foo bar" | baz
11478 ### Testing parsing of templates where a template arg
11479 ### has the same name as the template itself.
11485 {{{quote|{{{1}}}}}}
11489 Templates: Template Name/Arg clash: 1. Use of positional param
11498 Templates: Template Name/Arg clash: 2. Use of named param
11500 {{quote|quote=foo}}
11507 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11516 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11520 Templates: 1. Simple use
11529 Templates: 2. Inside a block tag
11531 <div>{{echo|Foo}}</div>
11532 <blockquote>{{echo|Foo}}</blockquote>
11535 <blockquote>Foo</blockquote>
11545 Templates: P-wrapping: 1a. Templates on consecutive lines
11556 Templates: P-wrapping: 1b. Templates on consecutive lines
11570 Templates: P-wrapping: 1c. Templates on consecutive lines
11573 {{echo|bar}} <div>baz</div>
11586 Templates: P-wrapping: 1d. Template preceded by comment-only line
11595 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11599 Templates: Inline Text: 1. Multiple template uses
11601 {{echo|Foo}}bar{{echo|baz}}
11608 Templates: Inline Text: 2. Back-to-back template uses
11610 {{echo|Foo}}{{echo|bar}}
11617 Templates: Block Tags: 1. Multiple template uses
11619 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11621 <div>Foo</div><div>bar</div><div>baz</div>
11626 Templates: Block Tags: 2. Back-to-back template uses
11628 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11630 <div>Foo</div><div>bar</div>
11634 # This is an edge case relating to paragraph wrapping.
11636 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11641 <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
11646 Templates: Links: 1. Simple example
11648 {{echo|[[Foo|bar]]}}
11650 <p><a href="/wiki/Foo" title="Foo">bar</a>
11655 Templates: Links: 2. Generation of link href
11657 [[{{echo|Foo}}|bar]]
11659 <p><a href="/wiki/Foo" title="Foo">bar</a>
11664 Templates: Links: 3. Generation of part of a link href
11666 [[Fo{{echo|o}}|bar]]
11668 [[Foo{{echo|bar}}]]
11670 [[Foo{{echo|bar}}baz]]
11672 [[Foo{{echo|bar}}|bar]]
11674 [[:Foo{{echo|bar}}]]
11676 [[:Foo{{echo|bar}}|bar]]
11678 <p><a href="/wiki/Foo" title="Foo">bar</a>
11679 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11680 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11681 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11682 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11683 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11688 Templates: Links: 4. Multiple templates generating link href
11690 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11692 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11697 Templates: Links: 5. Generation of link text
11699 [[Foo|{{echo|bar}}]]
11701 <p><a href="/wiki/Foo" title="Foo">bar</a>
11706 Templates: Links: 5. Nested templates (only outermost template should be marked)
11708 {{echo|[[{{echo|Foo}}|bar]]}}
11710 <p><a href="/wiki/Foo" title="Foo">bar</a>
11715 Templates: HTML Tag: 1. Generation of HTML attr. key
11717 <div {{echo|style}}="color:red;">foo</div>
11719 <div style="color:red;">foo</div>
11724 Templates: HTML Tag: 2. Generation of HTML attr. value
11726 <div style={{echo|'color:red;'}}>foo</div>
11728 <div style="color:red;">foo</div>
11733 Templates: HTML Tag: 3. Generation of HTML attr key and value
11735 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11737 <div style="color:red;">foo</div>
11742 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11744 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11746 <div title="This is a long title with just one piece templated">foo</div>
11751 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11753 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11755 <div title="This is a long title with just one piece templated">foo</div>
11760 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11762 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11764 <div title="This is a long title with just one piece templated">foo</div>
11768 # SSS FIXME: While it is great we added support for all this,
11769 # do we want to make this part of the spec? Maybe we want to
11770 # deprecate this kind of usage in the future?
11772 Templates: HTML Tag: 7. Generation of partial attribute key string
11774 <div st{{echo|yle}}="color:red;">foo</div>
11776 <div style="color:red;">foo</div>
11781 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11783 <div {{echo|1=id="v1"}}>bar</div>
11785 <div id="v1">bar</div>
11790 Templates: HTML Tag: 9. Multiple template-generated attributes
11792 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11794 <div id="v1" title="foo">bar</div>
11799 Templates: Support for templates generating attributes and content
11801 {| {{mixed_attr_content_template}}
11806 <table style="color:red;" title="T48811">
11816 <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|}"]}'>
11825 1. Entities and nowikis inside templated attributes should be handled correctly
11827 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11829 <div style="background:#f9f9f9;">foo</div>
11832 <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>
11836 2. Entities and nowikis inside templated attributes should be handled correctly
11839 |{{table_attribs_3}}
11844 <td style="background:#f9f9f9;">Foo
11849 <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>
11854 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11857 |{{table_attribs_3}}
11862 <td style="background:#f9f9f9;">Foo
11866 <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}}]}'>
11867 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11873 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11876 | {{table_attribs_6}} hi
11881 <td style="background: red;"> hi
11886 <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>
11891 Templates: HTML Tables: 1. Generating start of a HTML table
11893 {{echo|<table><tr><td>foo</td>}}</tr></table>
11895 <table><tr><td>foo</td></tr></table>
11900 Templates: HTML Tables: 2a. Generating middle of a HTML table
11902 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11904 <table><tr><td>foo</td></tr></table>
11909 Templates: HTML Tables: 2b. Generating middle of a HTML table
11911 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11913 <table><tr><td>foo</td></tr></table>
11918 Templates: HTML Tables: 3. Generating end of a HTML table
11920 <table><tr>{{echo|<td>foo</td></tr></table>}}
11922 <table><tr><td>foo</td></tr></table>
11927 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11929 {{echo|<table>}}<tr><td>foo</td></tr></table>
11931 <table><tr><td>foo</td></tr></table>
11936 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11938 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11940 <table><tr><td>foo</td></tr></table>
11945 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11947 <table><tr>{{echo|<td>}}foo</td></tr></table>
11949 <table><tr><td>foo</td></tr></table>
11954 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11956 <table><tr><td>foo{{echo|</td>}}</tr></table>
11958 <table><tr><td>foo</td></tr></table>
11963 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11965 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11967 <table><tr><td>foo</td></tr></table>
11972 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11974 <table><tr><td>foo</td></tr>{{echo|</table>}}
11976 <table><tr><td>foo</td></tr></table>
11981 Templates: HTML Tables: 5. Proper fostering of categories from inside
11983 parsoid=wt2html,wt2wt
11985 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11986 <!--Two categories (Bug 50330)-->
11987 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11989 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11990 <!--Two categories (Bug 50330)-->
11991 <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>
11995 Templates: Wiki Tables: 1a. Fostering of entire template content
12003 <tr><td></td></tr></table>
12015 Templates: Wiki Tables: 1b. Fostering of entire template content
12028 <tr><td></td></tr></table>
12042 Templates: Wiki Tables: 2. Fostering of partial template content
12052 <tr><td></td></tr></table>
12065 Templates: Wiki Tables: 3. td-content via multiple templates
12068 {{echo|{{pipe}}a}}{{echo|b}}
12079 Templates: Wiki Tables: 4. Templated tags, no content
12085 <tr><td></td></tr></table>
12090 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12104 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12117 ## This test case is very specific to Parsoid's internals
12118 ## and is hence only tested for Parsoid's code. Parsoid uses
12119 ## a <meta> marker tag for <ref> tags and they are expanded
12120 ## much later. We are verifying that this <meta> tag usage
12121 ## doesn't prevent foster parenting.
12123 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12125 {{PartialTable}}<ref>foo</ref>
12130 <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">
12134 <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>
12138 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12148 <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{{!}}}"]}'>
12149 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12153 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12158 Templates: Lists: Multi-line list-items via templates
12160 *{{echo|a {{nonexistent|
12162 *{{echo|b {{nonexistent|
12165 <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>
12166 <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>
12171 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12173 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12175 <p><i>ab</i>c<i>d</i>e
12180 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12181 (PHP parser generates misnested html)
12183 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12185 <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>
12189 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12190 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12192 parsoid=wt2html,wt2wt
12194 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12196 <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>
12197 <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>
12198 <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>
12202 Templates: Ugly nesting: 4. Divs opened/closed across templates
12204 a<div>b{{echo|c</div>d}}e
12215 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12221 |{{echo|foo</table>}}
12225 <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|}"]}'>
12229 <td>foo</td></tr></tbody></table><span about="#mwt1">
12230 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12235 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12245 <td>1. {{echo|foo </table>}}</td>
12247 <td>2. {{echo|baz </table>}}</td>
12260 <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>"]}'>
12265 <td>1. foo </td></tr></tbody></table></td>
12267 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12268 </span><span about="#mwt2">
12269 </span><span about="#mwt2">
12270 </span><span about="#mwt2">abc</span><span about="#mwt2">
12271 </span><span about="#mwt2">
12272 </span><span about="#mwt2">
12273 </span><span about="#mwt2">
12274 </span><span about="#mwt2">
12275 </span><span about="#mwt2">
12276 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12277 </span><span about="#mwt2">
12282 Templates: Ugly templates: 3. newline-only template parameter
12291 # This looks like a bug: a single newline triggers p/br for some reason.
12293 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12302 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
12303 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12305 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12311 <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
12312 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12316 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
12317 # that are "identical" and generate nesting cycles in the algorithm
12319 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12321 {{echo|<table><tr><td><table>}}
12325 <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"}'>
12326 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12327 </table></td></tr></tbody></table>
12331 Templates: Parameters substituted at the top-level
12333 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12335 <p><i>who</i> me? <b>never!</b>
12338 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
12342 Parser Functions: 1. Simple example
12351 Parser Functions: 2. Nested use (only outermost should be marked up)
12360 ### Pre-save transform tests
12363 pre-save transform: subst:
12369 This is a test template
12373 pre-save transform: normal template
12383 pre-save transform: nonexistent template
12387 {{thistemplatedoesnotexist}}
12389 {{thistemplatedoesnotexist}}
12393 pre-save transform: subst magic variables
12402 # This is bug 89, which I fixed. -- wtm
12404 pre-save transform: subst: templates with parameters
12408 {{subst:paramtest|param="something else"}}
12410 This is a test template with parameter "something else"
12414 Template:nowikitest
12416 <nowiki>'''not wiki'''</nowiki>
12420 pre-save transform: nowiki in subst (bug 1188)
12424 {{subst:nowikitest}}
12426 <nowiki>'''not wiki'''</nowiki>
12430 Template:commenttest
12432 This template has <!-- a comment --> in it.
12436 pre-save transform: comment in subst (bug 1936)
12440 {{subst:commenttest}}
12442 This template has <!-- a comment --> in it.
12446 pre-save transform: unclosed tag
12450 <nowiki>'''not wiki'''
12452 <nowiki>'''not wiki'''
12456 pre-save transform: mixed tag case
12460 <NOwiki>'''not wiki'''</noWIKI>
12462 <NOwiki>'''not wiki'''</noWIKI>
12466 pre-save transform: unclosed comment in <nowiki>
12470 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12472 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12475 # Leading @ in this template definition works around a limitation
12476 # in parsoid's parserTests which otherwise strips the <span> from the
12477 # result (confusing it for a template wrapper)
12481 @<span onmouseover="alert('crap')">Oh no</span>
12485 (confirming safety of fix for subst bug 1936)
12487 {{Template:dangerous}}
12489 <p>@<span>Oh no</span>
12494 pre-save transform: comment containing gallery (bug 5024)
12498 <!-- <gallery>data</gallery> -->
12500 <!-- <gallery>data</gallery> -->
12504 pre-save transform: comment containing extension
12508 <!-- <tag>data</tag> -->
12510 <!-- <tag>data</tag> -->
12514 pre-save transform: comment containing nowiki
12518 <!-- <nowiki>data</nowiki> -->
12520 <!-- <nowiki>data</nowiki> -->
12524 pre-save transform: <noinclude> in subst (bug 3298)
12534 pre-save transform: <onlyinclude> in subst (bug 3298)
12538 {{subst:Includes2}}
12546 {{<includeonly>subst:</includeonly>Includes}}
12550 Template:SafeSubstTest
12552 {{<includeonly>safesubst:</includeonly>Includes}}
12556 bug 22297: safesubst: works during PST
12560 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12566 bug 22297: safesubst: works during normal parse
12575 subst: does not work during normal parse
12579 <p>{{subst:Includes}}
12584 pre-save transform: context links ("pipe trick")
12588 [[Article (context)|]]
12591 [[Bar:Article (context)|]]
12592 [[:Bar:Article (context)|]]
12594 [[|Article (context)]]
12598 [[Article (context)|Article]]
12599 [[Bar:Article|Article]]
12600 [[:Bar:Article|Article]]
12601 [[Bar:Article (context)|Article]]
12602 [[:Bar:Article (context)|Article]]
12604 [[Article (context)]]
12605 [[Bar:X (Y) Z|X (Y) Z]]
12606 [[:Bar:X (Y) Z|X (Y) Z]]
12610 pre-save transform: context links ("pipe trick") with interwiki prefix
12614 [[interwiki:Article|]]
12615 [[:interwiki:Article|]]
12616 [[interwiki:Bar:Article|]]
12617 [[:interwiki:Bar:Article|]]
12619 [[interwiki:Article|Article]]
12620 [[:interwiki:Article|Article]]
12621 [[interwiki:Bar:Article|Bar:Article]]
12622 [[:interwiki:Bar:Article|Bar:Article]]
12626 pre-save transform: context links ("pipe trick") with parens in title
12628 pst title=[[Somearticle (context)]]
12632 [[Article (context)|Article]]
12636 pre-save transform: context links ("pipe trick") with comma in title
12638 pst title=[[Someplace, Somewhere]]
12641 [[Otherplace, Elsewhere|]]
12642 [[Otherplace, Elsewhere, Anywhere|]]
12644 [[Otherplace, Somewhere|Otherplace]]
12645 [[Otherplace, Elsewhere|Otherplace]]
12646 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12650 pre-save transform: context links ("pipe trick") with parens and comma
12652 pst title=[[Someplace (IGNORED), Somewhere]]
12655 [[Otherplace (place), Elsewhere|]]
12657 [[Otherplace, Somewhere|Otherplace]]
12658 [[Otherplace (place), Elsewhere|Otherplace]]
12662 pre-save transform: context links ("pipe trick") with comma and parens
12664 pst title=[[Who, me? (context)]]
12667 [[Me, Myself, and I (1937 song)|]]
12669 [[Yes, you. (context)|Yes, you.]]
12670 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12674 pre-save transform: context links ("pipe trick") with namespace
12676 pst title=[[Ns:Somearticle]]
12680 [[Ns:Article|Article]]
12684 pre-save transform: context links ("pipe trick") with namespace and parens
12686 pst title=[[Ns:Somearticle (context)]]
12690 [[Ns:Article (context)|Article]]
12694 pre-save transform: context links ("pipe trick") with namespace and comma
12696 pst title=[[Ns:Somearticle, Context, Whatever]]
12700 [[Ns:Article, Context, Whatever|Article]]
12704 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12706 pst title=[[Ns:Somearticle, Context (context)]]
12710 [[Ns:Article (context)|Article]]
12714 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12716 pst title=[[Ns:Somearticle (IGNORED), Context]]
12720 [[Ns:Article, Context|Article]]
12724 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12728 [[Article(context)|]]
12729 [[Bar:Article(context)|]]
12730 [[:Bar:Article(context)|]]
12731 [[|Article(context)]]
12735 [[Article(context)|Article]]
12736 [[Bar:Article(context)|Article]]
12737 [[:Bar:Article(context)|Article]]
12738 [[Article(context)]]
12739 [[Bar:X(Y)Z|X(Y)Z]]
12740 [[:Bar:X(Y)Z|X(Y)Z]]
12744 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12748 [[Article (context)|]]
12749 [[Bar:Article (context)|]]
12750 [[:Bar:Article (context)|]]
12751 [[|Article (context)]]
12755 [[Article (context)|Article]]
12756 [[Bar:Article (context)|Article]]
12757 [[:Bar:Article (context)|Article]]
12758 [[Article (context)]]
12759 [[Bar:X (Y) Z|X (Y) Z]]
12760 [[:Bar:X (Y) Z|X (Y) Z]]
12764 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12768 [[Article(context)|]]
12769 [[Bar:Article(context)|]]
12770 [[:Bar:Article(context)|]]
12771 [[|Article(context)]]
12775 [[Article(context)|Article]]
12776 [[Bar:Article(context)|Article]]
12777 [[:Bar:Article(context)|Article]]
12778 [[Article(context)]]
12779 [[Bar:X(Y)Z|X(Y)Z]]
12780 [[:Bar:X(Y)Z|X(Y)Z]]
12784 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12788 [[Article (context), context|]]
12789 [[Article (context),context|]]
12790 [[Bar:Article (context), context|]]
12791 [[Bar:Article (context),context|]]
12792 [[:Bar:Article (context), context|]]
12793 [[:Bar:Article (context),context|]]
12795 [[Article (context), context|Article]]
12796 [[Article (context),context|Article]]
12797 [[Bar:Article (context), context|Article]]
12798 [[Bar:Article (context),context|Article]]
12799 [[:Bar:Article (context), context|Article]]
12800 [[:Bar:Article (context),context|Article]]
12804 pre-save transform: trim trailing empty lines
12808 Empty lines are trimmed
12814 Empty lines are trimmed
12818 pre-save transform: Signature expansion
12823 * <noinclude>~~~</noinclude>
12824 * <includeonly>~~~</includeonly>
12825 * <onlyinclude>~~~</onlyinclude>
12827 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12828 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12829 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12830 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12835 pre-save transform: Signature expansion in nowiki tags (bug 93)
12841 <nowiki>~~~~</nowiki>
12843 <includeonly><nowiki>~~~~</nowiki></includeonly>
12845 <noinclude><nowiki>~~~~</nowiki></noinclude>
12847 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12849 {{subst:Foo}} shall be converted to FOO
12851 As well as inside noinclude/onlyinclude
12852 <noinclude>{{subst:Foo}}</noinclude>
12853 <onlyinclude>{{subst:Foo}}</onlyinclude>
12855 But not inside includeonly
12856 <includeonly>{{subst:Foo}}</includeonly>
12860 <nowiki>~~~~</nowiki>
12862 <includeonly><nowiki>~~~~</nowiki></includeonly>
12864 <noinclude><nowiki>~~~~</nowiki></noinclude>
12866 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12868 FOO shall be converted to FOO
12870 As well as inside noinclude/onlyinclude
12871 <noinclude>FOO</noinclude>
12872 <onlyinclude>FOO</onlyinclude>
12874 But not inside includeonly
12875 <includeonly>{{subst:Foo}}</includeonly>
12879 Parsoid: Recognize nowiki with trailing space in tags
12883 <nowiki ><div>[[foo]]</nowiki >
12891 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12898 Parsoid: Recognize nowiki with odd capitalization
12902 <noWikI ><div>[[foo]]</Nowiki >
12904 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12909 Parsoid: Escape nowiki with trailing space in tags
12913 <p><nowiki > foo </nowiki ></p>
12914 <p>a<nowiki />b</p>
12915 <p>c<nowiki/ >d</p>
12917 <nowiki > foo </nowiki >
12925 Parsoid: Escape weird noWikI capitalizations
12929 <p><noWikI > foo </NoWikI ></p>
12931 <noWikI > foo </NoWikI >
12935 ### Message transform tests
12938 message transform: magic variables
12948 message transform: should not transform wiki markup
12958 message transform: <noinclude> in transcluded template (bug 4926)
12968 message transform: <onlyinclude> in transcluded template (bug 4926)
12978 {{#special:}} page name, known
12982 {{#special:Recentchanges}}
12984 Special:RecentChanges
12988 {{#special:}} page name with subpage, known
12992 {{#special:Recentchanges/param}}
12994 Special:RecentChanges/param
12998 {{#special:}} page name, unknown
13002 {{#special:foobar nonexistent}}
13004 Special:Foobar nonexistent
13008 {{#speciale:}} page name, known
13012 {{#speciale:Recentchanges}}
13014 Special:RecentChanges
13018 {{#speciale:}} page name with subpage, known
13022 {{#speciale:Recentchanges/param}}
13024 Special:RecentChanges/param
13028 {{#speciale:}} page name, unknown
13032 {{#speciale:foobar nonexistent}}
13034 Special:Foobar_nonexistent
13040 ### For Parsoid-specific tests, see
13041 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13046 parsoid=wt2html,wt2wt,html2html
13048 [[Image:foobar.jpg]]
13050 <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>
13053 <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>
13057 Simple image (using File: namespace, now canonical)
13059 [[File:Foobar.jpg]]
13061 <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>
13064 <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>
13068 Right-aligned image
13070 [[File:Foobar.jpg|right]]
13072 <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>
13075 <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>
13081 [[File:Foobar.jpg|right|Caption text]]
13083 <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>
13086 <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>
13090 Image with caption, bug 53312 #1
13092 [[File:Foobar.jpg|right|Caption page stuff]]
13094 <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>
13097 <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>
13101 Image with caption, bug 53312 #2
13103 [[File:Foobar.jpg|right|Caption page=]]
13105 <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>
13108 <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>
13112 Image with caption, bug 53312 #3
13114 [[File:Foobar.jpg|right|Caption page=stuff]]
13116 <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>
13119 <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>
13123 Allow empty links in image captions (Bug 60753)
13127 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13132 <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>
13135 <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>
13137 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13138 </figcaption></figure>
13142 Titles in unlinked images (T23454)
13144 [[File:Foobar.jpg|link=|stuff]]
13146 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13151 Link with empty target
13160 Image with link trail
13162 Linktrails should not work for images: [[File:Foobar.jpg]]s
13164 <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
13167 <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>
13171 Image with empty attribute
13173 parsoid=wt2html,wt2wt,html2html
13175 [[File:Foobar.jpg|right||Caption text]]
13177 <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>
13180 <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>
13184 1. Block image with individual attributes from templates
13186 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13188 <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>
13191 <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>
13195 2. Block Image with individual attributes from templates
13197 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13199 <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>
13202 <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>
13206 3. Inline image with individual attributes from templates
13208 [[File:Foobar.jpg|{{echo|50px}}]]
13210 <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>
13213 <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>
13216 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13217 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13219 Image with multiple attributes from the same template
13221 [[File:Foobar.jpg|{{image_attribs}}]]
13223 <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>
13226 <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>
13230 Image with link tails
13234 123[[File:Foobar.jpg]]456
13235 123[[File:Foobar.jpg|right]]456
13236 123[[File:Foobar.jpg|thumb]]456
13238 <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
13240 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
13241 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
13244 <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>
13246 <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>
13248 <div class="thumb tright">
13249 <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>
13250 <div class="thumbcaption">
13251 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13257 <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>
13258 <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>
13259 <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>
13263 Image with multiple captions -- only last one is accepted
13265 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13267 <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>
13270 <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>
13274 Image with multiple widths -- use last
13276 [[File:Foobar.jpg|200px|300px|caption]]
13278 <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>
13281 <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>
13285 Image with multiple alignments -- use first (bug 48664)
13289 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13291 [[File:Foobar.jpg|middle|text-top|caption]]
13293 <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>
13294 <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>
13297 <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>
13298 <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>
13302 Image with width attribute at different positions
13304 [[File:Foobar.jpg|200px|right|Caption]]
13305 [[File:Foobar.jpg|right|200px|Caption]]
13306 [[File:Foobar.jpg|right|Caption|200px]]
13308 <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>
13309 <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>
13310 <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>
13313 <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>
13314 <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>
13315 <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>
13318 # a sad bit of backward-compatibility
13320 Image with size specified with pxpx (bug 13500, 51628)
13322 parsoid=wt2html,wt2wt,html2html
13324 [[File:Foobar.jpg|20pxpx]]
13325 [[File:Foobar.jpg|200x20pxpx]]
13327 <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>
13328 <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>
13331 <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>
13335 Image with link parameter, wiki target
13337 [[File:Foobar.jpg|link=Main Page]]
13339 <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>
13342 <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>
13345 # parsoid bug 49293 (part 1)
13347 Image with link parameter, URL target
13349 [[File:Foobar.jpg|link=http://example.com/]]
13351 <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>
13354 <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>
13357 # parsoid bug 49293 (part 2)
13359 Image with link parameter, protocol-less URL target
13361 [[File:Foobar.jpg|link=//example.com/]]
13363 <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>
13366 <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>
13370 Escaping non-block captions (T107435)
13373 "modes": ["wt2wt"],
13375 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13379 [[Image:Foobar.jpg|caption]]
13381 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13384 # wgExternalLinkTarget not supported by Parsoid
13386 Image with link parameter, wgExternalLinkTarget
13388 [[Image:foobar.jpg|link=http://example.com/]]
13390 wgExternalLinkTarget='foobar'
13392 <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>
13397 Image with link parameter, wgNoFollowLinks set to false
13399 [[Image:foobar.jpg|link=http://example.com/]]
13401 wgNoFollowLinks=false
13403 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13408 Image with link parameter, wgNoFollowDomainExceptions
13410 [[Image:foobar.jpg|link=http://example.com/]]
13412 wgNoFollowDomainExceptions='example.com'
13414 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13418 # wgExternalLinkTarget not supported by Parsoid
13420 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13422 [[Image:foobar.jpg|link=http://example.com/|Title]]
13424 wgExternalLinkTarget='foobar'
13426 <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>
13431 Image with empty link parameter
13433 [[File:Foobar.jpg|link=]]
13435 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13438 <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>
13442 Image with link parameter (wiki target) and unnamed parameter
13444 [[File:Foobar.jpg|link=Main_Page|Title]]
13446 <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>
13449 <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>
13453 Image with link parameter (URL target) and unnamed parameter
13455 [[File:Foobar.jpg|link=http://example.com/|Title]]
13457 <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>
13460 <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>
13464 Thumbnail image with link parameter
13467 parsoid=wt2html,wt2wt,html2html
13469 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13471 <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>
13474 <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>
13478 Manually-specified thumbnail image
13482 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13484 <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>
13487 <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>
13491 Manually-specified thumbnail image with explicit link to wiki page
13494 parsoid=wt2html,wt2wt,html2html
13496 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13498 <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>
13501 <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>
13505 Manually-specified thumbnail image with explicit link to url
13508 parsoid=wt2html,wt2wt,html2html
13510 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13512 <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>
13515 <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>
13519 Manually-specified thumbnail image with explicit no link
13522 parsoid=wt2html,wt2wt,html2html
13524 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13526 <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>
13529 <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>
13533 Manually-specified thumbnail image with explicit link and alt text
13536 parsoid=wt2html,wt2wt,html2html
13538 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13540 <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>
13543 <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>
13547 Image with frame and link
13549 parsoid=wt2html,wt2wt,html2html
13551 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13553 <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>
13556 <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>
13560 Image with frame and link and explicit alt
13562 parsoid=wt2html,wt2wt,html2html
13564 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13566 <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>
13569 <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>
13573 Image with wiki markup in implicit alt
13575 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13577 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13579 <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>
13580 </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>
13583 <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>
13585 <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>
13589 Alt image option should handle most kinds of wikitext without barfing
13591 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13593 <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>
13596 <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>
13599 ###################
13600 # Conflicting image format options.
13601 # First option specified should 'win'.
13602 # All three cases in each test should be identical.
13605 Image with 'frameless' first.
13607 parsoid=wt2html,wt2wt,html2html
13609 [[File:Foobar.jpg|frameless|caption]]
13611 [[File:Foobar.jpg|frameless|frame|caption]]
13613 [[File:Foobar.jpg|frameless|thumb|caption]]
13615 <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>
13616 </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>
13617 </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>
13620 <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>
13621 <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>
13622 <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>
13626 Image with 'frame' first.
13628 parsoid=wt2html,wt2wt,html2html
13630 [[File:Foobar.jpg|frame|caption]]
13631 [[File:Foobar.jpg|frame|frameless|caption]]
13632 [[File:Foobar.jpg|frame|thumb|caption]]
13634 <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>
13635 <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>
13636 <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>
13639 <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>
13640 <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>
13641 <figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
13645 Image with 'thumb' first.
13647 parsoid=wt2html,wt2wt,html2html
13649 [[File:Foobar.jpg|thumb|caption]]
13650 [[File:Foobar.jpg|thumb|frameless|caption]]
13651 [[File:Foobar.jpg|thumb|frame|caption]]
13653 <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>
13654 <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>
13655 <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>
13658 <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>
13659 <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>
13660 <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>
13663 ###################
13665 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13666 # and https://phabricator.wikimedia.org/T64258
13667 # Foobar has actual size of 1941x220
13668 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13669 # a scalable format.
13670 # 2. Framed images always ignore size options; always render at default size.
13671 # 3. "Unspecified format" and border are the only types which can be
13675 Image: "unspecified format" and border enlarge
13677 parsoid=wt2html,wt2wt,html2html
13679 [[File:Foobar.jpg|2000px]]
13681 [[File:Foobar.jpg|border|2000px]]
13683 <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>
13684 </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>
13687 <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>
13688 <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>
13692 Image: "unspecified format" and border reduce
13694 parsoid=wt2html,wt2wt,html2html
13696 [[File:Foobar.jpg|1000px]]
13698 [[File:Foobar.jpg|border|1000px]]
13700 <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>
13701 </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>
13704 <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>
13705 <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>
13709 Image: thumbs reduce
13711 parsoid=wt2html,wt2wt,html2html
13713 [[File:Foobar.jpg|thumb|50px]]
13715 <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>
13718 <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>
13722 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13724 parsoid=wt2html,wt2wt,html2html
13726 [[File:Foobar.jpg|thumb|2000px]]
13728 [[File:Foobar.svg|thumb|2000px]]
13730 <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>
13731 <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>
13734 <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>
13735 <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>
13739 Image: frameless can reduce in size
13741 parsoid=wt2html,wt2wt,html2html
13743 [[File:Foobar.jpg|frameless|50px]]
13745 <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>
13748 <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>
13752 Image: bitmap frameless can't be enlarged past original size, but vector can
13754 parsoid=wt2html,wt2wt,html2html
13756 [[File:Foobar.jpg|frameless|2000px]]
13758 [[File:Foobar.svg|frameless|2000px]]
13760 <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>
13761 </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>
13764 <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>
13765 <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>
13769 Image: framed images are always unscaled.
13771 parsoid=wt2html,wt2wt,html2html
13773 [[File:Foobar.jpg|frame]]
13775 [[File:Foobar.jpg|frame|50px]]
13777 [[File:Foobar.jpg|frame|50x50px]]
13779 [[File:Foobar.jpg|frame|2000px]]
13781 <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>
13782 <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>
13783 <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>
13784 <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>
13787 <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>
13788 <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>
13789 <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>
13790 <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>
13793 ###################
13796 Link to image page- image page normally doesn't exists, hence edit link
13797 Add test with existing image page
13798 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13802 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13807 bug 18784 Link to non-existent image page with caption should use caption as link text
13809 [[:Image:test|caption]]
13811 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13816 Frameless image caption with a free URL
13818 [[File:Foobar.jpg|http://example.com]]
13820 <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>
13823 <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>
13827 Thumbnail image caption with a free URL
13831 [[File:Foobar.jpg|thumb|http://example.com]]
13833 <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>
13836 <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>
13840 Thumbnail image caption with a free URL and explicit alt
13843 parsoid=wt2html,wt2wt,html2html
13845 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13847 <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>
13850 <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>
13854 SVG thumbnails with no language set
13857 [[File:Foobar.svg|thumb|caption]]
13859 <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>
13862 <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>
13866 SVG thumbnails with language de
13868 parsoid=wt2html,wt2wt,html2html
13870 [[File:Foobar.svg|thumb|caption|lang=de]]
13872 <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>
13875 <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>
13879 SVG thumbnails with invalid language code
13881 parsoid=wt2html,wt2wt,html2html
13883 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13885 <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>
13888 <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>
13892 BUG 1887: A ISBN with a thumbnail
13894 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13896 <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>
13899 <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>
13903 BUG 1887: A RFC with a thumbnail
13905 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13907 <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>
13910 <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>
13914 BUG 1887: A mailto link with a thumbnail
13916 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13918 <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>
13921 <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>
13924 # Pending resolution to bug 368
13926 BUG 648: Frameless image caption with a link
13928 [[File:Foobar.jpg|text with a [[link]] in it]]
13930 <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>
13933 <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>
13937 BUG 648: Frameless image caption with a link (suffix)
13939 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13941 <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>
13944 <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>
13948 BUG 648: Frameless image caption with an interwiki link
13950 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13952 <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>
13955 <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>
13959 BUG 648: Frameless image caption with a piped interwiki link
13961 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13963 <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>
13966 <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>
13970 T107474: Frameless image caption with <nowiki>
13972 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13974 <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>
13978 Escape HTML special chars in image alt text
13980 [[File:Foobar.jpg|& < > "]]
13982 <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>
13985 <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>
13989 Entities in file name and attributes
13991 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
13993 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
13996 <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>
14000 BUG 499: Alt text should have Ӓ, not &1234;
14002 [[File:Foobar.jpg|♀]]
14004 <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>
14007 <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>
14011 Broken image caption with link
14013 parsoid=wt2html,wt2wt,html2html
14015 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14017 <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.
14020 <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>
14024 Image caption containing another image
14026 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14028 <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>
14031 <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>
14035 Image: caption containing a newline
14037 [[File:Foobar.jpg|This
14040 <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>
14043 <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>
14047 Image: caption containing leading space
14048 (The leading space should not trigger nowiki escaping in wt2wt mode)
14050 [[File:Foobar.jpg|thumb| bar]]
14052 <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>
14055 <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>
14059 Image: caption containing a table
14061 parsoid=wt2html,wt2wt,html2html
14063 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14069 and some more text.]]
14071 <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>
14074 <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
14077 <tr><th>Foo </th><th>Bar</th></tr>
14080 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14084 Bug 3090: External links other than http: in image captions
14086 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14088 <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>
14091 <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>
14097 parsoid=wt2html,wt2wt,html2html
14099 [[Image:foobar.jpg|a|class=b]]
14101 <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>
14104 <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>
14108 Localized image handling (1).
14110 parsoid=wt2html,wt2wt,html2html
14113 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14115 <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>
14118 <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>
14122 Localized image handling (2).
14125 parsoid=wt2html,wt2wt,html2html
14128 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14130 <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>
14133 <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>
14137 Localized image handling (3).
14142 <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>
14144 [[File:Foobar.jpg|بندانگشتی]]
14148 "border", "frameless" and "class" attributes on an image.
14151 parsoid=wt2html,wt2wt,html2html
14153 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14155 <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>
14158 <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>
14161 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14163 Invalid image attributes (bug 62500)
14166 parsoid=wt2html,wt2wt,html2html
14168 [[File:Foobar.jpg|thumb|float|left|caption]]
14170 [[File:Foobar.jpg|thumb|righ|caption]]
14172 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14174 <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>
14175 <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>
14176 <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>
14179 <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>
14180 <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>
14181 <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>
14187 #REDIRECT [[File:Barfoo.jpg]]
14190 # FIXME: Parsoid should run this test -- but we'd need to teach the
14191 # mockAPI about the redirected Barfoo.jpg image.
14195 [[Image:Barfoo.jpg]]
14197 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14202 Missing image with uploads disabled
14206 [[File:Foobaz.jpg]]
14208 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14211 <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>
14214 # Parsoid-specific testing for images
14215 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14216 # Currently imperfect due to a flaw in the Parsoid testrunner
14218 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14222 Parsoid-specific image handling - simple image with size and middle alignment
14224 [[File:Foobar.jpg|middle|50px]]
14226 <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>
14230 Parsoid-specific image handling - simple image with size, middle alignment,
14231 non-standard namespace alias
14233 parsoid=wt2wt,wt2html,html2html
14235 [[Image:Foobar.jpg|middle|50px]]
14237 <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>
14241 Parsoid-specific image handling - simple image with size and middle alignment
14244 [[File:Foobar.jpg|50px|middle]]
14246 <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>
14250 Parsoid-specific image handling - simple image with size and middle alignment
14251 and non-standard namespace name
14253 parsoid=wt2html,wt2wt,html2html
14255 [[Image:Foobar.jpg|50px|middle]]
14257 <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>
14261 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14263 [[File:Foobar.jpg|500x10px|baseline|caption]]
14265 <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>
14269 Parsoid-specific image handling - simple image with border and size spec
14271 [[File:Foobar.jpg|50px|border|caption]]
14273 <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>
14277 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14279 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14281 <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>
14285 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14288 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14290 <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>
14294 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14296 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14298 <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>
14302 Parsoid-specific image handling - thumbnail with specific size, halign,
14303 valign, and caption (existing content)
14305 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14307 <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>
14311 Parsoid-specific image handling - framed image with specific size and caption
14314 parsoid=wt2html,wt2wt,html2html
14316 [[File:Foobar.jpg|frame|500x50px|caption]]
14318 <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>
14322 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14325 parsoid=wt2html,wt2wt,html2html
14327 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14329 <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>
14333 Parsoid-specific image handling - frameless image with specific size, border, and caption
14335 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14337 <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>
14341 Parsoid-specific image handling - simple image with a formatted caption
14343 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14345 <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>
14349 Parsoid-specific image handling - caption with a template in it
14351 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14353 <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>
14357 Parsoid-specific image handling - caption with unbalanced tags in it
14359 parsoid=wt2html,wt2wt,html2html
14362 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14366 <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>
14371 Parsoid-specific image handling - empty caption (1)
14373 parsoid=wt2html,wt2wt
14375 [[File:Foobar.jpg|thumb|]]
14377 <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>
14380 # empty captions don't get serialized unless we're in the "round trip" case
14382 Parsoid-specific image handling - empty caption (2)
14386 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14387 <a href="./File:Foobar.jpg">
14388 <img resource="./File:Foobar.jpg"
14389 src="//example.com/images/3/3a/Foobar.jpg"
14390 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14391 height="25" width="220"/>
14393 <figcaption></figcaption>
14396 [[File:Foobar.jpg|thumb]]
14400 Parsoid-specific image handling - whitespace caption
14402 [[File:Foobar.jpg|thumb| ]]
14404 <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>
14408 Parsoid-specific image handling - lang option
14411 [[File:Foobar.svg|lang=de|caption]]
14415 <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>
14419 ## Edge case bugs in Parsoid from T93580
14421 T93580: 1. Templated <ref> inside block images
14423 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14427 <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>
14429 <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>
14433 T93580: 2. <ref> inside inline images
14435 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14439 <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>
14441 <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>
14445 T93580: 3. Templated <ref> inside inline images
14447 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14451 <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>
14453 <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>
14460 Subpage test/subpage
14468 subpage title=[[Subpage test]]
14472 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14477 Subpage noslash link
14479 subpage title=[[Subpage test]]
14483 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14488 Subpage test/1/2/subpage
14494 Relative subpage noslash link
14496 parsoid=wt2wt,wt2html,html2html
14497 subpage title=[[Subpage test/1/2/3/4]]
14503 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14504 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14507 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14508 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14512 Parsoid: dot-slash prefixed wikilinks
14522 </p><p>[[././baz/]]
14527 </p><p>[[././baz/]]
14532 Render invalid page names as plain text (bug 51090)
14545 [[{{echo|./../foo}}|bar]]
14546 [[{{echo|foo/.}}|bar]]
14547 [[{{echo|foo/..}}|bar]]
14548 [[{{echo|foo~~~~bar}}]]
14549 [[{{echo|foo>bar}}]]
14550 [[{{echo|foo././bar}}]]
14551 [[{{echo|foo{bar}}]]
14552 [[{{echo|foo}bar}}]]
14553 [[{{echo|foo[bar}}]]
14554 [[{{echo|foo]bar}}]]
14555 [[{{echo|foo<bar}}]]
14557 <p>[[./../foo|bar]]
14567 </p><p>[[./../foo|bar]]
14580 <p>[[./../foo|bar]]
14591 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14592 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14593 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14594 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14595 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14596 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14597 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14598 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14599 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14600 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14601 [[<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>
14609 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14614 BUG 561: {{/Subpage}}
14616 subpage title=[[Page]]
14620 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14628 Category:MediaWiki User's Guide
14636 [[:Category:MediaWiki User's Guide]]
14638 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14647 [[Category:MediaWiki User's Guide]]
14649 cat=MediaWiki_User's_Guide sort=
14653 PAGESINCATEGORY invalid title fatal (r33546 fix)
14655 {{PAGESINCATEGORY:<bogus>}}
14662 Category with different sort key
14666 [[Category:MediaWiki User's Guide|Foo]]
14668 cat=MediaWiki_User's_Guide sort=Foo
14672 Category with identical sort key
14676 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14678 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
14682 Category with empty sort key
14687 [[Category:MediaWiki User's Guide|]]
14689 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14693 Category with empty sort key and parentheses
14698 [[Category:Foo (bar)|]]
14700 [[Category:Foo (bar)|Foo]]
14703 ## We used to, but no longer wt2wt this test since the default serializer
14704 ## will normalize all categories to serialize on their own line.
14705 ## This wikitext usage is going to be fairly uncommon in production and
14706 ## selser will take care of preserving formatting in those scenarios.
14708 Category with link tail
14714 123[[Category:Foo]]456
14716 123[[Category:Foo]]456
14718 <p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
14722 Category with template
14727 [[Category:{{echo|Foo}}]]
14729 [[Category:{{echo|Foo}}]]
14733 Category with template in sort key
14738 [[Category:Foo|{{echo|Bar}}]]
14740 [[Category:Foo|{{echo|Bar}}]]
14744 Category with template in sort key and title
14749 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14751 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14754 ## We used to, but no longer wt2wt this test since the default serializer
14755 ## will normalize all categories to serialize on their own line.
14756 ## This wikitext usage is going to be fairly uncommon in production and
14757 ## selser will take care of preserving formatting in those scenarios.
14759 Category / paragraph interactions
14763 Foo [[Category:Baz]] Bar
14765 Foo [[Category:Baz]]
14773 [[Category:Baz]] Bar
14786 {{echo|[[Category:Baz]]}}
14799 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14800 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14801 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14802 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14803 <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>
14804 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14807 ## We used to, but no longer wt2wt this test since the default serializer
14808 ## will normalize all categories to serialize on their own line.
14809 ## This wikitext usage is going to be fairly uncommon in production and
14810 ## selser will take care of preserving formatting in those scenarios.
14812 ## The whitespace on the empty line is part of the test. Please do not delete
14814 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14820 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14822 {{echo|[[Category:Foo]] and so should this!}}
14824 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14829 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14831 <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>
14834 ## Parsoid will not try to wt2wt this while preserving newlines because
14835 ## it suppresses excess newlines within list items -- and we don't want to
14836 ## introduce a special case just for categories, which is, in reality somewhat
14837 ## odd behavior -- categories are unlikely to be used in list items like this
14838 ## in top-level pages and are only likely to show up in template-generated
14839 ## list items where this RT-ing is a non-issue.
14841 ## The whitespace on the empty line is part of the test. Please do not delete
14843 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14849 [[Category:Foo]] and this should be part of the same list item
14852 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14854 <ul><li>This and this should be part of the same list item</li>
14855 <li>So should this and this should be part of the same list item</li></ul>
14858 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14859 <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>
14863 ## Newlines and categories that follow the last item of a list
14864 ## are treated differently because this (list followed by categories)
14865 ## is an extremely common pattern on wikis.
14867 3. Categories and newlines: newline suppression for last list item should RT properly
14880 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14882 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14883 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14887 4. Categories and newlines: newline suppression for last list item should RT properly
14895 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14897 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14900 ## only wt2html for this to make sure the algo only applies to the rightmost path
14902 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14915 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14917 <ul><li> d</li></ul></li></ul>
14918 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14921 ## We used to, but no longer wt2wt this test since the default serializer
14922 ## will normalize all categories to serialize on their own line.
14923 ## This wikitext usage is going to be fairly uncommon in production and
14924 ## selser will take care of preserving formatting in those scenarios.
14926 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14930 * a [[Category:Foo]]
14932 <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>
14935 # This test also demonstrates because of newline+category tunneling
14936 # through the list hander, template wrapping doesn't expand to the
14937 # containing list when the list item swallows the category.
14939 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14944 <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
14945 </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>
14949 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14953 {{echo|[[Category:Foo]]
14957 <ul><li> a</li></ul>
14959 <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">
14960 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14961 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14965 Category links with multiple namespaces
14967 [[Category:Project:Foo]]
14969 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
14973 Parsoid: Serialize link to category page with colon escape
14979 [[:Category:Foo|Bar]]
14982 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14983 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14987 # We used to, but no longer wt2wt this test since the default serializer
14988 # will normalize all categories to serialize on their own line.
14989 # This wikitext usage is going to be fairly uncommon in production and
14990 # selser will take care of preventing whitespace insertion if this
14991 # occurs in an article.
14993 # html2html disabled for the same reason (whitespace insertion between
14996 # html2wt disabled because it localizes the "Category" namespace.
14998 Link prefix/suffixes aren't applied to category links
15008 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15012 Parsoid: Serialize link to file page with colon escape
15018 [[:File:Foo.png|Bar]]
15021 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15022 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15027 Parsoid: Serialize a genuine category link without colon escape
15032 [[Category:Foo|Bar]]
15034 <link rel="mw:PageProp/Category" href="./Category:Foo">
15035 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15039 Normalize hrefs properly before testing for invalid link targets (bug 70894)
15043 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15045 [[Category:Toxine bactérienne]]
15049 Parsoid: Defaultsort
15051 {{DEFAULTSORT:Foo}}
15053 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15057 Parsoid: Defaultsort (template-generated)
15059 {{{{echo|DEFAULTSORT}}:Foo}}
15061 <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}}]}'/>
15065 ### Inter-language links
15068 Interlanguage links
15076 es:Alimento fr:Nourriture zh:食品
15078 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15079 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15080 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15084 Duplicate interlanguage links (bug 24502)
15095 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15096 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15097 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15098 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15105 Basic section headings
15112 ===Smaller headline===
15115 <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>
15118 <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>
15121 <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>
15127 Section headings with TOC
15130 === Subheadline 1 ===
15131 ===== Skipping a level =====
15132 ====== Skipping a level ======
15136 ===Another headline===
15138 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15140 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15142 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15144 <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>
15146 <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>
15153 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15155 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15161 <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>
15162 <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>
15163 <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>
15164 <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>
15165 <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>
15168 <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>
15173 TOC anchors don't collide
15181 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15183 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15184 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15185 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15186 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15190 <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>
15191 <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>
15192 <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>
15193 <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>
15197 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15199 Handling of sections up to level 6 and beyond
15202 == Level 2 Heading==
15203 === Level 3 Heading===
15204 ==== Level 4 Heading====
15205 ===== Level 5 Heading=====
15206 ====== Level 6 Heading======
15207 ======= Level 7 Heading=======
15208 ======== Level 8 Heading========
15209 ========= Level 9 Heading=========
15210 ========== Level 10 Heading==========
15212 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15214 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15216 <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>
15218 <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>
15220 <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>
15222 <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>
15224 <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>
15225 <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>
15226 <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>
15227 <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>
15228 <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>
15242 <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>
15243 <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>
15244 <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>
15245 <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>
15246 <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>
15247 <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>
15248 <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>
15249 <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>
15250 <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>
15251 <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>
15256 TOC regression (T11764)
15260 ==== title 1.1.1 ====
15265 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15267 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15269 <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>
15271 <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>
15274 <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>
15277 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15279 <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>
15285 <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>
15286 <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>
15287 <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>
15288 <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>
15289 <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>
15290 <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>
15295 TOC for heading containing <span id="..."></span> (T96153)
15298 ==<span id="old-anchor"></span>New title==
15300 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15302 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15306 <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>
15311 TOC with wgMaxTocLevel=3 (bug 6204)
15317 ==== title 1.1.1 ====
15322 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15324 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15326 <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>
15327 <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>
15330 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15332 <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>
15338 <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>
15339 <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>
15340 <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>
15341 <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>
15342 <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>
15343 <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>
15348 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
15354 ====Section 1.1.1====
15355 ====Section 1.1.1.1====
15358 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15360 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15362 <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>
15365 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15369 <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>
15370 <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>
15371 <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>
15372 <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>
15373 <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>
15379 Resolving duplicate section names
15384 <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>
15385 <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>
15390 Resolving duplicate section names with differing case (bug 10721)
15395 <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>
15396 <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>
15408 Template with sections, __NOTOC__
15415 <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>
15416 <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>
15417 <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>
15418 <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>
15423 __NOEDITSECTION__ keyword
15429 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15430 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15435 Link inside a section heading
15437 ==Section with a [[Main Page|link]] in it==
15439 <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>
15444 TOC regression (T14077)
15451 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15453 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15455 <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>
15458 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15462 <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>
15463 <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>
15464 <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>
15469 BUG 1219 URL next to image (good)
15471 http://example.com [[File:Foobar.jpg]]
15473 <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>
15476 <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>
15480 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15483 The line above must have a trailing space!
15486 But just in case it doesn't...
15488 <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>
15489 <p>The line above must have a trailing space!
15491 <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>
15492 <p>But just in case it doesn't...
15497 Header with special characters (bug 25462)
15499 The tooltips shall not show entities to the user (ie. be double escaped)
15516 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15518 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15520 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15521 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15522 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15523 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15524 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15528 <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>
15531 <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>
15534 <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>
15537 <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>
15540 <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>
15546 Header with space, plus and underscore as entity
15548 Id should not contain + for spaces
15550 == Space between Text ==
15553 == Space-Entity between Text ==
15556 == Plus+between+Text ==
15559 == Plus-Entity+between+Text ==
15562 == Underscore_between_Text ==
15565 == Underscore-Entity_between_Text ==
15568 [[#Space between Text]]
15569 [[#Space-Entity between Text]]
15570 [[#Plus+between+Text]]
15571 [[#Plus-Entity+between+Text]]
15572 [[#Underscore_between_Text]]
15573 [[#Underscore-Entity_between_Text]]
15575 <p>Id should not contain + for spaces
15577 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15579 <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>
15580 <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>
15581 <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>
15582 <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>
15583 <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>
15584 <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>
15588 <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>
15591 <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>
15594 <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>
15597 <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>
15600 <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>
15603 <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>
15605 </p><p><a href="#Space_between_Text">#Space between Text</a>
15606 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15607 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15608 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15609 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15610 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15615 Headers with excess '=' characters
15616 (Are similar tests necessary beyond the 1st level?)
15620 =''italic'' heading==
15621 ==''italic'' heading=
15623 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15625 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15626 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15627 <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>
15628 <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>
15632 <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>
15633 <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>
15634 <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>
15635 <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>
15640 HTML headers vs TOC (bug 23393)
15641 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15653 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15655 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15657 <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>
15658 <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>
15661 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15663 <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>
15664 <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>
15670 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15671 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15672 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15673 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15674 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15675 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15680 Single-line or multiline-comments can follow headings
15682 parsoid=wt2html,wt2wt
15690 <h2><span class="mw-headline" id="foo">foo</span></h2>
15691 <h2><span class="mw-headline" id="bar">bar</span></h2>
15692 <h2><span class="mw-headline" id="baz">baz</span></h2>
15697 BUG 1219 URL next to image (broken)
15699 http://example.com[[File:Foobar.jpg]]
15701 <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>
15704 <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>
15708 Bug 1186 news: in the middle of text
15710 http://en.wikinews.org/wiki/Wikinews:Workplace
15712 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15718 Namespaced link must have a title
15727 Namespaced link must have a title (bad fragment version)
15729 [[Project:#fragment]]
15731 <p>[[Project:#fragment]]
15737 ### HTML tags and HTML attributes
15741 div with no attributes
15743 <div>HTML rocks</div>
15745 <div>HTML rocks</div>
15750 div with double-quoted attribute
15752 <div id="rock">HTML rocks</div>
15754 <div id="rock">HTML rocks</div>
15759 div with single-quoted attribute
15761 <div id='rock'>HTML rocks</div>
15763 <div id="rock">HTML rocks</div>
15768 div with unquoted attribute
15770 <div id=rock>HTML rocks</div>
15772 <div id="rock">HTML rocks</div>
15777 div with illegal double attributes
15779 <div id="a" id="b">HTML rocks</div>
15781 <div id="b">HTML rocks</div>
15786 div with empty attribute value, space before equals
15788 parsoid=wt2html,html2html
15790 <div class =>HTML rocks</div>
15792 <div class="">HTML rocks</div>
15795 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15799 div with multiple empty attribute values
15801 parsoid=wt2html,html2html
15803 <div id= title=>HTML rocks</div>
15805 <div id="title.3D">HTML rocks</div>
15808 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
15812 table with multiple empty attribute values
15814 parsoid=wt2html,html2html
15820 <table title="id=">
15826 <table title="id=">
15827 <tbody><tr><td> hi</td></tr>
15832 div with braces in attribute value
15834 <div title="{}">Foo</div>
15836 <div title="{}">Foo</div>
15839 <div title="{}">Foo</div>
15843 div with empty attribute value, no space before equals
15845 parsoid=wt2html,html2html
15847 <div class=>HTML rocks</div>
15849 <div class="">HTML rocks</div>
15852 <div class="">HTML rocks</div>
15856 HTML multiple attributes correction
15858 <p class="error" class="awesome">Awesome!</p>
15860 <p class="awesome">Awesome!</p>
15865 Table multiple attributes correction
15868 !+ class="error" class="awesome"| status
15873 <th class="awesome"> status
15881 <DIV ID="x">HTML ROCKS</DIV>
15883 <div id="x">HTML ROCKS</div>
15888 Non-ASCII pseudo-tags are rendered as text
15897 Pseudo-tag with URL 'name' renders as url link
15899 <http://example.com/>
15901 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15906 text with amp in the middle of nowhere
15910 <p>Remember AT&T?
15915 text with character entity: eacute
15917 I always thought é was a cute letter.
15919 <p>I always thought é was a cute letter.
15922 <p>I always thought é was a cute letter.</p>
15926 text with entity-escaped character entity-like string: eacute
15928 I always thought &eacute; was a cute letter.
15930 <p>I always thought &eacute; was a cute letter.
15935 text with undefined character entity: xacute
15937 I always thought &xacute; was a cute letter.
15939 <p>I always thought &xacute; was a cute letter.
15946 <data value="5">five</data>
15947 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15948 <mark>This highlighted text</mark>
15950 <p><data value="5">five</data>
15951 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15952 <mark>This highlighted text</mark>
15957 HTML tag with leading space is parsed as text
15961 <p>< div>foo< /div>
15966 ### Nesting tests (see bug 41545, 50604, 51081)
15969 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15970 # Note that html2wt is considerably more difficult if we use <b> in
15971 # the test case, instead of <big>
15973 Ensure that HTML adoption agency algorithm is properly implemented.
15975 <big>X<big>Y</big>Z</big>
15977 <p><big>X<big>Y</big>Z</big>
15981 # This was bug 41545 in the PHP parser.
15982 # Note that tidy doesn't handle this correctly.
15986 <kbd>X<kbd>Y</kbd>Z</kbd>
15988 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15992 # The following cases were bug 51081 in the PHP parser.
15993 # Note that there are some other nestable tags (b, i, etc) which are
15994 # not covered; see bug 51081 for discussion.
15996 # Note that tidy doesn't handle this correctly.
16000 <em>X<em>Y</em>Z</em>
16002 <p><em>X<em>Y</em>Z</em>
16006 # Note that tidy doesn't handle this correctly.
16008 Nesting of <strong>
16010 <strong>X<strong>Y</strong>Z</strong>
16012 <p><strong>X<strong>Y</strong>Z</strong>
16021 <p><q>X<q>Y</q>Z</q></p>
16024 # Note that tidy doesn't handle this correctly.
16028 <ruby>X<ruby>Y</ruby>Z</ruby>
16030 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16034 # Note that tidy doesn't handle this correctly.
16038 <bdo>X<bdo>Y</bdo>Z</bdo>
16040 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16052 [[Media:Foobar.jpg]]
16054 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16059 Media link with text
16061 [[Media:Foobar.jpg|A neat file to look at]]
16063 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16067 # FIXME: this is still bad HTML tag nesting
16068 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16070 Media link with nasty text
16072 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16074 <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>
16077 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16078 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16082 Media link to nonexistent file (bug 1702)
16084 [[Media:No such.jpg]]
16086 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16091 Image link to nonexistent file (bug 1850 - good)
16093 [[File:No_such.jpg]]
16095 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16098 <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>
16102 :Image link to nonexistent file (bug 1850 - bad)
16104 [[:Image:No such.jpg]]
16106 <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>
16109 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16115 Character reference normalization in link text (bug 1938)
16117 [[Main Page|this&that]]
16119 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16126 Test for unicode normalization
16128 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16132 (bug 19451) Links should refer to the normalized form.
16140 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16141 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16142 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16143 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16144 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16149 Empty attribute crash test (bug 2067)
16151 <font color="">foo</font>
16153 <p><font color="">foo</font>
16158 Empty attribute crash test single-quotes (bug 2067)
16160 <font color=''>foo</font>
16162 <p><font color="">foo</font>
16167 Attribute test: equals, then nothing
16169 parsoid=wt2html,html2html
16171 <font color=>foo</font>
16173 <p><font color="">foo</font>
16176 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16180 Attribute test: unquoted value
16182 parsoid=wt2html,html2html
16184 <font color=x>foo</font>
16186 <p><font color="x">foo</font>
16189 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16193 Attribute test: unquoted but illegal value (hash)
16195 <font color=#x>foo</font>
16197 <p><font color="#x">foo</font>
16201 # Parsoid does not serialize to empty attribute syntax,
16202 # so wt2wt and html2wt cases are skipped
16204 Attribute test: no value (T54330)
16206 parsoid=wt2html,html2html
16208 <font color>foo</font>
16210 <p><font color="">foo</font>
16213 <p><font color="">foo</font></p>
16217 Bug 2095: link with three closing brackets
16221 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16224 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16228 Bug 2095: link with pipe and three closing brackets
16230 [[Main Page|link]]]
16232 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16235 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16239 Bug 2095: link with pipe and three closing brackets, version 2
16241 [[Main Page|[http://example.com/]]]
16243 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16246 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16255 Template:Dangerous attribute
16257 " onmouseover="alert(document.cookie)
16261 Template:Dangerous style attribute
16263 border-size: expression(alert(document.cookie))
16269 <div style="float: right; {{{1}}}">Magic div</div>
16273 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
16275 <div title="{{test}}"></div>
16277 <div title="This is a test template"></div>
16281 # Parsoid has enough context to handle this case
16283 Bug 2304: HTML attribute safety (dangerous template; 2309)
16285 <div title="{{dangerous attribute}}"></div>
16287 <div title=""></div>
16290 <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>
16294 Bug 2304: HTML attribute safety (dangerous style template; 2309)
16296 <div style="{{dangerous style attribute}}"></div>
16298 <div style="/* insecure input */"></div>
16303 Bug 2304: HTML attribute safety (safe parameter; 2309)
16305 {{div style|width: 200px}}
16307 <div style="float: right; width: 200px">Magic div</div>
16312 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
16314 {{div style|width: expression(alert(document.cookie))}}
16316 <div style="/* insecure input */">Magic div</div>
16321 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
16323 {{div style|"><script>alert(document.cookie)</script>}}
16325 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16330 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16332 {{div style|" ><script>alert(document.cookie)</script>}}
16334 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16339 Bug 2304: HTML attribute safety (link)
16341 <div title="[[Main Page]]"></div>
16343 <div title="[[Main Page]]"></div>
16348 Bug 2304: HTML attribute safety (italics)
16350 <div title="''foobar''"></div>
16352 <div title="''foobar''"></div>
16357 Bug 2304: HTML attribute safety (bold)
16359 <div title="'''foobar'''"></div>
16361 <div title="'''foobar'''"></div>
16367 Bug 2304: HTML attribute safety (ISBN)
16369 <div title="ISBN 1234567890"></div>
16371 <div title="ISBN 1234567890"></div>
16376 Bug 2304: HTML attribute safety (RFC)
16378 <div title="RFC 1234"></div>
16380 <div title="RFC 1234"></div>
16385 Bug 2304: HTML attribute safety (PMID)
16387 <div title="PMID 1234567890"></div>
16389 <div title="PMID 1234567890"></div>
16394 Bug 2304: HTML attribute safety (web link)
16396 <div title="http://example.com/"></div>
16398 <div title="http://example.com/"></div>
16403 Bug 2304: HTML attribute safety (named web link)
16405 <div title="[http://example.com/ link]"></div>
16407 <div title="[http://example.com/ link]"></div>
16412 Bug 3244: HTML attribute safety (extension; safe)
16414 <div style="<nowiki>background:blue</nowiki>"></div>
16416 <div style="background:blue"></div>
16421 Bug 3244: HTML attribute safety (extension; unsafe)
16423 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16425 <div style="/* insecure input */"></div>
16429 # More MSIE fun discovered by Tom Gilder
16432 MSIE CSS safety test: spurious slash
16434 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16436 <div style="/* insecure input */">evil</div>
16441 MSIE CSS safety test: hex code
16443 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16445 <div style="/* insecure input */">evil</div>
16450 MSIE CSS safety test: comment in url
16452 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16454 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16459 MSIE CSS safety test: comment in expression
16461 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16463 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16468 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16470 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16472 <p style="/* invalid control char */">A</p>
16477 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16479 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16480 <div style="top:EXPRESSION(alert())">B</div>
16482 <p style="/* insecure input */">A</p>
16483 <div style="/* insecure input */">B</div>
16488 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16490 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16491 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16493 <div style="/* insecure input */">A</div>
16494 <p style="/* insecure input */">B</p>
16499 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16501 <div style="background-image:url⁽javascript:alert())">A</div>
16502 <div style="background-image:url₍javascript:alert())">B</div>
16503 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16505 <div style="/* insecure input */">A</div>
16506 <div style="/* insecure input */">B</div>
16507 <p style="/* insecure input */">C</p>
16511 # FIXME: Parsoid fails to sanitize this! See T58846.
16516 title="data:text/html,<img src=1 onerror=alert(1)>"
16517 style="-o-link:attr(title);-o-link-source:current">X</div>
16519 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16524 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16526 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16527 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16528 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16529 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16530 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16531 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16532 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16534 <p style="/* insecure input */">A</p>
16535 <p style="/* insecure input */">B</p>
16536 <p style="/* insecure input */">C</p>
16537 <p style="/* insecure input */">D</p>
16538 <p style="/* insecure input */">E</p>
16539 <p style="/* insecure input */">F</p>
16540 <p style="/* insecure input */">G</p>
16545 Table attribute legitimate extension
16548 !+ style="<nowiki>color:blue</nowiki>"| status
16553 <th style="color:blue"> status
16559 Table attribute safety
16562 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16567 <th style="/* insecure input */"> status
16573 CSS line continuation 1
16575 <div style="background-image: u\ rl(test.jpg);"></div>
16577 <div style="/* insecure input */"></div>
16582 CSS line continuation 2
16584 <div style="background-image: u\ rl(test.jpg); "></div>
16586 <div style="/* invalid control char */"></div>
16597 Expansion of multi-line templates in attribute values (bug 6255)
16599 <div style="background: {{identity|#00FF00}}">-</div>
16601 <div style="background: #00FF00">-</div>
16607 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16609 <div style="background:
16612 <div style="background: #00FF00">-</div>
16615 <div style="background:
16620 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16622 <div style="background: #00FF00">-</div>
16624 <div style="background: #00FF00">-</div>
16629 evil <math>-wiki-tags without Extension:Math enabled
16631 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16633 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16637 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16640 Parser hook: empty input
16651 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16654 ## Don't expect parsoid to rt this form.
16656 Parser hook: empty input using terminated empty elements
16658 parsoid=wt2html,html2html
16669 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16673 Parser hook: empty input using terminated empty elements (space before)
16684 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16688 Parser hook: basic input
16699 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16702 ## Don't expect parsoid to rt this form.
16704 Parser hook: case insensitive
16706 parsoid=wt2html,html2html
16717 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16720 ## Don't expect parsoid to rt this form.
16722 Parser hook: case insensitive, redux
16724 parsoid=wt2html,html2html
16735 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16739 Parser hook: nested tags
16741 <tag><tag></tag></tag>
16750 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16754 Parser hook: basic arguments
16756 <tag width="200" height="100" depth="50" square=""></tag>
16769 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16772 ## Don't expect parsoid to rt this form.
16774 Parser hook: basic arguments, variations
16776 parsoid=wt2html,html2html
16778 <tag width=200 height = "100" depth = '50' square></tag>
16791 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16795 Parser hook: argument containing a forward slash (bug 5344)
16797 <tag filename="/tmp/bla"></tag>
16802 'filename' => '/tmp/bla',
16807 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16810 ## Don't expect parsoid to rt this form.
16812 Parser hook: empty input using terminated empty elements (bug 2374)
16814 parsoid=wt2html,html2html
16826 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16829 ## </tag> should be output literally since there is no matching tag that begins it
16830 ## Don't expect parsoid to rt this form.
16832 Parser hook: basic arguments using terminated empty elements (bug 2374)
16836 <tag width=200 height = "100" depth = '50' square/>
16853 <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
16857 ## Don't expect parsoid to rt this form.
16859 Parser hook: Don't allow unclosed extension tags
16865 this is a '''test'''
16867 <p>test <tag>123
16868 </p><p>this is a <b>test</b>
16871 <p>test <tag>123</p>
16873 <p>this is a <b>test</b></p>
16877 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16881 Parser hook: static parser hook not inside a comment
16883 <statictag>hello, world</statictag>
16885 <statictag action="flush" />
16891 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16892 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
16896 Parser hook: static parser hook inside a comment
16898 <!-- <statictag>hello, world</statictag> -->
16899 <statictag action="flush" />
16904 <!-- <statictag>hello, world</statictag> -->
16905 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
16908 # Nested template calls; this case was broken by Parser.php rev 1.506,
16912 Template:One-parameter
16914 (My parameter is: {{{1}}})
16918 Template:Map-one-parameter
16920 {{{{{1}}}|{{{2}}}}}
16924 Nested template calls
16926 {{Map-one-parameter|One-parameter|param}}
16928 <p>(My parameter is: param)
16937 # HTML+Tidy effectively strips out the empty tags completely
16938 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16939 # which Tidy would have done for the PHP parser had there been content inside it.
16941 Sanitizer: Closing of open tags
16943 <s></s><table></table>
16945 <s></s><table></table>
16948 <p><s></s></p><table></table>
16952 Sanitizer: Closing of open but not closed tags
16961 Sanitizer: Closing of closed but not open tags
16971 Sanitizer: Closing of closed but not open table tags
16975 Table not started</td></tr></table>
16977 <p>Table not started</p>
16979 <p>Table not started</p>
16983 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16985 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16987 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16991 # In HTML5, the restrictions are that id must contain at least one character,
16992 # and must not contain any space characters.
16994 Sanitizer: Validating the contents of the id attribute (bug 4515)
16998 <br id="" /><br id="a space" />
17003 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17005 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
17009 <br id="foo" /><br id="foo" />
17011 Something need to be done. foo-2 ?
17015 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17018 <meta itemprop="hello" content="world">
17019 <meta http-equiv="refresh" content="5">
17020 <meta itemprop="hello" http-equiv="refresh" content="5">
17021 <link itemprop="hello" href="{{SERVER}}">
17022 <link rel="stylesheet" href="{{SERVER}}">
17023 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17027 <p> <meta itemprop="hello" content="world" />
17028 <meta http-equiv="refresh" content="5">
17029 <meta itemprop="hello" content="5" />
17031 <link itemprop="hello" href="http://example.org" />
17032 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17033 <link itemprop="hello" href="http://example.org" />
17039 Language converter: output gets cut off unexpectedly (bug 5757)
17043 this bit is safe: }-
17045 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17047 then we get cut off here: }-
17049 all additional text is vanished
17051 <p>this bit is safe: }-
17052 </p><p>but if we add a conversion instance: xxx
17053 </p><p>then we get cut off here: }-
17054 </p><p>all additional text is vanished
17059 Self closed html pairs (bug 5487)
17062 <center><font id="bug" />Centered text</center>
17063 <div><font id="bug2" />In div text</div>
17065 <center><font id="bug" />Centered text</center>
17066 <div><font id="bug2" />In div text</div>
17075 Punctuation: nbsp before exclamation
17079 <p>C'est grave !
17084 Punctuation: CSS !important (bug 11874)
17086 <div style="width:50% !important">important</div>
17088 <div style="width:50% !important">important</div>
17093 Punctuation: CSS ! important (bug 11874; with space after)
17095 <div style="width:50% ! important">important</div>
17097 <div style="width:50% ! important">important</div>
17102 HTML bullet list, closed tags (bug 5497)
17115 <ul data-parsoid='{"stx":"html"}'>
17116 <li data-parsoid='{"stx":"html"}'>One</li>
17117 <li data-parsoid='{"stx":"html"}'>Two</li>
17123 HTML bullet list, unclosed tags (bug 5497)
17135 <ul data-parsoid='{"stx":"html"}'>
17136 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17137 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17143 HTML ordered list, closed tags (bug 5497)
17156 <ol data-parsoid='{"stx":"html"}'>
17157 <li data-parsoid='{"stx":"html"}'>One</li>
17158 <li data-parsoid='{"stx":"html"}'>Two</li>
17164 HTML ordered list, unclosed tags (bug 5497)
17177 <ol data-parsoid='{"stx":"html"}'>
17178 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17179 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17185 HTML nested bullet list, closed tags (bug 5497)
17208 <ul data-parsoid='{"stx":"html"}'>
17209 <li data-parsoid='{"stx":"html"}'>One</li>
17210 <li data-parsoid='{"stx":"html"}'>Two:
17211 <ul data-parsoid='{"stx":"html"}'>
17212 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17213 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17220 HTML nested bullet list, open tags (bug 5497)
17257 HTML nested ordered list, closed tags (bug 5497)
17282 HTML nested ordered list, open tags (bug 5497)
17319 HTML ordered list item with parameters oddity
17321 <ol><li id="fragment">One</li>
17324 <ol><li id="fragment">One</li>
17329 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
17331 bug 5918: autonumbering
17333 [http://first/] [http://second] [ftp://ftp]
17337 [mailto:enclosed@mail.tld With target]
17339 [mailto:enclosed@mail.tld]
17341 mailto:inline@mail.tld
17343 <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>
17344 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17345 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17346 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17347 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17350 <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>
17351 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17352 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17353 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17354 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17359 # Security and HTML correctness
17360 # From Nick Jenkins' fuzz testing
17364 Fuzz testing: Parser13
17379 Fuzz testing: Parser14
17384 <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>
17385 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17387 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17393 <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>
17395 <div id="toc" class="toc">
17396 <div id="toctitle">
17400 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17407 Fuzz testing: Parser14-table
17409 parsoid=wt2html,html2html
17414 <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>
17415 <table style="__TOC__">
17420 <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>
17421 <table style="__TOC__">
17428 <table style="__TOC__"></table>
17431 # Known to produce bogus xml (extra </td>)
17433 Fuzz testing: Parser16
17460 Fuzz testing: Parser21
17463 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17468 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17478 Fuzz testing: Parser22
17480 http://===r:::https://b
17484 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17492 # Known to produce bad XML for now
17494 Fuzz testing: Parser24
17499 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17500 <br style="onmouseover='alert(document.cookie);' " />
17502 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17507 <u class="|">}}}} >
17508 <br style="onmouseover='alert(document.cookie);'" />
17510 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17519 # Note: the current result listed for this is not what the original one was,
17520 # but the original bug was JavaScript injection, which is fixed in any case.
17521 # It's not clear that the original result listed was any more correct than the
17522 # current one. Original result:
17525 # <li class="||">
17526 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17528 Fuzz testing: Parser25 (bug 6055)
17534 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17536 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17541 Fuzz testing: URL adjacent extension (with space, clean)
17543 http://example.com <nowiki>junk</nowiki>
17545 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17548 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17552 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17554 http://example.com<nowiki>junk</nowiki>
17556 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17559 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17563 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17565 http://example.com<pre>junk</pre>
17567 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17570 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17575 <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>
17579 Fuzz testing: image with bogus manual thumbnail
17581 [[Image:foobar.jpg|thumbnail= ]]
17583 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17586 <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>
17590 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17592 <pre dir=" "></pre>
17594 <pre dir=" "></pre>
17599 Parsing optional HTML elements (Bug 6171)
17604 <td> Some tabular data</td>
17605 <td> More tabular data ...
17606 <td> And yet som tabular data</td>
17612 <td> Some tabular data</td>
17613 <td> More tabular data ...
17614 </td><td> And yet som tabular data</td>
17621 Correct handling of <td>, <tr> (Bug 6171)
17626 <td> Some tabular data</td>
17627 <td> More tabular data ...</td>
17628 <td> And yet som tabular data</td>
17634 <td> Some tabular data</td>
17635 <td> More tabular data ...</td>
17636 <td> And yet som tabular data</td>
17644 Parsing crashing regression (fr:JavaScript)
17648 <p></body></x>
17653 Inline wiki vs wiki block nesting
17659 <p><b>Bold paragraph</b>
17660 </p><p>New wiki paragraph
17664 # FIXME: The current php output is documented
17665 # and desired output is the parsoid target.
17667 Inline HTML vs wiki block nesting
17673 <p><b>Bold paragraph
17674 </p><p>New wiki paragraph</b>
17677 <p><b>Bold paragraph</b>
17678 </p><p>New wiki paragraph
17682 # Original result was this:
17683 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17685 # While that might be marginally more intuitive, maybe, the six-apostrophe
17686 # construct is clearly pathological and the result stated here (which is what
17687 # the parser actually does) is about as reasonable as anything.
17689 Mixing markup for italics and bold
17692 '''bold''''''bold''bolditalics'''''
17694 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17702 Article for special page transclusion test
17706 Special page transclusion
17709 {{Special:Prefixindex/Xyzzyx}}
17711 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17717 Special page transclusion twice (bug 5021)
17720 {{Special:Prefixindex/Xyzzyx}}
17721 {{Special:Prefixindex/Xyzzyx}}
17723 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17725 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17731 Transclusion of default MediaWiki message
17733 {{MediaWiki:Mainpage}}
17740 Transclusion of nonexistent MediaWiki message
17742 {{MediaWiki:Mainpagexxx}}
17744 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17749 Transclusion of MediaWiki message with underscore
17751 {{MediaWiki:history_short}}
17758 Transclusion of MediaWiki message with space
17760 {{MediaWiki:history short}}
17767 Invalid header with following text
17777 Section extraction test (section 0)
17797 Section extraction test (section 1)
17819 Section extraction test (section 2)
17840 Section extraction test (section 3)
17860 Section extraction test (section 4)
17884 Section extraction test (section 5)
17904 Section extraction test (section 6)
17925 Section extraction test (section 7)
17945 Section extraction test (section 8)
17965 Section extraction test (section 9)
17986 Section extraction test (section 10)
18006 Section extraction test (nonexistent section 11)
18025 Section extraction test with bogus heading (section 1)
18030 ==bogus== not a legal section
18034 ==bogus== not a legal section
18038 Section extraction test with bogus heading (section 2)
18043 ==bogus== not a legal section
18050 Section extraction test with comment after heading (section 1)
18062 Section extraction test with comment after heading (section 2)
18074 Section extraction test with bogus <nowiki> heading (section 1)
18079 ==bogus== <nowiki>not a legal section</nowiki>
18083 ==bogus== <nowiki>not a legal section</nowiki>
18087 Section extraction test with bogus <nowiki> heading (section 2)
18092 ==bogus== <nowiki>not a legal section</nowiki>
18098 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
18099 # instead of respecting commented sections
18101 Section extraction prefixed by comment (section 1)
18112 Section extraction prefixed by comment (section 2)
18122 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
18123 # instead of respecting HTML-style headings
18125 Section extraction, mixed wiki and html (section 1)
18141 Section extraction, mixed wiki and html (section 2)
18157 # Formerly testing for bug 3342
18159 Section extraction, heading surrounded by <noinclude>
18163 <noinclude>==unmarked==</noinclude>
18169 # Test behavior of bug 19910
18171 Sectiion with all-equals
18176 The line above must have a trailing space
18179 But just in case it doesn't...
18183 But just in case it doesn't...
18187 Section replacement test (section 0)
18218 Section replacement test (section 1)
18247 Section replacement test (section 2)
18277 Section replacement test (section 3)
18308 Section replacement test (section 4)
18335 Section replacement test (section 5)
18366 Section replacement test (section 6)
18396 Section replacement test (section 7)
18427 Section replacement test (section 8)
18458 Section replacement test (section 9)
18487 Section replacement test (section 10)
18517 Section replacement test with initial whitespace (bug 13728)
18521 Preformatted initial line
18525 Preformatted initial line
18532 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18544 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18557 Section extraction, <pre> around bogus header (bug 10309)
18574 Section replacement, <pre> around bogus header (bug 10309)
18596 Handling of 
 in URLs
18600 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18603 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18605 a</a></li></ul></li></ul>
18609 Handling of %0A in URLs
18613 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18616 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18620 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18622 5 quotes, code coverage +1 line
18629 <p><b><i></i></b></p>
18632 # same html as previous, but wikitext adjusted to match parsoid html2wt
18633 # note that wt2html and html2html will put the <i> before the <b>
18635 5 quotes, code coverage +1 line w/ nowiki (1)
18637 parsoid=wt2wt,html2wt
18639 '''''<nowiki/>'''''
18644 <p><b><i></i></b></p>
18647 # same as previous, just swapping the <i> and <b>
18649 5 quotes, code coverage +1 line w/ nowiki (2)
18651 '''''<nowiki/>'''''
18656 <p><i><b></b></i></p>
18660 Special:Search page linking.
18664 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18669 {{!}} is a magic word
18671 {{!}} is a magic word there and {{!}} is still a magic word here
18672 | is not a magic word here but {{!}} is still a magic word here
18674 <p>| is a magic word there and | is still a magic word here
18675 | is not a magic word here but | is still a magic word here
18678 <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
18679 | 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>
18686 title=[[Parser test]]
18691 * {{FULLPAGENAMEE}}
18693 * {{BASEPAGENAMEE}}
18697 * {{ROOTPAGENAMEE}}
18699 * {{TALKPAGENAMEE}}
18700 * {{SUBJECTPAGENAME}}
18701 * {{SUBJECTPAGENAMEE}}
18704 * {{NAMESPACENUMBER}}
18708 * {{SUBJECTSPACEE}}
18709 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18711 <ul><li> Parser test</li>
18712 <li> Parser_test</li>
18713 <li> Parser test</li>
18714 <li> Parser_test</li>
18715 <li> Parser test</li>
18716 <li> Parser_test</li>
18717 <li> Parser test</li>
18718 <li> Parser_test</li>
18719 <li> Parser test</li>
18720 <li> Parser_test</li>
18721 <li> Talk:Parser test</li>
18722 <li> Talk:Parser_test</li>
18723 <li> Parser test</li>
18724 <li> Parser_test</li>
18732 <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>
18735 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18745 image4 |300px| centre
18746 image5.svg| http://///////
18751 <ul class="gallery mw-gallery-traditional">
18752 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18753 <div class="thumb" style="height: 150px;">Image1.png</div>
18754 <div class="gallerytext">
18757 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18758 <div class="thumb" style="height: 150px;">Image2.gif</div>
18759 <div class="gallerytext">
18762 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18763 <div class="thumb" style="height: 150px;">Image3</div>
18764 <div class="gallerytext">
18767 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18768 <div class="thumb" style="height: 150px;">Image4</div>
18769 <div class="gallerytext">
18774 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18775 <div class="thumb" style="height: 150px;">Image5.svg</div>
18776 <div class="gallerytext">
18777 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18781 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18782 <div class="thumb" style="height: 150px;">* image6</div>
18783 <div class="gallerytext">
18791 Gallery (with options)
18793 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18794 File:Nonexistent.jpg|caption
18795 File:Nonexistent.jpg
18796 image:foobar.jpg|some '''caption''' [[Main Page]]
18798 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18801 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18802 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18803 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18804 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18805 <div class="gallerytext">
18810 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18811 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18812 <div class="gallerytext">
18815 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18816 <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>
18817 <div class="gallerytext">
18818 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18822 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18823 <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>
18824 <div class="gallerytext">
18827 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18828 <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>
18829 <div class="gallerytext">
18839 Gallery with link that has fragment
18842 image:foobar.jpg|link=Main_Page
18843 image:foobar.jpg|link=Main_Page#section
18844 image:foobar.jpg|link=Main Page#section|caption
18847 <ul class="gallery mw-gallery-traditional">
18848 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18849 <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>
18850 <div class="gallerytext">
18853 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18854 <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>
18855 <div class="gallerytext">
18858 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18859 <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>
18860 <div class="gallerytext">
18870 Gallery with wikitext inside caption
18873 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18874 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18877 <ul class="gallery mw-gallery-traditional">
18878 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18879 <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>
18880 <div class="gallerytext">
18881 <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>
18885 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18886 <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>
18887 <div class="gallerytext">
18888 <p>This is a test template
18897 gallery (with showfilename option)
18899 <gallery showfilename>
18900 File:Nonexistent.jpg|caption
18901 File:Nonexistent.jpg
18902 image:foobar.jpg|some '''caption''' [[Main Page]]
18906 <ul class="gallery mw-gallery-traditional">
18907 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18908 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18909 <div class="gallerytext">
18910 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
18915 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18916 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18917 <div class="gallerytext">
18918 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
18922 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18923 <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>
18924 <div class="gallerytext">
18925 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
18926 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18930 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18931 <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>
18932 <div class="gallerytext">
18933 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
18942 Gallery (with namespace-less filenames)
18945 File:Nonexistent.jpg
18951 <ul class="gallery mw-gallery-traditional">
18952 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18953 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18954 <div class="gallerytext">
18957 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18958 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18959 <div class="gallerytext">
18962 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18963 <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>
18964 <div class="gallerytext">
18967 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18968 <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>
18969 <div class="gallerytext">
18977 HTML Hex character encoding (spells the word "JavaScript")
18979 parsoid=wt2html,wt2wt,html2html
18981 JavaScript
18983 <p>JavaScript
18988 <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>
18992 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18996 <p>&#xsee;&#XSEE;
18999 <p>&#xsee;&#XSEE;</p>
19003 HTML Hex character encoding mixed case
19005 parsoid=wt2html,wt2wt,html2html
19014 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19017 # See: http://www.w3.org/TR/html5/syntax.html#character-references
19018 # Note that U+000C (form feed) is not a valid XML character, so
19019 # it is banned even though allowed in HTML5.
19021 Illegal character references (T106578)
19026 ; Control (low): 
19027 ; Control (high):  Ÿ
19028 ; Surrogate: ��
19029 ; This is an okay astral character: 💩
19038 <dt>Control (low)</dt>
19040 <dt>Control (high)</dt>
19041 <dd>&#x7F; &#x9F;</dd>
19043 <dd>&#xD83D;&#xDCA9;</dd>
19044 <dt>This is an okay astral character</dt>
19050 __FORCETOC__ override
19062 ISBN 978-0-1234-56 789
19064 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19067 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19069 <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>
19073 ISBN followed by 5 spaces
19084 ISBN ISBN 1234567890
19086 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19089 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19092 # Uppercase X and lowercase x as well
19103 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19104 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19105 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19106 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19107 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19108 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19111 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19112 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19113 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19114 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19115 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19116 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19120 ISBN with empty prefix (parsoid test)
19124 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19127 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19131 Bug 22905: <abbr> followed by ISBN followed by </a>
19133 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19135 <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>
19138 <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>
19146 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19151 Double RFC with a wiki link
19155 <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>
19164 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19167 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19171 Centre-aligned image
19173 [[Image:foobar.jpg|centre]]
19175 <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>
19182 [[Image:foobar.jpg|none]]
19184 <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>
19189 Width + Height sized image (using px) (height is ignored)
19191 [[Image:foobar.jpg|640x480px]]
19193 <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>
19198 Width-sized image (using px, no following whitespace)
19200 [[Image:foobar.jpg|640px]]
19202 <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>
19207 Width-sized image (using px, with following whitespace - test regression from r39467)
19209 [[Image:foobar.jpg|640px ]]
19211 <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>
19216 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19218 [[Image:foobar.jpg| 640px]]
19220 <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>
19225 Image with page parameter
19229 [[File:LoremIpsum.djvu|page=2]]
19231 <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>
19234 <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>
19238 Another italics / bold test
19246 # FIXME: The php output seems broken. It's interleaving some open/close tags.
19252 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
19255 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
19260 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
19262 Images with the "|" character in the comment
19264 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
19266 <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>
19269 <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>
19273 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
19275 <html><script>alert(1);</script></html>
19277 <p><html><script>alert(1);</script></html>
19282 HTML with raw HTML ($wgRawHtml==true)
19286 <html><script>alert(1);</script></html>
19288 <p><script>alert(1);</script>
19293 Parents of subpages, one level up
19295 subpage title=[[Subpage test/L1/L2/L3]]
19299 <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>
19305 Parents of subpages, one level up, not named
19307 subpage title=[[Subpage test/L1/L2/L3]]
19311 <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>
19318 Parents of subpages, two levels up
19320 subpage title=[[Subpage test/L1/L2/L3]]
19326 <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
19327 </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>
19332 Parents of subpages, two levels up, without trailing slash or name.
19334 subpage title=[[Subpage test/L1/L2/L3]]
19343 Parents of subpages, two levels up, with lots of extra trailing slashes.
19345 subpage title=[[Subpage test/L1/L2/L3]]
19349 <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>
19354 Subpage test/L1/L2/L3Sibling
19360 Transclusion of a sibling page (one level up)
19362 subpage title=[[Subpage test/L1/L2/L3]]
19371 Transclusion of a child page
19373 subpage title=[[Subpage test/L1/L2]]
19381 # This is wt2html only in Parsoid because we add <nowiki>
19382 # because of {{..}} and we don't expect to fix that to
19383 # eliminate the nowikis selective for {{..}} markup.
19385 Non-transclusion because of too many up levels
19387 subpage title=[[Subpage test/L1/L2/L3]]
19390 {{../../../../More than parent}}
19392 <p>{{../../../../More than parent}}
19397 Definition list code coverage
19403 <dl><dt> title  </dt>
19405 <dt> title </dt>
19411 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19412 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
19413 <dt>title</dt><dd> def</dd></dl>
19417 Don't fall for the self-closing div
19419 <div>hello world</div/>
19421 <div>hello world</div>
19430 <p>[[:Template:Msg]]
19439 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
19443 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
19445 Always escape literal '>' in output, not just after '<'
19459 <p>This is a test template
19460 This is a test template
19472 Inclusion of !userCanEdit() content
19476 <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>
19482 Out-of-order TOC heading levels
19491 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19493 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19495 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19496 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19499 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19501 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19502 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19508 <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>
19509 <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>
19510 <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>
19511 <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>
19512 <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>
19513 <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>
19519 ISBN with a dummy number
19529 ISBN with space-delimited number
19533 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19539 ISBN with multiple spaces, no number
19558 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19559 </p><p>ISBN 12345678901
19565 ISBN with trailing year (bug 8110)
19567 ISBN 1-234-56789-0 - 2006
19569 ISBN 1 234 56789 0 - 2006
19571 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19572 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19580 {{anchorencode:foo bar©#%n}}
19582 <p>foo_bar.C2.A9.23.25n
19587 anchorencode trims spaces
19589 {{anchorencode: __pretty__please__}}
19596 anchorencode deals with links
19598 {{anchorencode: [[hello|world]] [[hi]]}}
19605 anchorencode deals with templates
19607 {{anchorencode: {{Foo}} }}
19614 anchorencode encodes like the TOC generator: (bug 18431)
19616 === _ +:.3A%3A&&]] ===
19617 {{anchorencode: _ +:.3A%3A&&]] }}
19620 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19621 <p>.2B:.3A.253A.26.26.5D.5D
19626 Bug 6200: blockquotes and paragraph formatting
19647 Bug 8293: Use of center tag ruins paragraph formatting
19668 Parsing of overlapping (improperly nested) inline html tags
19670 <span><s>x</span></s>
19672 <p><span><s>x</span></s></span>
19675 <p><span><s>x</s></span>
19680 ### Language variants related tests
19683 Self-link in language variants
19685 title=[[Dunav]] language=sr
19687 Both [[Dunav]] and [[Дунав]] are names for this river.
19689 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19700 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19702 title=[[Duna]] language=sr
19704 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19706 <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.
19711 Link to a section of a variant of this title shouldn't be parsed as self-link
19713 title=[[Duna]] language=sr
19715 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19717 <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.
19722 Link to pages in language variants
19726 Main Page can be written as [[Маин Паге]]
19728 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19734 Multiple links to pages in language variants
19738 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19740 <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>.
19746 Simple template in language variants
19752 <p>This is a test template
19758 Template with explicit namespace in language variants
19764 <p>This is a test template
19770 Basic test for template parameter in language variants
19774 {{парамтест|param=foo}}
19776 <p>This is a test template with parameter foo
19782 Simple category in language variants
19786 [[Category:МедиаWики Усер'с Гуиде]]
19788 cat=МедиаWики_Усер'с_Гуиде sort=
19804 ## We used to, but no longer wt2wt this test since the default serializer
19805 ## will normalize all categories to serialize on their own line.
19806 ## This wikitext usage is going to be fairly uncommon in production and
19807 ## selser will take care of preserving formatting in those scenarios.
19809 Don't convert blue categorylinks to another variant (bug 33210)
19815 [[A]][[Category:分类]]
19819 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19820 <link rel="mw:PageProp/Category" href="Category:分类"/>
19824 Stripping -{}- tags (language variants)
19828 Latin proverb: -{Ne nuntium necare}-
19830 <p>Latin proverb: Ne nuntium necare
19836 Prevent conversion with -{}- tags (language variants)
19838 language=sr variant=sr-ec
19840 Latinski: -{Ne nuntium necare}-
19842 <p>Латински: Ne nuntium necare
19848 Prevent conversion of text with -{}- tags (language variants)
19850 language=sr variant=sr-ec
19852 Latinski: -{Ne nuntium necare}-
19854 <p>Латински: Ne nuntium necare
19860 Prevent conversion of links with -{}- tags (language variants)
19862 language=sr variant=sr-ec
19866 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19872 -{}- tags within headlines (within html for parserConvert())
19874 language=sr variant=sr-ec
19878 <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>
19884 Explicit definition of language variant alternatives
19886 language=zh variant=zh-tw
19888 -{zh:China;zh-tw:Taiwan}-, not China
19890 <p>Taiwan, not China
19896 Conversion around HTML tags
19898 language=sr variant=sr-ec
19900 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19901 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19904 <span title="ЛаCтин">ски</span>
19910 Explicit session-wise language variant mapping (A flag and - flag)
19912 language=zh variant=zh-tw
19914 Taiwan is not China.
19915 But -{A|zh:China;zh-tw:Taiwan}- is China,
19916 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19917 and -{China}- is China.
19919 <p>Taiwan is not China.
19920 But Taiwan is Taiwan,
19921 (This should be stripped!)
19922 and China is China.
19927 Explicit session-wise language variant mapping (H flag for hide)
19929 language=zh variant=zh-tw
19931 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19934 <p>(This should be stripped!)
19940 Adding explicit conversion rule for title (T flag)
19942 language=zh variant=zh-tw showtitle
19944 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19947 <p>Should be stripped!
19952 Testing that changing the language variant here in the tests actually works
19954 language=zh variant=zh showtitle
19956 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19959 <p>Should be stripped!
19964 Recursive conversion of alt and title attrs shouldn't clear converter state
19966 language=zh variant=zh-cn showtitle
19968 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19969 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19973 Should be stripped<span title="Exclamation">!</span>
19978 Bug 24072: more test on conversion rule for title
19980 language=zh variant=zh-tw showtitle
19982 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19983 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19986 <p>This should be stripped!
19987 This won't take interferes with the title rule.
19992 Partly disable title conversion if variant == main language code
19994 language=zh variant=zh title=[[ZH]] showtitle
19996 -{T|zh-cn:CN;zh-tw:TW}-
20004 Partly disable title conversion if variant == main language code, more
20006 language=zh variant=zh title=[[ZH]] showtitle
20016 Raw output of variant escape tags (R flag)
20018 language=zh variant=zh-tw
20020 Raw: -{R|zh:China;zh-tw:Taiwan}-
20022 <p>Raw: zh:China;zh-tw:Taiwan
20027 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20029 language=zh variant=zh-cn
20031 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20038 Conversion rules from [numeric-only string] to [something else] (T48634)
20040 language=zh variant=zh-cn
20042 -{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
20049 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20051 language=zh variant=zh-cn
20053 -{H|zh-cn:foo;zh-tw:;}-foobar
20060 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20062 language=zh variant=zh-cn
20064 -{H|=>zh-cn:foo;}-foobar
20071 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20073 language=zh variant=zh-cn
20082 Nested using of manual convert syntax
20084 language=zh variant=zh-hk
20086 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20088 <p>Nested: Hello Hong Kong!
20092 # Since Parsoid is starting to emit canonical wikitext for links,
20093 # [http://example.com http://example.com] will not RT back to that
20096 Proper conversion of text in external links
20098 language=sr variant=sr-ec
20101 http://www.google.com
20102 gopher://www.google.com
20103 [http://www.google.com http://www.google.com]
20104 [gopher://www.google.com gopher://www.google.com]
20105 [https://www.google.com irc://www.google.com]
20106 [ftp://www.google.com www.google.com/ftp://dir]
20107 [//www.google.com www.google.com]
20109 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20110 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20111 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20112 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20113 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20114 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20115 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20118 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20119 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20120 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20121 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20122 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20123 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20124 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20128 Do not convert roman numbers to language variants
20130 language=sr variant=sr-ec
20134 <p>Фридрих IV је цар.
20139 Unclosed language converter markup "-{"
20150 Don't convert raw rule "-{R|=>}-" to "=>"
20161 Don't break link parsing if language converter markup is in the caption.
20163 language=sr variant=sr-ec
20165 [[Main Page|-{R|main page}-]]
20167 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20171 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20173 Don't break image parsing if language converter markup is in the caption.
20177 [[File:Foobar.jpg|-{R|caption}-]]
20179 <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>
20183 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20185 Don't break list handling if language converter markup is in the item.
20187 language=zh variant=zh-cn
20189 ;-{zh-cn:AAA;zh-tw:BBB}-
20191 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
20198 # FIXME: This test is currently broken in the PHP parser (bug 52661)
20200 Don't break table handling if language converter markup is in the cell.
20202 language=sr variant=sr-ec
20225 Bug 529: Uncovered bullet
20234 # Plain MediaWiki does not remove empty lists, but tidy actually does.
20235 # Templates in Wikipedia rely on this behavior, as tidy has always been
20236 # enabled there. These tests are normally run *without* tidy, so specify the
20237 # full output here.
20238 # To test realistic parsing behavior, apply a tidy-like transformation to both
20239 # the expected output and your parser's output.
20241 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
20243 ******* Foo {{bullet}}
20245 <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>
20251 Bug 529: Uncovered table already at line-start
20274 Bug 529: Uncovered bullet in parser function result
20276 * Foo {{lc:{{bullet}} }}
20284 Bug 5678: Double-parsed template argument
20286 {{lc:{{{1}}}|hello}}
20293 Bug 5678: Double-parsed template invocation
20295 {{lc:{{paramtest {{!}} param = hello }} }}
20297 <p>{{paramtest | param = hello }}
20302 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
20305 title=[[Main Page]]
20307 {{PRVNÍVELKÉ:ěščř}}
20308 {{prvnívelké:ěščř}}
20328 Morwen/13: Unclosed link followed by heading
20335 <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>
20340 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
20347 <h1><span class="mw-headline" id="heading">heading</span></h1>
20352 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
20359 <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>
20374 Paragraphs inside divs (no extra line breaks)
20386 Paragraphs inside divs (extra line break on open)
20401 Paragraphs inside divs (extra line break on close)
20416 Paragraphs inside divs (extra line break on open and close)
20433 Nesting tags, paragraphs on lines which begin with <div>
20435 <div></div><strong>A
20438 <p><strong>A</strong></p>
20439 <p><strong>B</strong></p>
20447 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
20449 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
20451 <blockquote>Line one
20453 Line two</blockquote>
20455 <blockquote>Line one
20456 Line two</blockquote>
20460 <p>Line one Line two</p>
20465 Bug 6200: paragraphs inside blockquotes (extra line break on open)
20470 Line two</blockquote>
20475 Line two</blockquote>
20480 Line two</blockquote>
20484 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20486 <blockquote>Line one
20491 <blockquote>Line one
20504 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20526 Paragraphs inside blockquotes/divs (no extra line breaks)
20528 <blockquote><div>Line one
20530 Line two</div></blockquote>
20532 <blockquote><div>Line one
20533 Line two</div></blockquote>
20538 Paragraphs inside blockquotes/divs (extra line break on open)
20543 Line two</div></blockquote>
20548 Line two</div></blockquote>
20553 Paragraphs inside blockquotes/divs (extra line break on close)
20555 <blockquote><div>Line one
20558 </div></blockquote>
20560 <blockquote><div>Line one
20563 </div></blockquote>
20568 Paragraphs inside blockquotes/divs (extra line break on open and close)
20574 </div></blockquote>
20580 </div></blockquote>
20585 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20587 wgLinkHolderBatchSize=0
20593 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20594 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20595 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20600 Free external link invading image caption
20602 [[Image:Foobar.jpg|thumb|http://x|hello]]
20604 <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>
20609 Bug 15196: localised external link numbers
20613 [http://en.wikipedia.org/]
20615 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20618 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20622 Multibyte character in padleft
20624 {{padleft:-Hello|7|Æ}}
20631 Multibyte character in padright
20633 {{padright:Hello-|7|Æ}}
20640 formatdate parser function
20642 {{#formatdate:2009-03-24}}
20644 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20649 formatdate parser function, with default format
20651 {{#formatdate:2009-03-24|mdy}}
20653 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20658 Spacing of numbers in formatted dates
20660 {{#formatdate:January 15}}
20662 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20667 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
20669 language=nl title=[[MediaWiki:Common.css]]
20671 {{#formatdate:2009-03-24|dmy}}
20673 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20686 Edit comment with link
20690 I like the [[Main Page]] a lot
20692 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20696 Edit comment with link and link text
20700 I like the [[Main Page|best pages]] a lot
20702 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20706 Edit comment with link and link text with suffix
20710 I like the [[Main Page|best page]]s a lot
20712 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20716 Edit comment with section link (non-local, eg in history list)
20718 comment title=[[Main Page]]
20720 /* External links */ removed bogus entries
20722 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20726 Edit comment with section link and text before it (non-local, eg in history list)
20728 comment title=[[Main Page]]
20730 pre-comment text /* External links */ removed bogus entries
20732 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>
20736 Edit comment with section link (local, eg in diff view)
20738 comment local title=[[Main Page]]
20740 /* External links */ removed bogus entries
20742 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20746 Edit comment with subpage link (bug 14080)
20750 title=[[Subpage test]]
20752 Poked at a [[/subpage]] here...
20754 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20758 Edit comment with subpage link and link text (bug 14080)
20762 title=[[Subpage test]]
20764 Poked at a [[/subpage|neat little page]] here...
20766 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20770 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20773 title=[[Subpage test]]
20775 Poked at a [[/subpage]] here...
20777 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20781 Edit comment with bare anchor link (local, as on diff)
20785 title=[[Main Page]]
20789 <a href="#section">#section</a>
20793 Edit comment with bare anchor link (non-local, as on history)
20796 title=[[Main Page]]
20800 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20804 Anchor starting with underscore
20810 <p><a href="#_ref">One</a>
20813 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20817 Id starting with underscore
20819 <div id="_ref"></div>
20821 <div id="_ref"></div>
20826 Space normalisation on autocomment (bug 22784)
20829 title=[[Main Page]]
20831 /* __hello__world__ */
20833 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20837 percent-encoding and + signs in comments (Bug 26410)
20841 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20843 <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>
20846 # Parsoid doesn't support this yet: see bug 73581
20847 # but it *should* omit the 'src' attribute if the image is bad.
20848 # PHP side of tests was disabled in
20849 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20850 # because of issues in the PHP parserTests infrastructure
20851 # (but the output below is indeed what the PHP side emits)
20853 Bad images - basic functionality
20856 !! DISABLED/html/php
20858 <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>
20862 Bad images - bug 16039: text after bad image disappears
20867 !! DISABLED/html/php
20873 <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>
20878 Verify that displaytitle works (bug #22501) no displaytitle
20882 wgAllowDisplayTitle=true
20883 wgRestrictDisplayTitle=false
20885 this is not the the title
20888 <p>this is not the the title
20893 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20898 wgAllowDisplayTitle=true
20899 wgRestrictDisplayTitle=false
20901 this is not the the title
20902 {{DISPLAYTITLE:whatever}}
20905 <p>this is not the the title
20910 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20915 wgAllowDisplayTitle=true
20916 wgRestrictDisplayTitle=true
20918 this is not the the title
20919 {{DISPLAYTITLE:whatever}}
20922 <p>this is not the the title
20927 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20932 wgAllowDisplayTitle=true
20933 wgRestrictDisplayTitle=true
20935 this is not the the title
20936 {{DISPLAYTITLE:screen}}
20939 <p>this is not the the title
20944 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20949 wgAllowDisplayTitle=false
20951 this is not the the title
20952 {{DISPLAYTITLE:screen}}
20955 <p>this is not the the title
20956 <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>
20961 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20966 wgAllowDisplayTitle=false
20968 this is not the the title
20971 <p>this is not the the title
20976 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20981 wgAllowDisplayTitle=true
20982 wgRestrictDisplayTitle=true
20984 this is not the the title
20985 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20987 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20988 <p>this is not the the title
20993 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20998 wgAllowDisplayTitle=true
20999 wgRestrictDisplayTitle=true
21001 this is not the the title
21002 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21004 <span style="color: red;">s</span>creen
21005 <p>this is not the the title
21010 Page status indicators: Empty name is invalid
21014 <indicator name=" "></indicator>
21015 <indicator></indicator>
21017 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21018 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21023 Page status indicators: Weird syntaxes that are okay
21027 <indicator name="empty" />
21028 <indicator name="name"></indicator>
21037 Page status indicators: Torture test
21041 <indicator name="01">hello world</indicator>
21042 <indicator name="02">[[Main Page]]</indicator>
21043 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21044 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21045 <indicator name="05">* foo
21047 <indicator name="06"><nowiki>foo</nowiki></indicator>
21048 <indicator name="07"> Preformatted</indicator>
21049 <indicator name="08"><div>Broken tag</indicator>
21050 <indicator name="09">{| class=wikitable
21053 <indicator name="10">Two
21055 paragraphs</indicator>
21058 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21059 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" />
21060 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>
21061 05=<ul><li> foo</li>
21065 07=<pre>Preformatted
21067 08=<div>Broken tag</div>
21069 09=<table class="wikitable">
21086 preload: check <noinclude> and <includeonly>
21090 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21096 preload: check <onlyinclude>
21100 Goodbye <onlyinclude>Hello world</onlyinclude>
21106 preload: can pass tags through if we want to
21110 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
21112 <includeonly>Hello world</includeonly>
21116 preload: check that it doesn't try to do tricks
21120 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21122 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
21126 Play a bit with r67090 and bug 3158
21128 <div style="width:50% !important"> </div>
21129 <div style="width:50% !important"> </div>
21130 <div style="width:50% !important"> </div>
21131 <div style="border : solid;"> </div>
21133 <div style="width:50% !important"> </div>
21134 <div style="width:50% !important"> </div>
21135 <div style="width:50% !important"> </div>
21136 <div style="border : solid;"> </div>
21139 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21140 <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>
21141 <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>
21142 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
21147 HTML5 data attributes
21149 <span data-foo="bar">Baz</span>
21150 <p data-abc-def_hij="">Quuz</p>
21152 <p><span data-foo="bar">Baz</span>
21154 <p data-abc-def_hij="">Quuz</p>
21157 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
21158 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
21162 Strip reserved data attributes
21164 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
21166 <div data-ok="fred">d</div>
21169 <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>
21173 percent-encoding and + signs in internal links (Bug 26410)
21175 [[User:+%]] [[Page+title%]]
21176 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
21177 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
21178 [[%33%45]] [[%33%45+]]
21180 <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>
21181 <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>
21182 <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>
21183 <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>
21186 <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>
21187 <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>
21188 <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>
21189 <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>
21193 Special characters in embedded file links (bug 27679)
21195 [[File:Contains & ampersand.jpg]]
21196 [[File:Does not exist.jpg|Title with & ampersand]]
21198 <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>
21199 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
21202 <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>
21203 <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>
21207 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
21209 Text's been normalized?
21211 <p>Text's been normalized?
21216 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
21218 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
21220 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
21225 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
21227 [http://www.example.org/ ideograms]
21229 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
21234 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
21236 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
21238 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
21262 Bug 31098 Template which includes system messages which includes the template
21266 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21267 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
21272 Bug31490 Turkish: ucfirst 'blah'
21283 Bug31490 Turkish: ucfirst 'ix'
21294 Bug31490 Turkish: lcfirst 'BLAH'
21305 Bug31490 Turkish: ucfırst (with a dotless i)
21311 <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>
21316 Bug31490 ucfırst (with a dotless i) with English language
21322 <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>
21327 Bug 26375: TOC with italics
21329 title=[[Main Page]]
21332 == ''Lost'' episodes ==
21334 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21336 <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>
21340 <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>
21345 Bug 26375: TOC with bold
21347 title=[[Main Page]]
21350 == '''should be bold''' then normal text ==
21352 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21354 <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>
21358 <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>
21363 Bug 33845: Headings become cursive in TOC when they contain an image
21365 title=[[Main Page]]
21368 == Image [[Image:foobar.jpg]] ==
21370 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21372 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
21376 <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>
21381 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
21383 title=[[Main Page]]
21386 == <blockquote>Quote</blockquote> ==
21388 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21390 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21394 <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>
21398 <div id="toc" class="toc">
21399 <div id="toctitle">
21403 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
21407 <h2><span class="mw-headline" id="Quote"></span></h2>
21409 <p><span class="mw-headline" id="Quote">Quote</span></p>
21411 <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>
21415 Unclosed tags in TOC
21417 title=[[Main Page]]
21421 <small>Hanc marginis exiguitas non caperet.</small>
21424 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21426 <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>
21430 <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>
21431 <p><small>Hanc marginis exiguitas non caperet.</small>
21437 Multiple tags in TOC
21440 == <i>Foo</i> <b>Bar</b> ==
21442 == <i>Foo</i> <blockquote>Bar</blockquote> ==
21444 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21446 <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>
21447 <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>
21451 <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>
21452 <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>
21456 <div id="toc" class="toc">
21457 <div id="toctitle">
21461 <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>
21462 <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>
21466 <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>
21467 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
21469 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
21471 <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>
21474 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21475 # html5 tag parsing.
21477 Tags with parameters in TOC
21482 == <sup class="in-h2">Hello</sup> ==
21484 == <sup class="a > b">Evilbye</sup> ==
21486 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21488 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21489 <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>
21493 <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>
21494 <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>
21497 <meta property="mw:PageProp/toc" />
21498 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21500 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21504 span tags with directionality in TOC
21507 == <span dir="ltr">C++</span> ==
21509 == <span dir="rtl">זבנג!</span> ==
21511 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21513 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21515 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21517 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21519 <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>
21520 <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>
21521 <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>
21522 <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>
21523 <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>
21527 <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>
21528 <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>
21529 <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>
21530 <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>
21531 <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>
21536 Bug 72884: bdi element in ToC
21539 == <bdi>test</bdi> ==
21541 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21543 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21547 <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>
21551 # Note that the html output does not have the <p></p>, but the
21552 # html+tidy output *does*. This is because the empty <p></p> is
21553 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21555 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21560 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21562 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21566 <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>
21570 <div id="toc" class="toc">
21571 <div id="toctitle">
21575 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21579 <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>
21585 == {{int:headline_sample}} ==
21589 Bug 32057: Title needed when expanding <h> nodes.
21591 title=[[Main Page]]
21595 <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>
21600 Strip marker in urlencode
21602 {{urlencode:x<nowiki/>y}}
21603 {{urlencode:x<nowiki/>y|wiki}}
21604 {{urlencode:x<nowiki/>y|path}}
21605 {{urlencode:x<pre id="one">two</pre>y}}
21633 Strip marker in formatNum
21635 {{formatnum:1<nowiki/>2}}
21636 {{formatnum:1<nowiki/>2|R}}
21644 Check noCommafy in formatNum
21648 {{formatnum:123456.78}}
21649 {{formatnum:123456.78|NOSEP}}
21657 Wrong option for formatNum (bug 56199)
21659 {{formatnum:1,234.56|Random}}
21660 {{formatnum:1,234.56|EVERYTHING}}
21661 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21670 Strip marker in grammar
21674 {{grammar:elative|foo<nowiki/>bar}}
21681 Strip marker in padleft
21683 {{padleft:|2|x<nowiki/>y}}
21690 Strip marker in padright
21692 {{padright:|2|x<nowiki/>y}}
21699 Strip marker in anchorencode
21701 {{anchorencode:x<nowiki/>y}}
21708 nowiki inside link inside heading (bug 18295)
21710 ==[[foo|x<nowiki>y</nowiki>z]]==
21712 <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>
21717 new support for bdi element (bug 31817)
21719 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21721 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21726 Ignore pipe between table row attributes
21730 |- id=foo | style='color: red'
21738 <tr id="foo" style="color: red">
21745 Gallery override link with WikiLink (bug 34852)
21748 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21751 <ul class="gallery mw-gallery-traditional">
21752 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21753 <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>
21754 <div class="gallerytext">
21764 Gallery override link with absolute external link (bug 34852)
21767 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21770 <ul class="gallery mw-gallery-traditional">
21771 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21772 <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>
21773 <div class="gallerytext">
21783 Gallery override link with malicious javascript (bug 34852)
21786 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21789 <ul class="gallery mw-gallery-traditional">
21790 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21791 <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>
21792 <div class="gallerytext">
21802 Gallery with invalid title as link (bug 43964)
21805 File:foobar.jpg|link=<
21808 <ul class="gallery mw-gallery-traditional">
21809 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21810 <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>
21811 <div class="gallerytext">
21819 Language parser function
21828 Padleft and padright as substr
21830 {{padleft:|3|abcde}}
21831 {{padright:|3|abcde}}
21839 Special parser function
21841 {{#special:RandomPage}}
21842 {{#special:BaDtItLe}}
21843 {{#special:Foobar}}
21852 Bug 34939 - Case insensitive link parsing ([HttP://])
21854 [HttP://MediaWiki.Org/]
21856 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21859 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21863 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21865 [HttP://MediaWiki.Org/ MediaWiki]
21867 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21872 Bug 34939 - Case insensitive link parsing (HttP://)
21874 HttP://MediaWiki.Org/
21876 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21879 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21897 <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>
21898 <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>
21899 <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>
21900 <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>
21901 <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>
21907 ### Parsoid-specific tests
21908 ### Parsoid-PHP parser incompatibilities
21911 1. SOL-sensitive wikitext tokens as template-args
21913 parsoid=wt2html,wt2wt
21919 <span about="#mwt1" typeof="mw:Transclusion">
21920 </span><ul about="#mwt1"><li>a</li>
21922 <span about="#mwt2" typeof="mw:Transclusion">
21923 </span><ol about="#mwt2"><li>a</li>
21925 <span about="#mwt3" typeof="mw:Transclusion">
21926 </span><dl about="#mwt3"><dd>a</dd>
21930 #### -----------------------------------------------------------------
21931 #### Parsoid-specific functionality tests
21932 #### -----------------------------------------------------------------
21934 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21935 # We know wt2wt will fail, but we expect selser to pass.
21936 # Due to the nature of our testing, wt2wt and selser tests will enter the
21937 # blacklist and we'll catch selser regressions based on changes to the
21938 # blacklist entries for selser tests.
21940 1. Bad treebuilder fixup of formatting elt is cleaned up
21942 parsoid=wt2html,wt2wt
21947 [[Image:Foobar.jpg|right|Test]]
21954 <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>
21961 2. Bad treebuilder fixup of formatting elt is cleaned up
21963 parsoid=wt2html,wt2wt
21965 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21967 <small>[[Image:Foobar.jpg|right|300px]]</small>
21971 <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>
21973 <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>
21977 3. Bad treebuilder fixup of formatting elt is cleaned up
21979 parsoid=wt2html,wt2wt
21981 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21983 <p><small><b>foo</b></small></p>
21984 <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>
21985 <p><small><b>bar</b></small></p>
21989 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21991 parsoid=wt2html,wt2wt
21993 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21995 <p><b><small></small></b></p>
21996 <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>
22000 #### ----------------------------------------------------------------
22001 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
22002 #### tags. Parsoid's output for these tags differs from that of the
22004 #### ----------------------------------------------------------------
22007 Ref: 1. ref-location should be replaced with an index span
22010 B <ref name="x">foo</ref>
22014 <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>
22015 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>
22016 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>
22017 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22018 <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>
22019 <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>
22020 <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>
22025 Ref: 2. ref-tags with identical names should all get the same index
22027 A <ref name="x">foo</ref>
22031 <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>
22032 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>
22033 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22034 <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>
22039 Ref: 3. spaces in ref-names should be ignored
22041 A <ref name="x">foo</ref>
22042 B <ref name=" x " />
22046 <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>
22047 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>
22048 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>
22049 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22050 <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>
22054 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
22056 Ref: 4. 'constructor' should be accepted as a valid ref-name
22058 A <ref name="constructor">foo</ref>
22061 <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>
22062 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22063 <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>
22068 Ref: 5. body should accept generic wikitext
22071 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
22076 <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>
22078 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22079 <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>
22085 Ref: 6. indent-pres should not be output in ref-body
22095 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
22097 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22098 <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
22106 Ref: 7. No p-wrapping in ref-body
22123 <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>
22125 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22126 <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
22141 Ref: 8. transclusion wikitext has lower precedence
22143 A <ref> foo {{echo|</ref> B C}}
22147 <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>
22148 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22149 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo {{echo|</span></li>
22154 Ref: 9. unclosed comments should not leak out of ref-body
22156 A <ref> foo <!--</ref> B C
22159 <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>
22160 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22161 <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>
22166 Ref: 10. Unclosed HTML tags should not leak out of ref-body
22168 A <ref> <b> foo </ref> B C
22172 <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>
22175 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22176 <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>
22181 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
22187 <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
22188 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>
22189 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22190 <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>
22191 <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>
22196 Ref: 12. ref-tags act as trailing newline migration barrier
22198 <!--the newline at the end of this line moves out of the p tag-->a
22200 b<!--the newline at the end of this line stays inside the p tag--> <ref />
22206 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
22209 <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>
22210 <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>
22213 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22214 <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>
22215 <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>
22219 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
22226 <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
22227 <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>
22228 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22229 <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>
22230 <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
22236 Ref: 14. A nested ref-tag should be emitted as plain text
22238 <ref>foo <ref>bar</ref> baz</ref>
22242 <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>
22244 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22245 <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>
22250 Ref: 15. ref-tags with identical names should get identical indexes
22252 A1 <ref name="a">foo</ref> A2 <ref name="a" />
22253 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
22257 <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>
22258 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>
22260 <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>
22264 ## We don't bother wt2wt-ing non-standard whitespace
22266 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
22274 <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>
22275 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22276 <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>
22280 Ref: 17. Generate valid HTML5 id/about attributes
22282 <ref name="a b">foo</ref>
22286 <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>
22289 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22290 <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>
22295 Ref: 18. T58916: Extension attributes should be parsed as plain text
22297 <ref name="{{echo|a}}">foo</ref>
22301 <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>
22304 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22305 <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>
22310 Ref: 19. ref-tags with identical name encodings should get identical indexes
22312 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
22316 <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>
22318 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22319 <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>
22324 Ref: 20. ref-tags with identical names but different content should keep it
22326 A <ref name="foo">Foo one</ref>
22327 B <ref name="foo">Foo two</ref>
22328 C <ref name="foo" />
22332 <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>
22333 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>
22334 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>
22336 <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>
22341 References: 1. references tag without any refs should be handled properly
22345 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22349 References: 2. references tag with group only outputs references from that group
22351 A <ref group="a">foo</ref>
22352 B <ref group="b">bar</ref>
22355 <references group="a" />
22357 <references group="b" />
22359 <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>
22360 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>
22361 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>
22363 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
22364 <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>
22366 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
22367 <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>
22369 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
22370 <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>
22375 References: 3. ref list should be cleared after processing references
22385 <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>
22387 <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>
22390 <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>
22392 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
22393 <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>
22398 References: 4. only referenced group should be cleared after processing references
22400 A <ref group="a">afoo</ref>
22403 <references group="a" />
22409 <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>
22410 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>
22412 <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>
22415 <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>
22417 <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>
22421 ## Don't expect this to rt since we're dropping content
22423 References: 5. ref tags in references should be processed while ignoring all other content
22425 parsoid=wt2html,html2html
22428 B <ref name="b">bar</ref>
22431 <ref name="a">foo</ref>
22432 This should just get lost.
22435 <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>
22436 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>
22439 <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>
22444 References: 6. <references /> from a transclusion
22446 <ref>Foo</ref> {{echo|<references />}}
22448 <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>
22453 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
22455 A <ref>foo bar for a</ref>
22456 B <ref group="X" name="b" />
22460 <references group="X">
22461 <ref name="b">foo</ref>
22464 <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>
22465 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>
22468 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
22469 <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>
22472 <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"}}'>
22473 <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>
22478 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22480 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22483 <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>
22484 <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>
22488 # This test only works in wt2html now as the <references /> are always generated
22489 # unless selser is active. Once T72722 is fixed, we should add a changes test
22490 # here to ensure that unrelated changes don't add the new <references />
22491 # when selser is active.
22493 References: 9. Generate missing references list at the end
22496 B <ref group="inexistent">bar</ref>
22498 <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>
22499 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{},"autoGenerated":true}'>
22500 <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>
22502 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"},"autoGenerated":true}'>
22503 <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>
22508 References: 10. New <references/> shouldn't be added for unrelated edits.
22511 "modes": ["selser"],
22512 "changes": [["#x", "remove"]],
22516 Unrelated text<span id="x"> that's going to disappear</span>.
22524 Entities in ref name
22526 <ref name="test & me">hi</ref>
22529 <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>
22530 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22531 <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>
22535 ## The output here may look funny, but it's what the php parser will do. The
22536 ## unclosed references tag becomes escaped text, and then a new references
22537 ## tag is auto-generated. The test is wt2html only because it roundtrips with
22538 ## nowiki tags, and the auto-generated references tag is only dropped in
22541 Generate references for unclosed references tag
22549 <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>
22551 <p><references></p>
22552 <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>
22556 New reference serializes on its own line
22558 parsoid=wt2wt,html2wt
22563 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22566 #### ----------------------------------------------------------------
22567 #### Parsoid-only testing of Parsoid's impl of LST
22568 #### Not implemented yet, see
22569 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22570 #### ----------------------------------------------------------------
22573 LST Sections: 1. Simple section start and end
22575 parsoid={ "suppressErrors": true }
22577 <section begin="2011-05-16" />
22578 <section end="2014-04-10 (MW 1.23wmf22)" />
22580 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22581 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22584 #--------- Test stripping of empty nodes in template content ----------
22586 Empty LI and TR nodes should be stripped from template content
22591 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22595 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22608 Empty LI and TR nodes should not be stripped from top-level content
22635 Empty TR nodes should not be stripped if they have any attributes set
22637 {{EmptyTRWithHTMLAttrTest}}
22639 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22640 <tr align="center"></tr>
22641 <tr><td>foo</td></tr>
22642 <tr align="center"></tr>
22643 <tr><td>bar</td></tr>
22647 #### ----------------------------------------------------------------
22648 #### The following section of tests are primarily to test
22649 #### wikitext escaping capabilities of Parsoid. Given that
22650 #### escaping can be done any number of ways, the wikitext (input)
22651 #### is always adjusted to reflect how Parsoid adds nowiki
22654 #### We are marking several tests as parsoid-only since the
22655 #### HTML in the result section is different from what the
22656 #### PHP parser generates for it.
22657 #### ----------------------------------------------------------------
22660 #### --------------- Headings ---------------
22662 #### 1. Nested inside html <h1>=foo=</h1>
22663 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22664 #### 3. Nested inside html with wikitext split by html tags
22665 #### 4. No escape needed
22666 #### 5. Empty headings <h1></h1>
22667 #### 6. Heading chars in SOL context
22668 #### ----------------------------------------
22670 Headings: 0. Unnested
22680 <p>=foo<i>a</i>=</p>
22682 <nowiki>=foo=</nowiki>
22684 <nowiki> </nowiki>=foo=
22686 <nowiki>=foo=</nowiki>
22688 =foo''a''<nowiki>=</nowiki>
22691 # New headings and existing headings are handled differently
22693 Headings: 1. Nested inside html
22701 <h1 data-parsoid=''>=foo=</h1>
22702 <h2 data-parsoid=''>=foo=</h2>
22703 <h3 data-parsoid=''>=foo=</h3>
22704 <h4 data-parsoid=''>=foo=</h4>
22705 <h5 data-parsoid=''>=foo=</h5>
22706 <h6 data-parsoid=''>=foo=</h6>
22714 =<nowiki>=foo=</nowiki>=
22715 ==<nowiki>=foo=</nowiki>==
22716 ===<nowiki>=foo=</nowiki>===
22717 ====<nowiki>=foo=</nowiki>====
22718 =====<nowiki>=foo=</nowiki>=====
22719 ======<nowiki>=foo=</nowiki>======
22724 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22733 <nowiki>*</nowiki>bar
22739 <nowiki>=bar=</nowiki>
22743 Headings: 3. Nested inside html with wikitext split by html tags
22747 <h1>=<b>bold</b>foo=</h1>
22749 = ='''bold'''foo= =
22753 Headings: 4a. No escaping needed (testing just h1 and h2)
22764 <h1><i>=</i>foo=</h1>
22784 Headings: 4b. No escaping needed (inside p-tags)
22799 Headings: 5. Empty headings
22803 <h1 data-parsoid='{}'></h1>
22805 <h2 data-parsoid='{}'></h2>
22807 <h3 data-parsoid='{}'></h3>
22809 <h4 data-parsoid='{}'></h4>
22811 <h5 data-parsoid='{}'></h5>
22813 <h6 data-parsoid='{}'></h6>
22823 =====<nowiki/>=====
22825 ======<nowiki/>======
22829 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22839 <nowiki>=a=</nowiki>
22841 <nowiki>=a=</nowiki>
22843 <nowiki>=a=</nowiki>
22847 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22860 <nowiki>=a=</nowiki>
22863 <nowiki>=a=</nowiki>
22866 <nowiki>=a=</nowiki>
22871 Headings: 6c. Heading chars in SOL context (leading newline break)
22879 <nowiki>=b=</nowiki>
22883 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22887 <!--c0--><p>=a=</p>
22889 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22891 <!--c0--><nowiki>=a=</nowiki>
22893 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22897 Headings: 6d. Heading chars in SOL context (No escaping needed)
22907 Headings: 7. Insert a newline between new content and headings
22913 <h2 data-parsoid='{}'>A</h2>
22914 <p data-parsoid='{}'>a</p>
22924 #### --------------- Lists ---------------
22925 #### 0. Outside nests (*foo, etc.)
22926 #### 1. Nested inside html <ul><li>*foo</li></ul>
22927 #### 2. Inside definition lists
22928 #### 3. Only bullets at start should be escaped
22929 #### 4. No escapes needed
22930 #### 5. No unnecessary escapes
22931 #### 6. Escape bullets in SOL position
22932 #### 7. Escape bullets in a multi-line context
22933 #### ----------------------------------------
22936 Lists: 0. Outside nests
22946 <nowiki>*</nowiki>foo
22948 <nowiki>#</nowiki>foo
22950 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
22953 ## Making these next 3 tests Parsoid-only since they are html2wt tests
22954 ## to test wikitext escaping, and insignificant whitespace diffs
22955 ## cause PHP parser tests to barf
22957 Lists: 1. Nested inside html (No unnecessary escapes)
22966 <li data-parsoid='{}'>*foo</li>
22967 <li data-parsoid='{}'>#foo</li>
22968 <li data-parsoid='{}'>:foo</li>
22969 <li data-parsoid='{}'>;foo</li>
22977 <li data-parsoid='{}'>*foo</li>
22978 <li data-parsoid='{}'>#foo</li>
22979 <li data-parsoid='{}'>:foo</li>
22980 <li data-parsoid='{}'>;foo</li>
22987 *<nowiki>*foo</nowiki>
22988 *<nowiki>#foo</nowiki>
22989 *<nowiki>:foo</nowiki>
22990 *<nowiki>;foo</nowiki>
22996 #<nowiki>*foo</nowiki>
22997 #<nowiki>#foo</nowiki>
22998 #<nowiki>:foo</nowiki>
22999 #<nowiki>;foo</nowiki>
23003 Lists: 2. Inside definition lists
23007 <dl><dt>;foo</dt></dl>
23008 <dl><dt>:foo</dt></dl>
23011 <dl><dd>:foo</dd></dl>
23015 ; <nowiki>:foo</nowiki>
23017 ; <nowiki>:foo</nowiki>
23024 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23030 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23034 *<nowiki>*foo</nowiki>''it''*bar
23038 Lists: 4. No escapes needed
23051 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23055 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23069 Lists: 5. No unnecessary escapes
23073 <ul><li> bar <span>[[foo]]</span></li></ul>
23074 <ul><li> =bar <span>[[foo]]</span></li></ul>
23075 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23076 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23077 <ul><li> =bar <span>foo]]</span>=</li></ul>
23078 <ul><li> <s></s>: a</li></ul>
23079 <ul><li> <i>* foo</i></li></ul>
23082 * bar <span><nowiki>[[foo]]</nowiki></span>
23084 * =bar <span><nowiki>[[foo]]</nowiki></span>
23086 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23088 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23090 * =bar <span>foo]]</span>=
23098 Lists: 6. Escape bullets in SOL position
23102 <p><!--cmt-->*foo</p>
23104 <!--cmt--><nowiki>*</nowiki>foo
23108 Lists: 7. Escape bullets in a multi-line context
23117 <nowiki>*</nowiki>b
23121 Lists: 8. Escape colons only if not present in tags
23125 <dl><dt>a:b<i>c:d</i></dt></dl>
23127 ; <nowiki>a:b</nowiki>''c:d''
23130 #### --------------- HRs ---------------
23131 #### 1. Single line
23132 #### -----------------------------------
23135 HRs: 1. Single line
23143 ----<nowiki>----</nowiki>
23148 #### --------------- Tables ---------------
23149 #### 1a. Simple example
23150 #### 1b. No escaping needed (!foo)
23151 #### 1c. No escaping needed (|foo)
23152 #### 1d. No escaping needed (|}foo)
23154 #### 2a. Nested in td (<td>foo|bar</td>)
23155 #### 2b. Nested in td (<td>foo||bar</td>)
23156 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23158 #### 3a. Nested in th (<th>foo!bar</th>)
23159 #### 3b. Nested in th (<th>foo!!bar</th>)
23160 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23164 #### 4c. No escaping needed
23165 #### --------------------------------------
23168 Tables: 1a. Simple example
23176 <nowiki>{|</nowiki>
23181 Tables: 1b. No escaping needed
23192 Tables: 1c. No escaping needed
23203 Tables: 1d. No escaping needed
23214 Tables: 2a. Nested in td
23219 <td>foo|bar</td></tr>
23220 <tr><td>x<div>a|b</div></td>
23224 |<nowiki>foo|bar</nowiki>
23226 |x<div><nowiki>a|b</nowiki></div>
23242 Tables: 2b. Nested in td
23248 <td>a<i>b||c</i></td>
23249 <td>a<i><div>b||c</div></i></td>
23250 </tr></tbody></table>
23253 |<nowiki>foo||bar</nowiki>
23254 |a''<nowiki>b||c</nowiki>''
23255 |a''<div><nowiki>b||c</nowiki></div>''
23264 <td>a<i><div>b||c</div></i>
23270 Tables: 2c. Nested in td -- no escaping needed
23286 Tables: 3a. Nested in th
23302 Tables: 3b. Nested in th
23307 <tr><th>foo!!bar</th>
23308 <th><i>foo|bar</i></th>
23309 <th><i>foo!!bar</i></th>
23310 <th><i><span>foo!!bar</span></i></th>
23311 </tr></tbody></table>
23314 !<nowiki>foo!!bar</nowiki>
23315 !''<nowiki>foo|bar</nowiki>''
23316 !''<nowiki>foo!!bar</nowiki>''
23317 !''<span><nowiki>foo!!bar</nowiki></span>''
23326 <th><i>foo!!bar</i>
23328 <th><i><span>foo!!bar</span></i>
23334 Tables: 3c. Nested in th
23339 <tr><th>foo||bar</th>
23340 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23341 </tr></tbody></table>
23344 !<nowiki>foo||bar</nowiki>
23345 !<nowiki>foo||bar</nowiki>
23358 Tables: 4a. Escape -
23374 |<nowiki>-bar</nowiki>
23379 Tables: 4b. Escape +
23395 |<nowiki>+bar</nowiki>
23400 Tables: 4c. No escaping needed
23405 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23406 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23412 <div>a|b</div></td>
23457 Tables: 4d. No escaping needed
23462 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23463 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23464 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23475 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23485 T97430: Don't emit empty nowiki pairs around marker meta tags
23489 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23490 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23492 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23493 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23497 Unclosed xmlish element in table line shouldn't eat end delimiters
23502 <tbody><tr><td> <foo</td>
23503 <td> bar></td></tr>
23520 #### --------------- Links ----------------
23521 #### 1. Quote marks in link text
23522 #### 2. Wikilinks: Escapes needed
23523 #### 3. Wikilinks: No escapes needed
23524 #### 4. Extlinks: Escapes needed
23525 #### 5. Extlinks: No escapes needed
23526 #### --------------------------------------
23528 Links 1. WikiLinks: No escapes needed
23532 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23533 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23534 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23538 [[Foo|x [Foobar] x]]
23540 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23541 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23542 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23547 Links 2. WikiLinks: Escapes needed
23551 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23552 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23553 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23554 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23555 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23556 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23557 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23558 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23559 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23560 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23562 [[Foo|<nowiki>Foobar]</nowiki>]]
23563 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23564 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23565 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23566 [[Foo|<nowiki>|Bar</nowiki>]]
23567 [[Foo|<nowiki>]]bar</nowiki>]]
23568 [[Foo|<nowiki>[[bar</nowiki>]]
23569 [[Foo|<nowiki>x [[ y</nowiki>]]
23570 [[Foo|<nowiki>x ]] y</nowiki>]]
23571 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23573 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23574 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23575 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23576 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23577 <a href="/wiki/Foo" title="Foo">|Bar</a>
23578 <a href="/wiki/Foo" title="Foo">]]bar</a>
23579 <a href="/wiki/Foo" title="Foo">[[bar</a>
23580 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23581 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23582 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23587 Links 3. WikiLinks: No escapes needed
23591 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23592 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23597 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23598 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23603 Links 4. ExtLinks: Escapes needed
23607 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23608 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23609 <p>[http://google.com]</p>
23610 <p>[http://google.com google]</p>
23611 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23612 <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>
23614 [http://google.com <nowiki>[google]</nowiki>]
23615 [http://google.com <nowiki>google]</nowiki>]
23617 <nowiki>[http://google.com]</nowiki>
23619 <nowiki>[http://google.com google]</nowiki>
23621 [http://google.com<nowiki>]</nowiki>
23623 [{{echo|http://google.com}}<nowiki>]</nowiki>
23625 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23626 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23627 </p><p>[http://google.com]
23628 </p><p>[http://google.com google]
23629 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23630 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23635 Links 5. ExtLinks: No escapes needed
23639 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23640 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23642 [http://google.com [google]
23644 [[http://google.com]]
23646 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23647 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23652 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23656 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23657 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23658 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23659 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23660 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23661 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23662 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23663 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23664 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23665 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23666 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23667 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23668 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23671 x<nowiki/>http://example.com<nowiki/>y
23672 http://example.com<nowiki/>?x
23673 http://example.com<nowiki/>&x
23674 http://example.com<nowiki/>'x
23675 http://example.com<nowiki/>,x
23676 http://example.com<nowiki/>.x
23677 http://example.com<nowiki/>;x
23678 http://example.com<nowiki/>:x
23679 http://example.com<nowiki/>;x
23680 http://example.com<nowiki/>!x
23681 http://example.com<nowiki/>=x
23682 http://example.com<nowiki/>(x)
23683 http://example.com(x<nowiki/>)
23687 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23692 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23694 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23695 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23696 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23697 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23698 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23704 "http://example.com"
23705 (http://example.com)
23706 (http://example.com) foo
23707 http://example.com,
23708 http://example.com, foo
23711 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23713 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23714 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23715 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23716 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23717 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23722 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23726 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23727 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23729 http://example.com.,;:!?\
23730 -http://example.com:
23732 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23733 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23738 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23742 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23743 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23744 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23748 X<nowiki/>RFC 123<nowiki/>y
23752 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23756 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23757 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23758 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23765 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23766 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23767 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23772 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23776 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23777 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23778 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23782 X<nowiki/>PMID 123<nowiki/>y
23786 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23790 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23791 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23792 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23799 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23800 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23801 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23806 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23810 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23811 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23812 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23815 ISBN 1234567890<nowiki/>1
23816 ISBN 1234567890<nowiki/>x
23817 a<nowiki/>ISBN 1234567890<nowiki/>b
23821 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23825 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23829 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23834 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23838 <p>this is not a link: http://example.com
23841 this is not a link: <nowiki>http://example.com</nowiki>
23845 Links 15. Link trails can't become link prefixes.
23850 <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>
23852 [[Söfnuður]]-[[00]]
23854 <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>
23858 #### --------------- Quotes ---------------
23859 #### 1. Quotes inside <b> and <i>
23860 #### 2. Link fragments separated by <i> and <b> tags
23861 #### 3. Link fragments inside <i> and <b>
23862 #### 4. No escaping needed
23863 #### --------------------------------------
23865 1a. Quotes inside <b> and <i>
23876 <b>foo'<i>bar'</i>baz</b>
23885 <i>fools'<span> errand</span></i>
23886 <i><span>fool</span>'s errand</i>
23887 '<i>foo</i> bar '<i>baz</i>
23888 a|!*#-:;+-~[]{}b'<i>x</i>
23892 ''<nowiki>''foo''</nowiki>''
23893 ''<nowiki>'''foo'''</nowiki>''
23895 '''<nowiki/>'foo''''
23896 '''<nowiki>''foo''</nowiki>'''
23897 '''<nowiki>'''foo'''</nowiki>'''
23898 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23899 '''foo'''<nowiki/>'s
23905 '''foo'''<nowiki/>'
23906 ''''foo'''<nowiki/>'
23907 ''fools'<span> errand</span>''
23908 ''<span>fool</span>'s errand''
23909 '<nowiki/>''foo'' bar '''baz''
23910 a|!*#-:;+-~[]{}b'''x''
23914 1b. Quotes inside <b> and <i> with other tags on same line
23918 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23919 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23920 <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>
23921 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23922 '<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>
23923 '<i>foo</i> <div title="name">test</div>
23924 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23925 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23926 <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>
23929 '''a'' foo ''[[bar]]''
23930 ''a''' foo ''[[bar]]''
23931 ''a''' foo '''{{echo|[[bar]]}}'''
23932 [[foo]] x'''[[bar]]''
23933 '''foo'' <ref>test</ref>
23934 '''foo'' <div title="name">test</div>
23935 '''foo'' and <br> bar
23940 2. Link fragments separated by <i> and <b> tags
23944 <p>[[<i>foo</i>hello]]</p>
23945 <p>[[<b>foo</b>hello]]</p>
23947 [[''foo''<nowiki>hello]]</nowiki>
23949 [['''foo'''<nowiki>hello]]</nowiki>
23952 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23953 # this is one of the shortcomings of this format
23955 3. Link fragments inside <i> and <b>
23959 <p><i>[[foo</i>]]</p>
23960 <p><b>[[foo</b>]]</p>
23962 ''[[foo''<nowiki>]]</nowiki>
23964 '''[[foo'''<nowiki>]]</nowiki>
23968 4. No escaping needed
23972 <p>'<span><i>bar</i></span>'
23973 '<span><b>bar</b></span>'
23977 '<span>''bar''</span>'
23978 '<span>'''bar'''</span>'
23982 #### ----------- Paragraphs ---------------
23983 #### 1. No unnecessary escapes
23984 #### --------------------------------------
23987 1. No unnecessary escapes
23991 <p>bar <span>[[foo]]</span>
23992 </p><p>=bar <span>[[foo]]</span>
23993 </p><p>[[bar <span>[[foo]]</span>
23994 </p><p>]]bar <span>[[foo]]</span>
23995 </p><p>=bar <span>foo]]</span>=
23998 bar <span><nowiki>[[foo]]</nowiki></span>
24000 =bar <span><nowiki>[[foo]]</nowiki></span>
24002 [[bar <span><nowiki>[[foo]]</nowiki></span>
24004 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24006 =bar <span>foo]]</span><nowiki>=</nowiki>
24009 #### ----------------------- PRE --------------------------
24010 #### 1. Leading whitespace in SOL context should be escaped
24011 #### ------------------------------------------------------
24013 1. Leading whitespace in SOL context should be escaped
24036 <nowiki> </nowiki>a
24038 <nowiki> </nowiki> a
24042 <nowiki> </nowiki> a
24044 <nowiki> </nowiki>a
24047 <nowiki> </nowiki>b
24070 2. Leading whitespace in non-indent-pre contexts should not be escaped
24074 <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>
24075 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24076 <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>
24086 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24105 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24109 <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>
24111 [[File:Foobar.jpg|thumb|caption]]
24115 5. Nowiki escaping should account for indent-pres
24125 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24138 #### --------------- Behavior Switches --------------------
24141 1. Valid behavior switches should be escaped
24148 <nowiki>__TOC__</nowiki>
24149 ''<nowiki>__TOC__</nowiki>''
24153 2. Invalid behavior switches should not be escaped
24164 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24166 Behavior switches should be SOL-transparent
24170 <meta property="mw:PageProp/toc" />
24172 <!-- this one's bogus -->
24175 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24177 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24181 <!-- this one's bogus -->
24190 #### --------------- HTML tags ---------------
24193 #### 3. multi-line html tag
24194 #### 4. extension tags
24195 #### -----------------------------------------
24201 <a href="http://google.com">google</a>
24203 <a href="http://google.com">google</a>
24211 <ul><li> <div>foo</div></li>
24212 <li> <div style="color:red">foo</div></li>
24213 <li> <td></li></ul>
24216 * <nowiki><div>foo</div></nowiki>
24217 * <nowiki><div style="color:red">foo</div></nowiki>
24218 * <nowiki><td></nowiki>
24222 3. multi-line html tag
24241 <p><ref>foo</ref>
24242 </p><p><ref>bar
24243 </p><p>baz</ref>
24246 <nowiki><ref>foo</ref></nowiki>
24248 <nowiki><ref>bar</nowiki>
24250 baz<nowiki></ref></nowiki>
24253 #### --------------- Others ---------------
24259 <p><nowiki>foo</nowiki>
24262 <nowiki>foo</nowiki>
24265 ## The quote-char in the input is necessary for triggering the bug
24267 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
24276 #----------- End of wikitext escaping tests --------------
24280 Tag-like HTML structures are passed through as text
24302 </p><p>1<d e>f
24307 HTML tag with necessary entities in attributes
24309 <span title="&amp;">foo</span>
24311 <p><span title="&amp;">foo</span>
24316 HTML tag with 'unnecessary' entity encoding in attributes
24318 <span title="&">foo</span>
24320 <p><span title="&">foo</span>
24325 HTML tag with broken attribute value quoting
24327 parsoid=wt2html,html2html
24329 <span title="Hello world>Foo</span>
24331 <p><span title="Hello world">Foo</span>
24334 <p><span title="Hello world">Foo</span></p>
24338 Self-closed tag with broken attribute value quoting
24340 parsoid=wt2html,html2html
24342 <div title="Hello world />Foo
24344 <div title="Hello world"></div>
24347 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24351 Table with broken attribute value quoting
24353 parsoid=wt2html,html2html
24356 | title="Hello world|Foo
24361 <td title="Hello world">Foo
24367 <td title="Hello world">Foo
24373 Table with broken attribute value quoting on consecutive lines
24375 parsoid=wt2html,html2html
24378 | title="Hello world|Foo
24379 | style="color:red|Bar
24384 <td title="Hello world">Foo
24386 <td style="color:red">Bar
24392 <td title="Hello world">Foo
24393 </td><td style="color: red">Bar
24394 </td></tr></tbody></table>
24399 Accept empty td cell attribute
24402 | align="center" | foo || |
24407 <td align="center"> foo </td>
24414 Non-empty attributes in th-cells
24417 ! Foo !! style="color: red" | Bar
24423 <th style="color: red"> Bar
24429 Accept empty attributes in th-cells
24444 Empty table rows go away
24465 ### Parsoid-centric tests for testing RTing of inter-element separators
24466 ### Edge cases not tested by existing parser tests and specific to
24467 ### Parsoid-specific serialization strategies.
24471 RT-ed inter-element separators should be valid separators
24483 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24487 # Parsoid-only since PHP parser relies on Tidy for correct output
24489 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24503 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24504 <p>bar</p></small></td></tr>
24508 <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>
24512 # Note that the "style" attribute is really a template parameter here.
24513 # The = would have to be {{=}} if you wanted the literal.
24515 Empty TD followed by TD with tpl-generated attribute
24520 |{{echo|style='color:red'}}|foo
24534 Indented table with an empty td
24552 ## We have some newline diffs RT-ing this edge case
24553 ## and it is not important enough -- we seem to be emitting
24554 ## at most 2 newlines after a </tr> and this is unrelated to
24555 ## the issue from T85627 that this is testing.
24557 Indented table with blank lines in between (T85627)
24576 Indented block & table
24590 <div data-parsoid='{"stx":"html"}'>foo</div>
24592 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24597 Indent and comment before table row
24612 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24613 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24617 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24619 Empty TR followed by a template-generated TR
24625 {{echo|<tr><td>foo</td></tr>}}
24631 <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}}]}'>
24636 ## PHP and parsoid output differ for this, and since this is primarily
24637 ## for testing Parsoid's serializer, marking this Parsoid only
24639 Empty TR followed by mixed-ws-comment line should RT correctly
24655 <!--c--> </tr><!--d-->
24661 Multi-line image caption generated by templates with/without trailing newlines
24663 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24664 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24666 <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>
24667 <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>
24671 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24675 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24677 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24679 <includeonly>foo</includeonly>
24687 ## PHP emits broken html for this, and since this is primarily
24688 ## a Parsoid serializer test, marking this Parsoid only
24690 Improperly nested inline or quotes tags with whitespace in between
24692 <span> <s>x</span> </s>
24695 <p><span> <s>x</s></span><s> </s>
24696 <b> <i>x</i></b><i> </i>
24701 Encapsulate protected attributes from wt
24703 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24705 <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>
24709 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24710 ## Having nested or stray pre tags results in the attempt to add duplicates,
24711 ## causing an assertion fail. This test tries to prevent that situation.
24713 Ensure ParagraphWrapper can deal with stray closing pre tags
24723 1. Ensure fostered text content is wrapped in element nodes
24727 <table>hi</table><table>ho</table>
24736 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24738 parsoid=wt2html,wt2wt
24747 <tbody><tr><td> a</td></tr>
24752 Encapsulation properly handles null DSR information from foster box
24754 parsoid=wt2html,wt2wt
24756 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24758 <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>
24762 1. Encapsulate foster-parented transclusion content
24764 parsoid=wt2wt,wt2html
24766 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24768 <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>
24778 2. Encapsulate foster-parented transclusion content
24780 parsoid=wt2wt,wt2html
24782 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24784 <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>
24795 3. Encapsulate foster-parented transclusion content
24797 parsoid=wt2wt,wt2html
24799 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24801 <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>"]}">
24814 4. Encapsulate foster-parented transclusion content
24816 parsoid=wt2wt,wt2html
24818 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24820 <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>"]}">
24833 5. Encapsulate foster-parented transclusion content
24835 parsoid=wt2wt,wt2html
24837 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24839 <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>
24854 6. Encapsulate foster-parented transclusion content
24856 parsoid=wt2wt,wt2html
24858 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24860 <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>
24876 7. Encapsulate foster-parented transclusion content
24878 parsoid=wt2wt,wt2html
24880 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24882 <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>
24892 # Note that the wt is broken on purpose: the = should be {{=}} if you
24893 # don't want it to be a template parameter key.
24895 8. Encapsulate foster-parented transclusion content
24897 parsoid=wt2wt,wt2html
24900 }}{|{{echo|style='color:red'}}
24905 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24907 <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>
24918 9. Encapsulate foster-parented transclusion content
24920 parsoid=wt2wt,wt2html
24922 <table>{{echo|hi</table>hello}}
24924 <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>
24928 Table in fosterable position
24939 <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">
24941 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24947 # Parsoid only for bug 64747
24949 Properly encapsulate empty-content transclusions in fosterable positions
24957 <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"}]]}'>
24963 Always encapsulate foster box when template range is expanded to table
24976 T115289: Unclosed table
24978 {{echo|<table>}}<!--c-->[[Category:Two]]
24980 <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>
24984 T115289: Don't migrate newlines out of tables with fostered content
24986 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
24988 <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>
24992 T73074: More fostering fun
24994 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
24996 <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>
25000 Support <object> element with .data attribute
25004 <object data="test.swf"></object>
25006 <object data="test.swf"></object>
25010 Don't block XML namespace declaration
25012 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25014 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25017 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25020 # -----------------------------------------------------------------
25021 # The following section of tests are primarily to spec requirements
25022 # around Parsoid's serialization (old, new, edited content)
25024 # All these tests are marked Parsoid html2wt and html2html only
25025 # ----------------------------------------------------------------
25028 Ignore rel attribute in a-tags during serialization to url-links
25032 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25033 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25034 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25036 http://en.wikipedia.org/wiki/Foobar
25037 http://en.wikipedia.org/wiki/Foobar
25038 http://en.wikipedia.org/wiki/Foobar
25041 # 'mi' is a localinterwiki prefix as well as a language
25043 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
25047 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25054 New wikilinks should be serialized properly
25058 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25059 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25060 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25061 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25062 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25066 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25067 http://en.wikipedia.org/wiki/Foo
25068 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25072 New wiki links (href variations)
25076 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25077 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25078 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25079 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25084 [[Toxine bactérienne]]
25088 New wiki links (content string variations)
25092 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25093 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25094 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25098 [[Foo_bar|./Foo_bar]]
25102 New category links (href variations)
25106 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25107 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25108 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25110 [[Category:Toxine bactérienne]]
25111 [[Category:Toxine bactérienne]]
25112 [[Category:Toxine bactérienne]]
25116 New sol transparent links don't need indent-pre nowiki protection
25121 <link rel="mw:PageProp/redirect" href="./Main_Page">
25122 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25123 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25125 #WEITERLEITUNG [[Main Page]]
25126 <!-- this is good --> [[Category:Good]]
25127 <!-- this is great --> [[Kategorie:Great]]
25131 New interlanguage links (href variations)
25135 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25136 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25137 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25139 [[es:Toxine bactérienne]]
25140 [[es:Toxine_bactérienne]]
25141 [[es:Toxine_bactérienne]]
25145 Image: Modifying size of an image (1)
25148 "modes": ["wt2wt"],
25150 ["img[height]", "attr", "height", "22"],
25151 ["img[width]", "attr", "width", "200"]
25155 [[Image:Foobar.jpg|230x230px]]
25157 [[Image:Foobar.jpg|200x200px]]
25161 Image: Modifying size of an image (2)
25164 "modes": ["wt2wt"],
25166 ["img[height]", "attr", "height", "100"],
25167 ["img[width]", "attr", "width", "500"]
25171 [[Image:Foobar.jpg|230x230px]]
25173 [[Image:Foobar.jpg|500x500px]]
25176 # Change in size is ignored so long as class='mw-default-size'
25178 Image: Modifying size of an image (3)
25181 "modes": ["wt2wt"],
25183 ["figure[class]", "removeClass", "mw-default-size"],
25184 ["figure img", "attr", "height", "19"],
25185 ["figure img", "attr", "width", "170"]
25189 [[Image:Foobar.jpg|thumb]]
25191 [[Image:Foobar.jpg|thumb|170x170px]]
25195 Image: Modifying alignment of an image (bug 48665)
25198 "modes": ["wt2wt"],
25200 ["figure[class]", "removeClass", "mw-halign-right"],
25201 ["figure[class]", "addClass", "mw-halign-left"]
25205 [[Image:Foobar.jpg|thumb|caption|right]]
25207 [[Image:Foobar.jpg|thumb|caption|left]]
25211 Image: Modifying mw-default-size of an frameless image (bug 62805)
25214 "modes": ["wt2wt"],
25216 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25220 [[Image:Foobar.jpg|frameless|right]]
25222 [[Image:Foobar.jpg|frameless|right|220x220px]]
25226 Image: Modifying valign of an image (bug 49221)
25229 "modes": ["wt2wt"],
25231 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25232 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25236 [[File:Foobar.jpg|20px|middle]]
25238 [[File:Foobar.jpg|20px|text-top]]
25242 Image: Modifying alt attribute of an image (bug 56400)
25245 "modes": ["wt2wt"],
25247 ["img[alt]", "attr", "alt", "some alternate edited text"]
25251 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25253 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25257 Image: Modifying caption of an image
25260 "modes": ["wt2wt"],
25262 ["figcaption", "text", "new caption"]
25266 [[Image:Foobar.jpg|thumb|original caption]]
25268 [[Image:Foobar.jpg|thumb|new caption]]
25272 Image: empty alt attribute (bug 48924)
25276 [[File:Foobar.jpg|thumb|alt=|bar]]
25278 <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>
25282 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
25288 <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>
25290 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25294 Image: Block level image should have \n before and after
25297 [[File:Foobar.jpg|right|thumb|150x150px]]
25301 <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>
25306 Image: New block level image should have \n before and after (existing content)
25309 [[File:Foobar.jpg|right|thumb|150x150px]]
25313 <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>
25318 Image: upright option (parsoid)
25320 [[File:Foobar.jpg|thumb|upright|caption]]
25321 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25322 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25324 <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>
25325 <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>
25326 <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>
25330 Image: upright option is ignored on inline and frame images (parsoid)
25332 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25334 <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>
25338 Image: from basic HTML (1)
25342 <span typeof="mw:Image">
25343 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25346 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25350 Image: from basic HTML (2)
25354 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25356 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25360 Image: from basic HTML (3)
25364 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25366 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25370 Image: from basic HTML (4)
25374 <img src="./File:Foobar.jpg">
25376 [[File:Foobar.jpg|link=]]
25380 Image: Invalid title as link
25382 [[File:Foobar.jpg|link=<]]
25384 <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>
25387 <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>
25391 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25396 <li><p>foo</p></li>
25403 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25407 <ul> <li>foo</li></ul>
25413 Don't strip leading whitespace when handling indent-pre suppressing tags
25418 <tr><td> indented row</td></tr>
25421 <b>This is very bold of you!</b>
25424 indented cell (no pre-wrapping!)
25434 '''This is very bold of you!'''
25438 indented cell (no pre-wrapping!)
25446 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25468 <nowiki> </nowiki></span>bar2
25471 <nowiki> </nowiki><span>bar</span>
25474 <nowiki> </nowiki><span>foo</span>
25479 Lists: Dont insert newlines in a serialized list item.
25483 <ul><li>a<br>b</li><li>c</li></ul>
25490 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25493 "modes": ["html2wt"],
25494 "scrubWikitext": false
25497 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25498 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25500 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25501 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25503 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25505 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25507 == hello there [[Category:A1]] ==
25509 == [[Category:A2]] hi pal ==
25511 == <!--foo--> [[Category:A3]] how goes it ==
25513 == it goes well [[Category:A4]] <!--bar--> ==
25515 ==howdy [[Category:A5]]==
25521 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25524 "modes": ["html2wt"],
25525 "scrubWikitext": true
25528 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25529 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25531 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25532 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25534 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25542 <!--foo--> [[Category:A3]]
25547 [[Category:A4]] <!--bar-->
25555 Headings: Don't hoist metas that come from templates
25558 "modes": ["html2wt"],
25559 "scrubWikitext": true
25562 <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>
25564 == {{echo|foo [[Category:Foo]]}} ==
25568 Headings: Category in ref isn't hoisted
25571 "modes": ["html2wt"],
25572 "scrubWikitext": true
25575 <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>
25577 <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>
25580 [[Category:Baz]] </ref> ==
25586 Parsoid: Serialize positional parameters with = in them as named parameter
25590 <p about="#mwt1" typeof="mw:Transclusion"
25591 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25593 <p about="#mwt1" typeof="mw:Transclusion"
25594 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25596 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25597 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25598 <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>
25602 {{echo|1=f=oo|2=bar}}
25604 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25605 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25606 {{echo|<nowiki>f=oo</nowiki>|bar}}
25610 Parsoid: Serialize positional parameters with = in extlink as named parameter
25614 <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>
25616 {{echo|1=http://stuff?is=ok}}
25620 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25624 <div>a<p>b</p></div>
25645 Substrings resembling wikitext in hrefs should not get nowiki escapes
25649 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25655 Enforce single-line context in the serializer
25662 <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">
25663 </span><span about="#mwt1">you</span> </h2>
25665 <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>
25667 <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
25668 there</span></li></ol>
25680 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25687 </tbody></table></dd></dl>
25691 == hi {{bogus|there
25702 * foo '''bar''' baz
25714 Serialize new placeholder space without spans
25718 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25720 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25722 <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>
25728 <ref>foo : bar</ref>ok
25732 #-----------------------
25733 # Tag minimization tests
25734 #-----------------------
25737 1. I/B quote minimization: wikitext-only tags should be combined
25741 <p><i>A</i><i>B</i></p>
25742 <p><b>A</b><b>B</b></p>
25743 <p><i>A</i><b><i>B</i></b></p>
25744 <p><b>A</b><i><b>B</b></i></p>
25745 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25746 <p><i><b>A</b></i><i><b>B</b></i></p>
25747 <p><i><b>A</b></i><b><i>B</i></b></p>
25748 <p><b><i>A</i></b><i><b>B</b></i></p>
25768 2. I/B quote minimization: wikitext and html tags should not be combined
25772 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25773 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25777 ''A''<nowiki/>'''<i>B</i>'''
25781 3. I/B quote minimization: templated content stops minimization
25785 <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>
25786 <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>
25788 ''A''{{echo|''B''}}
25790 ''A''{{echo|'''''B'''''}}
25794 4. I/B quote minimization: new content should be mimimized with adjacent old content
25798 <p><i>A</i><i>B</i></p>
25799 <p><b>A</b><b>B</b></p>
25800 <p><i>A</i><b><i>B</i></b></p>
25810 5a. Merge adjacent quote nodes if they've been edited
25813 "modes": ["wt2wt", "selser"],
25815 ["p", "contents", "remove", ":contains('b')"]
25825 5b. Merge adjacent quote nodes if they've been edited
25828 "modes": ["wt2wt", "selser"],
25834 ''a''<span id="x">b</span>''c''
25840 1. Merge adjacent link nodes as long as at least one element is new
25843 "modes": ["html2wt"],
25844 "scrubWikitext": true
25847 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25848 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25849 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25853 [[Football|Foot]][[Football|ball]]
25857 2. Merge adjacent link nodes and enable additional normalizations
25860 "modes": ["html2wt"],
25861 "scrubWikitext": true
25864 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25866 [[Football|''Football'']]
25870 3. Don't merge adjacent link nodes if scrubWikitext is false
25873 "modes": ["html2wt"],
25874 "scrubWikitext": false
25877 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25879 [[Football|Foot]][[Football|ball]]
25882 #------------------------------
25883 # End of tag minimization tests
25884 #------------------------------
25887 Bug 54262: New entities
25891 <span typeof="mw:Entity"> </span>
25896 ## Note that there is no wikitext output for 'unknownproperty' ##
25897 ## Unknown magic words are silently dropped ##
25904 <meta property='mw:PageProp/toc' />
25905 <meta property='mw:PageProp/notoc' />
25906 <meta property='mw:PageProp/forcetoc' />
25907 <meta property='mw:PageProp/index' />
25908 <meta property='mw:PageProp/noindex' />
25909 <meta property='mw:PageProp/nogallery' />
25910 <meta property='mw:PageProp/noeditsection' />
25911 <meta property='mw:PageProp/notitleconvert' />
25912 <meta property='mw:PageProp/nocontentconvert' />
25913 <meta property='mw:PageProp/unknownproperty' />
25923 __NOCONTENTCONVERT__
25927 Consecutive <pre>s should not get merged
25929 parsoid=html2wt,html2html
25931 <pre>a</pre><pre>b</pre>
25959 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
25963 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
25965 [[Special:BookSources/1234567890|ISBN 1234567895]]
25969 Edited RFC links not serializable as RFC links should serialize as extlinks
25973 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
25975 [//tools.ietf.org/html/rfc123 New RFC]
25979 Edited PMID links not serializable as PMID links should serialize as extlinks
25983 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
25985 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
25989 WTS of autolinks with trailing/surrounding context
25993 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25994 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25995 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25996 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25997 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25998 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26000 http://cscott.net'''foo'''
26002 http://cscott.net<b>foo</b>
26004 '''http://cscott.net'''
26006 '''http://cscott.net '''
26008 '''http://cscott.net<nowiki/>x'''
26010 http://cscott.net<nowiki/>x
26014 WTS of autolinks with nowikis (round-trip)
26016 x<nowiki/>http://cscott.net<nowiki/>x
26018 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26021 # this is the "easy" test because it leaves in place all the
26022 # data-parsoid information indicating this is an autolink
26024 WTS of autolinks with escapes (editing)
26027 "modes": ["wt2wt"],
26029 [ "meta", "remove" ]
26033 x<nowiki/>http://cscott.net<nowiki/>x
26035 x<nowiki/>http://cscott.net<nowiki/>x
26039 WTS of edited autolink-like text (T103364)
26042 "modes": ["wt2wt"],
26044 [ "span[typeof]", "removeAttr", "typeof" ]
26048 Not a link: <nowiki>http://example.com</nowiki>.
26050 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26054 WTS of newly-authored autolink-like text (T103364)
26058 <p>http://example.com is not a link.</p>
26060 <nowiki>http://example.com</nowiki> is not a link.
26064 WTS of autolink-like text after an autolink (T108563)
26068 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26070 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26074 Magic links inside links (not autolinked)
26076 [[Foo|http://example.com]]
26079 [[Foo|ISBN 123456789x]]
26081 [http://foo.com http://example.com]
26082 [http://foo.com RFC 1234]
26083 [http://foo.com PMID 1234]
26084 [http://foo.com ISBN 123456789x]
26086 <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>
26087 <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>
26089 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26090 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26091 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26092 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26094 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26095 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26096 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26097 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26101 Magic links inside image captions (autolinked)
26103 [[File:Foobar.jpg|thumb|http://example.com]]
26104 [[File:Foobar.jpg|thumb|RFC 1234]]
26105 [[File:Foobar.jpg|thumb|PMID 1234]]
26106 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26108 <div class="thumb tright">
26109 <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>
26110 <div class="thumbcaption">
26111 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26112 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26115 <div class="thumb tright">
26116 <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>
26117 <div class="thumbcaption">
26118 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26119 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26122 <div class="thumb tright">
26123 <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>
26124 <div class="thumbcaption">
26125 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26126 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26129 <div class="thumb tright">
26130 <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>
26131 <div class="thumbcaption">
26132 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26133 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26137 <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>
26138 <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>
26139 <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>
26140 <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>
26144 WTS of magic word text (T109371)
26149 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26150 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26152 <nowiki>RFC 1234</nowiki>
26154 [http://foo.com RFC 1234]
26160 Edited Redirect link should emit a non-piped wikitext link
26164 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26170 T75121: Infer extension name from typeOf if data-mw is not present
26172 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26174 <div typeOf="mw:Extension/foo"></div>
26179 # Note that the <p> wrapping isn't present in PHP parser output
26180 # The important thing for this test is that P-wrapping doesn't
26181 # interfere with the <nowiki> protection for leading - in <td>
26182 # (which isn't necessary for <th>).
26184 T88318: p-wrapped dash in table.
26186 parsoid=html2wt,wt2wt
26189 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26190 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26191 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26198 |<nowiki>-</nowiki>
26199 |<nowiki>- </nowiki>
26218 <td><small>-</small></td>
26230 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26235 <td id='mwAc'>foo</td>
26236 <td id='serialize-this'>bar</td>
26241 | id="serialize-this" |bar
26246 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26250 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26252 <div id="hello">ok</div>
26259 "modes": ["wt2wt"],
26261 [ "#xyz", "before", "<b>before</b> stuff " ],
26262 [ "#xyz", "after", " stuff <i>after</i>" ],
26263 [ "#xyz", "html", "x <b>y</b> z" ]
26267 <span id="xyz">hello</span>
26269 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26273 Never serialize a-tag as html, regardless of what data-parsoid has to say
26275 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26277 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26282 ## SSS FIXME: This is broken output nevertheless.
26283 ## What might be a reasonable non-broken output for this?
26284 ## This is an edge case unlikely to be seen in production
26285 ## that I am not wasting more time on this right now.
26287 Never serialize a-tag as html, no matter what attributes it has
26289 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26291 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26293 [http://boo.org http://boohoo.org]
26296 # Misnested is an indication that selser can reuse the source but these have
26297 # shown to sneak through on occasion. See T101768.
26298 # The original wikitext here is: [http://test.com [[one]] two three]
26300 Strip span tags added to mark misnested links
26304 <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>
26306 [http://test.com][[one]] two three
26310 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26314 <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|}"]}'>
26326 ## This test verifies the presence and computation of this attribute indirectly
26327 ## by making an edit and ensuring that the serialization is correct (which it would be
26328 ## only if firstWikitextNode is properly set).
26330 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26333 "modes": ["wt2wt"],
26335 [ "div#x", "remove" ],
26336 [ "div", "before", "<div>new</div>" ]
26340 <div id="x">foo</div>
26342 {{echo|<div>boo</div>
26350 {{echo|<div>boo</div>
26356 # --------------------------------------------
26357 # Tests spec'ing wikitext serialization norms |
26358 # --------------------------------------------
26361 1. Categories should always be serialized on their own line
26365 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26373 2. Categories that are part of templates should not introduce a line break
26375 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26377 <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>
26380 # Careful while editing these next 2 tests. There are \u200f characters
26381 # before and after the <link> tags in the HTML and following some
26382 # of the categories in wikitext
26383 # Do not remove these characters in edits.
26385 # As part of the serialization, these bidi characters will get stripped.
26387 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26390 "modes": ["html2wt"],
26391 "scrubWikitext": true
26394 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26395 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26398 [[קטגוריה: שיטות משפט]]
26402 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26405 "modes": ["html2wt"],
26406 "scrubWikitext": true
26409 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26416 Lists: Add space after bullets
26423 <li><span> baz</span></li>
26428 * <span> baz</span>
26432 1. Headings: Add space before/after == (T53744)
26439 <h2><span> baz</span></h2>
26447 == <span> baz</span> ==
26451 2. Headings: Add space before/after == even after hoisted content
26454 "modes": ["html2wt"],
26455 "scrubWikitext": true
26458 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26466 1. Headings: suppress newly created empty headings
26469 "modes": ["html2wt"],
26470 "scrubWikitext": true
26478 2. Headings: don't suppress empty headings if scrubWikitext is false
26488 3. Headings: suppress empty headings on edits
26491 "modes": ["selser"],
26492 "scrubWikitext": true,
26498 ==<span id="x">foo</span>==
26503 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26506 "modes": ["html2wt"],
26507 "scrubWikitext": true
26510 <h2>foo<br/>bar</h2>
26511 <h2>foo <span><br/>bar</span> baz</h2>
26515 == foo <span> bar</span> baz ==
26519 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26522 "modes": ["html2wt"],
26523 "scrubWikitext": false
26526 <h2>foo<br/>bar</h2>
26532 1. WT Quote Tags: suppress newly created empty style tags
26535 "modes": ["html2wt"],
26536 "scrubWikitext": true
26544 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26550 ''<nowiki/>'''''<nowiki/>'''
26554 3. WT Quote Tags: suppress empty style tags on edits
26557 "modes": ["selser"],
26558 "scrubWikitext": true,
26564 '''<span id="x">foo</span>'''
26569 1. Anchors: suppress newly created empty anchors
26572 "modes": ["html2wt"],
26573 "scrubWikitext": true
26576 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26581 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26584 "modes": ["html2wt"],
26585 "scrubWikitext": false
26588 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26594 3. Anchors: suppress empty anchors on edits
26597 "modes": ["selser"],
26598 "scrubWikitext": true,
26604 [[Test|<span id="x">foo</span>]]
26609 3a. Anchors: do not suppress numbered extlinks
26612 "modes": ["wt2wt"],
26613 "scrubWikitext": true
26618 <a rel="mw:ExtLink" href="http://foo.com"></a>
26622 3b. Anchors: do not suppress numbered extlinks
26625 "modes": ["wt2wt"],
26626 "scrubWikitext": true,
26632 [http://foo.com <span id="x">foo</span>]
26638 Normalizations should be restricted to edited content
26641 "modes": ["selser"],
26642 "scrubWikitext": true,
26644 [ "h1", "before", "<i></i>"]
26658 1. Multiple normalizations (html2wt)
26661 "modes": ["html2wt"],
26662 "scrubWikitext": true
26666 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26667 </a><b><i></i></b>x</p>
26676 2. Multiple normalizations (selser)
26679 "modes": ["selser"],
26680 "scrubWikitext": true,
26682 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26686 <span id="x">foo</span>
26688 <span id="x">foo</span>
26694 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26697 "modes": ["html2wt"],
26698 "scrubWikitext": true
26710 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26717 <nowiki> </nowiki>hi
26719 <nowiki> </nowiki> hello
26723 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26726 "modes": ["html2wt"],
26727 "scrubWikitext": true
26736 baz bang</td></tr></table>
26742 bar<span>boo</span></p>
26758 bar<span>boo</span>
26762 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26765 "modes": ["selser"],
26766 "scrubWikitext": true,
26768 [ "p", "html", " a\n b" ]
26779 1. New links that end in spaces
26782 "modes": ["html2wt"],
26783 "scrubWikitext": false
26786 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26787 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26788 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26790 [[Berlin ]]<nowiki/>is the capital of Germany.
26794 [[Boston ]] is a city.
26798 2. New links that end in spaces
26801 "modes": ["html2wt"],
26802 "scrubWikitext": true
26805 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26806 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26807 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26809 [[Berlin]] is the capital of Germany.
26813 [[Boston]] is a city.
26817 1. Table cells with escapable prefixes
26820 "modes": ["html2wt"],
26821 "scrubWikitext": false
26825 <tr><td>a</td></tr>
26826 <tr><td>-</td></tr>
26827 <tr><td>+</td></tr>
26833 |<nowiki>-</nowiki>
26835 |<nowiki>+</nowiki>
26840 2. Table cells with escapable prefixes
26843 "modes": ["html2wt"],
26844 "scrubWikitext": true
26848 <tr><td>a</td></tr>
26849 <tr><td>-</td></tr>
26850 <tr><td>+</td></tr>
26863 3a. Table cells with escapable prefixes after edits
26866 "modes": ["selser"],
26867 "scrubWikitext": true,
26869 [ "table tbody tr:first-child td:first-child", "remove"]
26883 3b. Table cells with escapable prefixes after edits
26886 "modes": ["selser"],
26887 "scrubWikitext": true,
26889 [ "table tbody tr:first-child td:first-child", "html", "-" ],
26896 |<span id="x">foo</span>+
26905 # FIXME: This test will fail because
26906 # normalization doesn't realize that the id attribute
26907 # will eliminate the escapable scenario
26909 4a. Table cells without escapable prefixes after edits
26912 "modes": ["selser"],
26913 "scrubWikitext": true,
26915 [ "#x", "html", "-" ]
26928 ## This tests normalizer's ability to discriminate between
26929 ## cells having identical content.
26931 4b. Table cells without escapable prefixes after edits
26934 "modes": ["selser"],
26935 "scrubWikitext": true,
26937 [ "td", "html", "-" ]
26950 ## This tests normalizer's ability to not be tripped by
26951 ## comments (and whitespace)
26953 4c. Table cells without escapable prefixes after edits
26956 "modes": ["selser"],
26957 "scrubWikitext": true,
26959 [ "table tbody tr td:first-child", "remove" ]
26974 ## This tests normalizer's ability to handle HTML cells
26976 4d. Table cells without escapable prefixes after edits
26979 "modes": ["selser"],
26980 "scrubWikitext": true,
26982 [ "td", "html", "-" ]
26987 <tr><td>a</td></tr>
26991 <tr><td>-</td></tr>
26995 ## T111151 Remove font elements without attributes
26997 5a. font tags without attributes should be dropped in scrubWikitext mode
27000 "modes": ["html2wt"],
27001 "scrubWikitext": true
27005 <font><font>bar</font></font>
27006 <font class="x">boo</font>
27010 <font class="x">boo</font>
27014 5b. font tags should not be dropped without scrubWikitext being enabled
27017 "modes": ["html2wt"],
27018 "scrubWikitext": false
27027 Escape nowiki DOM elements
27031 <nowiki><i>foo</i></nowiki>
27033 <nowiki>''foo''</nowiki>
27036 # This is meant to be an interim fix while we go about figuring out
27037 # how to not introduce these trailing <nowiki/>s in the first place.
27039 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27043 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27045 <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>
27046 <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>
27059 # ---------------------------------------------------
27060 # End of tests spec'ing wikitext serialization norms |
27061 # ---------------------------------------------------
27065 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27073 <td><b>c</b><p>d</p></td>
27091 # -----------------------------------------------------------------
27092 # End of section for Parsoid-only html2wt tests for serialization
27094 # -----------------------------------------------------------------
27096 # -----------------------------------------------------------------
27097 # The following section of tests are primarily to spec behavior of
27098 # the selective serializer. All these tests have manual selser
27099 # changes. The automated selser changes for all tests handle the
27100 # wide variation of changes, but these tests here capture specs
27101 # deterministically.
27102 # ----------------------------------------------------------------
27106 Selser: New comments should not be lost
27109 "modes": ["selser"],
27111 [ "#a", "after", "<!--c1-->" ],
27112 [ "#b", "before", "<!--c2-->" ]
27116 <span id="a">a</span>
27118 <span id="b">b</span>
27120 <span id="a">a</span><!--c1-->
27122 <!--c2--><span id="b">b</span>
27127 Selser: Check for validity of DSR before using it
27130 "modes": ["selser"],
27132 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27136 <span id="a">a</span>
27138 {{DISPLAYTITLE:foo}}
27139 <span id="a">a</span>
27143 1. DOMDiff: Changes to <ref> content should be looked up using id
27146 "modes": ["selser"],
27148 ["#X", "after", "bar"],
27149 ["#Y", "after", "baz"]
27153 X <ref><span id="X">foo</span></ref>
27156 <ref name="a"><span id="Y">foo</span></ref>
27159 X <ref><span id="X">foo</span>bar</ref>
27162 <ref name="a"><span id="Y">foo</span>baz</ref>
27167 2. DOMDiff: Changes to <ref> content should be looked up using id
27170 "modes": ["selser"],
27172 ["#Z", "after", "bar"]
27176 A <ref>foo bar for a</ref>
27177 B <ref group="X" name="b" />
27181 <references group="X">
27182 <ref name="b"><span id="Z">foo</span></ref>
27185 A <ref>foo bar for a</ref>
27186 B <ref group="X" name="b" />
27190 <references group="X">
27191 <ref name="b"><span id="Z">foo</span>bar</ref>
27196 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27199 "modes": ["selser"],
27201 [ "div:first-child", "text", "bar" ]
27205 <div style="{{1x|color:red;}}%">foo</div>
27207 <div style="{{1x|color:red;}}%">bar</div>
27220 <li class="mw-empty-elt"></li>
27221 <li class="mw-empty-elt"></li>
27229 [[File:Thumb.png|thumb]]
27231 <div class="thumb tright">
27232 <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>
27233 <div class="thumbcaption">
27234 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27241 unclosed internal link XSS (T137264)
27243 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27245 <p>[[#<script>alert(1)</script>|