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 # ill add inter-language links
18 # (ignored by Parsoid, since it emits <link>s)
19 # subpage enable subpages (disabled by default)
20 # noxml don't check for XML well-formedness
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
36 # You can also set the following parser properties via test options:
37 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
38 # wgLinkHolderBatchSize, wgRawHtml
40 # For testing purposes, temporary articles can created:
41 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
42 # where '/' denotes a newline.
44 # This is the standard article assumed to exist.
81 MediaWiki:bad image list
83 * [[File:Bad.jpg]] except [[Nasty page]]
111 Template:echo_with_span
117 Template:echo_with_div
130 Template:table_attribs
133 |</noinclude>style="color:red;"|Foo
137 Template:table_attribs_2
140 |</noinclude>style="color:red;"|Foo
145 Template:table_attribs_3
148 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
152 Template:table_attribs_4
154 | style="background-color:#DC241f;" width="10px" |
158 Template:table_attribs_5
161 |</noinclude>style="color:red;"||Bar
165 Template:table_attribs_6
167 style="background: <nowiki>
174 Template:table_attribs_7
177 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
181 Template:table_header_cells
183 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
189 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
193 Template:PartialTable
200 Template:image_attribs
203 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
206 ## See T48811 for details
208 Template:mixed_attr_content_template
210 style="color:red;" title="T48811"
216 Template:definition_list
263 Template:EmptyTRWithHTMLAttrTest
266 <tr align="center"></tr>
267 <tr><td>foo</td></tr>
268 <tr align="center"></tr>
269 <tr><td>bar</td></tr>
286 This is a simple paragraph.
288 <p>This is a simple paragraph.
293 Paragraphs with extra newline spacing
316 Paragraphs with newline spacing with comment lines in between
324 <!--foo--><!--More than 1 comment, still stripped-->
328 <!--foo--> <!----> <!-- bar -->
389 Paragraphs with newline spacing with non-empty white-space lines in between
416 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
424 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
463 Extra newlines: More paragraphs with indented comment
478 Extra newlines followed by heading
493 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
494 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
497 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
502 Extra newlines between heading and content are swallowed
510 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
511 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
518 http://fr.wikipedia.org/wiki/🍺
519 <!-- EasterEgg we love beer, better be able be able to link to it -->
521 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
525 # Note that the html+tidy output removes the spaces after the <li>,
526 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
527 # This is an issue for all tests with lists. We intentionally do
528 # *not* add html+tidy clauses for these, as we don't want to
529 # document/test the broken behavior. (Parsoid matches the non-tidy
530 # output in these cases.)
539 <li> Item 2</li></ul>
547 * plain''italic''plain
548 * plain''italic''plain''italic''plain
549 * plain'''bold'''plain
550 * plain'''bold'''plain'''bold'''plain
551 * plain''italic''plain'''bold'''plain
552 * plain'''bold'''plain''italic''plain
553 * plain''italic'''bold-italic'''italic''plain
554 * plain'''bold''bold-italic''bold'''plain
555 * plain'''''bold-italic'''italic''plain
556 * plain'''''bold-italic''bold'''plain
557 * plain''italic'''bold-italic'''''plain
558 * plain'''bold''bold-italic'''''plain
559 * plain l'''italic''plain
560 * plain l''''bold''' plain
563 <li> plain<i>italic</i>plain</li>
564 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
565 <li> plain<b>bold</b>plain</li>
566 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
567 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
568 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
569 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
570 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
571 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
572 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
573 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
574 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
575 <li> plain l'<i>italic</i>plain</li>
576 <li> plain l'<b>bold</b> plain</li></ul>
580 # this example taken from the [[simple:Moon]] article (bug 47326)
582 Italics and possessives (1)
584 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
586 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
590 # this example taken from [[en:Flaming Pie]] (bug 49926)
592 Italics and possessives (2)
594 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
596 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
600 # this example taken from [[en:Dictionary]] (bug 49926)
602 Italics and possessives (3)
604 The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
606 <p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
612 ### 2-quote opening sequence tests
615 Italics and bold: 2-quote opening sequence: (2,2)
624 Italics and bold: 2-quote opening sequence: (2,3)
633 Italics and bold: 2-quote opening sequence: (2,4)
643 # same html as previous, but wikitext adjusted to match parsoid html2wt
645 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
647 ''foo<nowiki>''</nowiki>''
653 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
655 Italics and bold: 2-quote opening sequence: (2,5)
668 # same html as previous, but wikitext adjusted to match parsoid html2wt
670 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
672 ''foo'''''<nowiki/>'''
683 ### 3-quote opening sequence tests
687 Italics and bold: 3-quote opening sequence: (3,2)
696 Italics and bold: 3-quote opening sequence: (3,3)
705 Italics and bold: 3-quote opening sequence: (3,4)
713 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
715 Italics and bold: 3-quote opening sequence: (3,5)
728 # same html as previous, but wikitext adjusted to match parsoid html2wt
730 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
732 '''foo'''''<nowiki/>''
743 ### 4-quote opening sequence tests
747 Italics and bold: 4-quote opening sequence: (4,2)
757 # same html as previous, but wikitext adjusted to match parsoid html2wt
759 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
761 <nowiki>''</nowiki>''foo''
768 Italics and bold: 4-quote opening sequence: (4,3)
777 Italics and bold: 4-quote opening sequence: (4,4)
787 # same html as previous, but wikitext adjusted to match parsoid html2wt
789 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
797 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
799 Italics and bold: 4-quote opening sequence: (4,5)
808 <p>'<b>foo</b><i></i>
812 # same html as previous, but wikitext adjusted to match parsoid html2wt
814 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
816 '<nowiki/>'''foo'''''<nowiki/>''
821 <p>'<b>foo</b><i></i>
827 ### 5-quote opening sequence tests
831 Italics and bold: 5-quote opening sequence: (5,2)
841 # same html as previous, but wikitext adjusted to match parsoid html2wt
843 Italics and bold: 5-quote opening sequence: (5,2+3)
852 Italics and bold: 5-quote opening sequence: (5,3)
862 # same html as previous, but wikitext adjusted to match parsoid html2wt
864 Italics and bold: 5-quote opening sequence: (5,3+2)
873 Italics and bold: 5-quote opening sequence: (5,4)
879 <p><i><b>foo'</b></i>
884 Italics and bold: 5-quote opening sequence: (5,5)
893 Italics and bold: 5-quote opening sequence: (5,6)
897 <p><i><b>foo'</b></i>
902 ### multiple quote sequences in a line
905 Italics and bold: multiple quote sequences: (2,4,2)
911 <p><i>foo'<b>bar</b></i>
916 # same html as previous, but wikitext adjusted to match parsoid html2wt
918 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
920 ''foo'<nowiki/>'''bar'''''
922 <p><i>foo'<b>bar</b></i>
928 Italics and bold: multiple quote sequences: (2,4,3)
934 <p><i>foo'<b>bar</b></i>
939 # same html as previous, but wikitext adjusted to match parsoid html2wt
941 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
943 ''foo'<nowiki/>'''bar'''''
945 <p><i>foo'<b>bar</b></i>
951 Italics and bold: multiple quote sequences: (2,4,4)
957 <p><i>foo'<b>bar'</b></i>
962 # same html as previous, but wikitext adjusted to match parsoid html2wt
964 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
966 ''foo'<nowiki/>'''bar'<nowiki/>'''''
968 <p><i>foo'<b>bar'</b></i>
973 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
975 Italics and bold: multiple quote sequences: (3,4,2)
984 <p><b>foo'</b>bar<i></i>
988 # same html as previous, but wikitext adjusted to match parsoid html2wt
990 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
994 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
999 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1004 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1006 Italics and bold: multiple quote sequences: (3,4,3)
1015 <p><b>foo'</b>bar<b></b>
1019 # same html as previous, but wikitext adjusted to match parsoid html2wt
1021 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1023 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1028 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1033 ### other quote tests
1036 Italics and bold: other quote tests: (2,3,5)
1038 ''this is about '''foo's family'''''
1040 <p><i>this is about <b>foo's family</b></i>
1046 Italics and bold: other quote tests: (2,(3,3),2)
1048 ''this is about '''foo's''' family''
1050 <p><i>this is about <b>foo's</b> family</i>
1056 Italics and bold: other quote tests: (3,2,3,2)
1060 '''this is about ''foo'''s family''
1062 <p><b>this is about <i>foo</i></b><i>s family</i>
1067 # same html as previous, but wikitext adjusted to match parsoid html2wt
1069 Italics and bold: other quote tests: (3,2,3+2+2,2)
1071 '''this is about ''foo'''''<nowiki/>''s family''
1073 <p><b>this is about <i>foo</i></b><i>s family</i>
1079 Italics and bold: other quote tests: (3,2,3,3)
1081 '''this is about ''foo'''s family'''
1083 <p>'<i>this is about </i>foo<b>s family</b>
1089 Italics and bold: other quote tests: (3,(2,2),3)
1091 '''this is about ''foo's'' family'''
1093 <p><b>this is about <i>foo's</i> family</b>
1099 Italicized possessive
1101 The ''[[Main Page]]'''s talk page.
1103 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1106 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1110 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1111 (Requires tidy for PHP parser output to be fixed up)
1113 parsoid=wt2html,wt2wt
1130 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1131 <td><i>a</i></td><td><i>b</i></td></tr>
1140 Non-html5 tags should be accepted
1142 <center>''foo''</center>
1144 <font>''foo''</font>
1145 <strike>''foo''</strike>
1148 <center><i>foo</i></center>
1149 <p><big><i>foo</i></big>
1150 <font><i>foo</i></font>
1151 <strike><i>foo</i></strike>
1157 <wbr> is valid wikitext (bug 52468)
1165 # <strike> is HTML4, <s> is HTML4/5.
1167 <s> or <strike> for strikethrough
1169 <strike>strike</strike>
1173 <p><strike>strike</strike>
1181 Text-level semantic html elements in wikitext
1184 <strong>text</strong>
1200 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1207 <strong>text</strong>
1223 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1231 # test cases taken from
1232 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1234 Ruby markup (W3C-style)
1236 ; Mono-ruby for individual base characters
1237 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1239 : <ruby>今日<rt>きょう</rt></ruby>
1241 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1243 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1245 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1247 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1248 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1249 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1252 <dl><dt> Mono-ruby for individual base characters</dt>
1253 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1254 <dt> Group ruby</dt>
1255 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1256 <dt> Jukugo ruby</dt>
1257 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1258 <dt> Inline ruby</dt>
1259 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1260 <dt> Double-sided ruby</dt>
1261 <dd> <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
1263 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1264 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1265 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1270 # The next two test different paths in the sanitizer.
1272 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1274 <blockquote|>a</blockquote>
1276 <b→> doesn't terminate </b→>
1278 <bä> doesn't terminate </bä>
1280 <boo> doesn't terminate </boo>
1282 <s.foo> doesn't terminate </s.foo>
1286 <p><blockquote|>a</blockquote>
1287 </p><p><b→> doesn't terminate </b→>
1288 </p><p><bä> doesn't terminate </bä>
1289 </p><p><boo> doesn't terminate </boo>
1290 </p><p><s.foo> doesn't terminate </s.foo>
1291 </p><p><sub-ID#1>
1295 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1296 # If the non-word-character tag made it through the sanitizer, tidy
1297 # would munge it up.
1299 Non-word characters don't terminate tag names + tidy
1301 <blockquote|>a</blockquote>
1303 <b→> doesn't terminate </b→>
1305 <bä> doesn't terminate </bä>
1307 <boo> doesn't terminate </boo>
1309 <s.foo> doesn't terminate </s.foo>
1313 <p><blockquote|>a</p>
1314 <p><b→> doesn't terminate </b→></p>
1315 <p><bä> doesn't terminate </bä></p>
1316 <p><boo> doesn't terminate </boo></p>
1317 <p><s.foo> doesn't terminate </s.foo></p>
1318 <p><sub-ID#1></p>
1322 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1323 ### This checks that HTML5 tags (with non-word characters in the tag
1324 ### name) make it safely through the parser -- the Sanitizer will
1325 ### munge them later, as it should.
1328 Non-word characters are valid in extension tags (T19663)
1341 Isolated close tags should be treated as literal text (bug 52760)
1349 <p><s.foo>s</p>
1351 <p><s.foo>s</p>
1355 ### Special characters
1359 Bare pipe character (bug 52363)
1368 Bare pipe character from a template (bug 52363)
1377 ### <nowiki> test cases
1381 <nowiki> unordered list
1383 <nowiki>* This is not an unordered list item.</nowiki>
1385 <p>* This is not an unordered list item.
1388 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1394 <nowiki>Lorem ipsum dolor
1402 <p>Lorem ipsum dolor
1411 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1423 :There is not nowiki.
1424 :There is <nowiki>nowiki</nowiki>.
1426 #There is not nowiki.
1427 #There is <nowiki>nowiki</nowiki>.
1429 *There is not nowiki.
1430 *There is <nowiki>nowiki</nowiki>.
1432 <dl><dd>There is not nowiki.</dd>
1433 <dd>There is nowiki.</dd></dl>
1434 <ol><li>There is not nowiki.</li>
1435 <li>There is nowiki.</li></ol>
1436 <ul><li>There is not nowiki.</li>
1437 <li>There is nowiki.</li></ul>
1440 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1441 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1443 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1444 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1446 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1447 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1451 Entities inside <nowiki>
1453 <nowiki><</nowiki>
1460 Entities inside template parameters
1466 <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>
1470 Properly escape nowiki when combined with other wiki markup
1474 <p>* </nowiki> tag</p>
1476 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1480 T93824: Put escaped HTML tags inside nowiki
1484 <p><h2>foo</h2></p>
1486 <nowiki><h2>foo</h2></nowiki>
1490 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1494 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1495 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1496 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1498 This text: L'[[Foo]]
1499 This text: L<nowiki>''</nowiki>[[Foo]]
1500 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1503 # This test fails because wikitext whitespace is not normalized before comparing.
1505 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1509 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1512 This text : L<nowiki>''</nowiki>[[Foo]]
1515 # This test and the next one are html2wt only as they test that incorrect wikitext
1516 # passed in template arguments gets escaped or wrapped in nowikis where required.
1518 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1522 <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>
1523 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1525 {{echo|foo{{!}}bar}}
1526 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1530 T53961: Output correct nowikis in template arguments
1534 <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>
1535 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1536 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1537 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1538 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1541 {{echo|a <nowiki>}}</nowiki> b}}
1542 {{echo|<nowiki>a [[ b</nowiki>}}
1543 {{echo|a {{!}} <nowiki>{{ ]]</nowiki>}}
1544 {{echo|a <nowiki>}</nowiki>}}
1548 Cases where "!!" needs nowiki protection
1553 <tr><th>this needs protection !! here</th></tr>
1557 <tr><th>this does not need
1558 protection !! here</th></tr>
1562 !<nowiki>this needs protection !! here</nowiki>
1575 Comments and Indent-Pre
1577 <!-- comment 1 --> asdf
1579 <!-- comment 1 --> asdf
1582 <!-- comment 1 --> asdf
1583 <!-- comment 2 -->xyz
1585 <!-- comment 1 --> asdf
1586 <!-- comment 2 --> xyz
1642 asdf<!-- comment 1 -->jkl
1652 <!-- foo --> b <!-- bar -->
1666 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1672 Comment semantics and delimiters
1674 <!-- --><!----><!-----><!------>
1678 <!-- --><!----><!-----><!------>
1682 Comment semantics and delimiters, redux
1684 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1685 -- foo -- funky huh? ... -->
1689 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1690 -- foo -- funky huh? ... -->
1694 Comment semantics and delimiters: directors cut
1696 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1697 everything starting with < followed by !-- until the first -- and > we see,
1698 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1704 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1705 everything starting with < followed by !-- until the first -- and > we see,
1706 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1711 Comment semantics: nesting
1713 <!--<!-- no, we're not going to do anything fancy here -->-->
1718 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1721 # Parsoid closes the unclosed comment, even if it means a slight
1724 Comment semantics: unclosed comment at end
1726 parsoid=wt2html,html2html
1728 <!--This comment will run out to the end of the document
1732 <!--This comment will run out to the end of the document-->
1736 Comment semantics: normalize comments to play nice with XML and browsers
1738 <!-- Browsers --!> think this is closed -->
1739 <!--> This would normally be text -->
1740 <!---> As would this -->
1741 <!-- XML doesn't like trailing dashes -------->
1742 <!-- Nor doubled hyphens -- anywhere in the data -->
1743 But this is not a comment.
1745 <p>But this is not a comment.
1748 <!-- Browsers --!> think this is closed -->
1749 <!--> This would normally be text -->
1750 <!---> As would this -->
1751 <!-- XML doesn't like trailing dashes -------->
1752 <!-- Nor doubled hyphens -- anywhere in the data -->
1753 <p>But this is not a comment.</p>
1757 Comment semantics: round-trip even text which contains encoded -->
1759 <!-- hello & goodbye - > --> --&gt; --&xx -->
1761 <!-- hello & goodbye - > --> --&gt; --&xx -->
1765 Comment in template title
1774 Comment on its own line post-expand
1786 Comment on its own line post-expand with non-significant whitespace
1798 Multiple comments should still parse as SOL-transparent
1800 parsoid=wt2html,wt2wt
1803 <!--c2--><!--c3--><!--c4-->*b
1812 <!--c2--><!--c3--><!--c4-->
1819 ### paragraph wrapping tests
1834 Block tag on one line (<div>)
1850 Block tag on one line (<blockquote>)
1852 a <blockquote>foo</blockquote>
1856 a <blockquote>foo</blockquote>
1868 Block tag on both lines (<div>)
1885 Block tag on both lines (<blockquote>)
1887 a <blockquote>foo</blockquote>
1889 b <blockquote>foo</blockquote>
1891 a <blockquote>foo</blockquote>
1892 b <blockquote>foo</blockquote>
1906 Multiple lines without block tags
1930 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1931 # So, we have a separate section for Parsoid. We don't want
1932 # to mimic this stripping behavior in Parsoid. It affects
1933 # editing experience and also requires us to maintain additional
1936 Empty lines between lines with block tags
1974 <div data-parsoid='{"stx":"html"}'></div>
1977 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1980 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1982 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1985 <div data-parsoid='{"stx":"html"}'>e</div>
1988 ## PHP parser emits output which is broken
1990 Unclosed HTML p-tags should be handled properly
2003 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2008 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2009 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2012 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2016 a [[Category:A1]] [[Category:A2]]
2021 <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"/>
2025 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2031 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2035 ### Preformatted text
2044 And a [[Main Page|link]]
2050 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2055 Tabs don't trigger preformatted text
2059 This is preformatted text.
2065 <pre>This is preformatted text.
2070 preformatted text.</p>
2071 <pre>This is preformatted text.
2076 Space before tab needs nowiki pre protection
2082 <nowiki> </nowiki> a
2086 Ident preformatting with inline content
2097 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2114 Regression with preformatted in <center>
2128 Bug 52763: Preformatted in <blockquote>
2134 indented cell (no pre-wrapping!)
2144 <p> indented cell (no pre-wrapping!)
2152 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2169 Bug 15491: <ins>/<del> in blockquote
2172 Foo <del>bar</del> <ins>baz</ins> quux
2176 <p>Foo <del>bar</del> <ins>baz</ins> quux
2182 # Note that the p-wrapping is newline sensitive, which could be
2183 # considered a bug: tidy will wrap only the 'Foo' in the example
2184 # below in a <p> tag. (see comment 23-25 of bug #6200)
2186 Bug 15491: <ins>/<del> in blockquote (2)
2188 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2191 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2197 <del>bar</del> <ins>baz</ins> quux</blockquote>
2201 <pre> with attributes (bug 3202)
2203 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2205 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2210 <pre> with width attribute (bug 3202)
2212 <pre width="8">Narrow screen goodies</pre>
2214 <pre width="8">Narrow screen goodies</pre>
2219 <pre> with forbidden attribute (bug 3202)
2221 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2223 <pre width="8">Narrow screen goodies</pre>
2228 Entities inside <pre>
2237 <pre> with forbidden attribute values (bug 3202)
2239 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2241 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2246 <nowiki> inside <pre> (bug 13238)
2254 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2262 <pre><nowiki>Foo</nowiki></pre>
2267 <nowiki> and <pre> preference (first one wins)
2296 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2298 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2301 <p><span typeof="mw:Nowiki">
2310 </pre> inside nowiki
2312 <nowiki></pre></nowiki>
2318 # Parsoid doesn't strip empty tags, like Tidy does.
2320 Empty pre; pre inside other HTML tags (bug 54946)
2322 parsoid=wt2html,wt2wt
2353 HTML pre followed by indent-pre
2363 # Note that tidy removes the empty <p> tags from the start and end.
2364 # Parsoid does not, by design.
2368 <p><pre>foo</pre></p>
2374 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2378 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2386 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2396 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2408 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2429 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2433 {{echo| foo}}{{echo| bar}}
2438 {{echo|<!--cmt--> foo}}
2440 <!--cmt-->{{echo| foo}}
2442 {{echo|{{echo| }}bar}}
2460 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2497 Pres with newline attributes
2502 <pre class="one two">hi</pre>
2506 two" data-parsoid='{"stx":"html"}'>hi</pre>
2510 Things that look like <pre> tags aren't treated as such
2512 Barack Obama <President> of the United States
2513 <President></President>
2515 <p>Barack Obama <President> of the United States
2516 <President></President>
2520 ## PHP parser discards the "<pre " string
2522 Handle broken pre-like tags (bug 64025)
2526 {{echo|<pre <pre>x</pre>}}
2528 <table><pre </table>
2531 <table><pre></pre></table>
2534 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2543 Parsoid: handle pre with space after attribute
2547 <pre style="width:50%;" >{{echo|foo}}</pre>
2549 <pre style="width:50%;">{{echo|foo}}</pre>
2552 <pre style="width:50%;">{{echo|foo}}</pre>
2555 # TODO / maybe: fix wt2wt for this
2557 Parsoid: Don't paragraph-wrap fosterable content
2583 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2611 #--------------------------------------------------------------------
2612 # Transclusion parameter whitespace stripping tests
2613 # Behavior is different for positional and named parameters
2614 #--------------------------------------------------------------------
2616 Templates: Strip leading and trailing whitespace from named-param values
2620 {{echo|1= {{echo|b}} }}
2633 <ul><li> d</li></ul>
2638 Templates: Don't strip whitespace from positional-param values
2642 {{echo|{{echo|b}} }}
2674 <ul><li> f</li></ul>
2682 Templates: Handle empty comment-and-ws-only lines correctly
2685 <!--should be ignored-->
2686 <!--should be ignored as well-->
2695 Templates: Handle comments in the target
2698 <!-- should be ignored -->
2701 {{echo<!-- should be ignored -->
2704 {{echo<!-- should be ignored -->|foo}}
2706 {{<!-- should be ignored -->echo|foo}}
2708 <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>
2710 <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>
2712 <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>
2714 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2718 Templates: Handle comments in parameter names (bug 67657)
2721 <!-- should be ignored -->
2725 <!-- should be ignored -->
2728 {{echo|1<!-- should be ignored --> = foo}}
2730 {{echo|<!-- should be ignored -->1 = foo}}
2732 <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>
2734 <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>
2736 <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>
2738 <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>
2742 Templates: Other wikitext in parameter names (bug 67657)
2746 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2752 #--------------------------------------------------------------------
2753 # Transclusion parameter escaping tests
2754 #--------------------------------------------------------------------
2756 Templates: Parsoid parameter escaping test 1
2758 {{echo|[foo]|{{echo|[bar]}}}}
2762 <p about="#mwt1" typeof="mw:Transclusion"
2763 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2767 Parsoid: Pipes in external links in template parameter
2769 {{echo|[{{echo|http://example.com}} link]}}
2771 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2773 <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>
2777 Parsoid: pipe in transclusion parameter
2779 {{echo|http://foo.com/a|b}}
2781 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2783 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2784 typeof="mw:Transclusion"
2785 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>
2789 Parsoid: Pipe in external link target and content in template parameter
2791 parsoid=html2wt,wt2wt
2793 {{echo|[http://foo.com/a|b a|b]}}
2795 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2797 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2798 typeof="mw:Transclusion"
2799 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2800 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2804 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2808 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2810 <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>
2814 Templates: Don't escape already nowiki-escaped text in template parameters
2816 parsoid=html2wt,wt2wt
2818 {{echo|foo<nowiki>|</nowiki>bar}}
2819 {{echo|<nowiki><div></nowiki>}}
2820 {{echo|<nowiki></nowiki>}}
2822 <p>foo|bar <div></p>
2824 <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>
2825 <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>
2826 <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>
2832 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2834 parsoid=html2wt,wt2wt
2836 {{echo|{{echo|1=bar}}}}
2840 <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>
2845 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2851 <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>
2856 Templates: Preserve blank parameter names
2862 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2866 Templates: Preserve blank parameter names in other positions
2868 {{blank_param|bar|=foo}}
2872 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]},{"k":"","named":true,"spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
2877 ### Parsoid-centric tests for testing RT edge cases for pre
2881 1a. Indent-Pre and Comments
2894 1b. Indent-Pre and Comments
2907 1c. Indent-Pre and Comments
2920 1d. Indent-Pre and Comments
2921 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2934 2a. Indent-Pre and tables
2955 2b. Indent-Pre and tables
2971 2c. Indent-Pre and tables (bug 42252)
2988 2d. Indent-Pre and tables
3005 <tbody><tr><td> b</td></tr>
3010 2e. Indent-Pre and table-line syntax
3023 2f. Indent-pre started by table-line syntax
3042 3a. Indent-Pre and block tags (single-line html)
3046 c <blockquote> foo </blockquote>
3051 c <blockquote> foo </blockquote>
3052 <pre><span> foo </span>
3055 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3056 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3057 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3058 <pre><span> foo </span>
3075 3b. Indent-Pre and block tags (multi-line html)
3080 <pre>a <span>foo</span>
3085 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3086 b <div data-parsoid='{"stx":"html"}'> foo </div>
3096 3c. Indent-Pre and block tags (pre-content on separate line)
3160 4. Indent-Pre and extension tags
3166 a <ul class="gallery mw-gallery-traditional">
3167 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3168 <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>
3169 <div class="gallerytext">
3176 <ul class="gallery mw-gallery-traditional">
3177 <li class="gallerybox" style="width: 155px">
3178 <div style="width: 155px">
3179 <div class="thumb" style="width: 150px;">
3180 <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>
3182 <div class="gallerytext"></div>
3189 Table wikitext syntax outside wiki-tables
3192 ! not a table heading
3195 | class="foo bar" | baz
3202 ! not a table heading
3205 | class="foo bar" | baz
3214 Render paragraphs when indent-pre is suppressed in blocklevels
3231 4. Multiple spaces at start-of-line
3249 ## NOTE: the leading white-space chars on empty line are significant
3251 5a. White-space in indent-pre
3263 ## NOTE: the leading white-space chars on empty line are significant
3265 5b. White-space in indent-pre
3284 5c. White-space in indent-pre
3297 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3320 7a. Indent-pre and category links
3322 parsoid=wt2html,wt2wt
3324 [[Category:foo]] <!-- No pre-wrapping -->
3325 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3328 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3329 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre-wrapping -->
3333 7b. Indent-pre and category links
3335 parsoid=wt2html,wt2wt
3338 [[Category:foo]] {{echo|b}}
3340 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3341 <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>
3345 Indent-Pre: Newlines in comments shouldn't affect sol state
3359 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3363 HTML-pre: 1. embedded newlines
3398 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3400 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3404 <pre data-parsoid='{"stx":"html"}'>
3409 <pre data-parsoid='{"stx":"html"}'>
3417 HTML-pre: big spaces
3453 <pre data-parsoid='{"stx":"html"}'>
3472 HTML-pre: 2: indented text
3485 HTML-pre: 3: other wikitext
3504 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3513 ### Definition lists
3520 <dl><dt> name </dt>
3521 <dd> Definition</dd></dl>
3526 Definition list for indentation only
3530 <dl><dd> Indented text</dd></dl>
3535 Definition list with no space
3540 <dd>Definition</dd></dl>
3545 Definition list with URL link
3547 ; http://example.com/ : definition
3549 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3550 <dd> definition</dd></dl>
3555 Definition list with bracketed URL link
3557 ;[http://www.example.com/ Example]:Something about it
3559 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3560 <dd>Something about it</dd></dl>
3565 Definition list with wikilink containing colon
3567 ; [[Help:FAQ]]: The least-read page on Wikipedia
3569 <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>
3570 <dd> The least-read page on Wikipedia</dd></dl>
3574 # At Brion's and JeLuF's insistence... :)
3576 Definition list with news link containing colon
3578 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3580 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3581 <dd> This isn't even a real newsgroup!</dd></dl>
3584 <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>
3588 Malformed definition list with colon
3590 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3592 <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>
3597 Definition lists: colon in external link text
3599 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3601 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3602 <dd> OK, I made that up</dd></dl>
3607 Definition lists: colon in HTML attribute
3609 ;<b style="display: inline">bold</b>
3611 <dl><dt><b style="display: inline">bold</b></dt></dl>
3616 Definition lists: self-closed tag
3618 ;one<br/>two : two-line fun
3620 <dl><dt>one<br />two </dt>
3621 <dd> two-line fun</dd></dl>
3626 Bug 11748: Literal closing tags
3630 <dd>test test test test test</dd>
3632 <dd>test test test test test</dd>
3637 <dd>test test test test test</dd>
3639 <dd>test test test test test</dd>
3645 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3648 ; term : description
3653 <dl><dt> term </dt>
3654 <dd> description</dd></dl>
3655 <ul><li> unordered</li></ul>
3662 Definition list with empty definition and following paragraph
3674 Nested definition lists using html syntax
3683 Definition Lists: No nesting: Multiple dd's
3696 Definition Lists: Indentation: Regular
3704 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3709 Definition Lists: Indentation: Missing 1st level
3715 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3720 Definition Lists: Indentation: Multi-level indent
3724 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3729 Definition Lists: Hacky use to indent tables
3736 should be left alone
3738 <dl><dd><dl><dd><table>
3743 </td></tr></table></dd></dl></dd></dl>
3745 should be left alone
3750 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3758 should be left alone
3761 <dl><dd><dl><dd><table><tr>
3764 </tr></table><!-- bar --></dd></dl></dd></dl>
3766 should be left alone</p>
3770 Definition Lists: Hacky use to indent tables, with comment before table
3776 <dl><dd><dl><dd><!-- foo --><table><tr>
3778 </tr></table></dd></dl></dd></dl>
3781 # The trailing whitespace in this test is to catch a regression in
3782 # Parsoid after T54473.
3784 Definition Lists: Hacky use to indent tables (WS-insensitive)
3793 </td></tr></table></dd></dl>
3797 <tbody><tr><td>a</td></tr>
3798 </tbody></table> </dd></dl>
3801 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3802 ## as an empty dt item. It also ignores all but the last ";" when followed
3803 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3804 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3807 ## Ex: ";;t2 ::d2" is transformed into:
3819 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3820 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3831 ## All Parsoid only definition list tests have this difference.
3833 ## See also: https://phabricator.wikimedia.org/T8569
3834 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3837 Table / list interaction: indented table with lists in table contents
3852 <ul><li> b</li></ul>
3856 <ul><li> d</li></ul>
3857 </td></tr></table></dd></dl>
3862 Table / list interaction: lists nested in tables nested in indented lists
3885 </td></tr></table></dd></dl>
3892 Definition Lists: Nesting: Multi-level (Parsoid only)
3922 Definition Lists: Nesting: Test 2 (Parsoid only)
3949 Definition Lists: Nesting: Test 3 (Parsoid only)
3992 Definition Lists: Nesting: Test 4
3997 <dl><dd><dl><dd><dl><dt>t3</dt>
3998 <dd>d3</dd></dl></dd></dl></dd></dl>
4003 ## The Parsoid team believes the following three test exposes a
4004 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4005 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4006 ## It also exposes a "misfeature" in tidy, which doesn't like
4007 ## <dl> tags with a single <dt> child; it converts the <dt> into
4008 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4010 Definition Lists: Mixed Lists: Test 1
4016 <dl><dd><dl><dt><ul><li> foo</li>
4017 <li> bar</li></ul></dt></dl>
4018 <dl><dt> baz</dt></dl></dd></dl>
4053 Definition Lists: Mixed Lists: Test 2
4058 <ul><li><dl><dd> d1</dd>
4059 <dd> d2</dd></dl></li></ul>
4065 Definition Lists: Mixed Lists: Test 3
4070 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4071 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4077 Definition Lists: Mixed Lists: Test 4
4082 <ul><li><dl><dt>d1 </dt>
4085 <dd>d4</dd></dl></li></ul>
4091 Definition Lists: Mixed Lists: Test 5
4097 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4103 Definition Lists: Mixed Lists: Test 6
4108 <ol><li><ul><li><dl><dd>d1
4109 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4115 Definition Lists: Mixed Lists: Test 7
4120 <dl><dd><ul><li> d1</li>
4121 <li> d2</li></ul></dd></dl>
4127 Definition Lists: Mixed Lists: Test 8
4132 <dl><dd><ul><li> d1</li></ul>
4133 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4139 Definition Lists: Mixed Lists: Test 9
4143 <ul><li><dl><dt>foo </dt>
4144 <dd>bar</dd></dl></li></ul>
4150 Definition Lists: Mixed Lists: Test 10
4154 <ul><li><ol><li><dl><dt>foo </dt>
4155 <dd>bar</dd></dl></li></ol></li></ul>
4159 # The Parsoid team disagrees with the PHP parser's seemingly-random
4160 # rules regarding dd/dt on the next two tests. Parsoid is more
4161 # consistent, and recognizes the shared nesting and keeps the
4162 # still-open tags around until the nesting is complete.
4163 # (And tidy again converts <dt> to <dd> before 'bar'.)
4166 Definition Lists: Mixed Lists: Test 11
4171 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4172 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4173 <dl><dt>boo </dt>
4174 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4229 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4230 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4234 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4235 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4244 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4246 # * The test is wrong, there are two colons where there should be :;
4247 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4249 Definition Lists: Weird Ones: Test 1
4251 *#;*::;; foo : bar (who uses this?)
4253 <ul><li><ol><li><dl><dt> foo </dt>
4254 <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>
4273 <dt>bar (who uses this?)</dt>
4305 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4306 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4318 Definition Lists: colons occurring in tags
4336 <dt><span>a:b</span></dt>
4363 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4365 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4366 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4367 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4368 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4370 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4371 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4372 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4376 Definition Lists: colons and tables 1
4388 </td></tr></table></dd></dl>
4392 </td></tr></table></dd></dl>
4396 # Parsoid's output (as documented below) differs from php's in this case.
4397 # This is probably a bug. If we fixup parsoid to match php's output, the
4398 # above test should pass and the below test case can be removed. It is
4399 # unclear which output is more desirable.
4402 Definition Lists: colons and tables 2
4414 </td></tr></table></dd>
4418 </td></tr></table></dd></dl>
4422 Definition Lists: template interaction
4424 ::{{definition_list}}
4427 ::{{definition_list}}
4432 <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">
4433 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4435 <dl><dd data-parsoid='{}'>one
4436 <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">
4437 </span><dd about="#mwt2">two
4439 <dd>three</dd></dl></dd>
4440 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4448 External links: non-bracketed
4450 Non-bracketed: http://example.com
4452 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4456 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4458 External links: numbered
4460 Numbered: [http://example.com]
4461 Numbered: [http://example.net]
4462 Numbered: [http://example.com]
4464 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4465 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4466 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4469 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4470 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4471 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4475 External links: specified text
4477 Specified text: [http://example.com link]
4479 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4484 External links: trail
4486 Linktrails should not work for external links: [http://example.com link]s
4488 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4493 External links: dollar sign in URL
4495 http://example.com/1$2345
4497 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4501 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4503 External links: dollar sign in URL (autonumber)
4505 [http://example.com/1$2345]
4507 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4510 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4514 External links: open square bracket forbidden in URL (bug 4377)
4516 parsoid=wt2html,wt2wt,html2html
4518 http://example.com/1[2345
4520 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4523 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4527 External links: open square bracket forbidden in URL (named) (bug 4377)
4529 parsoid=wt2html,html2html
4531 [http://example.com/1[2345]
4533 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4536 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4539 # parsoid adds a space before the link name
4541 External links: open square bracket forbidden in URL (named) (bug 4377)
4544 [http://example.com/1 [2345]
4546 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4551 External links: nowiki in URL link text (bug 6230)
4553 [http://example.com/ <nowiki>''example site''</nowiki>]
4555 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4560 External links: newline forbidden in text (bug 6230 regression check)
4562 [http://example.com/ first
4565 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4571 External links: Pipe char between url and text
4573 [http://example.com | link]
4575 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4580 External links: protocol-relative URL in brackets
4582 [//example.com/ Test]
4584 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4588 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4590 External links: protocol-relative URL in brackets without text
4594 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4597 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4601 External links: protocol-relative URL in free text is left alone
4605 <p>//example.com/Foo
4610 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4612 foo//example.com/Foo
4614 <p>foo//example.com/Foo
4619 External links: with no contents
4621 [http://en.wikipedia.org/wiki/Foo]
4623 [[wikipedia:Foo|Bar]]
4625 [[wikipedia:Foo|<span>Bar</span>]]
4627 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4628 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4629 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4632 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4633 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4634 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4638 External links: Free with trailing punctuation
4648 http://example.com/url_with_(brackets)
4649 (http://example.com/url_without_brackets)
4650 http://example.com/url_with_entity&
4651 http://example.com/url_with_entity&
4652 http://example.com/url_with_entity&
4653 http://example.com/url_with_entity
4654 http://example.com/url_with_entity 
4655 http://example.com/url_with_entity 
4656 http://example.com/url_with_entity<
4657 http://example.com/url_with_entity<
4658 http://example.com/url_with_entity<
4660 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4661 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4662 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4663 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4664 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4665 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4666 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4667 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4668 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4669 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4670 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4671 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4672 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4673 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4674 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4675 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4676 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4677 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4678 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4681 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4682 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4683 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4684 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4685 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4686 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4687 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4688 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4689 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4690 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4691 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4692 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4693 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4694 <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>
4695 <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>
4696 <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>
4697 <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>
4698 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4699 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
4703 External links: tricky Parsoid html2html case
4705 parsoid=wt2html,wt2wt,html2html
4707 http://example.com/url_with_entity&amp;
4709 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4712 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4716 External links: Free with trailing quotes (T113666)
4718 '''News:''' Stuff here
4722 <p><b>News:</b> Stuff here
4723 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4726 <p><b>News:</b> Stuff here</p>
4727 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4731 External links: Lone protocols are never linked (T105697)
4750 External links: No preceding word characters allowed (bug 65278)
4752 NOPEhttp://example.com
4753 N0http://example.com
4754 ok:http://example.com
4755 ok-http://example.com
4757 <p>NOPEhttp://example.com
4758 N0http://example.com
4759 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4760 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4767 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4769 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4774 External image from https
4776 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4778 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4783 External image (when not allowed)
4785 wgAllowExternalImages=0
4787 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4789 <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>
4794 Link to non-http image, no img tag
4796 Link to non-http image, no img tag: ftp://example.com/test.jpg
4798 <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>
4803 External links: terminating separator
4805 Terminating separator: http://example.com/thing,
4807 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4812 External links: intervening separator
4814 Intervening separator: http://example.com/1,2,3
4816 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4821 External links: old bug with URL in query
4823 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4825 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4830 External links: old URL-in-URL bug, mixed protocols
4832 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4834 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4839 External links: URL in text
4841 URL in text: [http://example.com http://example.com]
4843 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4848 External links: Clickable images
4850 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4852 <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>
4855 <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>
4859 External links: raw ampersand
4861 Old & use: http://x&y
4863 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4868 External links: encoded ampersand
4870 Old & use: http://x&y
4872 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4875 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4879 External links: encoded equals (bug 6102)
4881 http://example.com/?foo=bar
4883 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4886 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4890 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4891 ## does it number them. As discussed in bug 53505, we can identify
4892 ## autonumbered links via CSS.
4896 External links: [raw ampersand]
4898 Old & use: [http://x&y]
4900 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4903 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4906 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4907 # mode will return the [raw ampersand] wikitext
4909 External links: [encoded ampersand]
4911 parsoid=wt2html,wt2wt,html2html
4913 Old & use: [http://x&y]
4915 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4918 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4922 External links: [raw equals]
4924 [http://example.com/?foo=bar]
4926 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4929 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4932 # note that parsoid html is identical to [raw equals] case; so html2wt
4933 # mode will return the [raw equals] wikitext
4935 External links: [encoded equals] (bug 6102)
4937 parsoid=wt2html,wt2wt,html2html
4939 [http://example.com/?foo=bar]
4941 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4944 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4947 # xxx parsoid strips the IDN character, so the round-trip tests will
4948 # obviously fail and are disabled. --cscott
4950 External links: [IDN ignored character reference in hostname; strip it right off]
4952 parsoid=wt2html,wt2wt,html2html
4954 [http://e‌xample.com/]
4956 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4959 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4962 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4963 # Where an external link could easily circumvent the sanitization of the text of
4964 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4965 # test demands a higher standard. That's a bit strange.
4969 # http://example.com -> [http://example.com|http://example.com]
4970 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4972 # The first example is sanitized, but the second is not. Any security benefits
4973 # from this production are trivial to circumvent. Either remove this test and
4974 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4975 # the test accordingly.
4979 # xxx parsoid strips the IDN character, so the round-trip tests will
4980 # obviously fail and are disabled. --cscott
4982 External links: IDN ignored character reference in hostname; strip it right off
4984 parsoid=wt2html,html2html
4986 http://e‌xample.com/
4988 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4991 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4995 External links: www.jpeg.org (bug 554)
4999 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5003 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5005 External links: URL within URL (original bug 2)
5007 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5009 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5012 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5016 BUG 361: URL inside bracketed URL
5018 [http://www.example.com/foo http://www.example.com/bar]
5020 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5025 BUG 361: URL within URL, not bracketed
5027 http://www.example.com/foo?=http://www.example.com/bar
5029 <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>
5034 BUG 289: ">"-token in URL-tail
5036 http://www.example.com/<hello>
5038 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5043 BUG 289: literal ">"-token in URL-tail
5045 http://www.example.com/<b>html</b>
5047 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5050 <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>
5054 BUG 289: ">"-token in bracketed URL
5056 [http://www.example.com/<hello> stuff]
5058 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5063 BUG 289: literal ">"-token in bracketed URL
5065 [http://www.example.com/<b>html</b> stuff]
5067 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5072 BUG 289: literal double quote at end of URL
5074 http://www.example.com/"hello"
5076 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5081 BUG 289: literal double quote in bracketed URL
5083 [http://www.example.com/"hello" stuff]
5085 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5090 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5092 [http://www.example.com test]
5094 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5099 External links: link text with spaces
5101 [http://www.example.com a b c]
5102 [http://www.example.com ''a'' ''b'']
5104 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5105 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5110 External links: wiki links within external link (Bug 3695)
5112 parsoid=wt2html,html2html
5114 [http://example.com [[wikilink]] embedded in ext link]
5116 <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>
5119 <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>
5123 BUG 787: Links with one slash after the url protocol are invalid
5127 [http:/example.com title]
5129 <p>http:/example.com
5130 </p><p>[http:/example.com title]
5135 Bracketed external links with template-generated invalid target
5137 [{{echo|http:/example.com}} title]
5139 <p>[http:/example.com title]
5144 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5146 ''[http://example.com text'']
5147 [http://example.com '''text]'''
5148 ''Something [http://example.com in italic'']
5149 ''Something [http://example.com mixed''''', even bold]'''
5150 '''''Now [http://example.com both''''']
5152 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5153 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5154 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5155 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5156 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5162 Bug 4781: %26 in URL
5164 http://www.example.com/?title=AT%26T
5166 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5169 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5172 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5173 # % is actually legal in HTML5. Any change in output would need testing though.
5175 Bug 4781, 5267: %25 in URL
5177 http://www.example.com/?title=100%25_Bran
5179 <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>
5182 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5186 Bug 4781, 5267: %28, %29 in URL
5188 http://www.example.com/?title=Ben-Hur_%281959_film%29
5190 <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>
5193 <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>
5198 Bug 4781: %26 in autonumber URL
5200 [http://www.example.com/?title=AT%26T]
5202 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5205 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5209 Bug 4781, 5267: %26 in autonumber URL
5211 [http://www.example.com/?title=100%25_Bran]
5213 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5216 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5220 Bug 4781, 5267: %28, %29 in autonumber URL
5222 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5224 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5227 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5232 Bug 4781: %26 in bracketed URL
5234 [http://www.example.com/?title=AT%26T link]
5236 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5239 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5243 Bug 4781, 5267: %25 in bracketed URL
5245 [http://www.example.com/?title=100%25_Bran link]
5247 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5252 Bug 4781, 5267: %28, %29 in bracketed URL
5254 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5256 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5259 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5263 External link containing a period in the anchor. (bug 63947)
5265 [//foo.org/bar#baz. bang]
5267 [//foo.org/bar. bang]
5269 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5270 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5273 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5274 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5278 External link containing a single quote. (bug 63947)
5282 [//foo.org/bar'baz bang]
5284 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5285 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5288 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5289 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5293 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5295 Some [http://example.com/ pretty ''italics'' and stuff]!
5297 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5302 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5304 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5306 <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>
5311 External link containing double-single-quotes with no space separating the url from text in italics
5313 [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]].]
5315 <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>
5318 <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>
5320 <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>
5324 External link with comments in link text
5326 [http://www.google.com Google <!-- comment -->]
5328 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5331 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5335 External link to bare IPv4 address
5337 [http://192.168.0.1 Link]
5339 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5342 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5346 URL-encoding in URL functions (single parameter)
5348 {{localurl:Some page|amp=&}}
5350 <p>/index.php?title=Some_page&amp=&
5355 URL-encoding in URL functions (multiple parameters)
5357 {{localurl:Some page|q=?&=&}}
5359 <p>/index.php?title=Some_page&q=?&amp=&
5366 http://example.com/index.php?foozoid%5B%5D=bar
5368 http://example.com/index.php?foozoid[]=bar
5370 <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>
5371 </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>
5374 <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>
5376 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5380 IPv6 urls, autolink format (T23261)
5382 http://[2404:130:0:1000::187:2]/index.php
5384 Examples from RFC 2373, section 2.2:
5385 * http://[1080::8:800:200C:417A]/unicast
5386 * http://[FF01::101]/multicast
5387 * http://[::1]/loopback
5388 * http://[::]/unspecified
5389 * http://[::13.1.68.3]/ipv4compat
5390 * http://[::FFFF:129.144.52.38]/ipv4compat
5392 Examples from RFC 2732, section 2:
5393 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5394 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5395 * http://[3ffe:2a00:100:7031::1]
5396 * http://[1080::8:800:200C:417A]/foo
5397 * http://[::192.9.5.5]/ipng
5398 * http://[::FFFF:129.144.52.38]:80/index.html
5399 * http://[2010:836B:4179::836B:4179]
5402 <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>
5403 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5405 <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>
5406 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5407 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5408 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5409 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5410 <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>
5411 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5413 <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>
5414 <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>
5415 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5416 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5417 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5418 <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>
5419 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5422 <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>
5424 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5425 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5426 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5427 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5428 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5429 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5430 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5432 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5433 <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>
5434 <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>
5435 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5436 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5437 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5438 <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>
5439 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5443 IPv6 urls, bracketed format (T23261)
5445 [http://[2404:130:0:1000::187:2]/index.php test]
5447 Examples from RFC 2373, section 2.2:
5448 * [http://[1080::8:800:200C:417A] unicast]
5449 * [http://[FF01::101] multicast]
5450 * [http://[::1]/ loopback]
5451 * [http://[::] unspecified]
5452 * [http://[::13.1.68.3] ipv4compat]
5453 * [http://[::FFFF:129.144.52.38] ipv4compat]
5455 Examples from RFC 2732, section 2:
5456 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5457 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5458 * [http://[3ffe:2a00:100:7031::1] 3]
5459 * [http://[1080::8:800:200C:417A]/foo 4]
5460 * [http://[::192.9.5.5]/ipng 5]
5461 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5462 * [http://[2010:836B:4179::836B:4179] 7]
5465 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5466 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5468 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5469 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5470 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5471 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5472 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5473 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5474 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5476 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5477 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5478 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5479 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5480 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5481 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5482 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5485 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5487 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5488 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5489 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5490 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5491 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5492 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5493 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5495 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5496 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5497 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5498 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5499 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5500 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5501 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5502 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5506 Non-extlinks in brackets
5515 [{{echo|foo}} ''bar'']
5516 [{{echo|foo}}l's] errand
5517 [{{echo|foo}}l's errand]
5519 [url=http://example.com]
5520 [http:// bare protocols don't count]
5533 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5534 [http:// bare protocols don't count]
5542 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5543 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5544 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5545 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5546 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5547 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5548 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5549 [http:// bare protocols don't count]</p>
5553 Percent encoding in external links
5555 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5557 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5560 <p><a rel="mw:ExtLink"
5561 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5565 Use url link syntax for links where the content is equal the link target
5569 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5572 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5576 Parenthesis in external links, especially URL links
5580 http://example.com/test)
5582 http://example.com/(test)
5584 http://example.com/((test)
5586 (http://example.com/(test))
5588 (http://example.com/(test)))))
5590 http://example.com/a)b
5592 [http://example.com) foo]
5594 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</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/(test))">http://example.com/(test))</a>
5599 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5600 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5601 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5604 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</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/(test))">http://example.com/(test))</a></p>
5609 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5610 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5611 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5615 Parenthesis in external links, w/ transclusion or comment
5617 (http://example.com/{{echo|hi}})
5619 (http://example.com<!-- hi -->)
5621 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5622 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5625 <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=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[20,31,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;hi&quot;}},&quot;i&quot;:0}}]}\">hi</span>"}]]}'>http://example.com/hi</a>)</p>
5627 <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>
5631 Serialize <a> tags with invalid link targets as plain text
5633 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5635 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5636 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5637 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5638 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5641 <nowiki>*</nowiki>text
5642 <nowiki>[[foo]]</nowiki>
5643 <nowiki>*a [[foo]]</nowiki>
5647 mw:ExtLink -vs- mw:WikiLink (T94723)
5651 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"},"dsr":[0,11,6,2]}'>Bar</a>
5652 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5653 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5654 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5656 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5657 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5662 [[wikipedia:Foo|Bar]]
5663 [[wikipedia:Foo|Bar]]
5665 [[wikipedia:European_Robin|European Robin]]
5666 [[wikipedia:European_Robin|European Robin]]
5670 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5674 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5676 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5687 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5689 Normal text. '''''Bold italic text.''''' Normal text.
5691 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5692 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5697 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5698 # parser strips. The wikitext contains just the first half of the bold
5701 Unclosed and unmatched quotes
5703 '''''Bold italic text '''with bold deactivated''' in between.'''''
5705 '''''Bold italic text ''with italic deactivated'' in between.'''''
5709 ..spanning two paragraphs (should not work).'''
5711 '''Bold tag left open
5713 ''Italic tag left open
5717 <!-- Unmatching number of opening, closing tags: -->
5718 '''This year''''s election ''should'' beat '''last year''''s.
5720 ''Tom'''s car is bigger than ''Susan'''s.
5722 Plain ''italic'''s plain
5724 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5725 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5726 </p><p><b>Bold text..</b>
5727 </p><p>..spanning two paragraphs (should not work).
5728 </p><p><b>Bold tag left open</b>
5729 </p><p><i>Italic tag left open</i>
5731 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5732 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5733 </p><p>Plain <i>italic'</i>s plain
5736 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5737 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5738 </p><p><b>Bold text..</b>
5739 </p><p>..spanning two paragraphs (should not work).<b></b>
5740 </p><p><b>Bold tag left open</b>
5741 </p><p><i>Italic tag left open</i>
5744 <!-- Unmatching number of opening, closing tags: -->
5745 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5746 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5747 </p><p>Plain <i>italic'</i>s plain
5754 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5757 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5758 # is the bare minimum required by the spec, see:
5759 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5760 # Parsoid team replies: empty table tags are legal in HTML5
5762 A table with no data.
5775 A table with stray table end tags on start tag line (wt2html)
5779 {|style="color: red;"|}
5781 {|style="color: red;" |}
5785 {|style="color: red;"|} id="foo"
5789 {|style="color: red;" |} id="foo"
5793 <table style="color: red;"></table>
5795 <table style="color: red;">
5801 <table style="color: red;" id="foo">
5807 <table style="color: red;" id="foo">
5816 A table with no data (take 2)
5824 # A table with nothing but a caption is invalid XHTML, we might want to render
5825 # this as <p>caption</p>
5826 # Parsoid team replies: table with only a caption is legal in HTML5
5828 A table with nothing but a caption
5836 </caption><tr><td></td></tr></table>
5839 <table><caption> caption</caption></table>
5843 A table with caption with default-spaced attributes and a table row
5846 |+ style="color: red;" | caption1
5852 <caption style="color: red;"> caption1
5861 A table with captions with non-default spaced attributes and a table row
5864 |+style="color: red;"|caption2
5865 |+ style="color: red;"| caption3
5871 <caption style="color: red;">caption2
5873 <caption style="color: red;"> caption3
5882 Table td-cell syntax variations
5886 | foo bar foo || baz
5887 | style='color:red;' | baz
5888 | style='color:red;' || baz
5895 <td> foo bar foo </td>
5898 <td style="color:red;"> baz
5900 <td> style='color:red;' </td>
5928 Simple table but with multiple dashes for row wikitext
5947 Multiplication table
5949 {| border="1" cellpadding="2"
5950 |+Multiplication table
5952 ! × !! 1 !! 2 !! 3
5970 <table border="1" cellpadding="2">
5971 <caption>Multiplication table
6018 Accept "||" in table headings
6033 Accept "!!" in table data
6047 <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>
6052 Accept "||" in indented table headings
6062 </th></tr></table></dd></dl>
6067 Accept "!!" in templates
6081 <tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1","spc":["","","",""]}]]}' 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>
6085 Accept "!!" in table headings after newline
6102 <p>b!!c</p></th></tr>
6107 Accept "!!" in table data of mixed wikitext / html syntax
6111 <tr><td>b!!c</td></tr>
6124 <tbody><tr><th>a</th></tr>
6125 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6130 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6147 Accept "| !" at start of line in tables (ignore !-attribute)
6151 | !style="color:red" | bar
6163 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 +/-
6167 |style='color:red;'|+1
6168 |style='color:blue;'|-1
6180 <td style="color:red;">+1
6182 <td style="color:blue;">-1
6206 |rowspan=2| Cell 2, row 1 (and 2)
6217 <td rowspan="2"> Cell 2, row 1 (and 2)
6235 {| bgcolor=#ABCDEF border=2
6240 |the original table again
6248 <table bgcolor="#ABCDEF" border="2">
6256 <td>the original table again
6262 Invalid attributes in table cell (bug 1830)
6276 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6280 | title="foo<nowiki>|</nowiki>" |bar
6281 | title="foo<nowiki>|</nowiki>" bar
6288 <td title="foo|">bar
6290 <td> title="foo|" bar
6295 <tbody><tr><td title="foo">bar</td>
6296 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6297 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6301 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6302 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6303 # *2wt modes will fail.
6305 Table security: embedded pipes
6307 parsoid=wt2html,html2html
6310 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6314 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6315 <td>]" onmouseover="alert(document.cookie)">test
6323 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6326 # FIXME: The output seems broken. Filed as T110268.
6328 ! and || in td attributes should not be parsed as <th>/<td>
6333 | style="color: red !important;" data-contrived="put this here ||" | foo
6338 <td> style="color: red !important;" data-contrived="put this here </td>
6344 <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>
6349 Indented table markup mixed with indented pre content (proposed in bug 6200)
6354 Text that should be rendered preformatted
6362 <pre>Text that should be rendered preformatted
6371 1. Template-generated table cell attributes and cell content
6376 || {{table_attribs_5}}
6377 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6378 |align=center {{table_attribs}}
6379 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6384 <td style="color:red;">Foo
6386 <td style="color:red;">Foo
6388 <td> style="color:red;"</td>
6391 <td style="color:red;">Foo
6393 <td align="center" style="color:red;">Foo
6395 <td align="center" style="color:red;">Foo
6401 2. Template-generated table cell attributes and cell content
6404 |{{table_attribs_2}}
6409 <td style="color:red;">Foo
6417 <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>
6418 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6423 3. Template-generated table cell attributes and cell content
6426 !align=center {{table_header_cells}}
6428 |align=center {{table_cells}}
6433 <th align="center" style="color:red;">Foo</th>
6434 <th style="color:red;"><i>Bar</i></th>
6435 <th style="color:brown;"><i>Foo</i> and Baz
6438 <td align="center" style="color:red;">Foo</td>
6439 <td style="color:red;"><i>Bar</i></td>
6440 <td style="color:brown;"><i>Foo</i> and Baz
6445 <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>
6446 <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>
6451 4. Template-generated table cell attributes and cell content inside a templated table
6454 !align=center {{table_header_cells}}
6456 |align=center {{table_cells}}
6461 <th align="center" style="color:red;">Foo</th>
6462 <th style="color:red;"><i>Bar</i></th>
6463 <th style="color:brown;"><i>Foo</i> and Baz
6466 <td align="center" style="color:red;">Foo</td>
6467 <td style="color:red;"><i>Bar</i></td>
6468 <td style="color:brown;"><i>Foo</i> and Baz
6472 <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}}]}'>
6473 <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>
6475 <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>
6479 ## Edge case fix to prevent future regressions
6481 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6484 |{{table_attribs_7}}
6489 <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>
6491 <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>
6495 Table with row followed by newlines and table heading
6513 Table with empty line following the start tag
6530 # FIXME: Preserve the attribute properly (with an empty string as value) in
6531 # the PHP parser. Parsoid implements the behavior below.
6533 Table attributes with empty value
6543 </td></tr></tbody></table>
6548 Wikitext table with a lot of comments
6571 Wikitext table comments represented in parsoid dom
6573 {|<!--c1--><!--c2-->
6584 <table><!--c1--><!--c2-->
6585 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6586 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6591 Wikitext table with double-line table cell
6608 Table cell with a single comment
6625 Table-cell after a comment-only-empty-line
6642 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6644 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6650 Build table with {{!}}
6652 {{{!}} class="wikitable"
6655 {{!}}- style="color:red;"
6656 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6659 <table class="wikitable">
6665 <tr style="color:red;">
6667 <td style="color:red;"> second data
6673 Build table with pipe as data
6675 {| class="wikitable"
6678 |- style="color:red;"
6679 | data || style="color:red;" | second data
6681 | style="color:red;" | data with | || style="color:red;" | second data with |
6683 || data with | ||| second data with |
6686 <table class="wikitable">
6692 <tr style="color:red;">
6694 <td style="color:red;"> second data
6697 <td style="color:red;"> data with | </td>
6698 <td style="color:red;"> second data with |
6701 <td> data with | </td>
6702 <td> second data with |
6708 Build table with wikilink
6710 {| class="wikitable"
6711 ! header || second header
6712 |- style="color:red;"
6713 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6715 | data || second data [[Main Page|link|text with pipe]]
6718 <table class="wikitable">
6723 <tr style="color:red;">
6724 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6725 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6729 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6734 # The expected HTML structure in this test is debatable. The PHP parser does
6735 # not parse this kind of table at all. The main focus for Parsoid is on
6736 # round-tripping, so this output is ok for now. TODO: revisit!
6738 Wikitext table with html-syntax row
6748 <td>foo</td></tr></tbody></table>
6751 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6752 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6753 ## PHP parser, which tidy then compounds by fostering the content
6754 ## entirely out of the table. Parsoid recognizes the table context
6755 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6756 ## depends on PHP's treatment of broken table markup!
6758 Implicit <td> after a |-
6760 parsoid=wt2html,html2html
6780 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6782 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6784 parsoid=wt2html,html2html
6817 <tr><td><pre>a</pre></td></tr>
6818 <tr><td> b</td></tr>
6823 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6824 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6826 Lists should be recognized in an implicit <td> context
6828 parsoid=wt2html,html2html
6855 Table cells not properly parsed in an implicit-td context
6859 {{table_attribs_4}} || a || b
6864 <td style="background-color:#DC241f;" width="10px"></td>
6871 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6872 <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>
6877 Parsoid: Round-trip tables directly followed by content (bug 51219)
6879 parsoid=wt2html,wt2wt
6904 Parsoid: Default to a newline after tables in new content (bug 51219)
6909 <tr><td>foo</td></tr></tbody></table> bar
6911 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6916 <nowiki> </nowiki>bar
6924 Parsoid: newline inducing block nodes don't suppress <nowiki>
6936 Parsoid: Row-syntax table headings followed by comment & table cells
6938 parsoid=wt2html,wt2wt
6942 <!-- foo --> || baz || quux
6956 <tbody><tr><th> foo </th><th> bar
6957 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6962 Parsoid: Recover better from broken table attributes
6982 <p>foo</p></td></tr>
6987 Tables: Digest broken attributes on table and tr tag
7004 Strip unsupported table tags
7052 Testing serialization after deletion of table cells
7055 "modes": ["wt2wt", "selser"],
7063 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7076 Plain link, capitalized
7080 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7085 Plain link, uncapitalized
7089 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7096 [[Main Page|The Main Page]]
7098 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7103 Piped link with comment in link text
7105 [[Main Page|The Main<!--front--> Page]]
7107 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7112 Piped link with multiple pipe characters in link text
7114 [[Main Page||The|Main|Page|]]
7116 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7119 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7127 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7132 Broken link with fragment
7134 [[Zigzagzogzagzig#zug]]
7136 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7141 Special page link with fragment
7143 [[Special:Version#anchor]]
7145 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7150 Nonexistent special page link with fragment
7152 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7154 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7161 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7163 <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>
7170 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7172 <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>!!!
7183 Bug 43661: Piped links with identical prefixes
7185 [[prefixed article|prefixed articles with spaces]]
7187 [[prefixed article|prefixed articlesaoeu]]
7189 [[Main Page|Main Page test]]
7191 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7192 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7193 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7199 Link with HTML entity in suffix / tail
7201 [[Main Page]]", [[Main Page]]a
7203 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7206 <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>
7210 Link with 3 brackets
7221 Link with 4 brackets
7225 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7230 Piped link with 3 brackets
7232 [[[main page|the main page]]]
7234 <p>[[[main page|the main page]]]
7239 Piped link with extlink-like text
7242 [[Main Page|This is a [bar]]]
7244 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7245 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7248 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7249 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7253 Link with multiple pipes
7255 [[Main Page|The|Main|Page]]
7257 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7261 # Note that parsoid does not munge anchor text; all non-space
7262 # characters are valid in HTML5 ids.
7264 Anchor containing a #. (bug 63430)
7266 [[Main Page#And#Link]]
7268 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7271 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7277 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7279 <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>
7284 Link with space in namespace
7286 [[User talk:Foo bar]]
7288 <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>
7293 MemoryAlpha:AlphaTest
7295 This is an article in the MemoryAlpha namespace
7296 (which shadows the memoryalpha interwiki link).
7300 Namespace takes precedence over interwiki link (bug 51680)
7302 [[MemoryAlpha:AlphaTest]]
7304 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7308 # The previous test doesn't work correctly in html2*, due to not recognizing the
7309 # link as an internal one. This one checks for the correct behavior.
7311 Link to namespace preferred over interwiki with correct rel attribute
7313 parsoid=html2wt,html2html
7315 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7317 [[MemoryAlpha:AlphaTest]]
7321 Piped link to namespace
7323 [[Meta:Disclaimers|The disclaimers]]
7325 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7332 [[Usually caused by a typo (oops}]]
7334 <p>[[Usually caused by a typo (oops}]]
7341 Just a test of an article title containing a percent.
7345 Link containing % (not as a hex sequence)
7349 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7352 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7355 # note that the parsoid HTML is identical to the previous test output,
7356 # so the previous test ensures that the html2wt mode will generate the
7357 # "not as a hex sequence" wikitext.
7359 Link containing % as a single hex sequence interpreted to char
7361 parsoid=wt2wt,wt2html,html2html
7365 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7368 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7372 Link containing % as a double hex sequence interpreted to hex sequence
7376 <p>[[7%2525 Solution]]
7380 # note that parsoid does not munge anchor text; all non-space
7381 # characters are valid in HTML5 anchors.
7383 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7384 Example for such a section: == < ==
7386 [[%23%3c]][[%23%3e]]
7388 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7391 <p><a rel="mw:WikiLink" href="./Main%20Page#%3C" title="Main Page">#<</a><a rel="mw:WikiLink" href="./Main%20Page#%3E" title="Main Page">#></a></p>
7395 Link containing "<#" and ">#" as a hex sequences
7397 [[%3c%23]][[%3e%23]]
7399 <p>[[%3c%23]][[%3e%23]]
7404 Link containing an equals sign
7406 [[Special:BookSources/isbn=4-00-026157-6]]
7408 <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>
7411 <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>
7417 Just a test of an article title containing a tilde.
7420 # note that links containing signatures, like [[Foo~~~~]], are
7421 # massaged by the pre-save transform (PST) and so the tildes are never
7422 # seen by the parser.
7424 Link containing a tilde
7428 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7431 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7435 Link containing double-single-quotes '' (bug 4598)
7437 [[Lista d''e paise d''o munno]]
7439 <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>
7442 <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>
7446 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7448 Some [[Link|pretty ''italics'' and stuff]]!
7450 <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>!
7453 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7457 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7459 ''Some [[Link|pretty ''italics'' and stuff]]!''
7461 <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>
7466 Link with double quotes in title part (literal) and alternate part (interpreted)
7468 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7472 [[''Pentecoste''|Pentecoste]]
7474 [[''Pentecoste''|''Pentecoste'']]
7476 <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>
7477 </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>
7478 </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>
7479 </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>
7482 <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>
7483 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7484 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7485 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7489 Broken image links with HTML captions (bug 39700)
7491 [[File:Nonexistent|<script></script>]]
7492 [[File:Nonexistent|100x100px|<script></script>]]
7493 [[File:Nonexistent|<]]
7494 [[File:Nonexistent|a<i>b</i>c]]
7496 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7497 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7498 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7499 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7502 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script&gt;&lt;/script&gt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
7503 <span typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;script&gt;&lt;/script&gt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100"/></a></span>
7504 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid=\"{&quot;src&quot;:&quot;&amp;lt;&quot;,&quot;srcContent&quot;:&quot;<&quot;,&quot;dsr&quot;:[107,111,null,null]}\">&lt;</span>"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
7505 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"a<i data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[134,142,3,4]}\">b</i>c"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span></p>
7511 [[http://www.example.com]]
7513 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7516 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7520 Plain link to URL with link text
7522 [[http://www.example.com Link text]]
7524 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7529 Plain link to protocol-relative URL
7531 [[//www.example.com]]
7533 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7536 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7540 Plain link to protocol-relative URL with link text
7542 [[//www.example.com Link text]]
7544 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7549 Plain link to page with question mark in title
7555 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7556 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7561 # I'm fairly sure the expected result here is wrong.
7562 # We want these to be URL links, not pseudo-pages with URLs for titles....
7563 # However the current output is also pretty screwy.
7566 # I'm changing it to match the current output--it arguably makes more
7567 # sense in the light of the test above. Old expected result was:
7568 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7570 # But I think this test is bordering on "garbage in, garbage out" anyway.
7575 Piped link to URL: [[http://www.example.com|an example URL]]
7577 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7580 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7584 BUG 2: [[page|http://url/]] should link to page, not http://url/
7586 [[Main Page|http://url/]]
7588 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7591 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7594 # Parsoid does not mark self-links, by design.
7596 BUG 337: Escaped self-links should be bold
7600 [[Bug462]] [[Bug462]]
7602 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7605 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7607 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7611 Self-link to section should not be bold
7615 [[Main Page#section]]
7617 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7628 Self-link to numeric title
7634 <p><strong class="selflink">0</strong>
7639 Link to numeric-equivalent title
7645 <p><a href="/wiki/00" title="00">00</a>
7650 <nowiki> inside a link
7652 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7654 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7659 Non-breaking spaces in title
7661 [[ Main Page ]]
7663 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7668 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7674 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7679 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7685 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7690 Internal link with en linktrail: no apostrophes (bug 27473)
7696 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7701 Internal link with ca linktrail with apostrophes (bug 27473)
7707 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7712 Internal link with kaa linktrail with apostrophes (bug 27473)
7718 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7723 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7725 [[User:Foo/Test/63636:Bar|Test]]
7727 <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>
7730 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7734 Purely hash wikilink
7736 title=[[User:test/123]]
7740 <p><a href="#a">b</a>
7743 <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>
7747 1. Interaction of linktrail and template encapsulation
7753 <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>
7757 2. Interaction of linktrail and template encapsulation
7761 {{echo|Some [[Fool]]}}s
7763 <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","spc":["","","",""]}]]}'>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>
7767 3. Interaction of linktrail and template encapsulation
7771 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7773 <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","spc":["","","",""]}]]}'>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>
7783 Internal link with is link prefix
7787 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7789 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7800 Internal link with is link trail and link prefix
7804 [[mótmælendatrú|xxx]]ar
7806 mótmælenda[[söfnuður]]
7807 mótmælenda[[söfnuður|söfnuðir]]
7808 mótmælenda[[söfnuður|söfnuðir]]xxx
7810 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7811 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7812 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7813 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7814 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7819 Parsoid link trail escaping
7821 parsoid=html2wt,html2html
7823 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7829 Parsoid link prefix escaping
7832 parsoid=html2wt,html2html
7834 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7836 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7840 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7848 [http://wp.org ''foo'']
7850 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7851 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7852 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7853 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7858 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7862 [[Foo|{{echo|a}} b {{echo|c}}]]
7864 <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>
7868 Link with angle bracket after anchor
7872 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7875 <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>
7879 ### Interwiki links (see maintenance/interwiki.sql)
7883 Inline interwiki link
7885 parsoid=wt2html,wt2wt,html2html
7887 [[MeatBall:SoftSecurity]]
7889 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7892 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7896 Inline interwiki link with empty title (bug 2372)
7898 parsoid=wt2html,wt2wt,html2html
7902 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7905 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7909 Interwiki link encoding conversion (bug 1636)
7911 *[[Wikipedia:ro:Olteniţa]]
7912 *[[Wikipedia:ro:Olteniţa]]
7914 <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>
7915 <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>
7919 <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>
7920 <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>
7925 Interwiki link with fragment (bug 2130)
7927 [[MeatBall:SoftSecurity#foo]]
7929 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7933 # Ideally the wikipedia: prefix here should be proto-relative too
7934 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7935 # define the 'en' prefix, and originally the test used 'wikipedia',
7936 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7939 Different interwiki prefixes mapping to the same URL
7947 [[:wikipedia:Foo|Foo]]
7949 [[wikipedia:en:Foo]]
7951 [[:wikipedia:en:Foo]]
7955 <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>
7957 <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>
7959 <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>
7961 <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>
7963 <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>
7965 <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>
7967 <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>
7971 Interwiki links that cannot be represented in wiki syntax
7974 [[meatball:ok#foo|ok with fragment]]
7975 [[meatball:ok_as_well?|ok ending with ? mark]]
7976 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7977 [http://de.wikipedia.org/wiki/#foo is just fragment]
7980 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7981 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7982 <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>
7983 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7984 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7987 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7988 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7989 <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>
7990 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7991 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7995 Interwiki links: trail
7997 [[wikipedia:Foo|Ba]]r
7999 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8002 <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>
8006 Local interwiki link
8008 parsoid=wt2html,wt2wt,html2html
8010 [[local:Template:Foo]]
8012 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8015 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8018 # Parsoid does not mark self-links, by design.
8020 Local interwiki link: self-link to current page
8023 parsoid=wt2html,wt2wt,html2html
8027 <p><strong class="selflink">local:Main Page</strong>
8030 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8034 Local interwiki link: prefix only (bug 64167)
8036 parsoid=wt2html,wt2wt,html2html
8040 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8043 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8047 Local interwiki link: with additional interwiki prefix (bug 61357)
8049 parsoid=wt2html,wt2wt,html2html
8051 [[local:meatball:Hello]]
8053 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8056 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8060 Multiple local interwiki link prefixes
8062 [[local:local:local:local:mi:local:Foo]]
8064 parsoid=wt2html,wt2wt,html2html
8066 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8069 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8073 ### Interlanguage links
8074 ### Language links (so that searching for '### language' matches..)
8080 parsoid=wt2html,wt2wt,html2html
8088 <p>Blah blah blah</p>
8089 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8093 Interlanguage link with spacing
8095 parsoid=wt2html,wt2wt,html2html
8103 <p>Blah blah blah</p>
8104 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8108 Double interlanguage link
8110 parsoid=wt2html,wt2wt,html2html
8119 <p>Blah blah blah</p>
8120 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8121 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8125 Interlanguage link variations
8127 parsoid=wt2html,wt2wt,html2html
8137 <p>Blah blah blah</p>
8138 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8139 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8140 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8144 Space and question mark encoding in interlanguage links (T95473)
8146 parsoid=wt2html,wt2wt,html2html
8154 <p>Blah blah blah</p>
8155 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8159 Interlanguage link, with prefix links
8169 <p>Blah blah blah</p>
8170 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8174 Double interlanguage link, with prefix links (bug 8897)
8185 <p>Blah blah blah</p>
8186 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8187 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8191 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8199 <p>Blah blah blah</p>
8200 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8204 Parsoid-specific test: Wikilinks with should RT properly
8210 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8215 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8219 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8220 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8222 He&nbsp;llo [[Foo|He&nbsp;llo]]
8224 He&nbsp;llo [[He&nbsp;llo]]
8228 Parsoid: handle constructor well
8234 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8235 </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>
8238 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8240 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8249 # Note that `ko` isn't a known interlanguage prefix
8251 Parsoid: recognize interlanguage links without a target page
8261 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8263 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8266 # Note that `ko` isn't a known interwiki prefix
8268 Parsoid: recognize interwiki links without a target page
8270 parsoid=wt2html,wt2wt,html2html
8276 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8277 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8280 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8281 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8285 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8289 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8292 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8296 Interlanguage link with preceding local interwiki link (bug 68085)
8298 parsoid=wt2html,wt2wt,html2html
8301 [[local:es:Spanish]]
8304 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8308 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8312 Looks like an interlanguage link, but is actually a local interwiki
8314 parsoid=wt2html,wt2wt,html2html
8320 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8324 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8328 ### Redirects, Parsoid-only
8332 1. Simple redirect to page
8334 #REDIRECT [[Main Page]]
8336 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8340 2. Other redirect variants
8342 #REDIRECT [[Main_Page]]
8344 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8347 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8348 # This tests the Parsoid bail-out code.
8350 3. Other redirect variants
8352 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8354 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8358 4. Redirect to a templated destination
8360 #REDIRECT [[{{echo|Foo}}bar]]
8362 <link typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[12,24,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;Foo&quot;}},&quot;i&quot;:0}}]}\">Foo</span>bar"}]]}'/>
8368 parsoid=wt2html,wt2wt
8373 <li>REDIRECT [[]]</li></ol>
8377 Optional colon in #REDIRECT
8379 # the colon is archaic syntax. we support it for wt2html, but we
8380 # don't care that it roundtrips back to the modern syntax.
8381 parsoid=wt2html,html2html
8383 #REDIRECT:[[Main Page]]
8385 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8389 Whitespace in #REDIRECT with optional colon
8391 # the colon and gratuitous whitespace is archaic syntax. we support
8392 # it for wt2html, but we don't care that it roundtrips back to the
8393 # modern syntax (without extra whitespace)
8394 parsoid=wt2html,html2html
8401 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8405 Piped link in #REDIRECT
8407 # content after piped link is ignored. we support this syntax,
8408 # but don't care that the piped link is lost when we roundtrip this.
8411 #REDIRECT [[Main Page|bar]]
8413 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8417 Redirect to category (T104502)
8419 parsoid=wt2html,wt2wt
8421 #REDIRECT [[Category:Foo]]
8423 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8427 Redirect to category with URL encoding (T104502)
8431 #REDIRECT [[Category%3AFoo]]
8433 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8437 Redirect to category page
8439 #REDIRECT [[:Category:Foo]]
8441 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8445 Redirect to image page (1)
8447 #REDIRECT [[File:Wiki.png]]
8449 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8453 Redirect to image page (2)
8455 #REDIRECT [[Image:Wiki.png]]
8457 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8460 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8461 # Next test confirms this.
8463 Redirect to language (1) (T104918)
8465 parsoid=wt2html,wt2wt,html2html
8467 #REDIRECT [[en:File:Wiki.png]]
8469 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8473 Redirect to language (2) (T104918)
8475 #REDIRECT [[:en:File:Wiki.png]]
8477 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8481 Redirect to interwiki (T104918)
8483 #REDIRECT [[meatball:File:Wiki.png]]
8485 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8489 Non-English #REDIRECT
8493 #TILVÍSUN [[Main Page]]
8495 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8499 Redirect syntax under text isn't considered a redirect
8502 #redirect [[Main Page]]
8505 <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>
8508 # FIXME: Should hoist the redirect to the top of the page and ensure there
8515 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8535 Broken br tag sanitization
8543 # TODO: Fix html2html mode (bug 51055)!
8545 Parsoid: Broken br tag recognition
8558 Incorrecly removing closing slashes from correctly formed XHTML
8560 <br style="clear:both;" />
8562 <p><br style="clear:both;" />
8567 Failing to transform badly formed HTML into correct XHTML
8569 <br style="clear: left;">
8570 <br style="clear: right;">
8571 <br style="clear: both;">
8573 <p><br style="clear: left;" />
8574 <br style="clear: right;" />
8575 <br style="clear: both;" />
8579 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8580 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8582 Handling html with a div self-closing tag
8591 <p><div title />
8595 <p><div title=bar />
8596 <div title=bar/>
8598 <div title="bar/"></div>
8602 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8603 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8604 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8605 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8606 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8607 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8611 Handling html with a br self-closing tag
8638 Horizontal ruler (should it add that extra space?)
8653 Horizontal ruler -- 4+ dashes render hr
8662 Horizontal ruler -- eats additional dashes on the same line
8671 Horizontal ruler -- does not collapse dashes on consecutive lines
8682 Horizontal ruler -- <4 dashes render as plain text
8691 Horizontal ruler -- Supports content following dashes on same line
8703 ### Block-level elements
8712 <ul><li>Common list</li>
8714 <li>item 3</li></ul>
8725 <ol><li>Numbered list</li>
8727 <li> item 3</li></ol>
8741 ***#Number on level 4
8743 **#Number on level 3
8744 **#Number on level 3
8748 #** Level 3, but ordered
8751 <ol><li> with numbers</li></ol>
8752 <ul><li> and bullets</li></ul>
8753 <ol><li> and numbers</li></ol></li>
8755 <ul><li>bullet level 2
8756 <ul><li>bullet level 3
8757 <ol><li>Number on level 4</li></ol></li></ul></li>
8759 <ol><li>Number on level 3</li>
8760 <li>Number on level 3</li></ol></li></ul>
8761 <ol><li>number level 2</li></ol></li>
8763 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8764 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8775 <ul><li>bar</li></ul></li></ul>
8785 <ul><li><ul><li>foo</li></ul></li>
8791 Nested lists 3 (first element empty)
8797 <ul><li>bar</li></ul></li></ul>
8802 Nested lists 4 (first element empty)
8807 <ul><li><ul><li></li></ul></li>
8813 Nested lists 5 (both elements empty)
8818 <ul><li><ul><li></li></ul></li>
8824 Nested lists 6 (both elements empty)
8830 <ul><li></li></ul></li></ul>
8835 Nested lists 7 (skip initial nesting levels)
8839 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8844 Nested lists 8 (multiple nesting transitions)
8852 <ul><li><ul><li> bar</li></ul></li>
8853 <li> baz</li></ul></li>
8859 Nested lists 9 (extension interaction)
8865 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8869 1. Lists with start-of-line-transparent tokens before bullets: Comments
8882 2. Lists with start-of-line-transparent tokens before bullets: Template close
8887 <ul><li>foo bar</li>
8893 List items are not parsed correctly following a <pre> block (bug 785)
8899 <ul><li> <pre>foo</pre></li>
8900 <li> <pre>bar</pre></li>
8904 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8905 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8910 List items from template
8921 * notSOL{{inner list}}
8924 <ul><li> item 1</li>
8925 <li> item 2</li></ul>
8926 <ul><li> item 0</li>
8928 <li> item 2</li></ul>
8929 <ul><li> item 0</li>
8932 <li> item 2</li></ul>
8937 List interrupted by empty line or heading
8945 <ul><li> foo</li></ul>
8946 <ul><li><ul><li> bar</li></ul></li></ul>
8947 <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>
8948 <ul><li> Another list item</li></ul>
8953 Multiple list tags generated by templates
8974 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8977 <!--This line will NOT split the list-->
8979 <!--This line will NOT split the list either-->
8981 <!--foo--> <!----> <!--This line NOT split the list either-->
8992 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8995 <!--This line will NOT split the list-->
8997 <!--This line will NOT split the list either-->
8999 <!--foo--> <!----> <!--This line NOT split the list
9012 (The PHP parser relies on Tidy for the hack)
9014 parsoid=wt2html,wt2wt
9018 * {{echo|<li>templated li-hack}}
9019 * <!--foo--> <li> unsupported li-hack with preceding comments
9022 <li><li>not a li-hack
9029 <li>templated li-hack</li>
9030 <li>unsupported li-hack with preceding comments</li>
9033 <li>not a li-hack</li>
9038 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9065 Parsoid: Test of whitespace serialization with Templated bullets
9072 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9076 # ------------------------------------------------------------------------
9077 # The next set of tests are about Parsoid's ability to handle badly nested
9078 # tags (parse, minimize scope of fixup, and roundtrip back)
9079 # ------------------------------------------------------------------------
9082 Unbalanced closing block tags break a list
9083 (php parser relies on Tidy to fix up)
9101 # Parsoid fails this test, but it might be tricky to support properly.
9104 Unbalanced closing non-block tags don't break a list
9105 (php parser relies on Tidy to fix up)
9112 <li><span>a</span></li>
9113 <li><span>b</span></li>
9127 Unclosed formatting tags that straddle lists are closed and reopened
9128 (php parser relies on Tidy to fix up)
9130 parsoid=wt2html,wt2wt,html2html
9140 <ol><li> <s> a</s></li>
9141 <li><s> b </s></li></ol>
9146 1. List embedded in a formatting tag
9153 <li><small>foo</small></li>
9163 ## Ugly Parsoid output here
9164 ## Not sure what the right output is.
9166 2. List embedded in a formatting tag
9173 <li><small>a</small></li>
9174 <li><small>b</small></li>
9181 <li><small>b</small></li>
9185 # Ugly Parsoid and PHP parser output here
9186 # Not sure if we want to make this a test!
9189 ## 3. Unclosed formatting tags in list elements
9195 ## <li><small>a</small></li>
9196 ## <li><small><small>b</small></small></li>
9200 ## <li><small>a</small></li>
9202 ## <li><small>b</small></li>
9206 # This is a bug in the PHP parser + tidy combination.
9207 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9208 # and then fostered out of the table by tidy.)
9209 # We believe the Parsoid output to be correct.
9211 Table with missing opening <tr> tag
9213 parsoid=wt2html,wt2wt
9231 # Note that the current date is hard-coded as
9232 # 1970-01-01T00:02:03Z (a Thursday)
9233 # when running parser tests. The timezone is also fixed to GMT, so
9234 # local date will be identical to current date.
9237 Magic Word: {{CURRENTDAY}}
9246 Magic Word: {{CURRENTDAY2}}
9255 Magic Word: {{CURRENTDAYNAME}}
9264 Magic Word: {{CURRENTDOW}}
9273 Magic Word: {{CURRENTMONTH}}
9282 Magic Word: {{CURRENTMONTH1}}
9291 Magic Word: {{CURRENTMONTHABBREV}}
9293 {{CURRENTMONTHABBREV}}
9300 Magic Word: {{CURRENTMONTHNAME}}
9302 {{CURRENTMONTHNAME}}
9309 Magic Word: {{CURRENTMONTHNAMEGEN}}
9311 {{CURRENTMONTHNAMEGEN}}
9318 Magic Word: {{CURRENTTIME}}
9327 Magic Word: {{CURRENTHOUR}}
9336 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9345 Magic Word: {{CURRENTYEAR}}
9354 Magic Word: {{CURRENTTIMESTAMP}}
9356 {{CURRENTTIMESTAMP}}
9363 Magic Words LOCAL (UTC)
9367 * {{LOCALMONTHNAME}}
9368 * {{LOCALMONTHNAMEGEN}}
9369 * {{LOCALMONTHABBREV}}
9378 * {{LOCALTIMESTAMP}}
9393 <li> 19700101000203</li></ul>
9398 Magic Word: {{FULLPAGENAME}}
9400 title=[[User:Ævar Arnfjörð Bjarmason]]
9404 <p>User:Ævar Arnfjörð Bjarmason
9409 Magic Word: {{FULLPAGENAMEE}}
9411 title=[[User:Ævar Arnfjörð Bjarmason]]
9415 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9420 Magic Word: {{TALKSPACE}}
9422 title=[[User:Ævar Arnfjörð Bjarmason]]
9431 Magic Word: {{TALKSPACE}}, same namespace
9433 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9442 Magic Word: {{TALKSPACE}}, main namespace
9444 title=[[Parser Test]]
9453 Magic Word: {{TALKSPACEE}}
9455 title=[[User:Ævar Arnfjörð Bjarmason]]
9464 Magic Word: {{SUBJECTSPACE}}
9466 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9475 Magic Word: {{SUBJECTSPACE}}, same namespace
9477 title=[[User:Ævar Arnfjörð Bjarmason]]
9486 Magic Word: {{SUBJECTSPACE}}, main namespace
9488 title=[[Parser Test]]
9496 Magic Word: {{SUBJECTSPACEE}}
9498 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9507 Magic Word: {{NAMESPACE}}
9509 title=[[User:Ævar Arnfjörð Bjarmason]]
9518 Magic Word: {{NAMESPACEE}}
9520 title=[[User:Ævar Arnfjörð Bjarmason]]
9529 Magic Word: {{NAMESPACENUMBER}}
9531 title=[[User:Ævar Arnfjörð Bjarmason]]
9540 Magic Word: {{SUBPAGENAME}}
9542 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9551 Magic Word: {{SUBPAGENAMEE}}
9553 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9562 Magic Word: {{ROOTPAGENAME}}
9564 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9568 <p>Ævar Arnfjörð Bjarmason
9573 Magic Word: {{ROOTPAGENAMEE}}
9575 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9579 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9584 Magic Word: {{BASEPAGENAME}}
9586 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9590 <p>Ævar Arnfjörð Bjarmason
9595 Magic Word: {{BASEPAGENAMEE}}
9597 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9601 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9606 Magic Word: {{TALKPAGENAME}}
9608 title=[[User:Ævar Arnfjörð Bjarmason]]
9612 <p>User talk:Ævar Arnfjörð Bjarmason
9617 Magic Word: {{TALKPAGENAMEE}}
9619 title=[[User:Ævar Arnfjörð Bjarmason]]
9623 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9628 Magic Word: {{SUBJECTPAGENAME}}
9630 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9634 <p>User:Ævar Arnfjörð Bjarmason
9639 Magic Word: {{SUBJECTPAGENAMEE}}
9641 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9643 {{SUBJECTPAGENAMEE}}
9645 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9650 Magic Word: {{NUMBEROFFILES}}
9659 Magic Word: {{PAGENAME}}
9661 title=[[User:Ævar Arnfjörð Bjarmason]]
9665 <p>Ævar Arnfjörð Bjarmason
9670 Magic Word: {{PAGENAME}} with metacharacters
9672 title=[['foo & bar = baz']]
9676 <p><i>'foo & bar = baz'</i>
9679 <p><i>'foo & bar = baz'</i></p>
9683 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9685 title=[[*RFC 1234 http://example.com/]]
9689 <p>*RFC 1234 http://example.com/
9692 <p>*RFC 1234 http://example.com/</p>
9696 Magic Word: {{PAGENAMEE}}
9698 title=[[User:Ævar Arnfjörð Bjarmason]]
9702 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9707 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9709 title=[[*RFC 1234 http://example.com/]]
9713 <p>*RFC_1234_http://example.com/
9716 <p>*RFC_1234_http://example.com/</p>
9720 Magic Word: {{REVISIONID}}
9729 Magic Word: {{SCRIPTPATH}}
9738 Magic Word: {{STYLEPATH}}
9747 Magic Word: {{SERVER}}
9751 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9756 Magic Word: {{SERVERNAME}}
9765 Magic Word: {{SITENAME}}
9774 Case-sensitive magic words, when cased differently, should just be template transclusions
9781 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9782 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9783 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9784 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9789 Case-insensitive magic words should still work with weird casing.
9799 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9803 # From plwiki:PLOS_ONE
9805 Parsoid: Page property magic word with magic word contents
9807 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9809 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"content"},{"html":"<i data-parsoid=\"{&quot;dsr&quot;:[15,31,2,2]}\"><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[]],&quot;dsr&quot;:[17,29,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;PAGENAME&quot;,&quot;function&quot;:&quot;pagename&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}\">Main Page</span></i>"}]]}'/>
9813 Parsoid: Template-generated DISPLAYTITLE
9815 {{{{echo|DISPLAYTITLE}}:Foo}}
9817 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,29,null,null],"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DISPLAYTITLE}}:Foo"},"params":{},"i":0}}]}'/>
9821 Namespace 1 {{ns:1}}
9830 Namespace 1 {{ns:01}}
9839 Namespace 0 {{ns:0}} (bug 4783)
9847 Namespace 0 {{ns:00}} (bug 4783)
9855 Namespace -1 {{ns:-1}}
9864 Namespace User {{ns:User}}
9873 Namespace User talk {{ns:User_talk}}
9882 Namespace User talk {{ns:uSeR tAlK}}
9891 Namespace File {{ns:File}}
9900 Namespace File {{ns:Image}}
9909 Namespace (lang=de) Benutzer {{ns:User}}
9920 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9926 <p>Benutzer Diskussion
9934 {{urlencode:hi world?!}}
9935 {{urlencode:hi world?!|WIKI}}
9936 {{urlencode:hi world?!|PATH}}
9937 {{urlencode:hi world?!|QUERY}}
9947 Magic Word: prioritize type info over data-parsoid
9951 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9957 Magic Word: serialize on separate line (parsoid)
9959 parsoid=wt2wt,html2wt
9965 foo<meta property="mw:PageProp/notoc"/>bar
9969 Magic Word: rt non-english wikis
9976 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9980 __proto__ is treated as normal wikitext (T105997)
9992 Magic links: internal link to RFC (bug 479)
9996 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9999 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10003 Magic links: RFC (bug 479)
10007 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10010 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10014 Magic links: RFC (bug 65278)
10016 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10018 <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.
10021 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10025 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10027 RFC      822
10031 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10036 <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>
10042 Magic links: ISBN (bug 1937)
10046 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10049 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10053 Magic links: ISBN (bug 65278)
10055 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10057 <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.
10060 <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>
10064 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10066 ISBN      978 0 316 09811 3
10072 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10079 <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>
10087 Magic links: PMID incorrectly converts space to underscore
10091 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10094 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10098 Magic links: PMID (bug 65278)
10100 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10102 <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.
10105 <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>
10109 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10111 PMID      1234
10115 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10120 <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>
10125 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10126 # since these are ExtLinkText, not MagicLinkText
10128 Magic links: use appropriate serialization for "almost" magic links.
10130 X[[Special:BookSources/0978739256|foo]]
10132 X[//tools.ietf.org/html/rfc1234 foo]
10134 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10135 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10138 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10139 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10147 Nonexistent template
10149 {{thistemplatedoesnotexist}}
10151 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10156 Template with invalid target containing tags
10158 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10160 <p>{{a<b>b</b>|foo|a=b|a = b}}
10165 Template with invalid target containing unclosed tag
10167 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10169 <p>{{a<b>|foo|a=b|a = b}}</b>
10174 Template with invalid target containing wikilink
10178 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10181 <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>
10185 Template with just whitespace in it, bug #68421
10189 <p><span typeof="mw:Transclusion mw:Nowiki" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</span></p>
10195 This is a test template
10203 <p>This is a test template
10208 Template with explicit namespace
10212 <p>This is a test template
10220 This is a test template with parameter {{{param}}}
10226 {{paramtest|param=foo}}
10228 <p>This is a test template with parameter foo
10233 Template:paramtestnum
10235 [[{{{1}}}|{{{2}}}]]
10239 Template unnamed parameter
10241 {{paramtestnum|Main Page|the main page}}
10243 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10248 Template:templatesimple
10254 Template:templateredirect
10256 #redirect [[Template:templatesimple]]
10260 Template:templateasargtestnum
10266 Template:templateasargtest
10268 {{template{{{templ}}}}}
10272 Template:templateasargtest2
10278 Template with template name as unnamed argument
10280 {{templateasargtestnum|templatesimple}}
10287 Template with template name as argument
10289 {{templateasargtest|templ=simple}}
10296 Template with template name as argument (2)
10298 {{templateasargtest2|templ=templatesimple}}
10305 Template:templateasargtestdefault
10307 {{{{{templ|templatesimple}}}}}
10317 Template with default value
10319 {{templateasargtestdefault}}
10326 Template with default value (value set)
10328 {{templateasargtestdefault|templ=templa}}
10337 {{templateredirect}}
10342 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10346 Template with argument in separate line
10348 {{ templateasargtest |
10356 Template with complex template as argument
10359 param ={{ templateasargtest |
10360 templ = simple }}}}
10362 <p>This is a test template with parameter (test)
10367 Template with thumb image (with link in description)
10369 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10371 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>
10374 <p>This is a test template with parameter</p>
10375 <div class="thumb tright">
10376 <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>
10377 <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>
10381 <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>
10385 Template:complextemplate
10387 {{{1}}} {{paramtest|
10388 param ={{{param}}}}}
10392 Template with complex arguments
10395 param ={{ templateasargtest |
10396 templ = simple }}|[[Template:complextemplate|link]]}}
10398 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10403 BUG 553: link with two variables in a piped link
10406 |[[{{{1}}}|{{{2}}}]]
10411 <td>[[{{{1}}}|{{{2}}}]]
10416 <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>
10421 Abort table cell attribute parsing on wikilink
10424 | testing [[one|two]] | three || four
10425 | testing one two | three || four
10430 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10439 <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>
10440 <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></tr>
10445 Don't abort table cell attribute parsing if wikilink is found in template arg
10448 | Test {{#tag:ref|One two "[[three]]" four}}
10452 <tbody><tr><td> Test <ref about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}' 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>
10457 Magic variable as template parameter
10459 {{paramtest|param={{SITENAME}}}}
10461 <p>This is a test template with parameter MediaWiki
10468 [[{{{param}}}|link]]
10472 Template parameter as link source
10474 {{linktest|param=Main Page}}
10476 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10481 Template:paramtest2
10483 including another template, {{paramtest|param={{{arg}}}}}
10487 Template passing argument to another template
10489 {{paramtest2|arg='hmm'}}
10491 <p>including another template, This is a test template with parameter 'hmm'
10502 Template as link source
10506 [[{{linktest2}}|Main Page]]
10508 [[{{linktest2}}]]Page
10510 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10511 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10512 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10530 Template infinite loop
10534 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10539 Template from main namespace
10558 BUG 529: Template with table, not included at beginning of line
10577 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10597 BUG 41: Template parameters shown as broken links
10606 Template with targets containing wikilinks
10610 {{[[{{echo|foo}}]]}}
10612 {{{{echo|[[foo}}]]}}
10614 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10615 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10627 Templates: Double quotes as template target
10634 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10639 Template:MSGNW test
10641 ''None'' of '''this''' should be
10643 but rather passed unmodified
10651 # hmm, fix this or just deprecate msgnw and document its behavior?
10655 {{msgnw:MSGNW test}}
10657 <p>''None'' of '''this''' should be
10659  but rather passed unmodified
10660 {{test}}
10664 <!-- comment -->
10671 {{int:youhavenewmessages|lots of money|not!}}
10673 <p>You have lots of money (not!).
10678 int keyword - non-existing message
10689 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10693 <includeonly> and <noinclude> being included
10704 <onlyinclude>Foo</onlyinclude>bar
10708 <onlyinclude> being included
10720 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10724 <onlyinclude> and <includeonly> being included
10733 <includeonly> and <noinclude> on a page
10735 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10742 Un-closed <noinclude>
10749 <onlyinclude> on a page
10751 <onlyinclude>Foo</onlyinclude>bar
10758 Un-closed <onlyinclude>
10765 Self-closed noinclude, includeonly, onlyinclude tags
10776 Unbalanced includeonly and noinclude tags
10780 |b</noinclude></noinclude>
10781 |c</noinclude></includeonly>
10782 |d</includeonly></includeonly>
10791 <td>c</includeonly>
10793 <td>d</includeonly></includeonly>
10799 Template:Includeonly section
10802 ==Includeonly section==
10808 Bug 6563: Edit link generation for section shown by <includeonly>
10810 {{includeonly section}}
10812 <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>
10813 <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>
10817 # Uses same input as the contents of [[Template:Includeonly section]]
10819 Bug 6563: Section extraction for section shown by <includeonly>
10824 ==Includeonly section==
10832 Bug 6563: Edit link generation for section suppressed by <includeonly>
10835 ==Includeonly section==
10839 <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>
10844 Bug 6563: Section extraction for section suppressed by <includeonly>
10849 ==Includeonly section==
10857 Un-closed <includeonly>
10864 Includes and comments at SOL
10866 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10870 </noinclude>* stuff
10873 <includeonly>can have stuff</includeonly>=== here ===
10876 <h2><span class="mw-headline" id="hu">hu</span></h2>
10879 <ul><li> stuff</li>
10880 <li> here</li></ul>
10881 <h3><span class="mw-headline" id="here">here</span></h3>
10884 <!-- 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>
10886 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10888 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10889 <li> here</li></ul>
10891 <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>
10895 # TODO: test with DOM fragment reuse!
10897 Parsoid: DOM fragment reuse
10899 parsoid=wt2wt,wt2html
10901 a{{echo|b<table></table>c}}d
10913 <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","spc":["","","",""]}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
10915 <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","spc":["","","",""]}]]}'>ab</p><span about="#mwt2">
10916 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10917 </span><p about="#mwt2">cd</p>
10919 <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","spc":["","","",""]}]]}'>a</p><span about="#mwt3">
10921 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10923 </span><p about="#mwt3">b</p>
10927 Parsoid: Merge double tds (T52603)
10932 |{{echo|{{!}} foo}}
10936 <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>
10941 Parsoid: Merge double tds in nested transclusion content (T52603)
10947 |{{echo|{{!}} foo}}
10951 <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}}]}'>
10953 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10959 ### <includeonly> and <noinclude> in attributes
10962 0. includeonly around the entire attribute
10964 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10966 <p><span id="v2">bar</span>
10971 1. includeonly in html attr key
10973 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10975 <p><span id="foo">bar</span>
10980 2. includeonly in html attr value
10982 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
10983 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
10985 <p><span id="v1">bar</span>
10986 <span id="v1">bar</span>
10991 3. includeonly in part of an attr value
10993 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
10995 <p><span style="color:red;">bar</span>
11000 4. includeonly in table attributes
11024 ### Token Stream Patcher tests
11026 ### These tests won't always pass wt2wt and other modes because
11027 ### on serialization, the table will be output on a new line.
11028 ### For now, we are blacklisting them, and using this to test selser.
11032 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11034 parsoid=wt2html,wt2wt
11036 {{echo|}}{| width = '100%'
11040 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11041 <tbody><tr><td>foo</td></tr>
11046 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11048 parsoid=wt2html,wt2wt
11050 <includeonly>a</includeonly>{| {{{b}}}
11054 <meta typeof="mw:Includes/IncludeOnly"/><meta typeof="mw:Includes/IncludeOnly/End"/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid=\"{&quot;dsr&quot;:[31,38,null,null],&quot;src&quot;:&quot;{{{b}}}&quot;}\">{{{b}}}</span>"},{"html":""}]]}' data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}'>
11055 <tbody><tr><td>c</td></tr>
11061 ### Testing parsing of templates where a template arg
11062 ### has the same name as the template itself.
11068 {{{quote|{{{1}}}}}}
11072 Templates: Template Name/Arg clash: 1. Use of positional param
11081 Templates: Template Name/Arg clash: 2. Use of named param
11083 {{quote|quote=foo}}
11090 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11099 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11103 Templates: 1. Simple use
11112 Templates: 2. Inside a block tag
11114 <div>{{echo|Foo}}</div>
11115 <blockquote>{{echo|Foo}}</blockquote>
11118 <blockquote>Foo</blockquote>
11128 Templates: P-wrapping: 1a. Templates on consecutive lines
11139 Templates: P-wrapping: 1b. Templates on consecutive lines
11153 Templates: P-wrapping: 1c. Templates on consecutive lines
11156 {{echo|bar}} <div>baz</div>
11169 Templates: P-wrapping: 1d. Template preceded by comment-only line
11178 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11182 Templates: Inline Text: 1. Multiple template uses
11184 {{echo|Foo}}bar{{echo|baz}}
11191 Templates: Inline Text: 2. Back-to-back template uses
11193 {{echo|Foo}}{{echo|bar}}
11200 Templates: Block Tags: 1. Multiple template uses
11202 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11204 <div>Foo</div><div>bar</div><div>baz</div>
11209 Templates: Block Tags: 2. Back-to-back template uses
11211 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11213 <div>Foo</div><div>bar</div>
11217 # This is an edge case relating to paragraph wrapping.
11219 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11224 <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
11229 Templates: Links: 1. Simple example
11231 {{echo|[[Foo|bar]]}}
11233 <p><a href="/wiki/Foo" title="Foo">bar</a>
11238 Templates: Links: 2. Generation of link href
11240 [[{{echo|Foo}}|bar]]
11242 <p><a href="/wiki/Foo" title="Foo">bar</a>
11247 Templates: Links: 3. Generation of part of a link href
11249 [[Fo{{echo|o}}|bar]]
11251 [[Foo{{echo|bar}}]]
11253 [[Foo{{echo|bar}}baz]]
11255 [[Foo{{echo|bar}}|bar]]
11257 [[:Foo{{echo|bar}}]]
11259 [[:Foo{{echo|bar}}|bar]]
11261 <p><a href="/wiki/Foo" title="Foo">bar</a>
11262 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11263 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11264 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11265 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11266 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11271 Templates: Links: 4. Multiple templates generating link href
11273 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11275 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11280 Templates: Links: 5. Generation of link text
11282 [[Foo|{{echo|bar}}]]
11284 <p><a href="/wiki/Foo" title="Foo">bar</a>
11289 Templates: Links: 5. Nested templates (only outermost template should be marked)
11291 {{echo|[[{{echo|Foo}}|bar]]}}
11293 <p><a href="/wiki/Foo" title="Foo">bar</a>
11298 Templates: HTML Tag: 1. Generation of HTML attr. key
11300 <div {{echo|style}}="color:red;">foo</div>
11302 <div style="color:red;">foo</div>
11307 Templates: HTML Tag: 2. Generation of HTML attr. value
11309 <div style={{echo|'color:red;'}}>foo</div>
11311 <div style="color:red;">foo</div>
11316 Templates: HTML Tag: 3. Generation of HTML attr key and value
11318 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11320 <div style="color:red;">foo</div>
11325 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11327 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11329 <div title="This is a long title with just one piece templated">foo</div>
11334 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11336 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11338 <div title="This is a long title with just one piece templated">foo</div>
11343 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11345 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11347 <div title="This is a long title with just one piece templated">foo</div>
11351 # SSS FIXME: While it is great we added support for all this,
11352 # do we want to make this part of the spec? Maybe we want to
11353 # deprecate this kind of usage in the future?
11355 Templates: HTML Tag: 7. Generation of partial attribute key string
11357 <div st{{echo|yle}}="color:red;">foo</div>
11359 <div style="color:red;">foo</div>
11364 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11366 <div {{echo|1=id="v1"}}>bar</div>
11368 <div id="v1">bar</div>
11373 Templates: HTML Tag: 9. Multiple template-generated attributes
11375 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11377 <div id="v1" title="foo">bar</div>
11382 Templates: Support for templates generating attributes and content
11384 {| {{mixed_attr_content_template}}
11389 <table style="color:red;" title="T48811">
11399 <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|}"]}'>
11408 1. Entities and nowikis inside templated attributes should be handled correctly
11410 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11412 <div style="background:#f9f9f9;">foo</div>
11415 <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=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[5,49,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;style{{=}}\\&quot;background:&amp;#35;f9f9f9;\\&quot;&quot;}},&quot;i&quot;: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=\"{&quot;src&quot;:&quot;&amp;#35;&quot;,&quot;srcContent&quot;:&quot;#&quot;}\">#</span><span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"</span>"},{"html":""}]]}'>foo</div>
11419 2. Entities and nowikis inside templated attributes should be handled correctly
11422 |{{table_attribs_3}}
11427 <td style="background:#f9f9f9;">Foo
11432 <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>
11437 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11440 |{{table_attribs_3}}
11445 <td style="background:#f9f9f9;">Foo
11449 <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}}]}'>
11450 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11456 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11459 | {{table_attribs_6}} hi
11464 <td style="background: red;"> hi
11469 <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>
11474 Templates: HTML Tables: 1. Generating start of a HTML table
11476 {{echo|<table><tr><td>foo</td>}}</tr></table>
11478 <table><tr><td>foo</td></tr></table>
11483 Templates: HTML Tables: 2a. Generating middle of a HTML table
11485 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11487 <table><tr><td>foo</td></tr></table>
11492 Templates: HTML Tables: 2b. Generating middle of a HTML table
11494 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11496 <table><tr><td>foo</td></tr></table>
11501 Templates: HTML Tables: 3. Generating end of a HTML table
11503 <table><tr>{{echo|<td>foo</td></tr></table>}}
11505 <table><tr><td>foo</td></tr></table>
11510 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11512 {{echo|<table>}}<tr><td>foo</td></tr></table>
11514 <table><tr><td>foo</td></tr></table>
11519 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11521 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11523 <table><tr><td>foo</td></tr></table>
11528 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11530 <table><tr>{{echo|<td>}}foo</td></tr></table>
11532 <table><tr><td>foo</td></tr></table>
11537 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11539 <table><tr><td>foo{{echo|</td>}}</tr></table>
11541 <table><tr><td>foo</td></tr></table>
11546 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11548 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11550 <table><tr><td>foo</td></tr></table>
11555 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11557 <table><tr><td>foo</td></tr>{{echo|</table>}}
11559 <table><tr><td>foo</td></tr></table>
11564 Templates: HTML Tables: 5. Proper fostering of categories from inside
11566 parsoid=wt2html,wt2wt
11568 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11569 <!--Two categories (Bug 50330)-->
11570 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11572 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11573 <!--Two categories (Bug 50330)-->
11574 <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>
11578 Templates: Wiki Tables: 1a. Fostering of entire template content
11586 <tr><td></td></tr></table>
11598 Templates: Wiki Tables: 1b. Fostering of entire template content
11611 <tr><td></td></tr></table>
11625 Templates: Wiki Tables: 2. Fostering of partial template content
11635 <tr><td></td></tr></table>
11648 Templates: Wiki Tables: 3. td-content via multiple templates
11651 {{echo|{{pipe}}a}}{{echo|b}}
11662 Templates: Wiki Tables: 4. Templated tags, no content
11668 <tr><td></td></tr></table>
11673 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11687 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11700 ## This test case is very specific to Parsoid's internals
11701 ## and is hence only tested for Parsoid's code. Parsoid uses
11702 ## a <meta> marker tag for <ref> tags and they are expanded
11703 ## much later. We are verifying that this <meta> tag usage
11704 ## doesn't prevent foster parenting.
11706 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11708 {{PartialTable}}<ref>foo</ref>
11713 <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">
11717 <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>
11721 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11731 <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{{!}}}"]}'>
11732 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11736 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11741 Templates: Lists: Multi-line list-items via templates
11743 *{{echo|a {{nonexistent|
11745 *{{echo|b {{nonexistent|
11748 <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>
11749 <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>
11754 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11756 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11758 <p><i>ab</i>c<i>d</i>e
11763 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11764 (PHP parser generates misnested html)
11766 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11768 <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>
11772 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11773 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11775 parsoid=wt2html,wt2wt
11777 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11779 <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>
11780 <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>
11781 <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>
11785 Templates: Ugly nesting: 4. Divs opened/closed across templates
11787 a<div>b{{echo|c</div>d}}e
11798 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11804 |{{echo|foo</table>}}
11808 <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|}"]}'>
11812 <td>foo</td></tr></tbody></table><span about="#mwt1">
11813 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11818 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11828 <td>1. {{echo|foo </table>}}</td>
11830 <td>2. {{echo|baz </table>}}</td>
11843 <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>"]}'>
11848 <td>1. foo </td></tr></tbody></table></td>
11850 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11851 </span><span about="#mwt2">
11852 </span><span about="#mwt2">
11853 </span><span about="#mwt2">abc</span><span about="#mwt2">
11854 </span><span about="#mwt2">
11855 </span><span about="#mwt2">
11856 </span><span about="#mwt2">
11857 </span><span about="#mwt2">
11858 </span><span about="#mwt2">
11859 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11860 </span><span about="#mwt2">
11865 Templates: Ugly templates: 3. newline-only template parameter
11874 # This looks like a bug: a single newline triggers p/br for some reason.
11876 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11885 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11886 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11888 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11894 <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","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}]]}'>foo
11895 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11899 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11900 # that are "identical" and generate nesting cycles in the algorithm
11902 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11904 {{echo|<table><tr><td><table>}}
11908 <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","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}],[{"k":"1","spc":["","","",""]}]]}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>
11909 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11910 </table></td></tr></tbody></table>
11914 Templates: Parameters substituted at the top-level
11916 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
11918 <p><i>who</i> me? <b>never!</b>
11921 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
11925 Parser Functions: 1. Simple example
11934 Parser Functions: 2. Nested use (only outermost should be marked up)
11943 ### Pre-save transform tests
11946 pre-save transform: subst:
11952 This is a test template
11956 pre-save transform: normal template
11966 pre-save transform: nonexistent template
11970 {{thistemplatedoesnotexist}}
11972 {{thistemplatedoesnotexist}}
11976 pre-save transform: subst magic variables
11985 # This is bug 89, which I fixed. -- wtm
11987 pre-save transform: subst: templates with parameters
11991 {{subst:paramtest|param="something else"}}
11993 This is a test template with parameter "something else"
11997 Template:nowikitest
11999 <nowiki>'''not wiki'''</nowiki>
12003 pre-save transform: nowiki in subst (bug 1188)
12007 {{subst:nowikitest}}
12009 <nowiki>'''not wiki'''</nowiki>
12013 Template:commenttest
12015 This template has <!-- a comment --> in it.
12019 pre-save transform: comment in subst (bug 1936)
12023 {{subst:commenttest}}
12025 This template has <!-- a comment --> in it.
12029 pre-save transform: unclosed tag
12033 <nowiki>'''not wiki'''
12035 <nowiki>'''not wiki'''
12039 pre-save transform: mixed tag case
12043 <NOwiki>'''not wiki'''</noWIKI>
12045 <NOwiki>'''not wiki'''</noWIKI>
12049 pre-save transform: unclosed comment in <nowiki>
12053 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12055 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12058 # Leading @ in this template definition works around a limitation
12059 # in parsoid's parserTests which otherwise strips the <span> from the
12060 # result (confusing it for a template wrapper)
12064 @<span onmouseover="alert('crap')">Oh no</span>
12068 (confirming safety of fix for subst bug 1936)
12070 {{Template:dangerous}}
12072 <p>@<span>Oh no</span>
12077 pre-save transform: comment containing gallery (bug 5024)
12081 <!-- <gallery>data</gallery> -->
12083 <!-- <gallery>data</gallery> -->
12087 pre-save transform: comment containing extension
12091 <!-- <tag>data</tag> -->
12093 <!-- <tag>data</tag> -->
12097 pre-save transform: comment containing nowiki
12101 <!-- <nowiki>data</nowiki> -->
12103 <!-- <nowiki>data</nowiki> -->
12107 pre-save transform: <noinclude> in subst (bug 3298)
12117 pre-save transform: <onlyinclude> in subst (bug 3298)
12121 {{subst:Includes2}}
12129 {{<includeonly>subst:</includeonly>Includes}}
12133 Template:SafeSubstTest
12135 {{<includeonly>safesubst:</includeonly>Includes}}
12139 bug 22297: safesubst: works during PST
12143 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12149 bug 22297: safesubst: works during normal parse
12158 subst: does not work during normal parse
12162 <p>{{subst:Includes}}
12167 pre-save transform: context links ("pipe trick")
12171 [[Article (context)|]]
12174 [[Bar:Article (context)|]]
12175 [[:Bar:Article (context)|]]
12177 [[|Article (context)]]
12181 [[Article (context)|Article]]
12182 [[Bar:Article|Article]]
12183 [[:Bar:Article|Article]]
12184 [[Bar:Article (context)|Article]]
12185 [[:Bar:Article (context)|Article]]
12187 [[Article (context)]]
12188 [[Bar:X (Y) Z|X (Y) Z]]
12189 [[:Bar:X (Y) Z|X (Y) Z]]
12193 pre-save transform: context links ("pipe trick") with interwiki prefix
12197 [[interwiki:Article|]]
12198 [[:interwiki:Article|]]
12199 [[interwiki:Bar:Article|]]
12200 [[:interwiki:Bar:Article|]]
12202 [[interwiki:Article|Article]]
12203 [[:interwiki:Article|Article]]
12204 [[interwiki:Bar:Article|Bar:Article]]
12205 [[:interwiki:Bar:Article|Bar:Article]]
12209 pre-save transform: context links ("pipe trick") with parens in title
12211 pst title=[[Somearticle (context)]]
12215 [[Article (context)|Article]]
12219 pre-save transform: context links ("pipe trick") with comma in title
12221 pst title=[[Someplace, Somewhere]]
12224 [[Otherplace, Elsewhere|]]
12225 [[Otherplace, Elsewhere, Anywhere|]]
12227 [[Otherplace, Somewhere|Otherplace]]
12228 [[Otherplace, Elsewhere|Otherplace]]
12229 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12233 pre-save transform: context links ("pipe trick") with parens and comma
12235 pst title=[[Someplace (IGNORED), Somewhere]]
12238 [[Otherplace (place), Elsewhere|]]
12240 [[Otherplace, Somewhere|Otherplace]]
12241 [[Otherplace (place), Elsewhere|Otherplace]]
12245 pre-save transform: context links ("pipe trick") with comma and parens
12247 pst title=[[Who, me? (context)]]
12250 [[Me, Myself, and I (1937 song)|]]
12252 [[Yes, you. (context)|Yes, you.]]
12253 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12257 pre-save transform: context links ("pipe trick") with namespace
12259 pst title=[[Ns:Somearticle]]
12263 [[Ns:Article|Article]]
12267 pre-save transform: context links ("pipe trick") with namespace and parens
12269 pst title=[[Ns:Somearticle (context)]]
12273 [[Ns:Article (context)|Article]]
12277 pre-save transform: context links ("pipe trick") with namespace and comma
12279 pst title=[[Ns:Somearticle, Context, Whatever]]
12283 [[Ns:Article, Context, Whatever|Article]]
12287 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12289 pst title=[[Ns:Somearticle, Context (context)]]
12293 [[Ns:Article (context)|Article]]
12297 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12299 pst title=[[Ns:Somearticle (IGNORED), Context]]
12303 [[Ns:Article, Context|Article]]
12307 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12311 [[Article(context)|]]
12312 [[Bar:Article(context)|]]
12313 [[:Bar:Article(context)|]]
12314 [[|Article(context)]]
12318 [[Article(context)|Article]]
12319 [[Bar:Article(context)|Article]]
12320 [[:Bar:Article(context)|Article]]
12321 [[Article(context)]]
12322 [[Bar:X(Y)Z|X(Y)Z]]
12323 [[:Bar:X(Y)Z|X(Y)Z]]
12327 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12331 [[Article (context)|]]
12332 [[Bar:Article (context)|]]
12333 [[:Bar:Article (context)|]]
12334 [[|Article (context)]]
12338 [[Article (context)|Article]]
12339 [[Bar:Article (context)|Article]]
12340 [[:Bar:Article (context)|Article]]
12341 [[Article (context)]]
12342 [[Bar:X (Y) Z|X (Y) Z]]
12343 [[:Bar:X (Y) Z|X (Y) Z]]
12347 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12351 [[Article(context)|]]
12352 [[Bar:Article(context)|]]
12353 [[:Bar:Article(context)|]]
12354 [[|Article(context)]]
12358 [[Article(context)|Article]]
12359 [[Bar:Article(context)|Article]]
12360 [[:Bar:Article(context)|Article]]
12361 [[Article(context)]]
12362 [[Bar:X(Y)Z|X(Y)Z]]
12363 [[:Bar:X(Y)Z|X(Y)Z]]
12367 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12371 [[Article (context), context|]]
12372 [[Article (context),context|]]
12373 [[Bar:Article (context), context|]]
12374 [[Bar:Article (context),context|]]
12375 [[:Bar:Article (context), context|]]
12376 [[:Bar:Article (context),context|]]
12378 [[Article (context), context|Article]]
12379 [[Article (context),context|Article]]
12380 [[Bar:Article (context), context|Article]]
12381 [[Bar:Article (context),context|Article]]
12382 [[:Bar:Article (context), context|Article]]
12383 [[:Bar:Article (context),context|Article]]
12387 pre-save transform: trim trailing empty lines
12391 Empty lines are trimmed
12397 Empty lines are trimmed
12401 pre-save transform: Signature expansion
12406 * <noinclude>~~~</noinclude>
12407 * <includeonly>~~~</includeonly>
12408 * <onlyinclude>~~~</onlyinclude>
12410 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12411 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12412 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12413 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12418 pre-save transform: Signature expansion in nowiki tags (bug 93)
12424 <nowiki>~~~~</nowiki>
12426 <includeonly><nowiki>~~~~</nowiki></includeonly>
12428 <noinclude><nowiki>~~~~</nowiki></noinclude>
12430 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12432 {{subst:Foo}} shall be converted to FOO
12434 As well as inside noinclude/onlyinclude
12435 <noinclude>{{subst:Foo}}</noinclude>
12436 <onlyinclude>{{subst:Foo}}</onlyinclude>
12438 But not inside includeonly
12439 <includeonly>{{subst:Foo}}</includeonly>
12443 <nowiki>~~~~</nowiki>
12445 <includeonly><nowiki>~~~~</nowiki></includeonly>
12447 <noinclude><nowiki>~~~~</nowiki></noinclude>
12449 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12451 FOO shall be converted to FOO
12453 As well as inside noinclude/onlyinclude
12454 <noinclude>FOO</noinclude>
12455 <onlyinclude>FOO</onlyinclude>
12457 But not inside includeonly
12458 <includeonly>{{subst:Foo}}</includeonly>
12462 Parsoid: Recognize nowiki with trailing space in tags
12466 <nowiki ><div>[[foo]]</nowiki >
12474 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12481 Parsoid: Recognize nowiki with odd capitalization
12485 <noWikI ><div>[[foo]]</Nowiki >
12487 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12492 Parsoid: Escape nowiki with trailing space in tags
12496 <p><nowiki > foo </nowiki ></p>
12497 <p>a<nowiki />b</p>
12498 <p>c<nowiki/ >d</p>
12500 <nowiki > foo </nowiki >
12508 Parsoid: Escape weird noWikI capitalizations
12512 <p><noWikI > foo </NoWikI ></p>
12514 <noWikI > foo </NoWikI >
12518 ### Message transform tests
12521 message transform: magic variables
12531 message transform: should not transform wiki markup
12541 message transform: <noinclude> in transcluded template (bug 4926)
12551 message transform: <onlyinclude> in transcluded template (bug 4926)
12561 {{#special:}} page name, known
12565 {{#special:Recentchanges}}
12567 Special:RecentChanges
12571 {{#special:}} page name with subpage, known
12575 {{#special:Recentchanges/param}}
12577 Special:RecentChanges/param
12581 {{#special:}} page name, unknown
12585 {{#special:foobar nonexistent}}
12587 Special:Foobar nonexistent
12591 {{#speciale:}} page name, known
12595 {{#speciale:Recentchanges}}
12597 Special:RecentChanges
12601 {{#speciale:}} page name with subpage, known
12605 {{#speciale:Recentchanges/param}}
12607 Special:RecentChanges/param
12611 {{#speciale:}} page name, unknown
12615 {{#speciale:foobar nonexistent}}
12617 Special:Foobar_nonexistent
12623 ### For Parsoid-specific tests, see
12624 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12629 parsoid=wt2html,wt2wt,html2html
12631 [[Image:foobar.jpg]]
12633 <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>
12636 <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>
12640 Simple image (using File: namespace, now canonical)
12642 [[File:Foobar.jpg]]
12644 <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>
12647 <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>
12651 Right-aligned image
12653 [[File:Foobar.jpg|right]]
12655 <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>
12658 <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>
12664 [[File:Foobar.jpg|right|Caption text]]
12666 <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>
12669 <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>
12673 Image with caption, bug 53312 #1
12675 [[File:Foobar.jpg|right|Caption page stuff]]
12677 <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>
12680 <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>
12684 Image with caption, bug 53312 #2
12686 [[File:Foobar.jpg|right|Caption page=]]
12688 <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>
12691 <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>
12695 Image with caption, bug 53312 #3
12697 [[File:Foobar.jpg|right|Caption page=stuff]]
12699 <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>
12702 <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>
12706 Allow empty links in image captions (Bug 60753)
12710 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12715 <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>
12718 <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>
12720 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12721 </figcaption></figure>
12725 Titles in unlinked images (T23454)
12727 [[File:Foobar.jpg|link=|stuff]]
12729 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12734 Link with empty target
12743 Image with link trail
12745 Linktrails should not work for images: [[File:Foobar.jpg]]s
12747 <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
12750 <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>
12754 Image with empty attribute
12756 parsoid=wt2html,wt2wt,html2html
12758 [[File:Foobar.jpg|right||Caption text]]
12760 <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>
12763 <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>
12767 1. Block image with individual attributes from templates
12769 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12771 <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>
12774 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[24,38,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\">137px</span>"}]]}'><a href="./File:Foobar.jpg"><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"/></a><figcaption>This is a caption</figcaption></figure>
12778 2. Block Image with individual attributes from templates
12780 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12782 <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>
12785 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[18,32,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;thumb&quot;}},&quot;i&quot;:0}}]}\">thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[33,47,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;137px&quot;}},&quot;i&quot;:0}}]}\">137px</span>"}]]}'><a href="./File:Foobar.jpg"><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"/></a><figcaption>This is a caption</figcaption></figure>
12789 3. Inline image with individual attributes from templates
12791 [[File:Foobar.jpg|{{echo|50px}}]]
12793 <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>
12796 <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=\"{&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;dsr&quot;:[18,31,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;50px&quot;}},&quot;i&quot;: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"/></a></span></p>
12799 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12800 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12802 Image with multiple attributes from the same template
12804 [[File:Foobar.jpg|{{image_attribs}}]]
12806 <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>
12809 <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>
12813 Image with link tails
12817 123[[File:Foobar.jpg]]456
12818 123[[File:Foobar.jpg|right]]456
12819 123[[File:Foobar.jpg|thumb]]456
12821 <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
12823 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
12824 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
12827 <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>
12829 <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>
12831 <div class="thumb tright">
12832 <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>
12833 <div class="thumbcaption">
12834 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12840 <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>
12841 <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>
12842 <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>
12846 Image with multiple captions -- only last one is accepted
12848 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12850 <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>
12853 <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>
12857 Image with multiple widths -- use last
12859 [[File:Foobar.jpg|200px|300px|caption]]
12861 <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>
12864 <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>
12868 Image with multiple alignments -- use first (bug 48664)
12872 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12874 [[File:Foobar.jpg|middle|text-top|caption]]
12876 <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>
12877 <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>
12880 <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>
12881 <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>
12885 Image with width attribute at different positions
12887 [[File:Foobar.jpg|200px|right|Caption]]
12888 [[File:Foobar.jpg|right|200px|Caption]]
12889 [[File:Foobar.jpg|right|Caption|200px]]
12891 <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>
12892 <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>
12893 <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>
12896 <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>
12897 <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>
12898 <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>
12901 # a sad bit of backward-compatibility
12903 Image with size specified with pxpx (bug 13500, 51628)
12905 parsoid=wt2html,wt2wt,html2html
12907 [[File:Foobar.jpg|20pxpx]]
12908 [[File:Foobar.jpg|200x20pxpx]]
12910 <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>
12911 <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>
12914 <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>
12918 Image with link parameter, wiki target
12920 [[File:Foobar.jpg|link=Main Page]]
12922 <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>
12925 <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>
12928 # parsoid bug 49293 (part 1)
12930 Image with link parameter, URL target
12932 [[File:Foobar.jpg|link=http://example.com/]]
12934 <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>
12937 <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>
12940 # parsoid bug 49293 (part 2)
12942 Image with link parameter, protocol-less URL target
12944 [[File:Foobar.jpg|link=//example.com/]]
12946 <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>
12949 <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>
12953 Escaping non-block captions (T107435)
12956 "modes": ["wt2wt"],
12958 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
12962 [[Image:Foobar.jpg|caption]]
12964 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
12967 # wgExternalLinkTarget not supported by Parsoid
12969 Image with link parameter, wgExternalLinkTarget
12971 [[Image:foobar.jpg|link=http://example.com/]]
12973 wgExternalLinkTarget='foobar'
12975 <p><a href="http://example.com/" target="foobar" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12980 Image with link parameter, wgNoFollowLinks set to false
12982 [[Image:foobar.jpg|link=http://example.com/]]
12984 wgNoFollowLinks=false
12986 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12991 Image with link parameter, wgNoFollowDomainExceptions
12993 [[Image:foobar.jpg|link=http://example.com/]]
12995 wgNoFollowDomainExceptions='example.com'
12997 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13001 # wgExternalLinkTarget not supported by Parsoid
13003 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13005 [[Image:foobar.jpg|link=http://example.com/|Title]]
13007 wgExternalLinkTarget='foobar'
13009 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13014 Image with empty link parameter
13016 [[File:Foobar.jpg|link=]]
13018 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13021 <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>
13025 Image with link parameter (wiki target) and unnamed parameter
13027 [[File:Foobar.jpg|link=Main_Page|Title]]
13029 <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>
13032 <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>
13036 Image with link parameter (URL target) and unnamed parameter
13038 [[File:Foobar.jpg|link=http://example.com/|Title]]
13040 <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>
13043 <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>
13047 Thumbnail image with link parameter
13050 parsoid=wt2html,wt2wt,html2html
13052 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13054 <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>
13057 <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>
13061 Manually-specified thumbnail image
13065 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13067 <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>
13070 <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>
13074 Manually-specified thumbnail image with explicit link to wiki page
13077 parsoid=wt2html,wt2wt,html2html
13079 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13081 <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>
13084 <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>
13088 Manually-specified thumbnail image with explicit link to url
13091 parsoid=wt2html,wt2wt,html2html
13093 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13095 <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>
13098 <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>
13102 Manually-specified thumbnail image with explicit no link
13105 parsoid=wt2html,wt2wt,html2html
13107 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13109 <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>
13112 <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>
13116 Manually-specified thumbnail image with explicit link and alt text
13119 parsoid=wt2html,wt2wt,html2html
13121 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13123 <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>
13126 <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>
13130 Image with frame and link
13132 parsoid=wt2html,wt2wt,html2html
13134 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13136 <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>
13139 <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>
13143 Image with frame and link and explicit alt
13145 parsoid=wt2html,wt2wt,html2html
13147 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13149 <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>
13152 <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>
13156 Image with wiki markup in implicit alt
13158 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13160 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13162 <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>
13163 </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>
13166 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"testing <b data-parsoid=\"{&quot;dsr&quot;:[27,37,3,3]}\">bold</b> in alt"}'><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" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></span></p>
13167 <p><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><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>
13171 Alt image option should handle most kinds of wikitext without barfing
13173 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13175 <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>
13178 <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=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;link&quot;},&quot;dsr&quot;:[65,73,2,2]}\">link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=\"{&quot;dsr&quot;:[80,106,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;''bold template''&quot;}},&quot;i&quot;: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>
13181 ###################
13182 # Conflicting image format options.
13183 # First option specified should 'win'.
13184 # All three cases in each test should be identical.
13187 Image with 'frameless' first.
13189 parsoid=wt2html,wt2wt,html2html
13191 [[File:Foobar.jpg|frameless|caption]]
13193 [[File:Foobar.jpg|frameless|frame|caption]]
13195 [[File:Foobar.jpg|frameless|thumb|caption]]
13197 <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>
13198 </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>
13199 </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>
13202 <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>
13203 <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>
13204 <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>
13208 Image with 'frame' first.
13210 parsoid=wt2html,wt2wt,html2html
13212 [[File:Foobar.jpg|frame|caption]]
13213 [[File:Foobar.jpg|frame|frameless|caption]]
13214 [[File:Foobar.jpg|frame|thumb|caption]]
13216 <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>
13217 <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>
13218 <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>
13221 <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>
13222 <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>
13223 <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>
13227 Image with 'thumb' first.
13229 parsoid=wt2html,wt2wt,html2html
13231 [[File:Foobar.jpg|thumb|caption]]
13232 [[File:Foobar.jpg|thumb|frameless|caption]]
13233 [[File:Foobar.jpg|thumb|frame|caption]]
13235 <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>
13236 <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>
13237 <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>
13240 <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>
13241 <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>
13242 <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>
13245 ###################
13247 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13248 # and https://phabricator.wikimedia.org/T64258
13249 # Foobar has actual size of 1941x220
13250 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13251 # a scalable format.
13252 # 2. Framed images always ignore size options; always render at default size.
13253 # 3. "Unspecified format" and border are the only types which can be
13257 Image: "unspecified format" and border enlarge
13259 parsoid=wt2html,wt2wt,html2html
13261 [[File:Foobar.jpg|2000px]]
13263 [[File:Foobar.jpg|border|2000px]]
13265 <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>
13266 </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>
13269 <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>
13270 <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>
13274 Image: "unspecified format" and border reduce
13276 parsoid=wt2html,wt2wt,html2html
13278 [[File:Foobar.jpg|1000px]]
13280 [[File:Foobar.jpg|border|1000px]]
13282 <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>
13283 </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>
13286 <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>
13287 <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>
13291 Image: thumbs reduce
13293 parsoid=wt2html,wt2wt,html2html
13295 [[File:Foobar.jpg|thumb|50px]]
13297 <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>
13300 <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>
13304 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13306 parsoid=wt2html,wt2wt,html2html
13308 [[File:Foobar.jpg|thumb|2000px]]
13310 [[File:Foobar.svg|thumb|2000px]]
13312 <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>
13313 <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>
13316 <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>
13317 <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>
13321 Image: frameless can reduce in size
13323 parsoid=wt2html,wt2wt,html2html
13325 [[File:Foobar.jpg|frameless|50px]]
13327 <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>
13330 <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>
13334 Image: bitmap frameless can't be enlarged past original size, but vector can
13336 parsoid=wt2html,wt2wt,html2html
13338 [[File:Foobar.jpg|frameless|2000px]]
13340 [[File:Foobar.svg|frameless|2000px]]
13342 <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>
13343 </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>
13346 <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>
13347 <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>
13351 Image: framed images are always unscaled.
13353 parsoid=wt2html,wt2wt,html2html
13355 [[File:Foobar.jpg|frame]]
13357 [[File:Foobar.jpg|frame|50px]]
13359 [[File:Foobar.jpg|frame|50x50px]]
13361 [[File:Foobar.jpg|frame|2000px]]
13363 <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>
13364 <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>
13365 <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>
13366 <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>
13369 <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>
13370 <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>
13371 <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>
13372 <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>
13375 ###################
13378 Link to image page- image page normally doesn't exists, hence edit link
13379 Add test with existing image page
13380 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13384 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13389 bug 18784 Link to non-existent image page with caption should use caption as link text
13391 [[:Image:test|caption]]
13393 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13398 Frameless image caption with a free URL
13400 [[File:Foobar.jpg|http://example.com]]
13402 <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>
13405 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid=\"{&quot;stx&quot;:&quot;url&quot;,&quot;dsr&quot;:[18,36,0,0]}\">http://example.com</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>
13409 Thumbnail image caption with a free URL
13413 [[File:Foobar.jpg|thumb|http://example.com]]
13415 <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>
13418 <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>
13422 Thumbnail image caption with a free URL and explicit alt
13425 parsoid=wt2html,wt2wt,html2html
13427 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13429 <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>
13432 <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>
13436 SVG thumbnails with no language set
13439 [[File:Foobar.svg|thumb|caption]]
13441 <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>
13444 <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>
13448 SVG thumbnails with language de
13450 parsoid=wt2html,wt2wt,html2html
13452 [[File:Foobar.svg|thumb|caption|lang=de]]
13454 <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>
13457 <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>
13461 SVG thumbnails with invalid language code
13463 parsoid=wt2html,wt2wt,html2html
13465 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13467 <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>
13470 <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>
13474 BUG 1887: A ISBN with a thumbnail
13476 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13478 <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>
13481 <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>
13485 BUG 1887: A RFC with a thumbnail
13487 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13489 <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>
13492 <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>
13496 BUG 1887: A mailto link with a thumbnail
13498 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13500 <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>
13503 <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>
13506 # Pending resolution to bug 368
13508 BUG 648: Frameless image caption with a link
13510 [[File:Foobar.jpg|text with a [[link]] in it]]
13512 <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>
13515 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;link&quot;},&quot;dsr&quot;:[30,38,2,2]}\">link</a> in it"}'><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>
13519 BUG 648: Frameless image caption with a link (suffix)
13521 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13523 <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>
13526 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;link&quot;},&quot;dsr&quot;:[30,41,2,5],&quot;tail&quot;:&quot;foo&quot;}\">linkfoo</a> in it"}'><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>
13530 BUG 648: Frameless image caption with an interwiki link
13532 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13534 <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>
13537 <p><span class="mw-default-size" typeof="mw:Image" 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=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;http://www.usemod.com/cgi-bin/mb.pl?Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;MeatBall:Link&quot;},&quot;isIW&quot;:true,&quot;dsr&quot;:[30,47,2,2]}\">MeatBall:Link</a> in it"}'><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>
13541 BUG 648: Frameless image caption with a piped interwiki link
13543 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13545 <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>
13548 <p><span class="mw-default-size" typeof="mw:Image" 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=\"{&quot;stx&quot;:&quot;piped&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;http://www.usemod.com/cgi-bin/mb.pl?Link&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;MeatBall:Link&quot;},&quot;isIW&quot;:true,&quot;dsr&quot;:[30,52,16,2]}\">link</a> in it"}'><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>
13552 T107474: Frameless image caption with <nowiki>
13554 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13556 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<span typeof=\"mw:Nowiki\" data-parsoid=\"{&quot;dsr&quot;:[18,75,8,9]}\">text with a [[MeatBall:Link|link]] in it</span>"}'><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>
13560 Escape HTML special chars in image alt text
13562 [[File:Foobar.jpg|& < > "]]
13564 <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>
13567 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"&amp; &lt; &gt; \""}'><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>
13571 BUG 499: Alt text should have Ӓ, not &1234;
13573 [[File:Foobar.jpg|♀]]
13575 <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>
13578 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<span typeof=\"mw:Entity\" data-parsoid=\"{&quot;src&quot;:&quot;&amp;#9792;&quot;,&quot;srcContent&quot;:&quot;♀&quot;,&quot;dsr&quot;:[18,25,null,null]}\">♀</span>"}'><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>
13582 Broken image caption with link
13584 parsoid=wt2html,wt2wt,html2html
13586 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13588 <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.
13591 <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>
13595 Image caption containing another image
13597 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13599 <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>
13602 <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>
13606 Image: caption containing a newline
13608 [[File:Foobar.jpg|This
13611 <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>
13614 <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>
13618 Image: caption containing leading space
13619 (The leading space should not trigger nowiki escaping in wt2wt mode)
13621 [[File:Foobar.jpg|thumb| bar]]
13623 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>bar</div></div></div>
13626 <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>
13630 Image: caption containing a table
13632 parsoid=wt2html,wt2wt,html2html
13634 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13640 and some more text.]]
13642 <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>
13645 <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
13648 <tr><th>Foo </th><th>Bar</th></tr>
13651 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13655 Bug 3090: External links other than http: in image captions
13657 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13659 <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>
13662 <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>
13668 parsoid=wt2html,wt2wt,html2html
13670 [[Image:foobar.jpg|a|class=b]]
13672 <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>
13675 <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>
13679 Localized image handling (1).
13681 parsoid=wt2html,wt2wt,html2html
13684 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13686 <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>
13689 <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>
13693 Localized image handling (2).
13696 parsoid=wt2html,wt2wt,html2html
13699 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13701 <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>
13704 <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>
13708 "border", "frameless" and "class" attributes on an image.
13711 parsoid=wt2html,wt2wt,html2html
13713 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13715 <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>
13718 <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>
13721 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13723 Invalid image attributes (bug 62500)
13726 parsoid=wt2html,wt2wt,html2html
13728 [[File:Foobar.jpg|thumb|float|left|caption]]
13730 [[File:Foobar.jpg|thumb|righ|caption]]
13732 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13734 <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>
13735 <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>
13736 <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>
13739 <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>
13740 <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>
13741 <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>
13747 #REDIRECT [[File:Barfoo.jpg]]
13750 # FIXME: Parsoid should run this test -- but we'd need to teach the
13751 # mockAPI about the redirected Barfoo.jpg image.
13755 [[Image:Barfoo.jpg]]
13757 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13762 Missing image with uploads disabled
13766 [[File:Foobaz.jpg]]
13768 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13771 <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>
13774 # Parsoid-specific testing for images
13775 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13776 # Currently imperfect due to a flaw in the Parsoid testrunner
13778 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13782 Parsoid-specific image handling - simple image with size and middle alignment
13784 [[File:Foobar.jpg|middle|50px]]
13786 <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>
13790 Parsoid-specific image handling - simple image with size, middle alignment,
13791 non-standard namespace alias
13793 parsoid=wt2wt,wt2html,html2html
13795 [[Image:Foobar.jpg|middle|50px]]
13797 <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>
13801 Parsoid-specific image handling - simple image with size and middle alignment
13804 [[File:Foobar.jpg|50px|middle]]
13806 <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>
13810 Parsoid-specific image handling - simple image with size and middle alignment
13811 and non-standard namespace name
13813 parsoid=wt2html,wt2wt,html2html
13815 [[Image:Foobar.jpg|50px|middle]]
13817 <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>
13821 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13823 [[File:Foobar.jpg|500x10px|baseline|caption]]
13825 <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>
13829 Parsoid-specific image handling - simple image with border and size spec
13831 [[File:Foobar.jpg|50px|border|caption]]
13833 <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>
13837 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13839 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13841 <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>
13845 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13848 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13850 <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>
13854 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13856 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13858 <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>
13862 Parsoid-specific image handling - thumbnail with specific size, halign,
13863 valign, and caption (existing content)
13865 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13867 <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>
13871 Parsoid-specific image handling - framed image with specific size and caption
13874 parsoid=wt2html,wt2wt,html2html
13876 [[File:Foobar.jpg|frame|500x50px|caption]]
13878 <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>
13882 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13885 parsoid=wt2html,wt2wt,html2html
13887 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13889 <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>
13893 Parsoid-specific image handling - frameless image with specific size, border, and caption
13895 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13897 <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>
13901 Parsoid-specific image handling - simple image with a formatted caption
13903 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13905 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<table data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[18,81,7,8]}\"><tbody data-parsoid=\"{&quot;dsr&quot;:[25,73,0,0]}\"><tr data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[25,54,4,5]}\"><td data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[29,39,4,5]}\">a</td><td data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[39,49,4,5]}\">b</td></tr><tr data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[54,73,4,5]}\"><td data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[58,68,4,5]}\">c</td></tr></tbody></table>"}'><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>
13909 Parsoid-specific image handling - caption with a template in it
13911 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13913 <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>
13917 Parsoid-specific image handling - caption with unbalanced tags in it
13919 parsoid=wt2html,wt2wt,html2html
13922 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13926 <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>
13931 Parsoid-specific image handling - empty caption (1)
13933 parsoid=wt2html,wt2wt
13935 [[File:Foobar.jpg|thumb|]]
13937 <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>
13940 # empty captions don't get serialized unless we're in the "round trip" case
13942 Parsoid-specific image handling - empty caption (2)
13946 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13947 <a href="./File:Foobar.jpg">
13948 <img resource="./File:Foobar.jpg"
13949 src="//example.com/images/3/3a/Foobar.jpg"
13950 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13951 height="25" width="220"/>
13953 <figcaption></figcaption>
13956 [[File:Foobar.jpg|thumb]]
13960 Parsoid-specific image handling - whitespace caption
13962 [[File:Foobar.jpg|thumb| ]]
13964 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> </figcaption></figure>
13968 Parsoid-specific image handling - lang option
13971 [[File:Foobar.svg|lang=de|caption]]
13975 <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>
13979 ## Edge case bugs in Parsoid from T93580
13981 T93580: 1. Templated <ref> inside block images
13983 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
13987 <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>
13989 <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>
13993 T93580: 2. <ref> inside inline images
13995 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
13999 <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=\"{&quot;dsr&quot;:[64,78,5,6]}\" data-mw=\"{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;id&quot;:&quot;mw-reference-text-cite_note-1&quot;},&quot;attrs&quot;:{}}\"><a href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\"><span class=\"mw-reflink-text\">[1]</span></a></span><meta typeof=\"mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid=\"{&quot;group&quot;:&quot;&quot;,&quot;name&quot;:&quot;&quot;,&quot;content&quot;:&quot;foo&quot;,&quot;hasRefInRef&quot;:false,&quot;dsr&quot;:[64,78,5,6],&quot;tmp&quot;:{}}\" data-mw=\"{}\">"}'><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>
14001 <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>
14005 T93580: 3. Templated <ref> inside inline images
14007 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14011 <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=\"{&quot;dsr&quot;:[64,96,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;<ref>{{echo|foo}}</ref>&quot;}},&quot;i&quot;:0}}]}\"><a href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\"><span class=\"mw-reflink-text\">[1]</span></a></span><meta typeof=\"mw:Transclusion mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid=\"{&quot;group&quot;:&quot;&quot;,&quot;name&quot;:&quot;&quot;,&quot;content&quot;:&quot;foo&quot;,&quot;hasRefInRef&quot;:false,&quot;dsr&quot;:[64,96,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;1&quot;,&quot;spc&quot;:[&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;]}]],&quot;tmp&quot;:{}}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;<ref>{{echo|foo}}</ref>&quot;}},&quot;i&quot;: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>
14013 <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>
14020 Subpage test/subpage
14028 subpage title=[[Subpage test]]
14032 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14037 Subpage noslash link
14039 subpage title=[[Subpage test]]
14043 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14048 Subpage test/1/2/subpage
14054 Relative subpage noslash link
14056 parsoid=wt2wt,wt2html,html2html
14057 subpage title=[[Subpage test/1/2/3/4]]
14063 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14064 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14067 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14068 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14072 Parsoid: dot-slash prefixed wikilinks
14082 </p><p>[[././baz/]]
14087 </p><p>[[././baz/]]
14092 Render invalid page names as plain text (bug 51090)
14105 [[{{echo|./../foo}}|bar]]
14106 [[{{echo|foo/.}}|bar]]
14107 [[{{echo|foo/..}}|bar]]
14108 [[{{echo|foo~~~~bar}}]]
14109 [[{{echo|foo>bar}}]]
14110 [[{{echo|foo././bar}}]]
14111 [[{{echo|foo{bar}}]]
14112 [[{{echo|foo}bar}}]]
14113 [[{{echo|foo[bar}}]]
14114 [[{{echo|foo]bar}}]]
14115 [[{{echo|foo<bar}}]]
14117 <p>[[./../foo|bar]]
14127 </p><p>[[./../foo|bar]]
14140 <p>[[./../foo|bar]]
14151 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14152 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14153 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14154 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14155 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14156 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14157 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14158 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14159 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14160 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14161 [[<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>
14169 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14174 BUG 561: {{/Subpage}}
14176 subpage title=[[Page]]
14180 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14188 Category:MediaWiki User's Guide
14196 [[:Category:MediaWiki User's Guide]]
14198 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14207 [[Category:MediaWiki User's Guide]]
14209 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14213 PAGESINCATEGORY invalid title fatal (r33546 fix)
14215 {{PAGESINCATEGORY:<bogus>}}
14222 Category with different sort key
14226 [[Category:MediaWiki User's Guide|Foo]]
14228 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14232 Category with identical sort key
14236 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14238 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14242 Category with empty sort key
14247 [[Category:MediaWiki User's Guide|]]
14249 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14253 Category with empty sort key and parentheses
14258 [[Category:Foo (bar)|]]
14260 [[Category:Foo (bar)|Foo]]
14264 Category with link tail
14269 123[[Category:Foo]]456
14271 123[[Category:Foo]]456
14275 Category with template
14280 [[Category:{{echo|Foo}}]]
14282 [[Category:{{echo|Foo}}]]
14286 Category with template in sort key
14291 [[Category:Foo|{{echo|Bar}}]]
14293 [[Category:Foo|{{echo|Bar}}]]
14297 Category with template in sort key and title
14302 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14304 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14308 Category / paragraph interactions
14310 Foo [[Category:Baz]] Bar
14312 Foo [[Category:Baz]]
14320 [[Category:Baz]] Bar
14333 {{echo|[[Category:Baz]]}}
14347 ## The whitespace on the empty line is part of the test. Please do not delete
14349 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14351 parsoid=wt2html,wt2wt
14355 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14357 {{echo|[[Category:Foo]] and so should this!}}
14359 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14364 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14366 <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>
14369 ## Parsoid will not try to wt2wt this while preserving newlines because
14370 ## it suppresses excess newlines within list items -- and we don't want to
14371 ## introduce a special case just for categories, which is, in reality somewhat
14372 ## odd behavior -- categories are unlikely to be used in list items like this
14373 ## in top-level pages and are only likely to show up in template-generated
14374 ## list items where this RT-ing is a non-issue.
14376 ## The whitespace on the empty line is part of the test. Please do not delete
14378 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14384 [[Category:Foo]] and this should be part of the same list item
14387 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14389 <ul><li>This and this should be part of the same list item</li>
14390 <li>So should this and this should be part of the same list item</li></ul>
14393 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14394 <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>
14398 ## Newlines and categories that follow the last item of a list
14399 ## are treated differently because this (list followed by categories)
14400 ## is an extremely common pattern on wikis.
14402 3. Categories and newlines: newline suppression for last list item should RT properly
14415 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14417 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14418 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14422 4. Categories and newlines: newline suppression for last list item should RT properly
14430 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14432 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14435 ## only wt2html for this to make sure the algo only applies to the rightmost path
14437 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14450 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14452 <ul><li> d</li></ul></li></ul>
14453 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14457 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14459 * a [[Category:Foo]]
14461 <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>
14464 # This test also demonstrates because of newline+category tunneling
14465 # through the list hander, template wrapping doesn't expand to the
14466 # containing list when the list item swallows the category.
14468 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14473 <ul><li> <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n[[Category:Foo]]"}},"i":0}}]}'>a
14474 </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>
14478 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14482 {{echo|[[Category:Foo]]
14486 <ul><li> a</li></ul>
14488 <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","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]\n[[Category:Bar]]"}},"i":0}}]}'/><span about="#mwt1">
14489 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14490 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14494 Parsoid: Serialize link to category page with colon escape
14500 [[:Category:Foo|Bar]]
14503 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14504 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14508 # html2wt localizes the "Category" namespace.
14509 # XXX the <link> element needs an empty data-parsoid attribute, or
14510 # else the html2html test fails because spaces are inserted.
14512 Link prefix/suffixes aren't applied to category links
14514 parsoid=wt2html,wt2wt,html2html
14522 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14526 Parsoid: Serialize link to file page with colon escape
14532 [[:File:Foo.png|Bar]]
14535 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14536 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14541 Parsoid: Serialize a genuine category link without colon escape
14546 [[Category:Foo|Bar]]
14548 <link rel="mw:PageProp/Category" href="./Category:Foo">
14549 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14553 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14557 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14559 [[Category:Toxine bactérienne]]
14563 Parsoid: Defaultsort
14565 {{DEFAULTSORT:Foo}}
14567 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14571 Parsoid: Defaultsort (template-generated)
14573 {{{{echo|DEFAULTSORT}}:Foo}}
14575 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,28,null,null],"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DEFAULTSORT}}:Foo"},"params":{},"i":0}}]}'/>
14579 ### Inter-language links
14582 Interlanguage links
14590 es:Alimento fr:Nourriture zh:食品
14592 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14593 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14594 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14598 Duplicate interlanguage links (bug 24502)
14609 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14610 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14611 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14612 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14619 Basic section headings
14626 ===Smaller headline===
14629 <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>
14632 <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>
14635 <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>
14641 Section headings with TOC
14644 === Subheadline 1 ===
14645 ===== Skipping a level =====
14646 ====== Skipping a level ======
14650 ===Another headline===
14652 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14654 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14656 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14658 <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>
14660 <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>
14667 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14669 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14675 <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>
14676 <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>
14677 <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>
14678 <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>
14679 <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>
14682 <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>
14687 TOC anchors don't collide
14695 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14697 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14698 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14699 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14700 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14704 <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>
14705 <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>
14706 <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>
14707 <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>
14711 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14713 Handling of sections up to level 6 and beyond
14716 == Level 2 Heading==
14717 === Level 3 Heading===
14718 ==== Level 4 Heading====
14719 ===== Level 5 Heading=====
14720 ====== Level 6 Heading======
14721 ======= Level 7 Heading=======
14722 ======== Level 8 Heading========
14723 ========= Level 9 Heading=========
14724 ========== Level 10 Heading==========
14726 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14728 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14730 <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>
14732 <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>
14734 <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>
14736 <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>
14738 <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>
14739 <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>
14740 <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>
14741 <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>
14742 <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>
14756 <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>
14757 <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>
14758 <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>
14759 <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>
14760 <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>
14761 <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>
14762 <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>
14763 <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>
14764 <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>
14765 <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>
14770 TOC regression (T11764)
14774 ==== title 1.1.1 ====
14779 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14781 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14783 <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>
14785 <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>
14788 <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>
14791 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14793 <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>
14799 <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>
14800 <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>
14801 <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>
14802 <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>
14803 <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>
14804 <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>
14809 TOC for heading containing <span id="..."></span> (T96153)
14812 ==<span id="old-anchor"></span>New title==
14814 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14816 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14820 <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>
14825 TOC with wgMaxTocLevel=3 (bug 6204)
14831 ==== title 1.1.1 ====
14836 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14838 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14840 <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>
14841 <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>
14844 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14846 <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>
14852 <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>
14853 <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>
14854 <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>
14855 <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>
14856 <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>
14857 <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>
14862 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14868 ====Section 1.1.1====
14869 ====Section 1.1.1.1====
14872 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14874 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14876 <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>
14879 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14883 <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>
14884 <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>
14885 <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>
14886 <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>
14887 <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>
14893 Resolving duplicate section names
14898 <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>
14899 <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>
14904 Resolving duplicate section names with differing case (bug 10721)
14909 <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>
14910 <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>
14922 Template with sections, __NOTOC__
14929 <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>
14930 <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>
14931 <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>
14932 <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>
14937 __NOEDITSECTION__ keyword
14943 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
14944 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
14949 Link inside a section heading
14951 ==Section with a [[Main Page|link]] in it==
14953 <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>
14958 TOC regression (T14077)
14965 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14967 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14969 <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>
14972 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
14976 <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>
14977 <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>
14978 <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>
14983 BUG 1219 URL next to image (good)
14985 http://example.com [[File:Foobar.jpg]]
14987 <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>
14990 <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>
14994 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
14997 The line above must have a trailing space!
15000 But just in case it doesn't...
15002 <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>
15003 <p>The line above must have a trailing space!
15005 <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>
15006 <p>But just in case it doesn't...
15011 Header with special characters (bug 25462)
15013 The tooltips shall not show entities to the user (ie. be double escaped)
15030 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15032 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15034 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15035 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15036 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15037 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15038 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15042 <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>
15045 <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>
15048 <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>
15051 <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>
15054 <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>
15060 Header with space, plus and underscore as entity
15062 Id should not contain + for spaces
15064 == Space between Text ==
15067 == Space-Entity between Text ==
15070 == Plus+between+Text ==
15073 == Plus-Entity+between+Text ==
15076 == Underscore_between_Text ==
15079 == Underscore-Entity_between_Text ==
15082 [[#Space between Text]]
15083 [[#Space-Entity between Text]]
15084 [[#Plus+between+Text]]
15085 [[#Plus-Entity+between+Text]]
15086 [[#Underscore_between_Text]]
15087 [[#Underscore-Entity_between_Text]]
15089 <p>Id should not contain + for spaces
15091 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15093 <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>
15094 <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>
15095 <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>
15096 <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>
15097 <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>
15098 <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>
15102 <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>
15105 <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>
15108 <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>
15111 <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>
15114 <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>
15117 <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>
15119 </p><p><a href="#Space_between_Text">#Space between Text</a>
15120 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15121 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15122 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15123 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15124 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15129 Headers with excess '=' characters
15130 (Are similar tests necessary beyond the 1st level?)
15134 =''italic'' heading==
15135 ==''italic'' heading=
15137 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15139 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15140 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15141 <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>
15142 <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>
15146 <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>
15147 <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>
15148 <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>
15149 <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>
15154 HTML headers vs TOC (bug 23393)
15155 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15167 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15169 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15171 <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>
15172 <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>
15175 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15177 <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>
15178 <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>
15184 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15185 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15186 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15187 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15188 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15189 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15194 Single-line or multiline-comments can follow headings
15196 parsoid=wt2html,wt2wt
15204 <h2><span class="mw-headline" id="foo">foo</span></h2>
15205 <h2><span class="mw-headline" id="bar">bar</span></h2>
15206 <h2><span class="mw-headline" id="baz">baz</span></h2>
15211 BUG 1219 URL next to image (broken)
15213 http://example.com[[File:Foobar.jpg]]
15215 <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>
15218 <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>
15222 Bug 1186 news: in the middle of text
15224 http://en.wikinews.org/wiki/Wikinews:Workplace
15226 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15232 Namespaced link must have a title
15241 Namespaced link must have a title (bad fragment version)
15243 [[Project:#fragment]]
15245 <p>[[Project:#fragment]]
15251 ### HTML tags and HTML attributes
15255 div with no attributes
15257 <div>HTML rocks</div>
15259 <div>HTML rocks</div>
15264 div with double-quoted attribute
15266 <div id="rock">HTML rocks</div>
15268 <div id="rock">HTML rocks</div>
15273 div with single-quoted attribute
15275 <div id='rock'>HTML rocks</div>
15277 <div id="rock">HTML rocks</div>
15282 div with unquoted attribute
15284 <div id=rock>HTML rocks</div>
15286 <div id="rock">HTML rocks</div>
15291 div with illegal double attributes
15293 <div id="a" id="b">HTML rocks</div>
15295 <div id="b">HTML rocks</div>
15299 # FIXME: produce empty string instead of "class" in the PHP parser, following
15302 div with empty attribute value, space before equals
15306 <div class =>HTML rocks</div>
15308 <div class="">HTML rocks</div>
15313 div with multiple empty attribute values
15317 <div id= title=>HTML rocks</div>
15319 <div id="" title="">HTML rocks</div>
15324 table with multiple empty attribute values
15332 <table title="" id="">
15333 <tbody><tr><td> hi</td></tr>
15338 div with braces in attribute value
15340 <div title="{}">Foo</div>
15342 <div title="{}">Foo</div>
15345 <div title="{}">Foo</div>
15348 # This it very inconsistent in the PHP parser: it returns
15349 # class="class" if there is a space between the name and the equal sign (see
15350 # 'div with empty attribute value, space before equals'), but strips the
15351 # attribute completely if the space is missing. We hope that not much content
15352 # depends on this, so are implementing the behavior below in Parsoid for
15353 # consistencies' sake.
15354 # FIXME: fix this behavior in the PHP parser?
15356 div with empty attribute value, no space before equals
15358 parsoid=wt2html,html2html
15360 <div class=>HTML rocks</div>
15362 <div>HTML rocks</div>
15365 <div class="">HTML rocks</div>
15369 HTML multiple attributes correction
15371 <p class="error" class="awesome">Awesome!</p>
15373 <p class="awesome">Awesome!</p>
15378 Table multiple attributes correction
15381 !+ class="error" class="awesome"| status
15386 <th class="awesome"> status
15394 <DIV ID="x">HTML ROCKS</DIV>
15396 <div id="x">HTML ROCKS</div>
15401 Non-ASCII pseudo-tags are rendered as text
15410 Pseudo-tag with URL 'name' renders as url link
15412 <http://example.com/>
15414 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15419 text with amp in the middle of nowhere
15423 <p>Remember AT&T?
15428 text with character entity: eacute
15430 I always thought é was a cute letter.
15432 <p>I always thought é was a cute letter.
15435 <p>I always thought é was a cute letter.</p>
15439 text with entity-escaped character entity-like string: eacute
15441 I always thought &eacute; was a cute letter.
15443 <p>I always thought &eacute; was a cute letter.
15448 text with undefined character entity: xacute
15450 I always thought &xacute; was a cute letter.
15452 <p>I always thought &xacute; was a cute letter.
15459 <data value="5">five</data>
15460 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15461 <mark>This highlighted text</mark>
15463 <p><data value="5">five</data>
15464 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15465 <mark>This highlighted text</mark>
15470 HTML tag with leading space is parsed as text
15474 <p>< div>foo< /div>
15479 ### Nesting tests (see bug 41545, 50604, 51081)
15482 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15483 # Note that html2wt is considerably more difficult if we use <b> in
15484 # the test case, instead of <big>
15486 Ensure that HTML adoption agency algorithm is properly implemented.
15488 <big>X<big>Y</big>Z</big>
15490 <p><big>X<big>Y</big>Z</big>
15494 # This was bug 41545 in the PHP parser.
15495 # Note that tidy doesn't handle this correctly.
15499 <kbd>X<kbd>Y</kbd>Z</kbd>
15501 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15505 # The following cases were bug 51081 in the PHP parser.
15506 # Note that there are some other nestable tags (b, i, etc) which are
15507 # not covered; see bug 51081 for discussion.
15509 # Note that tidy doesn't handle this correctly.
15513 <em>X<em>Y</em>Z</em>
15515 <p><em>X<em>Y</em>Z</em>
15519 # Note that tidy doesn't handle this correctly.
15521 Nesting of <strong>
15523 <strong>X<strong>Y</strong>Z</strong>
15525 <p><strong>X<strong>Y</strong>Z</strong>
15534 <p><q>X<q>Y</q>Z</q></p>
15537 # Note that tidy doesn't handle this correctly.
15541 <ruby>X<ruby>Y</ruby>Z</ruby>
15543 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15547 # Note that tidy doesn't handle this correctly.
15551 <bdo>X<bdo>Y</bdo>Z</bdo>
15553 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15565 [[Media:Foobar.jpg]]
15567 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15572 Media link with text
15574 [[Media:Foobar.jpg|A neat file to look at]]
15576 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15580 # FIXME: this is still bad HTML tag nesting
15581 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15583 Media link with nasty text
15585 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15587 <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>
15590 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15591 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15595 Media link to nonexistent file (bug 1702)
15597 [[Media:No such.jpg]]
15599 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15604 Image link to nonexistent file (bug 1850 - good)
15606 [[File:No_such.jpg]]
15608 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15611 <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>
15615 :Image link to nonexistent file (bug 1850 - bad)
15617 [[:Image:No such.jpg]]
15619 <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>
15622 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15628 Character reference normalization in link text (bug 1938)
15630 [[Main Page|this&that]]
15632 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15639 Test for unicode normalization
15641 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15645 (bug 19451) Links should refer to the normalized form.
15653 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15654 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15655 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15656 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15657 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15662 Empty attribute crash test (bug 2067)
15664 <font color="">foo</font>
15666 <p><font color="">foo</font>
15671 Empty attribute crash test single-quotes (bug 2067)
15673 <font color=''>foo</font>
15675 <p><font color="">foo</font>
15680 Attribute test: equals, then nothing
15682 <font color=>foo</font>
15684 <p><font>foo</font>
15689 Attribute test: unquoted value
15691 <font color=x>foo</font>
15693 <p><font color="x">foo</font>
15698 Attribute test: unquoted but illegal value (hash)
15700 <font color=#x>foo</font>
15702 <p><font color="#x">foo</font>
15706 # Parsoid does not serialize to empty attribute syntax,
15707 # so wt2wt and html2wt cases are skipped
15709 Attribute test: no value (T54330)
15711 parsoid=wt2html,html2html
15713 <font color>foo</font>
15715 <p><font color="">foo</font>
15718 <p><font color="">foo</font></p>
15722 Bug 2095: link with three closing brackets
15726 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15729 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15733 Bug 2095: link with pipe and three closing brackets
15735 [[Main Page|link]]]
15737 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15740 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15744 Bug 2095: link with pipe and three closing brackets, version 2
15746 [[Main Page|[http://example.com/]]]
15748 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15751 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15760 Template:Dangerous attribute
15762 " onmouseover="alert(document.cookie)
15766 Template:Dangerous style attribute
15768 border-size: expression(alert(document.cookie))
15774 <div style="float: right; {{{1}}}">Magic div</div>
15778 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15780 <div title="{{test}}"></div>
15782 <div title="This is a test template"></div>
15786 # Parsoid has enough context to handle this case
15788 Bug 2304: HTML attribute safety (dangerous template; 2309)
15790 <div title="{{dangerous attribute}}"></div>
15792 <div title=""></div>
15795 <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=\"{&quot;pi&quot;:[[]],&quot;dsr&quot;:[12,35,null,null]}\" data-mw=\"{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;dangerous attribute&quot;,&quot;href&quot;:&quot;./Template:Dangerous_attribute&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}\">\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
15799 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15801 <div style="{{dangerous style attribute}}"></div>
15803 <div style="/* insecure input */"></div>
15808 Bug 2304: HTML attribute safety (safe parameter; 2309)
15810 {{div style|width: 200px}}
15812 <div style="float: right; width: 200px">Magic div</div>
15817 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15819 {{div style|width: expression(alert(document.cookie))}}
15821 <div style="/* insecure input */">Magic div</div>
15826 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15828 {{div style|"><script>alert(document.cookie)</script>}}
15830 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15835 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
15837 {{div style|" ><script>alert(document.cookie)</script>}}
15839 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15844 Bug 2304: HTML attribute safety (link)
15846 <div title="[[Main Page]]"></div>
15848 <div title="[[Main Page]]"></div>
15853 Bug 2304: HTML attribute safety (italics)
15855 <div title="''foobar''"></div>
15857 <div title="''foobar''"></div>
15862 Bug 2304: HTML attribute safety (bold)
15864 <div title="'''foobar'''"></div>
15866 <div title="'''foobar'''"></div>
15872 Bug 2304: HTML attribute safety (ISBN)
15874 <div title="ISBN 1234567890"></div>
15876 <div title="ISBN 1234567890"></div>
15881 Bug 2304: HTML attribute safety (RFC)
15883 <div title="RFC 1234"></div>
15885 <div title="RFC 1234"></div>
15890 Bug 2304: HTML attribute safety (PMID)
15892 <div title="PMID 1234567890"></div>
15894 <div title="PMID 1234567890"></div>
15899 Bug 2304: HTML attribute safety (web link)
15901 <div title="http://example.com/"></div>
15903 <div title="http://example.com/"></div>
15908 Bug 2304: HTML attribute safety (named web link)
15910 <div title="[http://example.com/ link]"></div>
15912 <div title="[http://example.com/ link]"></div>
15917 Bug 3244: HTML attribute safety (extension; safe)
15919 <div style="<nowiki>background:blue</nowiki>"></div>
15921 <div style="background:blue"></div>
15926 Bug 3244: HTML attribute safety (extension; unsafe)
15928 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
15930 <div style="/* insecure input */"></div>
15934 # More MSIE fun discovered by Tom Gilder
15937 MSIE CSS safety test: spurious slash
15939 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
15941 <div style="/* insecure input */">evil</div>
15946 MSIE CSS safety test: hex code
15948 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
15950 <div style="/* insecure input */">evil</div>
15955 MSIE CSS safety test: comment in url
15957 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
15959 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
15964 MSIE CSS safety test: comment in expression
15966 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
15968 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
15973 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
15975 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
15977 <p style="/* invalid control char */">A</p>
15982 MSIE 6 CSS safety test: Fullwidth (bug 55332)
15984 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
15985 <div style="top:EXPRESSION(alert())">B</div>
15987 <p style="/* insecure input */">A</p>
15988 <div style="/* insecure input */">B</div>
15993 MSIE 6 CSS safety test: IPA extensions (bug 55332)
15995 <div style="background-image:uʀʟ(javascript:alert())">A</div>
15996 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
15998 <div style="/* insecure input */">A</div>
15999 <p style="/* insecure input */">B</p>
16004 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16006 <div style="background-image:url⁽javascript:alert())">A</div>
16007 <div style="background-image:url₍javascript:alert())">B</div>
16008 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16010 <div style="/* insecure input */">A</div>
16011 <div style="/* insecure input */">B</div>
16012 <p style="/* insecure input */">C</p>
16016 # FIXME: Parsoid fails to sanitize this! See T58846.
16021 title="data:text/html,<img src=1 onerror=alert(1)>"
16022 style="-o-link:attr(title);-o-link-source:current">X</div>
16024 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16029 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16031 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16032 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16033 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16034 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16035 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16036 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16037 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16039 <p style="/* insecure input */">A</p>
16040 <p style="/* insecure input */">B</p>
16041 <p style="/* insecure input */">C</p>
16042 <p style="/* insecure input */">D</p>
16043 <p style="/* insecure input */">E</p>
16044 <p style="/* insecure input */">F</p>
16045 <p style="/* insecure input */">G</p>
16050 Table attribute legitimate extension
16053 !+ style="<nowiki>color:blue</nowiki>"| status
16058 <th style="color:blue"> status
16064 Table attribute safety
16067 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16072 <th style="/* insecure input */"> status
16078 CSS line continuation 1
16080 <div style="background-image: u\ rl(test.jpg);"></div>
16082 <div style="/* insecure input */"></div>
16087 CSS line continuation 2
16089 <div style="background-image: u\ rl(test.jpg); "></div>
16091 <div style="/* invalid control char */"></div>
16102 Expansion of multi-line templates in attribute values (bug 6255)
16104 <div style="background: {{identity|#00FF00}}">-</div>
16106 <div style="background: #00FF00">-</div>
16112 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16114 <div style="background:
16117 <div style="background: #00FF00">-</div>
16120 <div style="background:
16125 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16127 <div style="background: #00FF00">-</div>
16129 <div style="background: #00FF00">-</div>
16134 evil <math>-wiki-tags without Extension:Math enabled
16136 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16138 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16142 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16145 Parser hook: empty input
16158 Parser hook: empty input using terminated empty elements
16171 Parser hook: empty input using terminated empty elements (space before)
16184 Parser hook: basic input
16198 Parser hook: case insensitive
16212 Parser hook: case insensitive, redux
16225 Parser hook: nested tags
16229 <tag><tag></tag></tag>
16240 Parser hook: basic arguments
16242 <tag width=200 height = "100" depth = '50' square></tag>
16257 Parser hook: argument containing a forward slash (bug 5344)
16259 <tag filename='/tmp/bla'></tag>
16264 'filename' => '/tmp/bla',
16271 Parser hook: empty input using terminated empty elements (bug 2374)
16284 # </tag> should be output literally since there is no matching tag that begins it
16286 Parser hook: basic arguments using terminated empty elements (bug 2374)
16288 <tag width=200 height = "100" depth = '50' square/>
16307 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16311 Parser hook: static parser hook not inside a comment
16313 <statictag>hello, world</statictag>
16314 <statictag action=flush/>
16322 Parser hook: static parser hook inside a comment
16324 <!-- <statictag>hello, world</statictag> -->
16325 <statictag action=flush/>
16331 # Nested template calls; this case was broken by Parser.php rev 1.506,
16335 Template:One-parameter
16337 (My parameter is: {{{1}}})
16341 Template:Map-one-parameter
16343 {{{{{1}}}|{{{2}}}}}
16347 Nested template calls
16349 {{Map-one-parameter|One-parameter|param}}
16351 <p>(My parameter is: param)
16360 # HTML+Tidy effectively strips out the empty tags completely
16361 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16362 # which Tidy would have done for the PHP parser had there been content inside it.
16364 Sanitizer: Closing of open tags
16366 <s></s><table></table>
16368 <s></s><table></table>
16371 <p><s></s></p><table></table>
16375 Sanitizer: Closing of open but not closed tags
16384 Sanitizer: Closing of closed but not open tags
16394 Sanitizer: Closing of closed but not open table tags
16398 Table not started</td></tr></table>
16400 <p>Table not started</p>
16402 <p>Table not started</p>
16406 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16408 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16410 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16414 # In HTML5, the restrictions are that id must contain at least one character,
16415 # and must not contain any space characters.
16417 Sanitizer: Validating the contents of the id attribute (bug 4515)
16421 <br id="" /><br id="a space" />
16426 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16428 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16432 <br id="foo" /><br id="foo" />
16434 Something need to be done. foo-2 ?
16438 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16441 <meta itemprop="hello" content="world">
16442 <meta http-equiv="refresh" content="5">
16443 <meta itemprop="hello" http-equiv="refresh" content="5">
16444 <link itemprop="hello" href="{{SERVER}}">
16445 <link rel="stylesheet" href="{{SERVER}}">
16446 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16450 <p> <meta itemprop="hello" content="world" />
16451 <meta http-equiv="refresh" content="5">
16452 <meta itemprop="hello" content="5" />
16454 <link itemprop="hello" href="http://example.org" />
16455 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16456 <link itemprop="hello" href="http://example.org" />
16462 Language converter: output gets cut off unexpectedly (bug 5757)
16466 this bit is safe: }-
16468 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16470 then we get cut off here: }-
16472 all additional text is vanished
16474 <p>this bit is safe: }-
16475 </p><p>but if we add a conversion instance: xxx
16476 </p><p>then we get cut off here: }-
16477 </p><p>all additional text is vanished
16482 Self closed html pairs (bug 5487)
16485 <center><font id="bug" />Centered text</center>
16486 <div><font id="bug2" />In div text</div>
16488 <center><font id="bug" />Centered text</center>
16489 <div><font id="bug2" />In div text</div>
16498 Punctuation: nbsp before exclamation
16502 <p>C'est grave !
16507 Punctuation: CSS !important (bug 11874)
16509 <div style="width:50% !important">important</div>
16511 <div style="width:50% !important">important</div>
16516 Punctuation: CSS ! important (bug 11874; with space after)
16518 <div style="width:50% ! important">important</div>
16520 <div style="width:50% ! important">important</div>
16525 HTML bullet list, closed tags (bug 5497)
16538 <ul data-parsoid='{"stx":"html"}'>
16539 <li data-parsoid='{"stx":"html"}'>One</li>
16540 <li data-parsoid='{"stx":"html"}'>Two</li>
16546 HTML bullet list, unclosed tags (bug 5497)
16558 <ul data-parsoid='{"stx":"html"}'>
16559 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16560 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16566 HTML ordered list, closed tags (bug 5497)
16579 <ol data-parsoid='{"stx":"html"}'>
16580 <li data-parsoid='{"stx":"html"}'>One</li>
16581 <li data-parsoid='{"stx":"html"}'>Two</li>
16587 HTML ordered list, unclosed tags (bug 5497)
16600 <ol data-parsoid='{"stx":"html"}'>
16601 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16602 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16608 HTML nested bullet list, closed tags (bug 5497)
16633 HTML nested bullet list, open tags (bug 5497)
16670 HTML nested ordered list, closed tags (bug 5497)
16695 HTML nested ordered list, open tags (bug 5497)
16732 HTML ordered list item with parameters oddity
16734 <ol><li id="fragment">One</li>
16737 <ol><li id="fragment">One</li>
16742 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16744 bug 5918: autonumbering
16746 [http://first/] [http://second] [ftp://ftp]
16750 [mailto:enclosed@mail.tld With target]
16752 [mailto:enclosed@mail.tld]
16754 mailto:inline@mail.tld
16756 <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>
16757 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16758 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16759 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16760 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16763 <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>
16764 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16765 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16766 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16767 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16772 # Security and HTML correctness
16773 # From Nick Jenkins' fuzz testing
16777 Fuzz testing: Parser13
16792 Fuzz testing: Parser14
16797 <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>
16798 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16800 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16806 <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>
16808 <div id="toc" class="toc">
16809 <div id="toctitle">
16813 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16820 Fuzz testing: Parser14-table
16825 <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>
16826 <table style="__TOC__">
16831 <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>
16832 <table style="__TOC__">
16839 # Known to produce bogus xml (extra </td>)
16841 Fuzz testing: Parser16
16870 Fuzz testing: Parser21
16873 ! irc://{{ftp://a" onmouseover="alert('hello world');"
16878 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
16888 Fuzz testing: Parser22
16890 http://===r:::https://b
16894 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
16902 # Known to produce bad XML for now
16904 Fuzz testing: Parser24
16911 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
16912 <br style="onmouseover='alert(document.cookie);' " />
16914 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16919 <u class="|">}}}} >
16920 <br style="onmouseover='alert(document.cookie);'" />
16922 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16931 # Note: the current result listed for this is not what the original one was,
16932 # but the original bug was JavaScript injection, which is fixed in any case.
16933 # It's not clear that the original result listed was any more correct than the
16934 # current one. Original result:
16937 # <li class="||">
16938 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16940 Fuzz testing: Parser25 (bug 6055)
16946 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
16948 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16953 Fuzz testing: URL adjacent extension (with space, clean)
16955 http://example.com <nowiki>junk</nowiki>
16957 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
16960 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
16964 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
16966 http://example.com<nowiki>junk</nowiki>
16968 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
16971 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
16975 Fuzz testing: URL adjacent extension (no space, dirty; pre)
16977 http://example.com<pre>junk</pre>
16979 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
16982 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
16987 <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>
16991 Fuzz testing: image with bogus manual thumbnail
16993 [[Image:foobar.jpg|thumbnail= ]]
16995 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
16998 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}],"dsr":[0,32,2,2]}' 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":{},"dsr":[2,30,null,null]}'><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>
17002 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17004 <pre dir=" "></pre>
17006 <pre dir=" "></pre>
17011 Parsing optional HTML elements (Bug 6171)
17016 <td> Some tabular data</td>
17017 <td> More tabular data ...
17018 <td> And yet som tabular data</td>
17024 <td> Some tabular data</td>
17025 <td> More tabular data ...
17026 </td><td> And yet som tabular data</td>
17033 Correct handling of <td>, <tr> (Bug 6171)
17038 <td> Some tabular data</td>
17039 <td> More tabular data ...</td>
17040 <td> And yet som tabular data</td>
17046 <td> Some tabular data</td>
17047 <td> More tabular data ...</td>
17048 <td> And yet som tabular data</td>
17056 Parsing crashing regression (fr:JavaScript)
17060 <p></body></x>
17065 Inline wiki vs wiki block nesting
17071 <p><b>Bold paragraph</b>
17072 </p><p>New wiki paragraph
17076 # FIXME: The current php output is documented
17077 # and desired output is the parsoid target.
17079 Inline HTML vs wiki block nesting
17085 <p><b>Bold paragraph
17086 </p><p>New wiki paragraph</b>
17089 <p><b>Bold paragraph</b>
17090 </p><p>New wiki paragraph
17094 # Original result was this:
17095 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17097 # While that might be marginally more intuitive, maybe, the six-apostrophe
17098 # construct is clearly pathological and the result stated here (which is what
17099 # the parser actually does) is about as reasonable as anything.
17101 Mixing markup for italics and bold
17104 '''bold''''''bold''bolditalics'''''
17106 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17114 Article for special page transclusion test
17118 Special page transclusion
17121 {{Special:Prefixindex/Xyzzyx}}
17123 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17129 Special page transclusion twice (bug 5021)
17132 {{Special:Prefixindex/Xyzzyx}}
17133 {{Special:Prefixindex/Xyzzyx}}
17135 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17137 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17143 Transclusion of default MediaWiki message
17145 {{MediaWiki:Mainpage}}
17152 Transclusion of nonexistent MediaWiki message
17154 {{MediaWiki:Mainpagexxx}}
17156 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17161 Transclusion of MediaWiki message with underscore
17163 {{MediaWiki:history_short}}
17170 Transclusion of MediaWiki message with space
17172 {{MediaWiki:history short}}
17179 Invalid header with following text
17189 Section extraction test (section 0)
17209 Section extraction test (section 1)
17231 Section extraction test (section 2)
17252 Section extraction test (section 3)
17272 Section extraction test (section 4)
17296 Section extraction test (section 5)
17316 Section extraction test (section 6)
17337 Section extraction test (section 7)
17357 Section extraction test (section 8)
17377 Section extraction test (section 9)
17398 Section extraction test (section 10)
17418 Section extraction test (nonexistent section 11)
17437 Section extraction test with bogus heading (section 1)
17442 ==bogus== not a legal section
17446 ==bogus== not a legal section
17450 Section extraction test with bogus heading (section 2)
17455 ==bogus== not a legal section
17462 Section extraction test with comment after heading (section 1)
17474 Section extraction test with comment after heading (section 2)
17486 Section extraction test with bogus <nowiki> heading (section 1)
17491 ==bogus== <nowiki>not a legal section</nowiki>
17495 ==bogus== <nowiki>not a legal section</nowiki>
17499 Section extraction test with bogus <nowiki> heading (section 2)
17504 ==bogus== <nowiki>not a legal section</nowiki>
17510 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17511 # instead of respecting commented sections
17513 Section extraction prefixed by comment (section 1)
17524 Section extraction prefixed by comment (section 2)
17534 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17535 # instead of respecting HTML-style headings
17537 Section extraction, mixed wiki and html (section 1)
17553 Section extraction, mixed wiki and html (section 2)
17569 # Formerly testing for bug 3342
17571 Section extraction, heading surrounded by <noinclude>
17575 <noinclude>==unmarked==</noinclude>
17581 # Test behavior of bug 19910
17583 Sectiion with all-equals
17588 The line above must have a trailing space
17591 But just in case it doesn't...
17595 But just in case it doesn't...
17599 Section replacement test (section 0)
17630 Section replacement test (section 1)
17659 Section replacement test (section 2)
17689 Section replacement test (section 3)
17720 Section replacement test (section 4)
17747 Section replacement test (section 5)
17778 Section replacement test (section 6)
17808 Section replacement test (section 7)
17839 Section replacement test (section 8)
17870 Section replacement test (section 9)
17899 Section replacement test (section 10)
17929 Section replacement test with initial whitespace (bug 13728)
17933 Preformatted initial line
17937 Preformatted initial line
17944 Section extraction, heading followed by pre with 20 spaces (bug 6398)
17956 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
17969 Section extraction, <pre> around bogus header (bug 10309)
17986 Section replacement, <pre> around bogus header (bug 10309)
17988 noxml replace=2,"xxx"
18008 Handling of 
 in URLs
18012 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18015 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18017 a</a></li></ul></li></ul>
18021 Handling of %0A in URLs
18025 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18028 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18032 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18034 5 quotes, code coverage +1 line
18041 <p><b><i></i></b></p>
18044 # same html as previous, but wikitext adjusted to match parsoid html2wt
18045 # note that wt2html and html2html will put the <i> before the <b>
18047 5 quotes, code coverage +1 line w/ nowiki (1)
18049 parsoid=wt2wt,html2wt
18051 '''''<nowiki/>'''''
18056 <p><b><i></i></b></p>
18059 # same as previous, just swapping the <i> and <b>
18061 5 quotes, code coverage +1 line w/ nowiki (2)
18063 '''''<nowiki/>'''''
18068 <p><i><b></b></i></p>
18072 Special:Search page linking.
18076 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18081 {{!}} is a magic word
18083 {{!}} is a magic word there and {{!}} is still a magic word here
18084 | is not a magic word here but {{!}} is still a magic word here
18086 <p>| is a magic word there and | is still a magic word here
18087 | is not a magic word here but | is still a magic word here
18090 <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
18091 | 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>
18098 title=[[Parser test]]
18103 * {{FULLPAGENAMEE}}
18105 * {{BASEPAGENAMEE}}
18109 * {{ROOTPAGENAMEE}}
18111 * {{TALKPAGENAMEE}}
18112 * {{SUBJECTPAGENAME}}
18113 * {{SUBJECTPAGENAMEE}}
18116 * {{NAMESPACENUMBER}}
18120 * {{SUBJECTSPACEE}}
18121 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18123 <ul><li> Parser test</li>
18124 <li> Parser_test</li>
18125 <li> Parser test</li>
18126 <li> Parser_test</li>
18127 <li> Parser test</li>
18128 <li> Parser_test</li>
18129 <li> Parser test</li>
18130 <li> Parser_test</li>
18131 <li> Parser test</li>
18132 <li> Parser_test</li>
18133 <li> Talk:Parser test</li>
18134 <li> Talk:Parser_test</li>
18135 <li> Parser test</li>
18136 <li> Parser_test</li>
18144 <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>
18147 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18157 image4 |300px| centre
18158 image5.svg| http://///////
18163 <ul class="gallery mw-gallery-traditional">
18164 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18165 <div class="thumb" style="height: 150px;">Image1.png</div>
18166 <div class="gallerytext">
18169 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18170 <div class="thumb" style="height: 150px;">Image2.gif</div>
18171 <div class="gallerytext">
18176 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18177 <div class="thumb" style="height: 150px;">Image3</div>
18178 <div class="gallerytext">
18181 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18182 <div class="thumb" style="height: 150px;">Image4</div>
18183 <div class="gallerytext">
18188 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18189 <div class="thumb" style="height: 150px;">Image5.svg</div>
18190 <div class="gallerytext">
18191 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18195 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18196 <div class="thumb" style="height: 150px;">* image6</div>
18197 <div class="gallerytext">
18205 Gallery (with options)
18207 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18208 File:Nonexistent.jpg|caption
18209 File:Nonexistent.jpg
18210 image:foobar.jpg|some '''caption''' [[Main Page]]
18212 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18215 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18216 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18217 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18218 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18219 <div class="gallerytext">
18224 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18225 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18226 <div class="gallerytext">
18229 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18230 <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>
18231 <div class="gallerytext">
18232 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18236 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18237 <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>
18238 <div class="gallerytext">
18241 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18242 <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>
18243 <div class="gallerytext">
18253 Gallery with link that has fragment
18256 image:foobar.jpg|link=Main_Page
18257 image:foobar.jpg|link=Main_Page#section
18258 image:foobar.jpg|link=Main Page#section|caption
18261 <ul class="gallery mw-gallery-traditional">
18262 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18263 <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>
18264 <div class="gallerytext">
18267 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18268 <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>
18269 <div class="gallerytext">
18272 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18273 <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>
18274 <div class="gallerytext">
18284 Gallery with wikitext inside caption
18287 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18288 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18291 <ul class="gallery mw-gallery-traditional">
18292 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18293 <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>
18294 <div class="gallerytext">
18295 <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>
18299 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18300 <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>
18301 <div class="gallerytext">
18302 <p>This is a test template
18311 gallery (with showfilename option)
18313 <gallery showfilename>
18314 File:Nonexistent.jpg|caption
18315 File:Nonexistent.jpg
18316 image:foobar.jpg|some '''caption''' [[Main Page]]
18320 <ul class="gallery mw-gallery-traditional">
18321 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18322 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18323 <div class="gallerytext">
18324 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18329 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18330 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18331 <div class="gallerytext">
18332 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18336 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18337 <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>
18338 <div class="gallerytext">
18339 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18340 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18344 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18345 <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>
18346 <div class="gallerytext">
18347 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18356 Gallery (with namespace-less filenames)
18359 File:Nonexistent.jpg
18365 <ul class="gallery mw-gallery-traditional">
18366 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18367 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18368 <div class="gallerytext">
18371 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18372 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18373 <div class="gallerytext">
18376 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18377 <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>
18378 <div class="gallerytext">
18381 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18382 <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>
18383 <div class="gallerytext">
18391 HTML Hex character encoding (spells the word "JavaScript")
18393 parsoid=wt2html,wt2wt,html2html
18395 JavaScript
18397 <p>JavaScript
18402 <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>
18406 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18410 <p>&#xsee;&#XSEE;
18413 <p>&#xsee;&#XSEE;</p>
18417 HTML Hex character encoding mixed case
18419 parsoid=wt2html,wt2wt,html2html
18428 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18431 # See: http://www.w3.org/TR/html5/syntax.html#character-references
18432 # Note that U+000C (form feed) is not a valid XML character, so
18433 # it is banned even though allowed in HTML5.
18435 Illegal character references (T106578)
18440 ; Control (low): 
18441 ; Control (high):  Ÿ
18442 ; Surrogate: ��
18443 ; This is an okay astral character: 💩
18452 <dt>Control (low)</dt>
18454 <dt>Control (high)</dt>
18455 <dd>&#x7F; &#x9F;</dd>
18457 <dd>&#xD83D;&#xDCA9;</dd>
18458 <dt>This is an okay astral character</dt>
18464 __FORCETOC__ override
18476 ISBN 978-0-1234-56 789
18478 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18481 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18483 <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>
18487 ISBN followed by 5 spaces
18498 ISBN ISBN 1234567890
18500 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18503 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18506 # Uppercase X and lowercase x as well
18517 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18518 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
18519 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18520 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
18521 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18522 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
18525 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18526 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
18527 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18528 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
18529 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
18530 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
18534 ISBN with empty prefix (parsoid test)
18538 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18541 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
18545 Bug 22905: <abbr> followed by ISBN followed by </a>
18547 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18549 <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>
18552 <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>
18560 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18565 Double RFC with a wiki link
18569 <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>
18578 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18581 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18585 Centre-aligned image
18587 [[Image:foobar.jpg|centre]]
18589 <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>
18596 [[Image:foobar.jpg|none]]
18598 <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>
18603 Width + Height sized image (using px) (height is ignored)
18605 [[Image:foobar.jpg|640x480px]]
18607 <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>
18612 Width-sized image (using px, no following whitespace)
18614 [[Image:foobar.jpg|640px]]
18616 <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>
18621 Width-sized image (using px, with following whitespace - test regression from r39467)
18623 [[Image:foobar.jpg|640px ]]
18625 <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>
18630 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18632 [[Image:foobar.jpg| 640px]]
18634 <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>
18639 Image with page parameter
18643 [[File:LoremIpsum.djvu|page=2]]
18645 <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>
18648 <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>
18652 Another italics / bold test
18660 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18666 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18669 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18674 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18676 Images with the "|" character in the comment
18678 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18680 <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>
18683 <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>
18687 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18689 <html><script>alert(1);</script></html>
18691 <p><html><script>alert(1);</script></html>
18696 HTML with raw HTML ($wgRawHtml==true)
18700 <html><script>alert(1);</script></html>
18702 <p><script>alert(1);</script>
18707 Parents of subpages, one level up
18709 subpage title=[[Subpage test/L1/L2/L3]]
18713 <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>
18719 Parents of subpages, one level up, not named
18721 subpage title=[[Subpage test/L1/L2/L3]]
18725 <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>
18732 Parents of subpages, two levels up
18734 subpage title=[[Subpage test/L1/L2/L3]]
18740 <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
18741 </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>
18746 Parents of subpages, two levels up, without trailing slash or name.
18748 subpage title=[[Subpage test/L1/L2/L3]]
18757 Parents of subpages, two levels up, with lots of extra trailing slashes.
18759 subpage title=[[Subpage test/L1/L2/L3]]
18763 <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>
18768 Subpage test/L1/L2/L3Sibling
18774 Transclusion of a sibling page (one level up)
18776 subpage title=[[Subpage test/L1/L2/L3]]
18785 Transclusion of a child page
18787 subpage title=[[Subpage test/L1/L2]]
18796 Non-transclusion because of too many up levels
18798 subpage title=[[Subpage test/L1/L2/L3]]
18800 {{../../../../More than parent}}
18802 <p>{{../../../../More than parent}}
18807 Definition list code coverage
18813 <dl><dt> title  </dt>
18815 <dt> title </dt>
18821 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18822 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18823 <dt>title</dt><dd> def</dd></dl>
18827 Don't fall for the self-closing div
18829 <div>hello world</div/>
18831 <div>hello world</div>
18840 <p>[[:Template:Msg]]
18849 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18853 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18855 Always escape literal '>' in output, not just after '<'
18869 <p>This is a test template
18870 This is a test template
18882 Inclusion of !userCanEdit() content
18886 <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>
18892 Out-of-order TOC heading levels
18901 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18903 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
18905 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
18906 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
18909 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
18911 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
18912 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
18918 <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>
18919 <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>
18920 <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>
18921 <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>
18922 <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>
18923 <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>
18929 ISBN with a dummy number
18939 ISBN with space-delimited number
18943 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
18949 ISBN with multiple spaces, no number
18968 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18969 </p><p>ISBN 12345678901
18975 ISBN with trailing year (bug 8110)
18977 ISBN 1-234-56789-0 - 2006
18979 ISBN 1 234 56789 0 - 2006
18981 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
18982 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
18990 {{anchorencode:foo bar©#%n}}
18992 <p>foo_bar.C2.A9.23.25n
18997 anchorencode trims spaces
18999 {{anchorencode: __pretty__please__}}
19006 anchorencode deals with links
19008 {{anchorencode: [[hello|world]] [[hi]]}}
19015 anchorencode deals with templates
19017 {{anchorencode: {{Foo}} }}
19024 anchorencode encodes like the TOC generator: (bug 18431)
19026 === _ +:.3A%3A&&]] ===
19027 {{anchorencode: _ +:.3A%3A&&]] }}
19030 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19031 <p>.2B:.3A.253A.26.26.5D.5D
19036 Bug 6200: blockquotes and paragraph formatting
19057 Bug 8293: Use of center tag ruins paragraph formatting
19078 Parsing of overlapping (improperly nested) inline html tags
19080 <span><s>x</span></s>
19082 <p><span><s>x</span></s></span>
19085 <p><span><s>x</s></span>
19090 ### Language variants related tests
19093 Self-link in language variants
19095 title=[[Dunav]] language=sr
19097 Both [[Dunav]] and [[Дунав]] are names for this river.
19099 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19110 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19112 title=[[Duna]] language=sr
19114 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19116 <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.
19121 Link to a section of a variant of this title shouldn't be parsed as self-link
19123 title=[[Duna]] language=sr
19125 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19127 <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.
19132 Link to pages in language variants
19136 Main Page can be written as [[Маин Паге]]
19138 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19144 Multiple links to pages in language variants
19148 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19150 <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>.
19156 Simple template in language variants
19162 <p>This is a test template
19168 Template with explicit namespace in language variants
19174 <p>This is a test template
19180 Basic test for template parameter in language variants
19184 {{парамтест|param=foo}}
19186 <p>This is a test template with parameter foo
19192 Simple category in language variants
19196 [[Category:МедиаWики Усер'с Гуиде]]
19198 <a href="/wiki/%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%98%D0%B0:MediaWiki_User%27s_Guide" title="Категорија:MediaWiki User's Guide">MediaWiki User's Guide</a>
19215 Don't convert blue categorylinks to another variant (bug 33210)
19219 [[A]][[Category:分类]]
19221 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
19226 Stripping -{}- tags (language variants)
19230 Latin proverb: -{Ne nuntium necare}-
19232 <p>Latin proverb: Ne nuntium necare
19238 Prevent conversion with -{}- tags (language variants)
19240 language=sr variant=sr-ec
19242 Latinski: -{Ne nuntium necare}-
19244 <p>Латински: Ne nuntium necare
19250 Prevent conversion of text with -{}- tags (language variants)
19252 language=sr variant=sr-ec
19254 Latinski: -{Ne nuntium necare}-
19256 <p>Латински: Ne nuntium necare
19262 Prevent conversion of links with -{}- tags (language variants)
19264 language=sr variant=sr-ec
19268 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19274 -{}- tags within headlines (within html for parserConvert())
19276 language=sr variant=sr-ec
19280 <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>
19286 Explicit definition of language variant alternatives
19288 language=zh variant=zh-tw
19290 -{zh:China;zh-tw:Taiwan}-, not China
19292 <p>Taiwan, not China
19298 Conversion around HTML tags
19300 language=sr variant=sr-ec
19302 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19303 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19306 <span title="ЛаCтин">ски</span>
19312 Explicit session-wise language variant mapping (A flag and - flag)
19314 language=zh variant=zh-tw
19316 Taiwan is not China.
19317 But -{A|zh:China;zh-tw:Taiwan}- is China,
19318 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19319 and -{China}- is China.
19321 <p>Taiwan is not China.
19322 But Taiwan is Taiwan,
19323 (This should be stripped!)
19324 and China is China.
19329 Explicit session-wise language variant mapping (H flag for hide)
19331 language=zh variant=zh-tw
19333 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19336 <p>(This should be stripped!)
19342 Adding explicit conversion rule for title (T flag)
19344 language=zh variant=zh-tw showtitle
19346 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19349 <p>Should be stripped!
19354 Testing that changing the language variant here in the tests actually works
19356 language=zh variant=zh showtitle
19358 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19361 <p>Should be stripped!
19366 Recursive conversion of alt and title attrs shouldn't clear converter state
19368 language=zh variant=zh-cn showtitle
19370 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19371 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19375 Should be stripped<span title="Exclamation">!</span>
19380 Bug 24072: more test on conversion rule for title
19382 language=zh variant=zh-tw showtitle
19384 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19385 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19388 <p>This should be stripped!
19389 This won't take interferes with the title rule.
19394 Partly disable title conversion if variant == main language code
19396 language=zh variant=zh title=[[ZH]] showtitle
19398 -{T|zh-cn:CN;zh-tw:TW}-
19406 Partly disable title conversion if variant == main language code, more
19408 language=zh variant=zh title=[[ZH]] showtitle
19418 Raw output of variant escape tags (R flag)
19420 language=zh variant=zh-tw
19422 Raw: -{R|zh:China;zh-tw:Taiwan}-
19424 <p>Raw: zh:China;zh-tw:Taiwan
19429 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19431 language=zh variant=zh-cn
19433 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19440 Conversion rules from [numeric-only string] to [something else] (T48634)
19442 language=zh variant=zh-cn
19444 -{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
19451 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19453 language=zh variant=zh-cn
19455 -{H|zh-cn:foo;zh-tw:;}-foobar
19462 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19464 language=zh variant=zh-cn
19466 -{H|=>zh-cn:foo;}-foobar
19473 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19475 language=zh variant=zh-cn
19484 Nested using of manual convert syntax
19486 language=zh variant=zh-hk
19488 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19490 <p>Nested: Hello Hong Kong!
19495 Proper conversion of text in external links
19497 language=sr variant=sr-ec
19499 http://www.google.com
19500 gopher://www.google.com
19501 [http://www.google.com http://www.google.com]
19502 [gopher://www.google.com gopher://www.google.com]
19503 [https://www.google.com irc://www.google.com]
19504 [ftp://www.google.com www.google.com/ftp://dir]
19505 [//www.google.com www.google.com]
19507 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19508 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19509 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19510 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19511 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19512 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19513 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19518 Do not convert roman numbers to language variants
19520 language=sr variant=sr-ec
19524 <p>Фридрих IV је цар.
19529 Unclosed language converter markup "-{"
19540 Don't convert raw rule "-{R|=>}-" to "=>"
19551 Don't break link parsing if language converter markup is in the caption.
19553 language=sr variant=sr-ec
19555 [[Main Page|-{R|main page}-]]
19557 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19561 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19563 Don't break image parsing if language converter markup is in the caption.
19567 [[File:Foobar.jpg|-{R|caption}-]]
19569 <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>
19573 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19575 Don't break list handling if language converter markup is in the item.
19577 language=zh variant=zh-cn
19579 ;-{zh-cn:AAA;zh-tw:BBB}-
19581 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19588 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19590 Don't break table handling if language converter markup is in the cell.
19592 language=sr variant=sr-ec
19615 Bug 529: Uncovered bullet
19624 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19625 # Templates in Wikipedia rely on this behavior, as tidy has always been
19626 # enabled there. These tests are normally run *without* tidy, so specify the
19627 # full output here.
19628 # To test realistic parsing behavior, apply a tidy-like transformation to both
19629 # the expected output and your parser's output.
19631 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19633 ******* Foo {{bullet}}
19635 <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>
19641 Bug 529: Uncovered table already at line-start
19664 Bug 529: Uncovered bullet in parser function result
19666 * Foo {{lc:{{bullet}} }}
19674 Bug 5678: Double-parsed template argument
19676 {{lc:{{{1}}}|hello}}
19683 Bug 5678: Double-parsed template invocation
19685 {{lc:{{paramtest {{!}} param = hello }} }}
19687 <p>{{paramtest | param = hello }}
19692 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19695 title=[[Main Page]]
19697 {{PRVNÍVELKÉ:ěščř}}
19698 {{prvnívelké:ěščř}}
19718 Morwen/13: Unclosed link followed by heading
19725 <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>
19730 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19737 <h1><span class="mw-headline" id="heading">heading</span></h1>
19742 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19749 <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>
19764 Paragraphs inside divs (no extra line breaks)
19776 Paragraphs inside divs (extra line break on open)
19791 Paragraphs inside divs (extra line break on close)
19806 Paragraphs inside divs (extra line break on open and close)
19823 Nesting tags, paragraphs on lines which begin with <div>
19825 <div></div><strong>A
19828 <p><strong>A</strong></p>
19829 <p><strong>B</strong></p>
19837 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19839 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19841 <blockquote>Line one
19843 Line two</blockquote>
19845 <blockquote>Line one
19846 Line two</blockquote>
19850 <p>Line one Line two</p>
19855 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19860 Line two</blockquote>
19865 Line two</blockquote>
19870 Line two</blockquote>
19874 Bug 6200: paragraphs inside blockquotes (extra line break on close)
19876 <blockquote>Line one
19881 <blockquote>Line one
19894 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
19916 Paragraphs inside blockquotes/divs (no extra line breaks)
19918 <blockquote><div>Line one
19920 Line two</div></blockquote>
19922 <blockquote><div>Line one
19923 Line two</div></blockquote>
19928 Paragraphs inside blockquotes/divs (extra line break on open)
19933 Line two</div></blockquote>
19938 Line two</div></blockquote>
19943 Paragraphs inside blockquotes/divs (extra line break on close)
19945 <blockquote><div>Line one
19948 </div></blockquote>
19950 <blockquote><div>Line one
19953 </div></blockquote>
19958 Paragraphs inside blockquotes/divs (extra line break on open and close)
19964 </div></blockquote>
19970 </div></blockquote>
19975 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
19977 wgLinkHolderBatchSize=0
19983 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
19984 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
19985 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
19990 Free external link invading image caption
19992 [[Image:Foobar.jpg|thumb|http://x|hello]]
19994 <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>
19999 Bug 15196: localised external link numbers
20003 [http://en.wikipedia.org/]
20005 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20008 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20012 Multibyte character in padleft
20014 {{padleft:-Hello|7|Æ}}
20021 Multibyte character in padright
20023 {{padright:Hello-|7|Æ}}
20030 formatdate parser function
20032 {{#formatdate:2009-03-24}}
20034 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20039 formatdate parser function, with default format
20041 {{#formatdate:2009-03-24|mdy}}
20043 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20048 Spacing of numbers in formatted dates
20050 {{#formatdate:January 15}}
20052 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20057 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
20059 language=nl title=[[MediaWiki:Common.css]]
20061 {{#formatdate:2009-03-24|dmy}}
20063 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20076 Edit comment with link
20080 I like the [[Main Page]] a lot
20082 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20086 Edit comment with link and link text
20090 I like the [[Main Page|best pages]] a lot
20092 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20096 Edit comment with link and link text with suffix
20100 I like the [[Main Page|best page]]s a lot
20102 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20106 Edit comment with section link (non-local, eg in history list)
20108 comment title=[[Main Page]]
20110 /* External links */ removed bogus entries
20112 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20116 Edit comment with section link and text before it (non-local, eg in history list)
20118 comment title=[[Main Page]]
20120 pre-comment text /* External links */ removed bogus entries
20122 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>
20126 Edit comment with section link (local, eg in diff view)
20128 comment local title=[[Main Page]]
20130 /* External links */ removed bogus entries
20132 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20136 Edit comment with subpage link (bug 14080)
20140 title=[[Subpage test]]
20142 Poked at a [[/subpage]] here...
20144 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20148 Edit comment with subpage link and link text (bug 14080)
20152 title=[[Subpage test]]
20154 Poked at a [[/subpage|neat little page]] here...
20156 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20160 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20163 title=[[Subpage test]]
20165 Poked at a [[/subpage]] here...
20167 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20171 Edit comment with bare anchor link (local, as on diff)
20175 title=[[Main Page]]
20179 <a href="#section">#section</a>
20183 Edit comment with bare anchor link (non-local, as on history)
20186 title=[[Main Page]]
20190 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20194 Anchor starting with underscore
20198 <p><a href="#_ref">One</a>
20203 Id starting with underscore
20205 <div id="_ref"></div>
20207 <div id="_ref"></div>
20212 Space normalisation on autocomment (bug 22784)
20215 title=[[Main Page]]
20217 /* __hello__world__ */
20219 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20223 percent-encoding and + signs in comments (Bug 26410)
20227 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20229 <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>
20232 # Parsoid doesn't support this yet: see bug 73581
20233 # but it *should* omit the 'src' attribute if the image is bad.
20234 # PHP side of tests was disabled in
20235 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20236 # because of issues in the PHP parserTests infrastructure
20237 # (but the output below is indeed what the PHP side emits)
20239 Bad images - basic functionality
20242 !! DISABLED/html/php
20244 <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>
20248 Bad images - bug 16039: text after bad image disappears
20253 !! DISABLED/html/php
20259 <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>
20264 Verify that displaytitle works (bug #22501) no displaytitle
20268 wgAllowDisplayTitle=true
20269 wgRestrictDisplayTitle=false
20271 this is not the the title
20274 <p>this is not the the title
20279 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20284 wgAllowDisplayTitle=true
20285 wgRestrictDisplayTitle=false
20287 this is not the the title
20288 {{DISPLAYTITLE:whatever}}
20291 <p>this is not the the title
20296 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20301 wgAllowDisplayTitle=true
20302 wgRestrictDisplayTitle=true
20304 this is not the the title
20305 {{DISPLAYTITLE:whatever}}
20308 <p>this is not the the title
20313 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20318 wgAllowDisplayTitle=true
20319 wgRestrictDisplayTitle=true
20321 this is not the the title
20322 {{DISPLAYTITLE:screen}}
20325 <p>this is not the the title
20330 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20335 wgAllowDisplayTitle=false
20337 this is not the the title
20338 {{DISPLAYTITLE:screen}}
20341 <p>this is not the the title
20342 <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>
20347 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20352 wgAllowDisplayTitle=false
20354 this is not the the title
20357 <p>this is not the the title
20362 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20367 wgAllowDisplayTitle=true
20368 wgRestrictDisplayTitle=true
20370 this is not the the title
20371 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20373 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20374 <p>this is not the the title
20379 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20384 wgAllowDisplayTitle=true
20385 wgRestrictDisplayTitle=true
20387 this is not the the title
20388 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20390 <span style="color: red;">s</span>creen
20391 <p>this is not the the title
20396 Page status indicators: Empty name is invalid
20400 <indicator name=" "></indicator>
20401 <indicator></indicator>
20403 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20404 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20409 Page status indicators: Weird syntaxes that are okay
20413 <indicator name="empty" />
20414 <indicator name="name"></indicator>
20423 Page status indicators: Torture test
20427 <indicator name="01">hello world</indicator>
20428 <indicator name="02">[[Main Page]]</indicator>
20429 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20430 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20431 <indicator name="05">* foo
20433 <indicator name="06"><nowiki>foo</nowiki></indicator>
20434 <indicator name="07"> Preformatted</indicator>
20435 <indicator name="08"><div>Broken tag</indicator>
20436 <indicator name="09">{| class=wikitable
20439 <indicator name="10">Two
20441 paragraphs</indicator>
20444 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20445 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" />
20446 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>
20447 05=<ul><li> foo</li>
20451 07=<pre>Preformatted
20453 08=<div>Broken tag</div>
20455 09=<table class="wikitable">
20472 preload: check <noinclude> and <includeonly>
20476 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20482 preload: check <onlyinclude>
20486 Goodbye <onlyinclude>Hello world</onlyinclude>
20492 preload: can pass tags through if we want to
20496 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20498 <includeonly>Hello world</includeonly>
20502 preload: check that it doesn't try to do tricks
20506 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20508 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20512 Play a bit with r67090 and bug 3158
20514 <div style="width:50% !important"> </div>
20515 <div style="width:50% !important"> </div>
20516 <div style="width:50% !important"> </div>
20517 <div style="border : solid;"> </div>
20519 <div style="width:50% !important"> </div>
20520 <div style="width:50% !important"> </div>
20521 <div style="width:50% !important"> </div>
20522 <div style="border : solid;"> </div>
20525 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20526 <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>
20527 <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>
20528 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20533 HTML5 data attributes
20535 <span data-foo="bar">Baz</span>
20536 <p data-abc-def_hij="">Quuz</p>
20538 <p><span data-foo="bar">Baz</span>
20540 <p data-abc-def_hij="">Quuz</p>
20545 percent-encoding and + signs in internal links (Bug 26410)
20547 [[User:+%]] [[Page+title%]]
20548 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20549 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20550 [[%33%45]] [[%33%45+]]
20552 <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>
20553 <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>
20554 <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>
20555 <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>
20558 <p><a rel="mw:WikiLink" href="./User:+%25" title="User:+%">User:+%</a> <a rel="mw:WikiLink" href="Page+title%25" title="Page+title%">Page+title%</a>
20559 <a rel="mw:WikiLink" href="%25+" title="%+">%+</a> <a rel="mw:WikiLink" href="%25+" title="%+">%20</a> <a rel="mw:WikiLink" href="%25+" title="%+">%+ </a> <a rel="mw:WikiLink" href="%25+r" title="%+r">%+r</a>
20560 <a rel="mw:WikiLink" href="%25" title="%">%</a> <a rel="mw:WikiLink" href="+" title="+">+</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=\"{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Bar&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;bar&quot;},&quot;dsr&quot;:[94,101,2,2]}\">bar</a>"}'><a href="./File:%25+abc9"><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>
20561 <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>
20565 Special characters in embedded file links (bug 27679)
20567 [[File:Contains & ampersand.jpg]]
20568 [[File:Does not exist.jpg|Title with & ampersand]]
20570 <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>
20571 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20574 <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>
20575 <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>
20579 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20581 Text's been normalized?
20583 <p>Text's been normalized?
20588 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20590 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20592 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20597 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20599 [http://www.example.org/ ideograms]
20601 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20606 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20608 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20610 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20634 Bug 31098 Template which includes system messages which includes the template
20638 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20639 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20644 Bug31490 Turkish: ucfirst 'blah'
20655 Bug31490 Turkish: ucfirst 'ix'
20666 Bug31490 Turkish: lcfirst 'BLAH'
20677 Bug31490 Turkish: ucfırst (with a dotless i)
20683 <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>
20688 Bug31490 ucfırst (with a dotless i) with English language
20694 <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>
20699 Bug 26375: TOC with italics
20701 title=[[Main Page]]
20704 == ''Lost'' episodes ==
20706 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20708 <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>
20712 <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>
20717 Bug 26375: TOC with bold
20719 title=[[Main Page]]
20722 == '''should be bold''' then normal text ==
20724 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20726 <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>
20730 <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>
20735 Bug 33845: Headings become cursive in TOC when they contain an image
20737 title=[[Main Page]]
20740 == Image [[Image:foobar.jpg]] ==
20742 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20744 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20748 <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>
20753 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20755 title=[[Main Page]]
20758 == <blockquote>Quote</blockquote> ==
20760 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20762 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20766 <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>
20770 <div id="toc" class="toc">
20771 <div id="toctitle">
20775 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20779 <h2><span class="mw-headline" id="Quote"></span></h2>
20781 <p><span class="mw-headline" id="Quote">Quote</span></p>
20783 <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>
20787 Unclosed tags in TOC
20789 title=[[Main Page]]
20793 <small>Hanc marginis exiguitas non caperet.</small>
20796 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20798 <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>
20802 <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>
20803 <p><small>Hanc marginis exiguitas non caperet.</small>
20809 Multiple tags in TOC
20812 == <i>Foo</i> <b>Bar</b> ==
20814 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20816 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20818 <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>
20819 <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>
20823 <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>
20824 <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>
20828 <div id="toc" class="toc">
20829 <div id="toctitle">
20833 <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>
20834 <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>
20838 <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>
20839 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20841 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20843 <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>
20846 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
20847 # html5 tag parsing.
20849 Tags with parameters in TOC
20854 == <sup class="in-h2">Hello</sup> ==
20856 == <sup class="a > b">Evilbye</sup> ==
20858 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20860 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
20861 <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>
20865 <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>
20866 <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>
20869 <meta property="mw:PageProp/toc" />
20870 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
20872 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
20876 span tags with directionality in TOC
20879 == <span dir="ltr">C++</span> ==
20881 == <span dir="rtl">זבנג!</span> ==
20883 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
20885 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
20887 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
20889 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20891 <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>
20892 <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>
20893 <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>
20894 <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>
20895 <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>
20899 <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>
20900 <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>
20901 <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>
20902 <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>
20903 <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>
20908 Bug 72884: bdi element in ToC
20911 == <bdi>test</bdi> ==
20913 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20915 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
20919 <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>
20923 # Note that the html output does not have the <p></p>, but the
20924 # html+tidy output *does*. This is because the empty <p></p> is
20925 # removed by the sanitizer, but only when tidy is *not* enabled (!).
20927 Empty <p> tag in TOC, removed by Sanitizer (T92892)
20932 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20934 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20938 <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>
20942 <div id="toc" class="toc">
20943 <div id="toctitle">
20947 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20951 <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>
20957 == {{int:headline_sample}} ==
20961 Bug 32057: Title needed when expanding <h> nodes.
20963 title=[[Main Page]]
20967 <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>
20972 Strip marker in urlencode
20974 {{urlencode:x<nowiki/>y}}
20975 {{urlencode:x<nowiki/>y|wiki}}
20976 {{urlencode:x<nowiki/>y|path}}
20977 {{urlencode:x<pre id="one">two</pre>y}}
21005 Strip marker in formatNum
21007 {{formatnum:1<nowiki/>2}}
21008 {{formatnum:1<nowiki/>2|R}}
21016 Check noCommafy in formatNum
21020 {{formatnum:123456.78}}
21021 {{formatnum:123456.78|NOSEP}}
21029 Wrong option for formatNum (bug 56199)
21031 {{formatnum:1,234.56|Random}}
21032 {{formatnum:1,234.56|EVERYTHING}}
21033 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21042 Strip marker in grammar
21046 {{grammar:elative|foo<nowiki/>bar}}
21053 Strip marker in padleft
21055 {{padleft:|2|x<nowiki/>y}}
21062 Strip marker in padright
21064 {{padright:|2|x<nowiki/>y}}
21071 Strip marker in anchorencode
21073 {{anchorencode:x<nowiki/>y}}
21080 nowiki inside link inside heading (bug 18295)
21082 ==[[foo|x<nowiki>y</nowiki>z]]==
21084 <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>
21089 new support for bdi element (bug 31817)
21091 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21093 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21098 Ignore pipe between table row attributes
21102 |- id=foo | style='color: red'
21110 <tr id="foo" style="color: red">
21117 Gallery override link with WikiLink (bug 34852)
21120 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21123 <ul class="gallery mw-gallery-traditional">
21124 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21125 <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>
21126 <div class="gallerytext">
21136 Gallery override link with absolute external link (bug 34852)
21139 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21142 <ul class="gallery mw-gallery-traditional">
21143 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21144 <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>
21145 <div class="gallerytext">
21155 Gallery override link with malicious javascript (bug 34852)
21158 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21161 <ul class="gallery mw-gallery-traditional">
21162 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21163 <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>
21164 <div class="gallerytext">
21174 Gallery with invalid title as link (bug 43964)
21177 File:foobar.jpg|link=<
21180 <ul class="gallery mw-gallery-traditional">
21181 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21182 <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>
21183 <div class="gallerytext">
21191 Language parser function
21200 Padleft and padright as substr
21202 {{padleft:|3|abcde}}
21203 {{padright:|3|abcde}}
21211 Special parser function
21213 {{#special:RandomPage}}
21214 {{#special:BaDtItLe}}
21215 {{#special:Foobar}}
21224 Bug 34939 - Case insensitive link parsing ([HttP://])
21226 [HttP://MediaWiki.Org/]
21228 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21231 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21235 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21237 [HttP://MediaWiki.Org/ MediaWiki]
21239 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21244 Bug 34939 - Case insensitive link parsing (HttP://)
21246 HttP://MediaWiki.Org/
21248 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21251 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21269 <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>
21270 <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>
21271 <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>
21272 <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>
21273 <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>
21279 ### Parsoid-specific tests
21280 ### Parsoid-PHP parser incompatibilities
21283 1. SOL-sensitive wikitext tokens as template-args
21285 parsoid=wt2html,wt2wt
21291 <span about="#mwt1" typeof="mw:Transclusion">
21292 </span><ul about="#mwt1"><li>a</li>
21294 <span about="#mwt2" typeof="mw:Transclusion">
21295 </span><ol about="#mwt2"><li>a</li>
21297 <span about="#mwt3" typeof="mw:Transclusion">
21298 </span><dl about="#mwt3"><dd>a</dd>
21302 #### -----------------------------------------------------------------
21303 #### Parsoid-specific functionality tests
21304 #### -----------------------------------------------------------------
21306 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21307 # We know wt2wt will fail, but we expect selser to pass.
21308 # Due to the nature of our testing, wt2wt and selser tests will enter the
21309 # blacklist and we'll catch selser regressions based on changes to the
21310 # blacklist entries for selser tests.
21312 1. Bad treebuilder fixup of formatting elt is cleaned up
21314 parsoid=wt2html,wt2wt
21319 [[Image:Foobar.jpg|right|Test]]
21326 <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>
21333 2. Bad treebuilder fixup of formatting elt is cleaned up
21335 parsoid=wt2html,wt2wt
21337 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21339 <small>[[Image:Foobar.jpg|right|300px]]</small>
21343 <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>
21345 <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>
21349 3. Bad treebuilder fixup of formatting elt is cleaned up
21351 parsoid=wt2html,wt2wt
21353 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21355 <p><small><b>foo</b></small></p>
21356 <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>
21357 <p><small><b>bar</b></small></p>
21361 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21363 parsoid=wt2html,wt2wt
21365 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21367 <p><b><small></small></b></p>
21368 <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>
21372 #### ----------------------------------------------------------------
21373 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
21374 #### tags. Parsoid's output for these tags differs from that of the
21376 #### ----------------------------------------------------------------
21379 Ref: 1. ref-location should be replaced with an index span
21384 B <ref name="x">foo</ref>
21388 <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>
21389 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>
21390 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>
21391 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21392 <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>
21393 <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>
21394 <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>
21399 Ref: 2. ref-tags with identical names should all get the same index
21403 A <ref name="x">foo</ref>
21407 <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>
21408 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>
21409 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21410 <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>
21415 Ref: 3. spaces in ref-names should be ignored
21419 A <ref name="x">foo</ref>
21420 B <ref name=" x " />
21424 <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>
21425 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>
21426 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>
21427 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21428 <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>
21432 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21434 Ref: 4. 'constructor' should be accepted as a valid ref-name
21438 A <ref name="constructor">foo</ref>
21441 <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>
21442 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21443 <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>
21448 Ref: 5. body should accept generic wikitext
21453 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
21458 <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>
21460 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21461 <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>
21467 Ref: 6. indent-pres should not be output in ref-body
21479 <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>
21481 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21482 <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
21490 Ref: 7. No p-wrapping in ref-body
21509 <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>
21511 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21512 <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
21527 Ref: 8. transclusion wikitext has lower precedence
21531 A <ref> foo {{echo|</ref> B C}}
21535 <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<span typeof="mw:Nowiki">}}</span></p>
21536 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21537 <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 typeof="mw:Nowiki" data-parsoid='{"src":"{{","dsr":[12,14,0,0]}'>{{</span>echo|</span></li>
21542 Ref: 9. unclosed comments should not leak out of ref-body
21546 A <ref> foo <!--</ref> B C
21549 <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>
21550 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21551 <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>
21556 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21560 A <ref> <b> foo </ref> B C
21564 <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>
21567 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21568 <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>
21573 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21581 <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
21582 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>
21583 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21584 <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>
21585 <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>
21590 Ref: 12. ref-tags act as trailing newline migration barrier
21592 <!--the newline at the end of this line moves out of the p tag-->a
21594 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21600 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21603 <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>
21604 <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>
21607 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21608 <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>
21609 <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>
21613 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21622 <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
21623 <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>
21624 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21625 <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>
21626 <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
21632 Ref: 14. A nested ref-tag should be emitted as plain text
21636 <ref>foo <ref>bar</ref> baz</ref>
21640 <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>
21642 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21643 <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>
21648 Ref: 15. ref-tags with identical names should get identical indexes
21652 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21653 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21657 <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>
21658 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>
21660 <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>
21664 ## We don't bother wt2wt-ing non-standard whitespace
21666 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21674 <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>
21675 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21676 <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>
21680 Ref: 17. Generate valid HTML5 id/about attributes
21684 <ref name="a b">foo</ref>
21688 <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>
21691 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21692 <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>
21697 Ref: 18. T58916: Extension attributes should be parsed as plain text
21701 <ref name="{{echo|a}}">foo</ref>
21705 <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>
21708 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21709 <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>
21714 Ref: 19. ref-tags with identical name encodings should get identical indexes
21718 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21722 <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>
21724 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21725 <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>
21730 Ref: 20. ref-tags with identical names but different content should keep it
21734 A <ref name="foo">Foo one</ref>
21735 B <ref name="foo">Foo two</ref>
21736 C <ref name="foo" />
21740 <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>
21741 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>
21742 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>
21744 <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>
21749 References: 1. references tag without any refs should be handled properly
21753 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21757 References: 2. references tag with group only outputs references from that group
21759 A <ref group="a">foo</ref>
21760 B <ref group="b">bar</ref>
21763 <references group="a" />
21765 <references group="b" />
21767 <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>
21768 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>
21769 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>
21771 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21772 <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>
21774 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21775 <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>
21777 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21778 <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>
21783 References: 3. ref list should be cleared after processing references
21793 <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>
21795 <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>
21798 <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>
21800 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21801 <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>
21806 References: 4. only referenced group should be cleared after processing references
21808 A <ref group="a">afoo</ref>
21811 <references group="a" />
21817 <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>
21818 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>
21820 <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>
21823 <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>
21825 <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>
21830 References: 5. ref tags in references should be processed while ignoring all other content
21833 B <ref name="b">bar</ref>
21836 <ref name="a">foo</ref>
21837 This should just get lost.
21840 <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>
21841 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>
21844 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","body":{"extsrc":"<ref name=\"a\">foo</ref>\nThis should just get lost.","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;\"><span class=\"mw-reflink-text\">[1]</span></a></span>\n"},"attrs":{}}'><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>
21849 References: 6. <references /> from a transclusion
21851 <ref>Foo</ref> {{echo|<references />}}
21853 <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>
21858 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21860 A <ref>foo bar for a</ref>
21861 B <ref group="X" name="b" />
21865 <references group="X">
21866 <ref name="b">foo</ref>
21869 <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>
21870 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>
21873 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21874 <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>
21877 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="X" data-mw='{"name":"references","body":{"extsrc":"<ref name=\"b\">foo</ref>","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\"><span class=\"mw-reflink-text\">[X 1]</span></a></span>\n"},"attrs":{"group":"X"}}'>
21878 <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>
21883 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
21885 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
21888 <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>
21889 <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>
21893 # This test only works in wt2html now as the <references /> are always generated
21894 # unless selser is active. Once T72722 is fixed, we should add a changes test
21895 # here to ensure that unrelated changes don't add the new <references /> in
21898 References: 9. Generate missing references list at the end
21901 B <ref group="inexistent">bar</ref>
21903 <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>
21904 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21905 <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>
21907 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
21908 <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>
21913 References: 10. New <references/> shouldn't be added for unrelated edits.
21916 "modes": ["selser"],
21917 "changes": [["#x", "remove"]],
21921 Unrelated text<span id="x"> that's going to disappear</span>.
21929 Entities in ref name
21931 <ref name="test & me">hi</ref>
21934 <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>
21935 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21936 <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>
21940 # This test is wt2html only because we're permitting the serializer to produce
21941 # dirty diffs, normalizing the unclosed references to the self-closed version.
21943 Generate references for unclosed references tag
21951 <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>
21952 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21953 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
21957 New reference serializes on its own line
21959 parsoid=wt2wt,html2wt
21964 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21967 #### ----------------------------------------------------------------
21968 #### Parsoid-only testing of Parsoid's impl of LST
21969 #### Not implemented yet, see
21970 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
21971 #### ----------------------------------------------------------------
21974 LST Sections: 1. Simple section start and end
21976 <section begin="2011-05-16" />
21977 <section end="2014-04-10 (MW 1.23wmf22)" />
21979 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
21980 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
21983 #--------- Test stripping of empty nodes in template content ----------
21985 Empty LI and TR nodes should be stripped from template content
21990 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
21994 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22007 Empty LI and TR nodes should not be stripped from top-level content
22034 Empty TR nodes should not be stripped if they have any attributes set
22036 {{EmptyTRWithHTMLAttrTest}}
22038 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22039 <tr align="center"></tr>
22040 <tr><td>foo</td></tr>
22041 <tr align="center"></tr>
22042 <tr><td>bar</td></tr>
22046 #### ----------------------------------------------------------------
22047 #### The following section of tests are primarily to test
22048 #### wikitext escaping capabilities of Parsoid. Given that
22049 #### escaping can be done any number of ways, the wikitext (input)
22050 #### is always adjusted to reflect how Parsoid adds nowiki
22053 #### We are marking several tests as parsoid-only since the
22054 #### HTML in the result section is different from what the
22055 #### PHP parser generates for it.
22056 #### ----------------------------------------------------------------
22059 #### --------------- Headings ---------------
22061 #### 1. Nested inside html <h1>=foo=</h1>
22062 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22063 #### 3. Nested inside html with wikitext split by html tags
22064 #### 4. No escape needed
22065 #### 5. Empty headings <h1></h1>
22066 #### 6. Heading chars in SOL context
22067 #### ----------------------------------------
22069 Headings: 0. Unnested
22079 <p>=foo<i>a</i>=</p>
22081 <nowiki>=foo=</nowiki>
22083 <nowiki> </nowiki>=foo=
22085 <nowiki>=foo=</nowiki>
22087 =foo''a''<nowiki>=</nowiki>
22090 # New headings and existing headings are handled differently
22092 Headings: 1. Nested inside html
22100 <h1 data-parsoid=''>=foo=</h1>
22101 <h2 data-parsoid=''>=foo=</h2>
22102 <h3 data-parsoid=''>=foo=</h3>
22103 <h4 data-parsoid=''>=foo=</h4>
22104 <h5 data-parsoid=''>=foo=</h5>
22105 <h6 data-parsoid=''>=foo=</h6>
22113 =<nowiki>=foo=</nowiki>=
22114 ==<nowiki>=foo=</nowiki>==
22115 ===<nowiki>=foo=</nowiki>===
22116 ====<nowiki>=foo=</nowiki>====
22117 =====<nowiki>=foo=</nowiki>=====
22118 ======<nowiki>=foo=</nowiki>======
22123 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22132 <nowiki>*</nowiki>bar
22138 <nowiki>=bar=</nowiki>
22142 Headings: 3. Nested inside html with wikitext split by html tags
22146 <h1>=<b>bold</b>foo=</h1>
22148 = ='''bold'''<nowiki>foo=</nowiki> =
22152 Headings: 4a. No escaping needed (testing just h1 and h2)
22163 <h1><i>=</i>foo=</h1>
22183 Headings: 4b. No escaping needed (inside p-tags)
22198 Headings: 5. Empty headings
22202 <h1 data-parsoid='{}'></h1>
22204 <h2 data-parsoid='{}'></h2>
22206 <h3 data-parsoid='{}'></h3>
22208 <h4 data-parsoid='{}'></h4>
22210 <h5 data-parsoid='{}'></h5>
22212 <h6 data-parsoid='{}'></h6>
22222 =====<nowiki/>=====
22224 ======<nowiki/>======
22228 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22238 <nowiki>=a=</nowiki>
22240 <nowiki>=a=</nowiki>
22242 <nowiki>=a=</nowiki>
22246 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22259 <nowiki>=a=</nowiki>
22262 <nowiki>=a=</nowiki>
22265 <nowiki>=a=</nowiki>
22270 Headings: 6c. Heading chars in SOL context (leading newline break)
22278 <nowiki>=b=</nowiki>
22282 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22286 <!--c0--><p>=a=</p>
22288 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22290 <!--c0--><nowiki>=a=</nowiki>
22292 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22296 Headings: 6d. Heading chars in SOL context (No escaping needed)
22306 Headings: 7. Insert a newline between new content and headings
22312 <h2 data-parsoid='{}'>A</h2>
22313 <p data-parsoid='{}'>a</p>
22323 #### --------------- Lists ---------------
22324 #### 0. Outside nests (*foo, etc.)
22325 #### 1. Nested inside html <ul><li>*foo</li></ul>
22326 #### 2. Inside definition lists
22327 #### 3. Only bullets at start should be escaped
22328 #### 4. No escapes needed
22329 #### 5. No unnecessary escapes
22330 #### 6. Escape bullets in SOL position
22331 #### 7. Escape bullets in a multi-line context
22332 #### ----------------------------------------
22335 Lists: 0. Outside nests
22345 <nowiki>*</nowiki>foo
22347 <nowiki>#</nowiki>foo
22349 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
22353 Lists: 1. Nested inside html
22357 <ul><li>*foo</li></ul>
22358 <ul><li>#foo</li></ul>
22359 <ul><li>:foo</li></ul>
22360 <ul><li>;foo</li></ul>
22361 <ol><li>*foo</li></ol>
22362 <ol><li>#foo</li></ol>
22363 <ol><li>:foo</li></ol>
22364 <ol><li>;foo</li></ol>
22367 *<nowiki>*foo</nowiki>
22369 *<nowiki>#foo</nowiki>
22371 *<nowiki>:foo</nowiki>
22373 *<nowiki>;foo</nowiki>
22375 #<nowiki>*foo</nowiki>
22377 #<nowiki>#foo</nowiki>
22379 #<nowiki>:foo</nowiki>
22381 #<nowiki>;foo</nowiki>
22385 Lists: 2. Inside definition lists
22389 <dl><dt>;foo</dt></dl>
22390 <dl><dt>:foo</dt></dl>
22393 <dl><dd>:foo</dd></dl>
22396 ;<nowiki>;foo</nowiki>
22398 ;<nowiki>:foo</nowiki>
22400 ;<nowiki>:foo</nowiki>
22403 :<nowiki>:foo</nowiki>
22407 Lists: 3. Only bullets at start of text should be escaped
22411 <ul><li>*foo*bar</li></ul>
22412 <ul><li>*foo<i>it</i>*bar</li></ul>
22415 *<nowiki>*foo*bar</nowiki>
22417 *<nowiki>*foo</nowiki>''it''*bar
22421 Lists: 4. No escapes needed
22434 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22438 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22452 Lists: 5. No unnecessary escapes
22456 <ul><li> bar <span>[[foo]]</span></li></ul>
22457 <ul><li> =bar <span>[[foo]]</span></li></ul>
22458 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22459 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22460 <ul><li> =bar <span>foo]]</span>=</li></ul>
22461 <ul><li> <s></s>: a</li></ul>
22462 <ul><li> <i>* foo</i></li></ul>
22465 * bar <span><nowiki>[[foo]]</nowiki></span>
22467 * =bar <span><nowiki>[[foo]]</nowiki></span>
22469 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22471 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22473 * =bar <span>foo]]</span>=
22481 Lists: 6. Escape bullets in SOL position
22485 <p><!--cmt-->*foo</p>
22487 <!--cmt--><nowiki>*</nowiki>foo
22491 Lists: 7. Escape bullets in a multi-line context
22500 <nowiki>*</nowiki>b
22504 Lists: 8. Escape colons only if not present in tags
22508 <dl><dt>a:b<i>c:d</i></dt></dl>
22510 ; <nowiki>a:b</nowiki>''c:d''
22513 #### --------------- HRs ---------------
22514 #### 1. Single line
22515 #### -----------------------------------
22518 HRs: 1. Single line
22526 ----<nowiki>----</nowiki>
22531 #### --------------- Tables ---------------
22532 #### 1a. Simple example
22533 #### 1b. No escaping needed (!foo)
22534 #### 1c. No escaping needed (|foo)
22535 #### 1d. No escaping needed (|}foo)
22537 #### 2a. Nested in td (<td>foo|bar</td>)
22538 #### 2b. Nested in td (<td>foo||bar</td>)
22539 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22541 #### 3a. Nested in th (<th>foo!bar</th>)
22542 #### 3b. Nested in th (<th>foo!!bar</th>)
22543 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22547 #### 4c. No escaping needed
22548 #### --------------------------------------
22551 Tables: 1a. Simple example
22559 <nowiki>{|</nowiki>
22564 Tables: 1b. No escaping needed
22575 Tables: 1c. No escaping needed
22586 Tables: 1d. No escaping needed
22597 Tables: 2a. Nested in td
22602 <td>foo|bar</td></tr>
22603 <tr><td>x<div>a|b</div></td>
22607 |<nowiki>foo|bar</nowiki>
22609 |x<div><nowiki>a|b</nowiki></div>
22625 Tables: 2b. Nested in td
22631 <td>a<i>b||c</i></td>
22632 <td>a<i><div>b||c</div></i></td>
22633 </tr></tbody></table>
22636 |<nowiki>foo||bar</nowiki>
22637 |a''<nowiki>b||c</nowiki>''
22638 |a''<div><nowiki>b||c</nowiki></div>''
22647 <td>a<i><div>b||c</div></i>
22653 Tables: 2c. Nested in td -- no escaping needed
22671 Tables: 3a. Nested in th
22689 Tables: 3b. Nested in th
22694 <tr><th>foo!!bar</th>
22695 <th><i>foo|bar</i></th>
22696 <th><i>foo!!bar</i></th>
22697 <th><i><span>foo!!bar</span></i></th>
22698 </tr></tbody></table>
22701 !<nowiki>foo!!bar</nowiki>
22702 !''<nowiki>foo|bar</nowiki>''
22703 !''<nowiki>foo!!bar</nowiki>''
22704 !''<span><nowiki>foo!!bar</nowiki></span>''
22713 <th><i>foo!!bar</i>
22715 <th><i><span>foo!!bar</span></i>
22721 Tables: 3c. Nested in th
22726 <tr><th>foo||bar</th>
22727 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22728 </tr></tbody></table>
22731 !<nowiki>foo||bar</nowiki>
22732 !<nowiki>foo||bar</nowiki>
22745 Tables: 4a. Escape -
22764 |<nowiki>-bar</nowiki>
22769 Tables: 4b. Escape +
22788 |<nowiki>+bar</nowiki>
22793 Tables: 4c. No escaping needed
22798 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22799 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22805 <div>a|b</div></td>
22850 Tables: 4d. No escaping needed
22855 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22856 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22857 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22868 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22878 T97430: Don't emit empty nowiki pairs around marker meta tags
22882 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22883 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
22885 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22886 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
22890 Unclosed xmlish element in table line shouldn't eat end delimiters
22895 <tbody><tr><td> <foo</td>
22896 <td> bar></td></tr>
22913 #### --------------- Links ----------------
22914 #### 1. Quote marks in link text
22915 #### 2. Wikilinks: Escapes needed
22916 #### 3. Wikilinks: No escapes needed
22917 #### 4. Extlinks: Escapes needed
22918 #### 5. Extlinks: No escapes needed
22919 #### --------------------------------------
22921 Links 1. WikiLinks: No escapes needed
22925 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
22926 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
22927 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
22931 [[Foo|x [Foobar] x]]
22933 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
22934 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
22935 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
22940 Links 2. WikiLinks: Escapes needed
22944 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
22945 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
22946 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
22947 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
22948 <a href="Foo" rel="mw:WikiLink">|Bar</a>
22949 <a href="Foo" rel="mw:WikiLink">]]bar</a>
22950 <a href="Foo" rel="mw:WikiLink">[[bar</a>
22951 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
22952 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
22953 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
22955 [[Foo|<nowiki>Foobar]</nowiki>]]
22956 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
22957 [[Foo|<nowiki>[[Bar]]</nowiki>]]
22958 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
22959 [[Foo|<nowiki>|Bar</nowiki>]]
22960 [[Foo|<nowiki>]]bar</nowiki>]]
22961 [[Foo|<nowiki>[[bar</nowiki>]]
22962 [[Foo|<nowiki>x [[ y</nowiki>]]
22963 [[Foo|<nowiki>x ]] y</nowiki>]]
22964 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
22966 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
22967 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
22968 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
22969 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
22970 <a href="/wiki/Foo" title="Foo">|Bar</a>
22971 <a href="/wiki/Foo" title="Foo">]]bar</a>
22972 <a href="/wiki/Foo" title="Foo">[[bar</a>
22973 <a href="/wiki/Foo" title="Foo">x [[ y</a>
22974 <a href="/wiki/Foo" title="Foo">x ]] y</a>
22975 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
22980 Links 3. WikiLinks: No escapes needed
22984 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
22985 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
22990 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
22991 <a href="/wiki/Foo" title="Foo">foo|bar</a>
22996 Links 4. ExtLinks: Escapes needed
23000 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23001 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23002 <p>[http://google.com]</p>
23003 <p>[http://google.com google]</p>
23005 [http://google.com <nowiki>[google]</nowiki>]
23006 [http://google.com <nowiki>google]</nowiki>]
23008 <nowiki>[http://google.com]</nowiki>
23010 <nowiki>[http://google.com google]</nowiki>
23013 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23014 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23015 </p><p>[http://google.com]
23016 </p><p>[http://google.com google]
23021 Links 5. ExtLinks: No escapes needed
23025 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23027 [http://google.com [google]
23029 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23034 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23038 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23039 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23040 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23041 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23042 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23043 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23044 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23045 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23046 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23047 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23048 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23049 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23050 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23053 x<nowiki/>http://example.com<nowiki/>y
23054 http://example.com<nowiki/>?x
23055 http://example.com<nowiki/>&x
23056 http://example.com<nowiki/>'x
23057 http://example.com<nowiki/>,x
23058 http://example.com<nowiki/>.x
23059 http://example.com<nowiki/>;x
23060 http://example.com<nowiki/>:x
23061 http://example.com<nowiki/>;x
23062 http://example.com<nowiki/>!x
23063 http://example.com<nowiki/>=x
23064 http://example.com<nowiki/>(x)
23065 http://example.com(x<nowiki/>)
23069 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23074 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23076 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23077 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23078 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23079 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23080 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23086 "http://example.com"
23087 (http://example.com)
23088 (http://example.com) foo
23089 http://example.com,
23090 http://example.com, foo
23093 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23095 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23096 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23097 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23098 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23099 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23104 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23108 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23109 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23111 http://example.com.,;:!?\
23112 -http://example.com:
23114 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23115 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23120 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23124 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23125 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23126 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23130 X<nowiki/>RFC 123<nowiki/>y
23134 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23138 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23139 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23140 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23147 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23148 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23149 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23154 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23158 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23159 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23160 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23164 X<nowiki/>PMID 123<nowiki/>y
23168 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23172 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23173 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23174 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23181 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23182 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23183 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23188 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23192 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23193 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23194 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23197 ISBN 1234567890<nowiki/>1
23198 ISBN 1234567890<nowiki/>x
23199 a<nowiki/>ISBN 1234567890<nowiki/>b
23203 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23207 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23211 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23216 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23220 <p>this is not a link: http://example.com
23223 this is not a link: <nowiki>http://example.com</nowiki>
23227 Links 15. Link trails can't become link prefixes.
23232 <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>
23234 [[Söfnuður]]-[[00]]
23236 <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>
23240 #### --------------- Quotes ---------------
23241 #### 1. Quotes inside <b> and <i>
23242 #### 2. Link fragments separated by <i> and <b> tags
23243 #### 3. Link fragments inside <i> and <b>
23244 #### 4. No escaping needed
23245 #### --------------------------------------
23247 1a. Quotes inside <b> and <i>
23258 <b>foo'<i>bar'</i>baz</b>
23267 <i>fools'<span> errand</span></i>
23268 <i><span>fool</span>'s errand</i>
23269 '<i>foo</i> bar '<i>baz</i>
23270 a|!*#-:;+-~[]{}b'<i>x</i>
23274 ''<nowiki>''foo''</nowiki>''
23275 ''<nowiki>'''foo'''</nowiki>''
23277 '''<nowiki/>'foo''''
23278 '''<nowiki>''foo''</nowiki>'''
23279 '''<nowiki>'''foo'''</nowiki>'''
23280 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23281 '''foo'''<nowiki/>'s
23287 '''foo'''<nowiki/>'
23288 ''''foo'''<nowiki/>'
23289 ''fools'<span> errand</span>''
23290 ''<span>fool</span>'s errand''
23291 '<nowiki/>''foo'' bar '''baz''
23292 a|!*#-:;+-~[]{}b'''x''
23296 1b. Quotes inside <b> and <i> with other tags on same line
23300 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23301 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23302 <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>
23303 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23304 '<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>
23305 '<i>foo</i> <div title="name">test</div>
23306 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23307 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23308 <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>
23311 '''a'' foo ''[[bar]]''
23312 ''a''' foo ''[[bar]]''
23313 ''a''' foo '''{{echo|[[bar]]}}'''
23314 [[foo]] x'''[[bar]]''
23315 '''foo'' <ref>test</ref>
23316 '''foo'' <div title="name">test</div>
23317 '''foo'' and <br> bar
23322 2. Link fragments separated by <i> and <b> tags
23326 <p>[[<i>foo</i>hello]]</p>
23327 <p>[[<b>foo</b>hello]]</p>
23329 [[''foo''<nowiki>hello]]</nowiki>
23331 [['''foo'''<nowiki>hello]]</nowiki>
23334 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23335 # this is one of the shortcomings of this format
23337 3. Link fragments inside <i> and <b>
23341 <p><i>[[foo</i>]]</p>
23342 <p><b>[[foo</b>]]</p>
23344 ''[[foo''<nowiki>]]</nowiki>
23346 '''[[foo'''<nowiki>]]</nowiki>
23350 4. No escaping needed
23354 <p>'<span><i>bar</i></span>'
23355 '<span><b>bar</b></span>'
23359 '<span>''bar''</span>'
23360 '<span>'''bar'''</span>'
23364 #### ----------- Paragraphs ---------------
23365 #### 1. No unnecessary escapes
23366 #### --------------------------------------
23369 1. No unnecessary escapes
23373 <p>bar <span>[[foo]]</span>
23374 </p><p>=bar <span>[[foo]]</span>
23375 </p><p>[[bar <span>[[foo]]</span>
23376 </p><p>]]bar <span>[[foo]]</span>
23377 </p><p>=bar <span>foo]]</span>=
23380 bar <span><nowiki>[[foo]]</nowiki></span>
23382 =bar <span><nowiki>[[foo]]</nowiki></span>
23384 [[bar <span><nowiki>[[foo]]</nowiki></span>
23386 ]]bar <span><nowiki>[[foo]]</nowiki></span>
23388 =bar <span>foo]]</span><nowiki>=</nowiki>
23391 #### ----------------------- PRE --------------------------
23392 #### 1. Leading whitespace in SOL context should be escaped
23393 #### ------------------------------------------------------
23395 1. Leading whitespace in SOL context should be escaped
23418 <nowiki> </nowiki>a
23420 <nowiki> </nowiki> a
23424 <nowiki> </nowiki> a
23426 <nowiki> </nowiki>a
23429 <nowiki> </nowiki>b
23452 2. Leading whitespace in non-indent-pre contexts should not be escaped
23456 <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>
23457 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23458 <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 data-parsoid='{"dsr":[9,14,2,2]}'>a</i>
23468 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
23487 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
23491 <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>
23493 [[File:Foobar.jpg|thumb|caption]]
23497 5. Nowiki escaping should account for indent-pres
23507 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23520 #### --------------- Behavior Switches --------------------
23523 1. Valid behavior switches should be escaped
23530 <nowiki>__TOC__</nowiki>
23531 ''<nowiki>__TOC__</nowiki>''
23535 2. Invalid behavior switches should not be escaped
23546 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23548 Behavior switches should be SOL-transparent
23552 <meta property="mw:PageProp/toc" />
23554 <!-- this one's bogus -->
23557 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23559 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23563 <!-- this one's bogus -->
23571 #### --------------- HTML tags ---------------
23574 #### 3. multi-line html tag
23575 #### 4. extension tags
23576 #### -----------------------------------------
23582 <a href="http://google.com">google</a>
23584 <a href="http://google.com">google</a>
23592 <ul><li> <div>foo</div></li>
23593 <li> <div style="color:red">foo</div></li>
23594 <li> <td></li></ul>
23597 * <nowiki><div>foo</div></nowiki>
23598 * <nowiki><div style="color:red">foo</div></nowiki>
23599 * <nowiki><td></nowiki>
23603 3. multi-line html tag
23622 <p><ref>foo</ref>
23623 </p><p><ref>bar
23624 </p><p>baz</ref>
23627 <nowiki><ref>foo</ref></nowiki>
23629 <nowiki><ref>bar</nowiki>
23631 baz<nowiki></ref></nowiki>
23634 #### --------------- Others ---------------
23640 <p><nowiki>foo</nowiki>
23643 <nowiki>foo</nowiki>
23646 ## The quote-char in the input is necessary for triggering the bug
23648 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
23657 #----------- End of wikitext escaping tests --------------
23661 Tag-like HTML structures are passed through as text
23683 </p><p>1<d e>f
23688 HTML tag with necessary entities in attributes
23690 <span title="&amp;">foo</span>
23692 <p><span title="&amp;">foo</span>
23697 HTML tag with 'unnecessary' entity encoding in attributes
23699 <span title="&">foo</span>
23701 <p><span title="&">foo</span>
23706 HTML tag with broken attribute value quoting
23708 <span title="Hello world>Foo</span>
23710 <p><span title="Hello world">Foo</span>
23713 <p><span title="Hello world">Foo</span>
23718 Table with broken attribute value quoting
23721 | title="Hello world|Foo
23726 <td title="Hello world">Foo
23732 <td title="Hello world">Foo
23738 Table with broken attribute value quoting on consecutive lines
23741 | title="Hello world|Foo
23742 | style="color:red|Bar
23747 <td title="Hello world">Foo
23749 <td style="color:red">Bar
23755 <td title="Hello world">Foo
23756 </td><td style="color: red">Bar
23757 </td></tr></tbody></table>
23762 2. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23772 1. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23782 Accept empty td cell attribute
23785 | align="center" | foo || |
23790 <td align="center"> foo </td>
23797 Non-empty attributes in th-cells
23800 ! Foo !! style="color: red" | Bar
23806 <th style="color: red"> Bar
23812 Accept empty attributes in th-cells
23827 Empty table rows go away
23848 ### Parsoid-centric tests for testing RTing of inter-element separators
23849 ### Edge cases not tested by existing parser tests and specific to
23850 ### Parsoid-specific serialization strategies.
23854 RT-ed inter-element separators should be valid separators
23866 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
23870 # Parsoid-only since PHP parser relies on Tidy for correct output
23872 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
23886 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
23887 <p>bar</p></small></td></tr>
23891 <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>
23895 # Note that the "style" attribute is really a template parameter here.
23896 # The = would have to be {{=}} if you wanted the literal.
23898 Empty TD followed by TD with tpl-generated attribute
23903 |{{echo|style='color:red'}}|foo
23917 Indented table with an empty td
23935 ## We have some newline diffs RT-ing this edge case
23936 ## and it is not important enough -- we seem to be emitting
23937 ## at most 2 newlines after a </tr> and this is unrelated to
23938 ## the issue from T85627 that this is testing.
23940 Indented table with blank lines in between (T85627)
23959 Indented block & table
23973 <div data-parsoid='{"stx":"html"}'>foo</div>
23975 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
23980 Indent and comment before table row
23995 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
23996 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24000 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24002 Empty TR followed by a template-generated TR
24008 {{echo|<tr><td>foo</td></tr>}}
24014 <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}}]}'>
24019 ## PHP and parsoid output differ for this, and since this is primarily
24020 ## for testing Parsoid's serializer, marking this Parsoid only
24022 Empty TR followed by mixed-ws-comment line should RT correctly
24038 <!--c--> </tr><!--d-->
24044 Multi-line image caption generated by templates with/without trailing newlines
24046 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24047 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24049 <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>
24050 <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>
24054 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24058 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24060 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24062 <includeonly>foo</includeonly>
24070 ## PHP emits broken html for this, and since this is primarily
24071 ## a Parsoid serializer test, marking this Parsoid only
24073 Improperly nested inline or quotes tags with whitespace in between
24075 <span> <s>x</span> </s>
24078 <p><span> <s>x</s></span><s> </s>
24079 <b> <i>x</i></b><i> </i>
24084 Encapsulate protected attributes from wt
24086 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24088 <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>
24092 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24093 ## Having nested or stray pre tags results in the attempt to add duplicates,
24094 ## causing an assertion fail. This test tries to prevent that situation.
24096 Ensure ParagraphWrapper can deal with stray closing pre tags
24106 1. Ensure fostered text content is wrapped in element nodes
24110 <table>hi</table><table>ho</table>
24119 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24121 parsoid=wt2html,wt2wt
24130 <tbody><tr><td> a</td></tr>
24135 Encapsulation properly handles null DSR information from foster box
24137 parsoid=wt2html,wt2wt
24139 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24141 <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>
24145 1. Encapsulate foster-parented transclusion content
24147 parsoid=wt2wt,wt2html
24149 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24151 <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>
24161 2. Encapsulate foster-parented transclusion content
24163 parsoid=wt2wt,wt2html
24165 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24167 <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>
24178 3. Encapsulate foster-parented transclusion content
24180 parsoid=wt2wt,wt2html
24182 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24184 <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>"]}">
24197 4. Encapsulate foster-parented transclusion content
24199 parsoid=wt2wt,wt2html
24201 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24203 <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>"]}">
24216 5. Encapsulate foster-parented transclusion content
24218 parsoid=wt2wt,wt2html
24220 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24222 <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>
24237 6. Encapsulate foster-parented transclusion content
24239 parsoid=wt2wt,wt2html
24241 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24243 <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>
24259 7. Encapsulate foster-parented transclusion content
24261 parsoid=wt2wt,wt2html
24263 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24265 <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>
24275 # Note that the wt is broken on purpose: the = should be {{=}} if you
24276 # don't want it to be a template parameter key.
24278 8. Encapsulate foster-parented transclusion content
24280 parsoid=wt2wt,wt2html
24283 }}{|{{echo|style='color:red'}}
24288 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24290 <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>
24301 9. Encapsulate foster-parented transclusion content
24303 parsoid=wt2wt,wt2html
24305 <table>{{echo|hi</table>hello}}
24307 <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","spc":["","","",""]}]]}'>hi</p><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><p about="#mwt2">hello</p>
24311 Table in fosterable position
24313 parsoid=wt2html,wt2wt
24322 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"OpenTable","href":"./Template:OpenTable"},"params":{},"i":0}},"\n<div>"]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[]]}'></div><span about="#mwt1">
24324 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24330 # Parsoid only for bug 64747
24332 Properly encapsulate empty-content transclusions in fosterable positions
24340 <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","spc":["","","",""]}]]}'>
24346 Support <object> element with .data attribute
24350 <object data="test.swf"></object>
24352 <object data="test.swf"></object>
24356 Don't block XML namespace declaration
24358 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24360 <p><span>MediaWiki</span>
24363 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
24366 # -----------------------------------------------------------------
24367 # The following section of tests are primarily to spec requirements
24368 # around serialization of new/edited content.
24370 # All these tests are marked Parsoid html2wt and html2html only
24371 # ----------------------------------------------------------------
24373 # 'mi' is a localinterwiki prefix as well as a language
24375 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
24379 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
24386 New wikilinks should be serialized properly
24390 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
24391 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
24398 New wiki links (href variations)
24402 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24403 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
24404 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
24405 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
24410 [[Toxine bactérienne]]
24414 New wiki links (content string variations)
24418 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24419 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
24420 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
24424 [[Foo_bar|./Foo_bar]]
24428 New category links (href variations)
24432 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
24433 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
24434 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
24436 [[Category:Toxine bactérienne]]
24437 [[Category:Toxine bactérienne]]
24438 [[Category:Toxine bactérienne]]
24442 New sol transparent links don't need indent-pre nowiki protection
24447 <link rel="mw:PageProp/redirect" href="./Main_Page">
24448 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
24449 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
24451 #WEITERLEITUNG [[Main Page]]
24452 <!-- this is good --> [[Category:Good]]
24453 <!-- this is great --> [[Kategorie:Great]]
24457 New interlanguage links (href variations)
24461 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
24462 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
24463 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
24465 [[es:Toxine bactérienne]]
24466 [[es:Toxine_bactérienne]]
24467 [[es:Toxine_bactérienne]]
24471 Image: Modifying size of an image (1)
24474 "modes": ["wt2wt"],
24476 ["img[height]", "attr", "height", "22"],
24477 ["img[width]", "attr", "width", "200"]
24481 [[Image:Foobar.jpg|230x230px]]
24483 [[Image:Foobar.jpg|200x200px]]
24487 Image: Modifying size of an image (2)
24490 "modes": ["wt2wt"],
24492 ["img[height]", "attr", "height", "100"],
24493 ["img[width]", "attr", "width", "500"]
24497 [[Image:Foobar.jpg|230x230px]]
24499 [[Image:Foobar.jpg|500x500px]]
24502 # Change in size is ignored so long as class='mw-default-size'
24504 Image: Modifying size of an image (3)
24507 "modes": ["wt2wt"],
24509 ["figure[class]", "removeClass", "mw-default-size"],
24510 ["figure img", "attr", "height", "19"],
24511 ["figure img", "attr", "width", "170"]
24515 [[Image:Foobar.jpg|thumb]]
24517 [[Image:Foobar.jpg|thumb|170x170px]]
24521 Image: Modifying alignment of an image (bug 48665)
24524 "modes": ["wt2wt"],
24526 ["figure[class]", "removeClass", "mw-halign-right"],
24527 ["figure[class]", "addClass", "mw-halign-left"]
24531 [[Image:Foobar.jpg|thumb|caption|right]]
24533 [[Image:Foobar.jpg|thumb|caption|left]]
24537 Image: Modifying mw-default-size of an frameless image (bug 62805)
24540 "modes": ["wt2wt"],
24542 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24546 [[Image:Foobar.jpg|frameless|right]]
24548 [[Image:Foobar.jpg|frameless|right|220x220px]]
24552 Image: Modifying valign of an image (bug 49221)
24555 "modes": ["wt2wt"],
24557 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24558 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24562 [[File:Foobar.jpg|20px|middle]]
24564 [[File:Foobar.jpg|20px|text-top]]
24568 Image: Modifying alt attribute of an image (bug 56400)
24571 "modes": ["wt2wt"],
24573 ["img[alt]", "attr", "alt", "some alternate edited text"]
24577 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24579 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24583 Image: Modifying caption of an image
24586 "modes": ["wt2wt"],
24588 ["figcaption", "text", "new caption"]
24592 [[Image:Foobar.jpg|thumb|original caption]]
24594 [[Image:Foobar.jpg|thumb|new caption]]
24598 Image: empty alt attribute (bug 48924)
24602 [[File:Foobar.jpg|thumb|alt=|bar]]
24604 <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>
24608 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
24614 <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>
24616 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
24620 Image: Block level image should have \n before and after
24623 [[File:Foobar.jpg|right|thumb|150x150px]]
24627 <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>
24632 Image: New block level image should have \n before and after (existing content)
24635 [[File:Foobar.jpg|right|thumb|150x150px]]
24639 <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>
24644 Image: upright option (parsoid)
24646 [[File:Foobar.jpg|thumb|upright|caption]]
24647 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
24648 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
24650 <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>
24651 <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>
24652 <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>
24656 Image: upright option is ignored on inline and frame images (parsoid)
24658 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
24660 <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>
24664 Image: from basic HTML (1)
24668 <span typeof="mw:Image">
24669 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24672 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24676 Image: from basic HTML (2)
24680 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24682 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24686 Image: from basic HTML (3)
24690 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24692 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24696 Image: from basic HTML (4)
24700 <img src="./File:Foobar.jpg">
24702 [[File:Foobar.jpg|link=]]
24706 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24711 <li><p>foo</p></li>
24718 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24722 <ul> <li>foo</li></ul>
24728 Don't strip leading whitespace when handling indent-pre suppressing tags
24733 <tr><td> indented row</td></tr>
24736 <b>This is very bold of you!</b>
24739 indented cell (no pre-wrapping!)
24749 '''This is very bold of you!'''
24753 indented cell (no pre-wrapping!)
24761 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24779 <nowiki> </nowiki><span>bar</span>
24782 <nowiki> </nowiki></span>bar2
24785 <nowiki> </nowiki><span>bar</span>
24788 <nowiki> </nowiki><span>foo</span>
24793 Lists: Dont insert newlines in a serialized list item.
24797 <ul><li>a<br>b</li><li>c</li></ul>
24804 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
24807 "modes": ["html2wt"],
24808 "scrubWikitext": false
24811 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24812 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24814 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24815 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24817 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
24819 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24821 == hello there [[Category:A1]] ==
24823 == [[Category:A2]] hi pal ==
24825 == <!--foo--> [[Category:A3]] how goes it ==
24827 == it goes well [[Category:A4]] <!--bar--> ==
24829 ==howdy [[Category:A5]] ==
24835 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
24838 "modes": ["html2wt"],
24839 "scrubWikitext": true
24842 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24843 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24845 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24846 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24848 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24856 <!--foo--> [[Category:A3]]
24861 [[Category:A4]] <!--bar-->
24869 Headings: Don't hoist metas that come from templates
24872 "modes": ["html2wt"],
24873 "scrubWikitext": true
24876 <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>
24878 == {{echo|foo [[Category:Foo]]}} ==
24882 Headings: Category in ref isn't hoisted
24885 "modes": ["html2wt"],
24886 "scrubWikitext": true
24889 <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>
24891 <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>
24894 [[Category:Baz]] </ref> ==
24900 Parsoid: Serialize positional parameters with = in them as named parameter
24904 <p about="#mwt1" typeof="mw:Transclusion"
24905 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
24907 <p about="#mwt1" typeof="mw:Transclusion"
24908 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
24910 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24911 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24912 <p data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]},{"k":"2","spc":["","","",""]}]]}' 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>
24916 {{echo|1 = f=oo|2 = bar}}
24918 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24919 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24920 {{echo|<nowiki>f=oo</nowiki>|bar}}
24924 Parsoid: Serialize positional parameters with = in extlink as named parameter
24928 <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>
24930 {{echo|1 = http://stuff?is=ok}}
24934 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
24938 <div>a<p>b</p></div>
24959 Substrings resembling wikitext in hrefs should not get nowiki escapes
24963 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
24969 Enforce single-line context in the serializer
24976 <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">
24977 </span><span about="#mwt1">you</span> </h2>
24979 <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>
24981 <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
24982 there</span></li></ol>
24994 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25001 </tbody></table></dd></dl>
25005 == hi {{bogus|there
25016 * foo '''bar''' baz
25028 Serialize new placeholder space without spans
25032 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25034 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25036 <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>
25042 <ref>foo : bar</ref>ok
25046 #-----------------------
25047 # Tag minimization tests
25048 #-----------------------
25051 1. I/B quote minimization: wikitext-only tags should be combined
25055 <p><i>A</i><i>B</i></p>
25056 <p><b>A</b><b>B</b></p>
25057 <p><i>A</i><b><i>B</i></b></p>
25058 <p><b>A</b><i><b>B</b></i></p>
25059 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25060 <p><i><b>A</b></i><i><b>B</b></i></p>
25061 <p><i><b>A</b></i><b><i>B</i></b></p>
25062 <p><b><i>A</i></b><i><b>B</b></i></p>
25082 2. I/B quote minimization: wikitext and html tags should not be combined
25086 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25087 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25091 ''A''<nowiki/>'''<i>B</i>'''
25095 3. I/B quote minimization: templated content stops minimization
25099 <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>
25100 <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>
25102 ''A''{{echo|''B''}}
25104 ''A''{{echo|'''''B'''''}}
25108 4. I/B quote minimization: new content should be mimimized with adjacent old content
25112 <p><i>A</i><i>B</i></p>
25113 <p><b>A</b><b>B</b></p>
25114 <p><i>A</i><b><i>B</i></b></p>
25124 5a. Merge adjacent quote nodes if they've been edited
25127 "modes": ["wt2wt", "selser"],
25129 ["p", "contents", "remove", ":contains('b')"]
25139 5b. Merge adjacent quote nodes if they've been edited
25142 "modes": ["wt2wt", "selser"],
25148 ''a''<span id="x">b</span>''c''
25154 1. Merge adjacent link nodes as long as at least one element is new
25157 "modes": ["html2wt"],
25158 "scrubWikitext": true
25161 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25162 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25163 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25167 [[Football|Foot]][[Football|ball]]
25171 2. Merge adjacent link nodes and enable additional normalizations
25174 "modes": ["html2wt"],
25175 "scrubWikitext": true
25178 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25180 [[Football|''Football'']]
25184 3. Don't merge adjacent link nodes if scrubWikitext is false
25187 "modes": ["html2wt"],
25188 "scrubWikitext": false
25191 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25193 [[Football|Foot]][[Football|ball]]
25196 #------------------------------
25197 # End of tag minimization tests
25198 #------------------------------
25201 Bug 54262: New entities
25205 <span typeof="mw:Entity"> </span>
25210 ## Note that there is no wikitext output for 'unknownproperty' ##
25211 ## Unknown magic words are silently dropped ##
25218 <meta property='mw:PageProp/toc' />
25219 <meta property='mw:PageProp/notoc' />
25220 <meta property='mw:PageProp/forcetoc' />
25221 <meta property='mw:PageProp/index' />
25222 <meta property='mw:PageProp/noindex' />
25223 <meta property='mw:PageProp/nogallery' />
25224 <meta property='mw:PageProp/noeditsection' />
25225 <meta property='mw:PageProp/notitleconvert' />
25226 <meta property='mw:PageProp/nocontentconvert' />
25227 <meta property='mw:PageProp/unknownproperty' />
25237 __NOCONTENTCONVERT__
25241 Consecutive <pre>s should not get merged
25243 parsoid=html2wt,html2html
25245 <pre>a</pre><pre>b</pre>
25273 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
25277 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
25279 [[Special:BookSources/1234567890|ISBN 1234567895]]
25283 Edited RFC links not serializable as RFC links should serialize as extlinks
25287 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
25289 [//tools.ietf.org/html/rfc123 New RFC]
25293 Edited PMID links not serializable as PMID links should serialize as extlinks
25297 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
25299 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
25303 WTS of autolinks with trailing/surrounding context
25307 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25308 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25309 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25310 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25311 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25312 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
25314 http://cscott.net'''foo'''
25316 http://cscott.net<b>foo</b>
25318 '''http://cscott.net'''
25320 '''http://cscott.net '''
25322 '''http://cscott.net<nowiki/>x'''
25324 http://cscott.net<nowiki/>x
25328 WTS of autolinks with nowikis (round-trip)
25330 x<nowiki/>http://cscott.net<nowiki/>x
25332 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
25335 # this is the "easy" test because it leaves in place all the
25336 # data-parsoid information indicating this is an autolink
25338 WTS of autolinks with escapes (editing)
25341 "modes": ["wt2wt"],
25343 [ "meta", "remove" ]
25347 x<nowiki/>http://cscott.net<nowiki/>x
25349 x<nowiki/>http://cscott.net<nowiki/>x
25353 WTS of edited autolink-like text (T103364)
25356 "modes": ["wt2wt"],
25358 [ "span[typeof]", "removeAttr", "typeof" ]
25362 Not a link: <nowiki>http://example.com</nowiki>.
25364 Not a link: <span><nowiki>http://example.com</nowiki></span>.
25368 WTS of newly-authored autolink-like text (T103364)
25372 <p>http://example.com is not a link.</p>
25374 <nowiki>http://example.com</nowiki> is not a link.
25378 WTS of autolink-like text after an autolink (T108563)
25382 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
25384 http://example.com <nowiki>http://example.com</nowiki> is not a link.
25388 Magic links inside links (not autolinked)
25390 [[Foo|http://example.com]]
25393 [[Foo|ISBN 123456789x]]
25395 [http://foo.com http://example.com]
25396 [http://foo.com RFC 1234]
25397 [http://foo.com PMID 1234]
25398 [http://foo.com ISBN 123456789x]
25400 <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>
25401 <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>
25403 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
25404 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
25405 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
25406 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
25408 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
25409 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
25410 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
25411 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
25415 Magic links inside image captions (autolinked)
25417 [[File:Foobar.jpg|thumb|http://example.com]]
25418 [[File:Foobar.jpg|thumb|RFC 1234]]
25419 [[File:Foobar.jpg|thumb|PMID 1234]]
25420 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
25422 <div class="thumb tright">
25423 <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>
25424 <div class="thumbcaption">
25425 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25426 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
25429 <div class="thumb tright">
25430 <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>
25431 <div class="thumbcaption">
25432 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25433 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
25436 <div class="thumb tright">
25437 <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>
25438 <div class="thumbcaption">
25439 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25440 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
25443 <div class="thumb tright">
25444 <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>
25445 <div class="thumbcaption">
25446 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25447 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
25451 <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>
25452 <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>
25453 <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>
25454 <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>
25458 WTS of magic word text (T109371)
25463 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
25464 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
25466 <nowiki>RFC 1234</nowiki>
25468 [http://foo.com RFC 1234]
25474 Edited Redirect link should emit a non-piped wikitext link
25478 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
25484 T75121: Infer extension name from typeOf if data-mw is not present
25486 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25488 <div typeOf="mw:Extension/foo"></div>
25493 # Note that the <p> wrapping isn't present in PHP parser output
25494 # The important thing for this test is that P-wrapping doesn't
25495 # interfere with the <nowiki> protection for leading - in <td>
25496 # (which isn't necessary for <th>).
25498 T88318: p-wrapped dash in table.
25500 parsoid=html2wt,wt2wt
25503 <tr><th><p>-</p></th><th><p>- </p></th></tr>
25504 <tr><td><p>-</p></td><td><p>- </p></td></tr>
25505 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
25512 |<nowiki>-</nowiki>
25513 |<nowiki>- </nowiki>
25532 <td><small>-</small></td>
25544 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
25549 <td id='mwAc'>foo</td>
25550 <td id='serialize-this'>bar</td>
25555 | id="serialize-this" |bar
25560 Parsoid-like element ids should not be serialized to wikitext unless shadowed
25564 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
25566 <div id="hello">ok</div>
25573 "modes": ["wt2wt"],
25575 [ "#xyz", "before", "<b>before</b> stuff " ],
25576 [ "#xyz", "after", " stuff <i>after</i>" ],
25577 [ "#xyz", "html", "x <b>y</b> z" ]
25581 <span id="xyz">hello</span>
25583 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
25587 Never serialize a-tag as html, regardless of what data-parsoid has to say
25589 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25591 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
25596 ## SSS FIXME: This is broken output nevertheless.
25597 ## What might be a reasonable non-broken output for this?
25598 ## This is an edge case unlikely to be seen in production
25599 ## that I am not wasting more time on this right now.
25601 Never serialize a-tag as html, no matter what attributes it has
25603 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25605 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
25607 [http://boo.org http://boohoo.org]
25610 # Misnested is an indication that selser can reuse the source but these have
25611 # shown to sneak through on occasion. See T101768.
25612 # The original wikitext here is: [http://test.com [[one]] two three]
25614 Strip span tags added to mark as misnested
25618 <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>
25620 [http://test.com][[one]] two three
25623 # --------------------------------------------
25624 # Tests spec'ing wikitext serialization norms |
25625 # --------------------------------------------
25628 Lists: Add space after bullets
25635 <li><span> baz</span></li>
25640 * <span> baz</span>
25644 1. Headings: Add space before/after == (T53744)
25651 <h2><span> baz</span></h2>
25659 == <span> baz</span> ==
25663 2. Headings: Add space before/after == even after hoisted content
25666 "modes": ["html2wt"],
25667 "scrubWikitext": true
25670 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
25678 1. Headings: suppress newly created empty headings
25681 "modes": ["html2wt"],
25682 "scrubWikitext": true
25690 2. Headings: don't suppress empty headings if scrubWikitext is false
25700 3. Headings: suppress empty headings on edits
25703 "modes": ["selser"],
25704 "scrubWikitext": true,
25710 ==<span id="x">foo</span>==
25715 1. WT Quote Tags: suppress newly created empty style tags
25718 "modes": ["html2wt"],
25719 "scrubWikitext": true
25727 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
25733 ''<nowiki/>'''''<nowiki/>'''
25737 3. WT Quote Tags: suppress empty style tags on edits
25740 "modes": ["selser"],
25741 "scrubWikitext": true,
25747 '''<span id="x">foo</span>'''
25752 1. Anchors: suppress newly created empty anchors
25755 "modes": ["html2wt"],
25756 "scrubWikitext": true
25759 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
25764 2. Anchors: don't suppress empty anchors if scrubWikitext is false
25767 "modes": ["html2wt"],
25768 "scrubWikitext": false
25771 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
25777 3. Anchors: suppress empty anchors on edits
25780 "modes": ["selser"],
25781 "scrubWikitext": true,
25787 [[Test|<span id="x">foo</span>]]
25792 3a. Anchors: do not suppress numbered extlinks
25795 "modes": ["wt2wt"],
25796 "scrubWikitext": true
25801 <a rel="mw:ExtLink" href="http://foo.com"></a>
25805 3b. Anchors: do not suppress numbered extlinks
25808 "modes": ["wt2wt"],
25809 "scrubWikitext": true,
25815 [http://foo.com <span id="x">foo</span>]
25821 Normalizations should be restricted to edited content
25824 "modes": ["selser"],
25825 "scrubWikitext": true,
25827 [ "h1", "before", "<i></i>"]
25841 1. Multiple normalizations (html2wt)
25844 "modes": ["html2wt"],
25845 "scrubWikitext": true
25849 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
25850 </a><b><i></i></b>x</p>
25859 2. Multiple normalizations (selser)
25862 "modes": ["selser"],
25863 "scrubWikitext": true,
25865 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
25869 <span id="x">foo</span>
25871 <span id="x">foo</span>
25877 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
25880 "modes": ["html2wt"],
25881 "scrubWikitext": true
25893 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
25900 <nowiki> </nowiki>hi
25902 <nowiki> </nowiki> hello
25906 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
25909 "modes": ["html2wt"],
25910 "scrubWikitext": true
25919 baz bang</td></tr></table>
25925 bar<span>boo</span></p>
25941 bar<span>boo</span>
25945 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
25948 "modes": ["selser"],
25949 "scrubWikitext": true,
25951 [ "p", "html", " a\n b" ]
25962 1. New links that end in spaces
25965 "modes": ["html2wt"],
25966 "scrubWikitext": false
25969 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
25970 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
25971 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
25973 [[Berlin ]]<nowiki/>is the capital of Germany.
25977 [[Boston ]] is a city.
25981 2. New links that end in spaces
25984 "modes": ["html2wt"],
25985 "scrubWikitext": true
25988 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
25989 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
25990 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
25992 [[Berlin]] is the capital of Germany.
25996 [[Boston]] is a city.
26000 1. Table cells with escapable prefixes
26003 "modes": ["html2wt"],
26004 "scrubWikitext": false
26008 <tr><td>a</td></tr>
26009 <tr><td>-</td></tr>
26010 <tr><td>+</td></tr>
26016 |<nowiki>-</nowiki>
26018 |<nowiki>+</nowiki>
26023 2. Table cells with escapable prefixes
26026 "modes": ["html2wt"],
26027 "scrubWikitext": true
26031 <tr><td>a</td></tr>
26032 <tr><td>-</td></tr>
26033 <tr><td>+</td></tr>
26046 3a. Table cells with escapable prefixes after edits
26049 "modes": ["selser"],
26050 "scrubWikitext": true,
26052 [ "table tbody tr:first-child td:first-child", "remove"]
26066 3b. Table cells with escapable prefixes after edits
26069 "modes": ["selser"],
26070 "scrubWikitext": true,
26072 [ "table tbody tr:first-child td:first-child", "html", "-" ],
26079 |<span id="x">foo</span>+
26088 # FIXME: This test will fail because
26089 # normalization doesn't realize that the id attribute
26090 # will eliminate the escapable scenario
26092 4a. Table cells without escapable prefixes after edits
26095 "modes": ["selser"],
26096 "scrubWikitext": true,
26098 [ "#x", "html", "-" ]
26111 ## This tests normalizer's ability to discriminate between
26112 ## cells having identical content.
26114 4b. Table cells without escapable prefixes after edits
26117 "modes": ["selser"],
26118 "scrubWikitext": true,
26120 [ "td", "html", "-" ]
26133 ## This tests normalizer's ability to not be tripped by
26134 ## comments (and whitespace)
26136 4c. Table cells without escapable prefixes after edits
26139 "modes": ["selser"],
26140 "scrubWikitext": true,
26142 [ "table tbody tr td:first-child", "remove" ]
26157 ## This tests normalizer's ability to handle HTML cells
26159 4d. Table cells without escapable prefixes after edits
26162 "modes": ["selser"],
26163 "scrubWikitext": true,
26165 [ "td", "html", "-" ]
26170 <tr><td>a</td></tr>
26174 <tr><td>-</td></tr>
26178 ## T111151 Remove font elements without attributes
26180 5a. font tags without attributes should be dropped in scrubWikitext mode
26183 "modes": ["html2wt"],
26184 "scrubWikitext": true
26188 <font><font>bar</font></font>
26189 <font class="x">boo</font>
26193 <font class="x">boo</font>
26197 5b. font tags should not be dropped without scrubWikitext being enabled
26200 "modes": ["html2wt"],
26201 "scrubWikitext": false
26210 Escape nowiki DOM elements
26214 <nowiki><i>foo</i></nowiki>
26216 <nowiki>''foo''</nowiki>
26219 # ---------------------------------------------------
26220 # End of tests spec'ing wikitext serialization norms |
26221 # ---------------------------------------------------
26223 # -----------------------------------------------------------------
26224 # End of section for Parsoid-only html2wt tests for serialization
26226 # -----------------------------------------------------------------
26228 # -----------------------------------------------------------------
26229 # The following section of tests are primarily to spec behavior of
26230 # the selective serializer. All these tests have manual selser
26231 # changes. The automated selser changes for all tests handle the
26232 # wide variation of changes, but these tests here capture specs
26233 # deterministically.
26234 # ----------------------------------------------------------------
26238 Selser: New comments should not be lost
26241 "modes": ["selser"],
26243 [ "#a", "after", "<!--c1-->" ],
26244 [ "#b", "before", "<!--c2-->" ]
26248 <span id="a">a</span>
26250 <span id="b">b</span>
26252 <span id="a">a</span><!--c1-->
26254 <!--c2--><span id="b">b</span>
26259 Selser: Check for validity of DSR before using it
26262 "modes": ["selser"],
26264 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
26268 <span id="a">a</span>
26270 {{DISPLAYTITLE:foo}}
26271 <span id="a">a</span>
26275 1. DOMDiff: Changes to <ref> content should be looked up using id
26278 "modes": ["selser"],
26280 ["#X", "after", "bar"],
26281 ["#Y", "after", "baz"]
26285 X <ref><span id="X">foo</span></ref>
26288 <ref name="a"><span id="Y">foo</span></ref>
26291 X <ref><span id="X">foo</span>bar</ref>
26294 <ref name="a"><span id="Y">foo</span>baz</ref>
26299 2. DOMDiff: Changes to <ref> content should be looked up using id
26302 "modes": ["selser"],
26304 ["#Z", "after", "bar"]
26308 A <ref>foo bar for a</ref>
26309 B <ref group="X" name="b" />
26313 <references group="X">
26314 <ref name="b"><span id="Z">foo</span></ref>
26317 A <ref>foo bar for a</ref>
26318 B <ref group="X" name="b" />
26322 <references group="X">
26323 <ref name="b"><span id="Z">foo</span>bar</ref>
26337 <li class="mw-empty-li"></li>
26338 <li class="mw-empty-li"></li>