1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <links>s)
20 # subpage enable subpages (disabled by default)
21 # noxml don't check for XML well-formedness
22 # title=[[XXX]] run test using article title XXX
23 # language=XXX set content language to XXX for this test
24 # variant=XXX set the variant of language for this test (eg zh-tw)
25 # disabled do not run test
26 # parsoid parsoid-specific options (not run by PHP parser unless
27 # the test includes an html/php section)
28 # php php-only test (not run by the parsoid parser unless
29 # the test includes an html/parsoid section)
30 # showtitle make the first line the title
31 # showindicators make the first lines the page status indicators
32 # comment run through Linker::formatComment() instead of main parser
33 # local format section links in edit comment text as local links
34 # notoc disable table of contents
35 # thumbsize=NNN set the default thumb size to NNNpx for this test
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml
41 # For testing purposes, temporary articles can created:
42 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
43 # where '/' denotes a newline.
45 # This is the standard article assumed to exist.
82 MediaWiki:bad image list
84 * [[File:Bad.jpg]] except [[Nasty page]]
112 Template:echo_with_span
118 Template:echo_with_div
131 Template:table_attribs
134 |</noinclude>style="color:red;"|Foo
138 Template:table_attribs_2
141 |</noinclude>style="color:red;"|Foo
146 Template:table_attribs_3
149 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
153 Template:table_attribs_4
155 | style="background-color:#DC241f;" width="10px" |
159 Template:table_attribs_5
162 |</noinclude>style="color:red;"||Bar
166 Template:table_attribs_6
168 style="background: <nowiki>
175 Template:table_attribs_7
178 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
182 Template:table_header_cells
184 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
190 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
194 Template:PartialTable
201 Template:image_attribs
204 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
207 ## See T48811 for details
209 Template:mixed_attr_content_template
211 style="color:red;" title="T48811"
217 Template:definition_list
264 Template:EmptyTRWithHTMLAttrTest
267 <tr align="center"></tr>
268 <tr><td>foo</td></tr>
269 <tr align="center"></tr>
270 <tr><td>bar</td></tr>
287 This is a simple paragraph.
289 <p>This is a simple paragraph.
294 Paragraphs with extra newline spacing
317 Paragraphs with newline spacing with comment lines in between
325 <!--foo--><!--More than 1 comment, still stripped-->
329 <!--foo--> <!----> <!-- bar -->
390 Paragraphs with newline spacing with non-empty white-space lines in between
417 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
425 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
464 Extra newlines: More paragraphs with indented comment
479 Extra newlines followed by heading
494 <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>
495 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
498 <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>
503 Extra newlines between heading and content are swallowed
511 <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>
512 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
519 http://fr.wikipedia.org/wiki/🍺
520 <!-- EasterEgg we love beer, better be able be able to link to it -->
522 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
526 # Note that the html+tidy output removes the spaces after the <li>,
527 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
528 # This is an issue for all tests with lists. We intentionally do
529 # *not* add html+tidy clauses for these, as we don't want to
530 # document/test the broken behavior. (Parsoid matches the non-tidy
531 # output in these cases.)
540 <li> Item 2</li></ul>
548 * plain''italic''plain
549 * plain''italic''plain''italic''plain
550 * plain'''bold'''plain
551 * plain'''bold'''plain'''bold'''plain
552 * plain''italic''plain'''bold'''plain
553 * plain'''bold'''plain''italic''plain
554 * plain''italic'''bold-italic'''italic''plain
555 * plain'''bold''bold-italic''bold'''plain
556 * plain'''''bold-italic'''italic''plain
557 * plain'''''bold-italic''bold'''plain
558 * plain''italic'''bold-italic'''''plain
559 * plain'''bold''bold-italic'''''plain
560 * plain l'''italic''plain
561 * plain l''''bold''' plain
564 <li> plain<i>italic</i>plain</li>
565 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
566 <li> plain<b>bold</b>plain</li>
567 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
568 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
569 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
570 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
571 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
572 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
573 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
574 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
575 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
576 <li> plain l'<i>italic</i>plain</li>
577 <li> plain l'<b>bold</b> plain</li></ul>
581 # this example taken from the [[simple:Moon]] article (bug 47326)
583 Italics and possessives (1)
585 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
587 <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
591 # this example taken from [[en:Flaming Pie]] (bug 49926)
593 Italics and possessives (2)
595 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
597 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
601 # this example taken from [[en:Dictionary]] (bug 49926)
603 Italics and possessives (3)
605 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''.
607 <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>.
613 ### 2-quote opening sequence tests
616 Italics and bold: 2-quote opening sequence: (2,2)
625 Italics and bold: 2-quote opening sequence: (2,3)
634 Italics and bold: 2-quote opening sequence: (2,4)
644 # same html as previous, but wikitext adjusted to match parsoid html2wt
646 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
648 ''foo<nowiki>''</nowiki>''
654 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
656 Italics and bold: 2-quote opening sequence: (2,5)
669 # same html as previous, but wikitext adjusted to match parsoid html2wt
671 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
673 ''foo'''''<nowiki/>'''
684 ### 3-quote opening sequence tests
688 Italics and bold: 3-quote opening sequence: (3,2)
697 Italics and bold: 3-quote opening sequence: (3,3)
706 Italics and bold: 3-quote opening sequence: (3,4)
714 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
716 Italics and bold: 3-quote opening sequence: (3,5)
729 # same html as previous, but wikitext adjusted to match parsoid html2wt
731 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
733 '''foo'''''<nowiki/>''
744 ### 4-quote opening sequence tests
748 Italics and bold: 4-quote opening sequence: (4,2)
758 # same html as previous, but wikitext adjusted to match parsoid html2wt
760 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
762 <nowiki>''</nowiki>''foo''
769 Italics and bold: 4-quote opening sequence: (4,3)
778 Italics and bold: 4-quote opening sequence: (4,4)
788 # same html as previous, but wikitext adjusted to match parsoid html2wt
790 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
798 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
800 Italics and bold: 4-quote opening sequence: (4,5)
809 <p>'<b>foo</b><i></i>
813 # same html as previous, but wikitext adjusted to match parsoid html2wt
815 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
817 '<nowiki/>'''foo'''''<nowiki/>''
822 <p>'<b>foo</b><i></i>
828 ### 5-quote opening sequence tests
832 Italics and bold: 5-quote opening sequence: (5,2)
842 # same html as previous, but wikitext adjusted to match parsoid html2wt
844 Italics and bold: 5-quote opening sequence: (5,2+3)
853 Italics and bold: 5-quote opening sequence: (5,3)
863 # same html as previous, but wikitext adjusted to match parsoid html2wt
865 Italics and bold: 5-quote opening sequence: (5,3+2)
874 Italics and bold: 5-quote opening sequence: (5,4)
880 <p><i><b>foo'</b></i>
885 Italics and bold: 5-quote opening sequence: (5,5)
894 Italics and bold: 5-quote opening sequence: (5,6)
898 <p><i><b>foo'</b></i>
903 ### multiple quote sequences in a line
906 Italics and bold: multiple quote sequences: (2,4,2)
912 <p><i>foo'<b>bar</b></i>
917 # same html as previous, but wikitext adjusted to match parsoid html2wt
919 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
921 ''foo'<nowiki/>'''bar'''''
923 <p><i>foo'<b>bar</b></i>
929 Italics and bold: multiple quote sequences: (2,4,3)
935 <p><i>foo'<b>bar</b></i>
940 # same html as previous, but wikitext adjusted to match parsoid html2wt
942 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
944 ''foo'<nowiki/>'''bar'''''
946 <p><i>foo'<b>bar</b></i>
952 Italics and bold: multiple quote sequences: (2,4,4)
958 <p><i>foo'<b>bar'</b></i>
963 # same html as previous, but wikitext adjusted to match parsoid html2wt
965 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
967 ''foo'<nowiki/>'''bar'<nowiki/>'''''
969 <p><i>foo'<b>bar'</b></i>
974 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
976 Italics and bold: multiple quote sequences: (3,4,2)
985 <p><b>foo'</b>bar<i></i>
989 # same html as previous, but wikitext adjusted to match parsoid html2wt
991 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
995 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
1000 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
1005 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1007 Italics and bold: multiple quote sequences: (3,4,3)
1016 <p><b>foo'</b>bar<b></b>
1020 # same html as previous, but wikitext adjusted to match parsoid html2wt
1022 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1024 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1029 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1034 ### other quote tests
1037 Italics and bold: other quote tests: (2,3,5)
1039 ''this is about '''foo's family'''''
1041 <p><i>this is about <b>foo's family</b></i>
1047 Italics and bold: other quote tests: (2,(3,3),2)
1049 ''this is about '''foo's''' family''
1051 <p><i>this is about <b>foo's</b> family</i>
1057 Italics and bold: other quote tests: (3,2,3,2)
1061 '''this is about ''foo'''s family''
1063 <p><b>this is about <i>foo</i></b><i>s family</i>
1068 # same html as previous, but wikitext adjusted to match parsoid html2wt
1070 Italics and bold: other quote tests: (3,2,3+2+2,2)
1072 '''this is about ''foo'''''<nowiki/>''s family''
1074 <p><b>this is about <i>foo</i></b><i>s family</i>
1080 Italics and bold: other quote tests: (3,2,3,3)
1082 '''this is about ''foo'''s family'''
1084 <p>'<i>this is about </i>foo<b>s family</b>
1090 Italics and bold: other quote tests: (3,(2,2),3)
1092 '''this is about ''foo's'' family'''
1094 <p><b>this is about <i>foo's</i> family</b>
1100 Italicized possessive
1102 The ''[[Main Page]]'''s talk page.
1104 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1107 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1111 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1112 (Requires tidy for PHP parser output to be fixed up)
1114 parsoid=wt2html,wt2wt
1131 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1132 <td><i>a</i></td><td><i>b</i></td></tr>
1141 Non-html5 tags should be accepted
1143 <center>''foo''</center>
1145 <font>''foo''</font>
1146 <strike>''foo''</strike>
1149 <center><i>foo</i></center>
1150 <p><big><i>foo</i></big>
1151 <font><i>foo</i></font>
1152 <strike><i>foo</i></strike>
1158 <wbr> is valid wikitext (bug 52468)
1166 # <strike> is HTML4, <s> is HTML4/5.
1168 <s> or <strike> for strikethrough
1170 <strike>strike</strike>
1174 <p><strike>strike</strike>
1182 Text-level semantic html elements in wikitext
1185 <strong>text</strong>
1201 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1208 <strong>text</strong>
1224 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1232 # test cases taken from
1233 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1235 Ruby markup (W3C-style)
1237 ; Mono-ruby for individual base characters
1238 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1240 : <ruby>今日<rt>きょう</rt></ruby>
1242 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1244 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1246 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1248 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1249 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1250 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1253 <dl><dt> Mono-ruby for individual base characters</dt>
1254 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1255 <dt> Group ruby</dt>
1256 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1257 <dt> Jukugo ruby</dt>
1258 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1259 <dt> Inline ruby</dt>
1260 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1261 <dt> Double-sided ruby</dt>
1262 <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>
1264 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1265 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1266 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1271 # The next two test different paths in the sanitizer.
1273 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1275 <blockquote|>a</blockquote>
1277 <b→> doesn't terminate </b→>
1279 <bä> doesn't terminate </bä>
1281 <boo> doesn't terminate </boo>
1283 <s.foo> doesn't terminate </s.foo>
1287 <p><blockquote|>a</blockquote>
1288 </p><p><b→> doesn't terminate </b→>
1289 </p><p><bä> doesn't terminate </bä>
1290 </p><p><boo> doesn't terminate </boo>
1291 </p><p><s.foo> doesn't terminate </s.foo>
1292 </p><p><sub-ID#1>
1296 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1297 # If the non-word-character tag made it through the sanitizer, tidy
1298 # would munge it up.
1300 Non-word characters don't terminate tag names + tidy
1302 <blockquote|>a</blockquote>
1304 <b→> doesn't terminate </b→>
1306 <bä> doesn't terminate </bä>
1308 <boo> doesn't terminate </boo>
1310 <s.foo> doesn't terminate </s.foo>
1314 <p><blockquote|>a</p>
1315 <p><b→> doesn't terminate </b→></p>
1316 <p><bä> doesn't terminate </bä></p>
1317 <p><boo> doesn't terminate </boo></p>
1318 <p><s.foo> doesn't terminate </s.foo></p>
1319 <p><sub-ID#1></p>
1323 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1324 ### This checks that HTML5 tags (with non-word characters in the tag
1325 ### name) make it safely through the parser -- the Sanitizer will
1326 ### munge them later, as it should.
1329 Non-word characters are valid in extension tags (T19663)
1342 Isolated close tags should be treated as literal text (bug 52760)
1350 <p><s.foo>s</p>
1352 <p><s.foo>s</p>
1356 ### Special characters
1360 Bare pipe character (bug 52363)
1369 Bare pipe character from a template (bug 52363)
1378 ### <nowiki> test cases
1382 <nowiki> unordered list
1384 <nowiki>* This is not an unordered list item.</nowiki>
1386 <p>* This is not an unordered list item.
1389 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1395 <nowiki>Lorem ipsum dolor
1403 <p>Lorem ipsum dolor
1412 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1424 :There is not nowiki.
1425 :There is <nowiki>nowiki</nowiki>.
1427 #There is not nowiki.
1428 #There is <nowiki>nowiki</nowiki>.
1430 *There is not nowiki.
1431 *There is <nowiki>nowiki</nowiki>.
1433 <dl><dd>There is not nowiki.</dd>
1434 <dd>There is nowiki.</dd></dl>
1435 <ol><li>There is not nowiki.</li>
1436 <li>There is nowiki.</li></ol>
1437 <ul><li>There is not nowiki.</li>
1438 <li>There is nowiki.</li></ul>
1441 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1442 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1444 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1445 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1447 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1448 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1452 Entities inside <nowiki>
1454 <nowiki><</nowiki>
1461 Entities inside template parameters
1467 <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>
1471 Properly escape nowiki when combined with other wiki markup
1475 <p>* </nowiki> tag</p>
1477 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1481 T93824: Put escaped HTML tags inside nowiki
1485 <p><h2>foo</h2></p>
1487 <nowiki><h2>foo</h2></nowiki>
1491 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1495 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1496 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1497 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1499 This text: L'[[Foo]]
1500 This text: L<nowiki>''</nowiki>[[Foo]]
1501 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1504 # This test fails because wikitext whitespace is not normalized before comparing.
1506 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1510 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1513 This text : L<nowiki>''</nowiki>[[Foo]]
1516 # This test and the next one are html2wt only as they test that incorrect wikitext
1517 # passed in template arguments gets escaped or wrapped in nowikis where required.
1519 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1523 <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>
1524 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1526 {{echo|foo{{!}}bar}}
1527 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1531 T53961: Output correct nowikis in template arguments
1535 <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>
1536 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1537 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1538 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1539 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1542 {{echo|a <nowiki>}}</nowiki> b}}
1543 {{echo|<nowiki>a [[ b</nowiki>}}
1544 {{echo|a {{!}} <nowiki>{{ ]]</nowiki>}}
1545 {{echo|a <nowiki>}</nowiki>}}
1549 Cases where "!!" needs nowiki protection
1554 <tr><th>this needs protection !! here</th></tr>
1558 <tr><th>this does not need
1559 protection !! here</th></tr>
1563 !<nowiki>this needs protection !! here</nowiki>
1576 Comments and Indent-Pre
1578 <!-- comment 1 --> asdf
1580 <!-- comment 1 --> asdf
1583 <!-- comment 1 --> asdf
1584 <!-- comment 2 -->xyz
1586 <!-- comment 1 --> asdf
1587 <!-- comment 2 --> xyz
1643 asdf<!-- comment 1 -->jkl
1653 <!-- foo --> b <!-- bar -->
1667 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1673 Comment semantics and delimiters
1675 <!-- --><!----><!-----><!------>
1679 <!-- --><!----><!-----><!------>
1683 Comment semantics and delimiters, redux
1685 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1686 -- foo -- funky huh? ... -->
1690 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1691 -- foo -- funky huh? ... -->
1695 Comment semantics and delimiters: directors cut
1697 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1698 everything starting with < followed by !-- until the first -- and > we see,
1699 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1705 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1706 everything starting with < followed by !-- until the first -- and > we see,
1707 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1712 Comment semantics: nesting
1714 <!--<!-- no, we're not going to do anything fancy here -->-->
1719 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1722 # Parsoid closes the unclosed comment, even if it means a slight
1725 Comment semantics: unclosed comment at end
1727 parsoid=wt2html,html2html
1729 <!--This comment will run out to the end of the document
1733 <!--This comment will run out to the end of the document-->
1737 Comment semantics: normalize comments to play nice with XML and browsers
1739 <!-- Browsers --!> think this is closed -->
1740 <!--> This would normally be text -->
1741 <!---> As would this -->
1742 <!-- XML doesn't like trailing dashes -------->
1743 <!-- Nor doubled hyphens -- anywhere in the data -->
1744 But this is not a comment.
1746 <p>But this is not a comment.
1749 <!-- Browsers --!> think this is closed -->
1750 <!--> This would normally be text -->
1751 <!---> As would this -->
1752 <!-- XML doesn't like trailing dashes -------->
1753 <!-- Nor doubled hyphens -- anywhere in the data -->
1754 <p>But this is not a comment.</p>
1758 Comment semantics: round-trip even text which contains encoded -->
1760 <!-- hello & goodbye - > --> --&gt; --&xx -->
1762 <!-- hello & goodbye - > --> --&gt; --&xx -->
1766 Comment in template title
1775 Comment on its own line post-expand
1787 Comment on its own line post-expand with non-significant whitespace
1799 Multiple comments should still parse as SOL-transparent
1801 parsoid=wt2html,wt2wt
1804 <!--c2--><!--c3--><!--c4-->*b
1813 <!--c2--><!--c3--><!--c4-->
1820 ### paragraph wrapping tests
1835 Block tag on one line (<div>)
1851 Block tag on one line (<blockquote>)
1853 a <blockquote>foo</blockquote>
1857 a <blockquote>foo</blockquote>
1869 Block tag on both lines (<div>)
1886 Block tag on both lines (<blockquote>)
1888 a <blockquote>foo</blockquote>
1890 b <blockquote>foo</blockquote>
1892 a <blockquote>foo</blockquote>
1893 b <blockquote>foo</blockquote>
1907 Multiple lines without block tags
1931 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1932 # So, we have a separate section for Parsoid. We don't want
1933 # to mimic this stripping behavior in Parsoid. It affects
1934 # editing experience and also requires us to maintain additional
1937 Empty lines between lines with block tags
1975 <div data-parsoid='{"stx":"html"}'></div>
1978 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1981 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1983 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1986 <div data-parsoid='{"stx":"html"}'>e</div>
1989 ## PHP parser emits output which is broken
1991 Unclosed HTML p-tags should be handled properly
2004 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2009 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2010 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2013 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2017 a [[Category:A1]] [[Category:A2]]
2022 <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"/>
2026 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2032 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2036 ### Preformatted text
2045 And a [[Main Page|link]]
2051 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2056 Tabs don't trigger preformatted text
2060 This is preformatted text.
2066 <pre>This is preformatted text.
2071 preformatted text.</p>
2072 <pre>This is preformatted text.
2077 Space before tab needs nowiki pre protection
2083 <nowiki> </nowiki> a
2087 Ident preformatting with inline content
2098 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2115 Regression with preformatted in <center>
2129 Bug 52763: Preformatted in <blockquote>
2135 indented cell (no pre-wrapping!)
2145 <p> indented cell (no pre-wrapping!)
2153 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2170 Bug 15491: <ins>/<del> in blockquote
2173 Foo <del>bar</del> <ins>baz</ins> quux
2177 <p>Foo <del>bar</del> <ins>baz</ins> quux
2183 # Note that the p-wrapping is newline sensitive, which could be
2184 # considered a bug: tidy will wrap only the 'Foo' in the example
2185 # below in a <p> tag. (see comment 23-25 of bug #6200)
2187 Bug 15491: <ins>/<del> in blockquote (2)
2189 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2192 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2198 <del>bar</del> <ins>baz</ins> quux</blockquote>
2202 <pre> with attributes (bug 3202)
2204 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2206 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2211 <pre> with width attribute (bug 3202)
2213 <pre width="8">Narrow screen goodies</pre>
2215 <pre width="8">Narrow screen goodies</pre>
2220 <pre> with forbidden attribute (bug 3202)
2222 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2224 <pre width="8">Narrow screen goodies</pre>
2229 Entities inside <pre>
2238 <pre> with forbidden attribute values (bug 3202)
2240 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2242 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2247 <nowiki> inside <pre> (bug 13238)
2255 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2263 <pre><nowiki>Foo</nowiki></pre>
2268 <nowiki> and <pre> preference (first one wins)
2297 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2299 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2302 <p><span typeof="mw:Nowiki">
2311 </pre> inside nowiki
2313 <nowiki></pre></nowiki>
2319 # Parsoid doesn't strip empty tags, like Tidy does.
2321 Empty pre; pre inside other HTML tags (bug 54946)
2323 parsoid=wt2html,wt2wt
2354 HTML pre followed by indent-pre
2364 # Note that tidy removes the empty <p> tags from the start and end.
2365 # Parsoid does not, by design.
2369 <p><pre>foo</pre></p>
2375 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2379 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2387 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2397 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2409 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2430 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2434 {{echo| foo}}{{echo| bar}}
2439 {{echo|<!--cmt--> foo}}
2441 <!--cmt-->{{echo| foo}}
2443 {{echo|{{echo| }}bar}}
2461 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2498 Pres with newline attributes
2503 <pre class="one two">hi</pre>
2507 two" data-parsoid='{"stx":"html"}'>hi</pre>
2511 Things that look like <pre> tags aren't treated as such
2513 Barack Obama <President> of the United States
2514 <President></President>
2516 <p>Barack Obama <President> of the United States
2517 <President></President>
2521 ## PHP parser discards the "<pre " string
2523 Handle broken pre-like tags (bug 64025)
2527 {{echo|<pre <pre>x</pre>}}
2529 <table><pre </table>
2532 <table><pre></pre></table>
2535 <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>
2544 Parsoid: handle pre with space after attribute
2548 <pre style="width:50%;" >{{echo|foo}}</pre>
2550 <pre style="width:50%;">{{echo|foo}}</pre>
2553 <pre style="width:50%;">{{echo|foo}}</pre>
2556 # TODO / maybe: fix wt2wt for this
2558 Parsoid: Don't paragraph-wrap fosterable content
2584 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2612 #--------------------------------------------------------------------
2613 # Transclusion parameter whitespace stripping tests
2614 # Behavior is different for positional and named parameters
2615 #--------------------------------------------------------------------
2617 Templates: Strip leading and trailing whitespace from named-param values
2621 {{echo|1= {{echo|b}} }}
2634 <ul><li> d</li></ul>
2639 Templates: Don't strip whitespace from positional-param values
2643 {{echo|{{echo|b}} }}
2675 <ul><li> f</li></ul>
2683 Templates: Handle empty comment-and-ws-only lines correctly
2686 <!--should be ignored-->
2687 <!--should be ignored as well-->
2696 Templates: Handle comments in the target
2699 <!-- should be ignored -->
2702 {{echo<!-- should be ignored -->
2705 {{echo<!-- should be ignored -->|foo}}
2707 {{<!-- should be ignored -->echo|foo}}
2709 <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>
2711 <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>
2713 <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>
2715 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2719 Templates: Handle comments in parameter names (bug 67657)
2722 <!-- should be ignored -->
2726 <!-- should be ignored -->
2729 {{echo|1<!-- should be ignored --> = foo}}
2731 {{echo|<!-- should be ignored -->1 = foo}}
2733 <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>
2735 <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>
2737 <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>
2739 <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>
2743 Templates: Other wikitext in parameter names (bug 67657)
2747 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2753 #--------------------------------------------------------------------
2754 # Transclusion parameter escaping tests
2755 #--------------------------------------------------------------------
2757 Templates: Parsoid parameter escaping test 1
2759 {{echo|[foo]|{{echo|[bar]}}}}
2763 <p about="#mwt1" typeof="mw:Transclusion"
2764 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2768 Parsoid: Pipes in external links in template parameter
2770 {{echo|[{{echo|http://example.com}} link]}}
2772 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2774 <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>
2778 Parsoid: pipe in transclusion parameter
2780 {{echo|http://foo.com/a|b}}
2782 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2784 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2785 typeof="mw:Transclusion"
2786 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>
2790 Parsoid: Pipe in external link target and content in template parameter
2792 parsoid=html2wt,wt2wt
2794 {{echo|[http://foo.com/a|b a|b]}}
2796 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2798 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2799 typeof="mw:Transclusion"
2800 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2801 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2805 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2809 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2811 <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>
2815 Templates: Don't escape already nowiki-escaped text in template parameters
2817 parsoid=html2wt,wt2wt
2819 {{echo|foo<nowiki>|</nowiki>bar}}
2820 {{echo|<nowiki><div></nowiki>}}
2821 {{echo|<nowiki></nowiki>}}
2823 <p>foo|bar <div></p>
2825 <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>
2826 <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>
2827 <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>
2833 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2835 parsoid=html2wt,wt2wt
2837 {{echo|{{echo|1=bar}}}}
2841 <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>
2846 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2852 <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>
2857 Templates: Preserve blank parameter names
2863 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2867 Templates: Preserve blank parameter names in other positions
2869 {{blank_param|bar|=foo}}
2873 <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
2878 ### Parsoid-centric tests for testing RT edge cases for pre
2882 1a. Indent-Pre and Comments
2895 1b. Indent-Pre and Comments
2908 1c. Indent-Pre and Comments
2921 1d. Indent-Pre and Comments
2922 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2935 2a. Indent-Pre and tables
2956 2b. Indent-Pre and tables
2972 2c. Indent-Pre and tables (bug 42252)
2989 2d. Indent-Pre and tables
3006 <tbody><tr><td> b</td></tr>
3011 2e. Indent-Pre and table-line syntax
3024 2f. Indent-pre started by table-line syntax
3043 3a. Indent-Pre and block tags (single-line html)
3047 c <blockquote> foo </blockquote>
3052 c <blockquote> foo </blockquote>
3053 <pre><span> foo </span>
3056 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3057 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3058 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3059 <pre><span> foo </span>
3076 3b. Indent-Pre and block tags (multi-line html)
3081 <pre>a <span>foo</span>
3086 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3087 b <div data-parsoid='{"stx":"html"}'> foo </div>
3097 3c. Indent-Pre and block tags (pre-content on separate line)
3161 4. Indent-Pre and extension tags
3167 a <ul class="gallery mw-gallery-traditional">
3168 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3169 <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>
3170 <div class="gallerytext">
3177 <ul class="gallery mw-gallery-traditional">
3178 <li class="gallerybox" style="width: 155px">
3179 <div style="width: 155px">
3180 <div class="thumb" style="width: 150px;">
3181 <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>
3183 <div class="gallerytext"></div>
3190 Table wikitext syntax outside wiki-tables
3193 ! not a table heading
3196 | class="foo bar" | baz
3203 ! not a table heading
3206 | class="foo bar" | baz
3215 Render paragraphs when indent-pre is suppressed in blocklevels
3232 4. Multiple spaces at start-of-line
3250 ## NOTE: the leading white-space chars on empty line are significant
3252 5a. White-space in indent-pre
3264 ## NOTE: the leading white-space chars on empty line are significant
3266 5b. White-space in indent-pre
3285 5c. White-space in indent-pre
3298 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3321 7a. Indent-pre and category links
3323 parsoid=wt2html,wt2wt
3325 [[Category:foo]] <!-- No pre-wrapping -->
3326 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3329 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3330 <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 ## We used to, but no longer wt2wt this test since the default serializer
3334 ## will normalize all categories to serialize on their own line.
3335 ## This wikitext usage is going to be fairly uncommon in production and
3336 ## selser will take care of preserving formatting in those scenarios.
3338 7b. Indent-pre and category links
3343 [[Category:foo]] {{echo|b}}
3345 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3346 <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>
3350 Indent-Pre: Newlines in comments shouldn't affect sol state
3364 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3368 HTML-pre: 1. embedded newlines
3403 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3405 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3409 <pre data-parsoid='{"stx":"html"}'>
3414 <pre data-parsoid='{"stx":"html"}'>
3422 HTML-pre: big spaces
3458 <pre data-parsoid='{"stx":"html"}'>
3477 HTML-pre: 2: indented text
3490 HTML-pre: 3: other wikitext
3509 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3518 ### Definition lists
3525 <dl><dt> name </dt>
3526 <dd> Definition</dd></dl>
3531 Definition list for indentation only
3535 <dl><dd> Indented text</dd></dl>
3540 Definition list with no space
3545 <dd>Definition</dd></dl>
3550 Definition list with URL link
3552 ; http://example.com/ : definition
3554 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3555 <dd> definition</dd></dl>
3560 Definition list with bracketed URL link
3562 ;[http://www.example.com/ Example]:Something about it
3564 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3565 <dd>Something about it</dd></dl>
3570 Definition list with wikilink containing colon
3572 ; [[Help:FAQ]]: The least-read page on Wikipedia
3574 <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>
3575 <dd> The least-read page on Wikipedia</dd></dl>
3579 # At Brion's and JeLuF's insistence... :)
3581 Definition list with news link containing colon
3583 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3585 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3586 <dd> This isn't even a real newsgroup!</dd></dl>
3589 <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>
3593 Malformed definition list with colon
3595 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3597 <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>
3602 Definition lists: colon in external link text
3604 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3606 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3607 <dd> OK, I made that up</dd></dl>
3612 Definition lists: colon in HTML attribute
3614 ;<b style="display: inline">bold</b>
3616 <dl><dt><b style="display: inline">bold</b></dt></dl>
3621 Definition lists: self-closed tag
3623 ;one<br/>two : two-line fun
3625 <dl><dt>one<br />two </dt>
3626 <dd> two-line fun</dd></dl>
3631 Bug 11748: Literal closing tags
3635 <dd>test test test test test</dd>
3637 <dd>test test test test test</dd>
3642 <dd>test test test test test</dd>
3644 <dd>test test test test test</dd>
3650 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3653 ; term : description
3658 <dl><dt> term </dt>
3659 <dd> description</dd></dl>
3660 <ul><li> unordered</li></ul>
3667 Definition list with empty definition and following paragraph
3679 Nested definition lists using html syntax
3688 Definition Lists: No nesting: Multiple dd's
3701 Definition Lists: Indentation: Regular
3709 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3714 Definition Lists: Indentation: Missing 1st level
3720 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3725 Definition Lists: Indentation: Multi-level indent
3729 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3734 Definition Lists: Hacky use to indent tables
3741 should be left alone
3743 <dl><dd><dl><dd><table>
3748 </td></tr></table></dd></dl></dd></dl>
3750 should be left alone
3755 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3763 should be left alone
3766 <dl><dd><dl><dd><table><tr>
3769 </tr></table><!-- bar --></dd></dl></dd></dl>
3771 should be left alone</p>
3775 Definition Lists: Hacky use to indent tables, with comment before table
3781 <dl><dd><dl><dd><!-- foo --><table><tr>
3783 </tr></table></dd></dl></dd></dl>
3786 # The trailing whitespace in this test is to catch a regression in
3787 # Parsoid after T54473.
3789 Definition Lists: Hacky use to indent tables (WS-insensitive)
3798 </td></tr></table></dd></dl>
3802 <tbody><tr><td>a</td></tr>
3803 </tbody></table> </dd></dl>
3806 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3807 ## as an empty dt item. It also ignores all but the last ";" when followed
3808 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3809 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3812 ## Ex: ";;t2 ::d2" is transformed into:
3824 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3825 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3836 ## All Parsoid only definition list tests have this difference.
3838 ## See also: https://phabricator.wikimedia.org/T8569
3839 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3842 Table / list interaction: indented table with lists in table contents
3857 <ul><li> b</li></ul>
3861 <ul><li> d</li></ul>
3862 </td></tr></table></dd></dl>
3867 Table / list interaction: lists nested in tables nested in indented lists
3890 </td></tr></table></dd></dl>
3897 Definition Lists: Nesting: Multi-level (Parsoid only)
3927 Definition Lists: Nesting: Test 2 (Parsoid only)
3954 Definition Lists: Nesting: Test 3 (Parsoid only)
3997 Definition Lists: Nesting: Test 4
4002 <dl><dd><dl><dd><dl><dt>t3</dt>
4003 <dd>d3</dd></dl></dd></dl></dd></dl>
4008 ## The Parsoid team believes the following three test exposes a
4009 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4010 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4011 ## It also exposes a "misfeature" in tidy, which doesn't like
4012 ## <dl> tags with a single <dt> child; it converts the <dt> into
4013 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4015 Definition Lists: Mixed Lists: Test 1
4021 <dl><dd><dl><dt><ul><li> foo</li>
4022 <li> bar</li></ul></dt></dl>
4023 <dl><dt> baz</dt></dl></dd></dl>
4058 Definition Lists: Mixed Lists: Test 2
4063 <ul><li><dl><dd> d1</dd>
4064 <dd> d2</dd></dl></li></ul>
4070 Definition Lists: Mixed Lists: Test 3
4075 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4076 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4082 Definition Lists: Mixed Lists: Test 4
4087 <ul><li><dl><dt>d1 </dt>
4090 <dd>d4</dd></dl></li></ul>
4096 Definition Lists: Mixed Lists: Test 5
4102 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4108 Definition Lists: Mixed Lists: Test 6
4113 <ol><li><ul><li><dl><dd>d1
4114 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4120 Definition Lists: Mixed Lists: Test 7
4125 <dl><dd><ul><li> d1</li>
4126 <li> d2</li></ul></dd></dl>
4132 Definition Lists: Mixed Lists: Test 8
4137 <dl><dd><ul><li> d1</li></ul>
4138 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4144 Definition Lists: Mixed Lists: Test 9
4148 <ul><li><dl><dt>foo </dt>
4149 <dd>bar</dd></dl></li></ul>
4155 Definition Lists: Mixed Lists: Test 10
4159 <ul><li><ol><li><dl><dt>foo </dt>
4160 <dd>bar</dd></dl></li></ol></li></ul>
4164 # The Parsoid team disagrees with the PHP parser's seemingly-random
4165 # rules regarding dd/dt on the next two tests. Parsoid is more
4166 # consistent, and recognizes the shared nesting and keeps the
4167 # still-open tags around until the nesting is complete.
4168 # (And tidy again converts <dt> to <dd> before 'bar'.)
4171 Definition Lists: Mixed Lists: Test 11
4176 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4177 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4178 <dl><dt>boo </dt>
4179 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4234 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4235 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4239 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4240 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4249 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4251 # * The test is wrong, there are two colons where there should be :;
4252 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4254 Definition Lists: Weird Ones: Test 1
4256 *#;*::;; foo : bar (who uses this?)
4258 <ul><li><ol><li><dl><dt> foo </dt>
4259 <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>
4278 <dt>bar (who uses this?)</dt>
4310 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4311 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4323 Definition Lists: colons occurring in tags
4341 <dt><span>a:b</span></dt>
4368 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4370 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4371 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4372 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4373 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4375 <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>
4376 <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>
4377 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4381 Definition Lists: colons and tables 1
4393 </td></tr></table></dd></dl>
4397 </td></tr></table></dd></dl>
4401 # Parsoid's output (as documented below) differs from php's in this case.
4402 # This is probably a bug. If we fixup parsoid to match php's output, the
4403 # above test should pass and the below test case can be removed. It is
4404 # unclear which output is more desirable.
4407 Definition Lists: colons and tables 2
4419 </td></tr></table></dd>
4423 </td></tr></table></dd></dl>
4427 Definition Lists: template interaction
4429 ::{{definition_list}}
4432 ::{{definition_list}}
4437 <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">
4438 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4440 <dl><dd data-parsoid='{}'>one
4441 <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">
4442 </span><dd about="#mwt2">two
4444 <dd>three</dd></dl></dd>
4445 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4453 External links: non-bracketed
4455 Non-bracketed: http://example.com
4457 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4461 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4463 External links: numbered
4465 Numbered: [http://example.com]
4466 Numbered: [http://example.net]
4467 Numbered: [http://example.com]
4469 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4470 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4471 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4474 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4475 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4476 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4480 External links: specified text
4482 Specified text: [http://example.com link]
4484 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4489 External links: trail
4491 Linktrails should not work for external links: [http://example.com link]s
4493 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4498 External links: dollar sign in URL
4500 http://example.com/1$2345
4502 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4506 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4508 External links: dollar sign in URL (autonumber)
4510 [http://example.com/1$2345]
4512 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4515 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4519 External links: open square bracket forbidden in URL (bug 4377)
4521 parsoid=wt2html,wt2wt,html2html
4523 http://example.com/1[2345
4525 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4528 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4532 External links: open square bracket forbidden in URL (named) (bug 4377)
4534 parsoid=wt2html,html2html
4536 [http://example.com/1[2345]
4538 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4541 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4544 # parsoid adds a space before the link name
4546 External links: open square bracket forbidden in URL (named) (bug 4377)
4549 [http://example.com/1 [2345]
4551 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4556 External links: nowiki in URL link text (bug 6230)
4558 [http://example.com/ <nowiki>''example site''</nowiki>]
4560 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4565 External links: newline forbidden in text (bug 6230 regression check)
4567 [http://example.com/ first
4570 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4576 External links: Pipe char between url and text
4578 [http://example.com | link]
4580 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4585 External links: protocol-relative URL in brackets
4587 [//example.com/ Test]
4589 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4593 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4595 External links: protocol-relative URL in brackets without text
4599 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4602 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4606 External links: protocol-relative URL in free text is left alone
4610 <p>//example.com/Foo
4615 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4617 foo//example.com/Foo
4619 <p>foo//example.com/Foo
4624 External links: with no contents
4626 [http://en.wikipedia.org/wiki/Foo]
4628 [[wikipedia:Foo|Bar]]
4630 [[wikipedia:Foo|<span>Bar</span>]]
4632 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4633 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4634 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4637 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4638 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4639 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4643 External links: Free with trailing punctuation
4653 http://example.com/url_with_(brackets)
4654 (http://example.com/url_without_brackets)
4655 http://example.com/url_with_entity&
4656 http://example.com/url_with_entity&
4657 http://example.com/url_with_entity&
4658 http://example.com/url_with_entity
4659 http://example.com/url_with_entity 
4660 http://example.com/url_with_entity 
4661 http://example.com/url_with_entity<
4662 http://example.com/url_with_entity<
4663 http://example.com/url_with_entity<
4665 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4666 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4667 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4668 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4669 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4670 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4671 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4672 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4673 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4674 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4675 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4676 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4677 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4678 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4679 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4680 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4681 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4682 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4683 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4686 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4687 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4688 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4689 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4690 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4691 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4692 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4693 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4694 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4695 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4696 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4697 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4698 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
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":"&nbsp;","srcContent":" "}'> </span>
4700 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
4701 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4702 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4703 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4704 <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>
4708 External links: tricky Parsoid html2html case
4710 parsoid=wt2html,wt2wt,html2html
4712 http://example.com/url_with_entity&amp;
4714 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4717 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4721 External links: Free with trailing quotes (T113666)
4723 '''News:''' Stuff here
4727 <p><b>News:</b> Stuff here
4728 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4731 <p><b>News:</b> Stuff here</p>
4732 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4736 External links: Lone protocols are never linked (T105697)
4755 External links: No preceding word characters allowed (bug 65278)
4757 NOPEhttp://example.com
4758 N0http://example.com
4759 ok:http://example.com
4760 ok-http://example.com
4762 <p>NOPEhttp://example.com
4763 N0http://example.com
4764 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4765 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4772 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4774 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4779 External image from https
4781 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4783 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4788 External image (when not allowed)
4790 wgAllowExternalImages=0
4792 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4794 <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>
4799 Link to non-http image, no img tag
4801 Link to non-http image, no img tag: ftp://example.com/test.jpg
4803 <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>
4808 External links: terminating separator
4810 Terminating separator: http://example.com/thing,
4812 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4817 External links: intervening separator
4819 Intervening separator: http://example.com/1,2,3
4821 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4826 External links: old bug with URL in query
4828 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4830 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4835 External links: old URL-in-URL bug, mixed protocols
4837 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4839 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4844 External links: URL in text
4846 URL in text: [http://example.com http://example.com]
4848 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4853 External links: Clickable images
4855 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4857 <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>
4860 <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>
4864 External links: raw ampersand
4866 Old & use: http://x&y
4868 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4873 External links: encoded ampersand
4875 Old & use: http://x&y
4877 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4880 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4884 External links: encoded equals (bug 6102)
4886 http://example.com/?foo=bar
4888 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4891 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4895 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4896 ## does it number them. As discussed in bug 53505, we can identify
4897 ## autonumbered links via CSS.
4901 External links: [raw ampersand]
4903 Old & use: [http://x&y]
4905 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4908 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4911 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4912 # mode will return the [raw ampersand] wikitext
4914 External links: [encoded ampersand]
4916 parsoid=wt2html,wt2wt,html2html
4918 Old & use: [http://x&y]
4920 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4923 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4927 External links: [raw equals]
4929 [http://example.com/?foo=bar]
4931 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4934 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4937 # note that parsoid html is identical to [raw equals] case; so html2wt
4938 # mode will return the [raw equals] wikitext
4940 External links: [encoded equals] (bug 6102)
4942 parsoid=wt2html,wt2wt,html2html
4944 [http://example.com/?foo=bar]
4946 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4949 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4952 # xxx parsoid strips the IDN character, so the round-trip tests will
4953 # obviously fail and are disabled. --cscott
4955 External links: [IDN ignored character reference in hostname; strip it right off]
4957 parsoid=wt2html,wt2wt,html2html
4959 [http://e‌xample.com/]
4961 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4964 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4967 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4968 # Where an external link could easily circumvent the sanitization of the text of
4969 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4970 # test demands a higher standard. That's a bit strange.
4974 # http://example.com -> [http://example.com|http://example.com]
4975 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4977 # The first example is sanitized, but the second is not. Any security benefits
4978 # from this production are trivial to circumvent. Either remove this test and
4979 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4980 # the test accordingly.
4984 # xxx parsoid strips the IDN character, so the round-trip tests will
4985 # obviously fail and are disabled. --cscott
4987 External links: IDN ignored character reference in hostname; strip it right off
4989 parsoid=wt2html,html2html
4991 http://e‌xample.com/
4993 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4996 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5000 External links: www.jpeg.org (bug 554)
5004 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5008 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5010 External links: URL within URL (original bug 2)
5012 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5014 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5017 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5021 BUG 361: URL inside bracketed URL
5023 [http://www.example.com/foo http://www.example.com/bar]
5025 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5030 BUG 361: URL within URL, not bracketed
5032 http://www.example.com/foo?=http://www.example.com/bar
5034 <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>
5039 BUG 289: ">"-token in URL-tail
5041 http://www.example.com/<hello>
5043 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5048 BUG 289: literal ">"-token in URL-tail
5050 http://www.example.com/<b>html</b>
5052 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5055 <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>
5059 BUG 289: ">"-token in bracketed URL
5061 [http://www.example.com/<hello> stuff]
5063 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5068 BUG 289: literal ">"-token in bracketed URL
5070 [http://www.example.com/<b>html</b> stuff]
5072 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5077 BUG 289: literal double quote at end of URL
5079 http://www.example.com/"hello"
5081 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5086 BUG 289: literal double quote in bracketed URL
5088 [http://www.example.com/"hello" stuff]
5090 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5095 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5097 [http://www.example.com test]
5099 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5104 External links: link text with spaces
5106 [http://www.example.com a b c]
5107 [http://www.example.com ''a'' ''b'']
5109 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5110 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5115 External links: wiki links within external link (Bug 3695)
5117 parsoid=wt2html,html2html
5119 [http://example.com [[wikilink]] embedded in ext link]
5121 <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>
5124 <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>
5128 BUG 787: Links with one slash after the url protocol are invalid
5132 [http:/example.com title]
5134 <p>http:/example.com
5135 </p><p>[http:/example.com title]
5140 Bracketed external links with template-generated invalid target
5142 [{{echo|http:/example.com}} title]
5144 <p>[http:/example.com title]
5149 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5151 ''[http://example.com text'']
5152 [http://example.com '''text]'''
5153 ''Something [http://example.com in italic'']
5154 ''Something [http://example.com mixed''''', even bold]'''
5155 '''''Now [http://example.com both''''']
5157 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5158 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5159 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5160 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5161 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5167 Bug 4781: %26 in URL
5169 http://www.example.com/?title=AT%26T
5171 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5174 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5177 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5178 # % is actually legal in HTML5. Any change in output would need testing though.
5180 Bug 4781, 5267: %25 in URL
5182 http://www.example.com/?title=100%25_Bran
5184 <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>
5187 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5191 Bug 4781, 5267: %28, %29 in URL
5193 http://www.example.com/?title=Ben-Hur_%281959_film%29
5195 <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>
5198 <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>
5203 Bug 4781: %26 in autonumber URL
5205 [http://www.example.com/?title=AT%26T]
5207 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5210 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5214 Bug 4781, 5267: %26 in autonumber URL
5216 [http://www.example.com/?title=100%25_Bran]
5218 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5221 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5225 Bug 4781, 5267: %28, %29 in autonumber URL
5227 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5229 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5232 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5237 Bug 4781: %26 in bracketed URL
5239 [http://www.example.com/?title=AT%26T link]
5241 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5244 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5248 Bug 4781, 5267: %25 in bracketed URL
5250 [http://www.example.com/?title=100%25_Bran link]
5252 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5257 Bug 4781, 5267: %28, %29 in bracketed URL
5259 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5261 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5264 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5268 External link containing a period in the anchor. (bug 63947)
5270 [//foo.org/bar#baz. bang]
5272 [//foo.org/bar. bang]
5274 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5275 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5278 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5279 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5283 External link containing a single quote. (bug 63947)
5287 [//foo.org/bar'baz bang]
5289 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5290 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5293 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5294 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5298 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5300 Some [http://example.com/ pretty ''italics'' and stuff]!
5302 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5307 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5309 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5311 <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>
5316 External link containing double-single-quotes with no space separating the url from text in italics
5318 [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]].]
5320 <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>
5323 <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>
5325 <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>
5329 External link with comments in link text
5331 [http://www.google.com Google <!-- comment -->]
5333 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5336 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5340 External link to bare IPv4 address
5342 [http://192.168.0.1 Link]
5344 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5347 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5351 URL-encoding in URL functions (single parameter)
5353 {{localurl:Some page|amp=&}}
5355 <p>/index.php?title=Some_page&amp=&
5360 URL-encoding in URL functions (multiple parameters)
5362 {{localurl:Some page|q=?&=&}}
5364 <p>/index.php?title=Some_page&q=?&amp=&
5371 http://example.com/index.php?foozoid%5B%5D=bar
5373 http://example.com/index.php?foozoid[]=bar
5375 <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>
5376 </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>
5379 <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>
5381 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5385 IPv6 urls, autolink format (T23261)
5387 http://[2404:130:0:1000::187:2]/index.php
5389 Examples from RFC 2373, section 2.2:
5390 * http://[1080::8:800:200C:417A]/unicast
5391 * http://[FF01::101]/multicast
5392 * http://[::1]/loopback
5393 * http://[::]/unspecified
5394 * http://[::13.1.68.3]/ipv4compat
5395 * http://[::FFFF:129.144.52.38]/ipv4compat
5397 Examples from RFC 2732, section 2:
5398 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5399 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5400 * http://[3ffe:2a00:100:7031::1]
5401 * http://[1080::8:800:200C:417A]/foo
5402 * http://[::192.9.5.5]/ipng
5403 * http://[::FFFF:129.144.52.38]:80/index.html
5404 * http://[2010:836B:4179::836B:4179]
5407 <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>
5408 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5410 <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>
5411 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5412 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5413 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5414 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5415 <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>
5416 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5418 <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>
5419 <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>
5420 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5421 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5422 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5423 <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>
5424 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5427 <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>
5429 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5430 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5431 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5432 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5433 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5434 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5435 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5437 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5438 <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>
5439 <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>
5440 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5441 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5442 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5443 <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>
5444 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5448 IPv6 urls, bracketed format (T23261)
5450 [http://[2404:130:0:1000::187:2]/index.php test]
5452 Examples from RFC 2373, section 2.2:
5453 * [http://[1080::8:800:200C:417A] unicast]
5454 * [http://[FF01::101] multicast]
5455 * [http://[::1]/ loopback]
5456 * [http://[::] unspecified]
5457 * [http://[::13.1.68.3] ipv4compat]
5458 * [http://[::FFFF:129.144.52.38] ipv4compat]
5460 Examples from RFC 2732, section 2:
5461 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5462 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5463 * [http://[3ffe:2a00:100:7031::1] 3]
5464 * [http://[1080::8:800:200C:417A]/foo 4]
5465 * [http://[::192.9.5.5]/ipng 5]
5466 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5467 * [http://[2010:836B:4179::836B:4179] 7]
5470 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5471 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5473 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5474 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5475 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5476 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5477 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5478 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5479 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5481 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5482 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5483 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5484 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5485 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5486 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5487 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5490 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5492 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5493 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5494 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5495 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5496 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5497 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5498 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5500 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5501 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5502 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5503 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5504 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5505 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5506 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5507 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5511 Non-extlinks in brackets
5520 [{{echo|foo}} ''bar'']
5521 [{{echo|foo}}l's] errand
5522 [{{echo|foo}}l's errand]
5524 [url=http://example.com]
5525 [http:// bare protocols don't count]
5538 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5539 [http:// bare protocols don't count]
5547 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5548 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5549 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5550 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5551 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5552 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5553 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5554 [http:// bare protocols don't count]</p>
5558 Percent encoding in external links
5560 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5562 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5565 <p><a rel="mw:ExtLink"
5566 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5570 Use url link syntax for links where the content is equal the link target
5574 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5577 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5581 Parenthesis in external links, especially URL links
5585 http://example.com/test)
5587 http://example.com/(test)
5589 http://example.com/((test)
5591 (http://example.com/(test))
5593 (http://example.com/(test)))))
5595 http://example.com/a)b
5597 [http://example.com) foo]
5599 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5600 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5601 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5602 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5603 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5604 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5605 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5606 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5609 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5610 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5611 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5612 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5613 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5614 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5615 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5616 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5620 Parenthesis in external links, w/ transclusion or comment
5622 (http://example.com/{{echo|hi}})
5624 (http://example.com<!-- hi -->)
5626 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5627 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5630 <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>
5632 <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>
5636 Serialize <a> tags with invalid link targets as plain text
5638 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5640 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5641 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5642 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5643 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5646 <nowiki>*</nowiki>text
5647 <nowiki>[[foo]]</nowiki>
5648 <nowiki>*a [[foo]]</nowiki>
5652 mw:ExtLink -vs- mw:WikiLink (T94723)
5656 <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>
5657 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5658 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5659 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5661 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5662 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5667 [[wikipedia:Foo|Bar]]
5668 [[wikipedia:Foo|Bar]]
5670 [[wikipedia:European_Robin|European Robin]]
5671 [[wikipedia:European_Robin|European Robin]]
5675 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5679 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5681 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5692 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5694 Normal text. '''''Bold italic text.''''' Normal text.
5696 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5697 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5702 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5703 # parser strips. The wikitext contains just the first half of the bold
5706 Unclosed and unmatched quotes
5708 '''''Bold italic text '''with bold deactivated''' in between.'''''
5710 '''''Bold italic text ''with italic deactivated'' in between.'''''
5714 ..spanning two paragraphs (should not work).'''
5716 '''Bold tag left open
5718 ''Italic tag left open
5722 <!-- Unmatching number of opening, closing tags: -->
5723 '''This year''''s election ''should'' beat '''last year''''s.
5725 ''Tom'''s car is bigger than ''Susan'''s.
5727 Plain ''italic'''s plain
5729 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5730 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5731 </p><p><b>Bold text..</b>
5732 </p><p>..spanning two paragraphs (should not work).
5733 </p><p><b>Bold tag left open</b>
5734 </p><p><i>Italic tag left open</i>
5736 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5737 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5738 </p><p>Plain <i>italic'</i>s plain
5741 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5742 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5743 </p><p><b>Bold text..</b>
5744 </p><p>..spanning two paragraphs (should not work).<b></b>
5745 </p><p><b>Bold tag left open</b>
5746 </p><p><i>Italic tag left open</i>
5749 <!-- Unmatching number of opening, closing tags: -->
5750 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5751 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5752 </p><p>Plain <i>italic'</i>s plain
5759 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5762 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5763 # is the bare minimum required by the spec, see:
5764 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5765 # Parsoid team replies: empty table tags are legal in HTML5
5767 A table with no data.
5780 A table with stray table end tags on start tag line (wt2html)
5784 {|style="color: red;"|}
5786 {|style="color: red;" |}
5790 {|style="color: red;"|} id="foo"
5794 {|style="color: red;" |} id="foo"
5798 <table style="color: red;"></table>
5800 <table style="color: red;">
5806 <table style="color: red;" id="foo">
5812 <table style="color: red;" id="foo">
5821 A table with no data (take 2)
5829 # A table with nothing but a caption is invalid XHTML, we might want to render
5830 # this as <p>caption</p>
5831 # Parsoid team replies: table with only a caption is legal in HTML5
5833 A table with nothing but a caption
5841 </caption><tr><td></td></tr></table>
5844 <table><caption> caption</caption></table>
5848 A table with caption with default-spaced attributes and a table row
5851 |+ style="color: red;" | caption1
5857 <caption style="color: red;"> caption1
5866 A table with captions with non-default spaced attributes and a table row
5869 |+style="color: red;"|caption2
5870 |+ style="color: red;"| caption3
5876 <caption style="color: red;">caption2
5878 <caption style="color: red;"> caption3
5887 Table td-cell syntax variations
5891 | foo bar foo || baz
5892 | style='color:red;' | baz
5893 | style='color:red;' || baz
5900 <td> foo bar foo </td>
5903 <td style="color:red;"> baz
5905 <td> style='color:red;' </td>
5933 Simple table but with multiple dashes for row wikitext
5952 Multiplication table
5954 {| border="1" cellpadding="2"
5955 |+Multiplication table
5957 ! × !! 1 !! 2 !! 3
5975 <table border="1" cellpadding="2">
5976 <caption>Multiplication table
6023 Accept "||" in table headings
6038 Accept "!!" in table data
6052 <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>
6057 Accept "||" in indented table headings
6067 </th></tr></table></dd></dl>
6072 Accept "!!" in templates
6086 <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>
6090 Accept "!!" in table headings after newline
6107 <p>b!!c</p></th></tr>
6112 Accept "!!" in table data of mixed wikitext / html syntax
6116 <tr><td>b!!c</td></tr>
6129 <tbody><tr><th>a</th></tr>
6130 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6135 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6152 Accept "| !" at start of line in tables (ignore !-attribute)
6156 | !style="color:red" | bar
6168 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 +/-
6172 |style='color:red;'|+1
6173 |style='color:blue;'|-1
6185 <td style="color:red;">+1
6187 <td style="color:blue;">-1
6211 |rowspan=2| Cell 2, row 1 (and 2)
6222 <td rowspan="2"> Cell 2, row 1 (and 2)
6240 {| bgcolor=#ABCDEF border=2
6245 |the original table again
6253 <table bgcolor="#ABCDEF" border="2">
6261 <td>the original table again
6267 Invalid attributes in table cell (bug 1830)
6281 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6285 | title="foo<nowiki>|</nowiki>" |bar
6286 | title="foo<nowiki>|</nowiki>" bar
6293 <td title="foo|">bar
6295 <td> title="foo|" bar
6300 <tbody><tr><td title="foo">bar</td>
6301 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6302 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6306 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6307 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6308 # *2wt modes will fail.
6310 Table security: embedded pipes
6312 parsoid=wt2html,html2html
6315 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6319 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6320 <td>]" onmouseover="alert(document.cookie)">test
6328 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6331 # FIXME: The output seems broken. Filed as T110268.
6333 ! and || in td attributes should not be parsed as <th>/<td>
6338 | style="color: red !important;" data-contrived="put this here ||" | foo
6343 <td> style="color: red !important;" data-contrived="put this here </td>
6349 <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>
6354 Indented table markup mixed with indented pre content (proposed in bug 6200)
6359 Text that should be rendered preformatted
6367 <pre>Text that should be rendered preformatted
6376 1. Template-generated table cell attributes and cell content
6381 || {{table_attribs_5}}
6382 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6383 |align=center {{table_attribs}}
6384 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6389 <td style="color:red;">Foo
6391 <td style="color:red;">Foo
6393 <td> style="color:red;"</td>
6396 <td style="color:red;">Foo
6398 <td align="center" style="color:red;">Foo
6400 <td align="center" style="color:red;">Foo
6406 2. Template-generated table cell attributes and cell content
6409 |{{table_attribs_2}}
6414 <td style="color:red;">Foo
6422 <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>
6423 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6428 3. Template-generated table cell attributes and cell content
6431 !align=center {{table_header_cells}}
6433 |align=center {{table_cells}}
6438 <th align="center" style="color:red;">Foo</th>
6439 <th style="color:red;"><i>Bar</i></th>
6440 <th style="color:brown;"><i>Foo</i> and Baz
6443 <td align="center" style="color:red;">Foo</td>
6444 <td style="color:red;"><i>Bar</i></td>
6445 <td style="color:brown;"><i>Foo</i> and Baz
6450 <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>
6451 <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>
6456 4. Template-generated table cell attributes and cell content inside a templated table
6459 !align=center {{table_header_cells}}
6461 |align=center {{table_cells}}
6466 <th align="center" style="color:red;">Foo</th>
6467 <th style="color:red;"><i>Bar</i></th>
6468 <th style="color:brown;"><i>Foo</i> and Baz
6471 <td align="center" style="color:red;">Foo</td>
6472 <td style="color:red;"><i>Bar</i></td>
6473 <td style="color:brown;"><i>Foo</i> and Baz
6477 <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}}]}'>
6478 <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>
6480 <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>
6484 ## Edge case fix to prevent future regressions
6486 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6489 |{{table_attribs_7}}
6494 <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>
6496 <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>
6500 Table with row followed by newlines and table heading
6518 Table with empty line following the start tag
6535 # FIXME: Preserve the attribute properly (with an empty string as value) in
6536 # the PHP parser. Parsoid implements the behavior below.
6538 Table attributes with empty value
6548 </td></tr></tbody></table>
6553 Wikitext table with a lot of comments
6576 Wikitext table comments represented in parsoid dom
6578 {|<!--c1--><!--c2-->
6589 <table><!--c1--><!--c2-->
6590 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6591 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6596 Wikitext table with double-line table cell
6613 Table cell with a single comment
6630 Table-cell after a comment-only-empty-line
6647 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6649 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6655 Build table with {{!}}
6657 {{{!}} class="wikitable"
6660 {{!}}- style="color:red;"
6661 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6664 <table class="wikitable">
6670 <tr style="color:red;">
6672 <td style="color:red;"> second data
6678 Build table with pipe as data
6680 {| class="wikitable"
6683 |- style="color:red;"
6684 | data || style="color:red;" | second data
6686 | style="color:red;" | data with | || style="color:red;" | second data with |
6688 || data with | ||| second data with |
6691 <table class="wikitable">
6697 <tr style="color:red;">
6699 <td style="color:red;"> second data
6702 <td style="color:red;"> data with | </td>
6703 <td style="color:red;"> second data with |
6706 <td> data with | </td>
6707 <td> second data with |
6713 Build table with wikilink
6715 {| class="wikitable"
6716 ! header || second header
6717 |- style="color:red;"
6718 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6720 | data || second data [[Main Page|link|text with pipe]]
6723 <table class="wikitable">
6728 <tr style="color:red;">
6729 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6730 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6734 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6739 # The expected HTML structure in this test is debatable. The PHP parser does
6740 # not parse this kind of table at all. The main focus for Parsoid is on
6741 # round-tripping, so this output is ok for now. TODO: revisit!
6743 Wikitext table with html-syntax row
6753 <td>foo</td></tr></tbody></table>
6756 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6757 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6758 ## PHP parser, which tidy then compounds by fostering the content
6759 ## entirely out of the table. Parsoid recognizes the table context
6760 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6761 ## depends on PHP's treatment of broken table markup!
6763 Implicit <td> after a |-
6765 parsoid=wt2html,html2html
6785 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6787 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6789 parsoid=wt2html,html2html
6822 <tr><td><pre>a</pre></td></tr>
6823 <tr><td> b</td></tr>
6828 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6829 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6831 Lists should be recognized in an implicit <td> context
6833 parsoid=wt2html,html2html
6860 Table cells not properly parsed in an implicit-td context
6864 {{table_attribs_4}} || a || b
6869 <td style="background-color:#DC241f;" width="10px"></td>
6876 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6877 <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>
6882 Parsoid: Round-trip tables directly followed by content (bug 51219)
6884 parsoid=wt2html,wt2wt
6909 Parsoid: Default to a newline after tables in new content (bug 51219)
6914 <tr><td>foo</td></tr></tbody></table> bar
6916 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6921 <nowiki> </nowiki>bar
6929 Parsoid: newline inducing block nodes don't suppress <nowiki>
6941 Parsoid: Row-syntax table headings followed by comment & table cells
6943 parsoid=wt2html,wt2wt
6947 <!-- foo --> || baz || quux
6961 <tbody><tr><th> foo </th><th> bar
6962 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6967 Parsoid: Recover better from broken table attributes
6987 <p>foo</p></td></tr>
6992 Tables: Digest broken attributes on table and tr tag
7009 Strip unsupported table tags
7057 Testing serialization after deletion of table cells
7060 "modes": ["wt2wt", "selser"],
7068 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7081 Plain link, capitalized
7085 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7090 Plain link, uncapitalized
7094 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7101 [[Main Page|The Main Page]]
7103 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7108 Piped link with comment in link text
7110 [[Main Page|The Main<!--front--> Page]]
7112 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7117 Piped link with multiple pipe characters in link text
7119 [[Main Page||The|Main|Page|]]
7121 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7124 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7132 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7137 Broken link with fragment
7139 [[Zigzagzogzagzig#zug]]
7141 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7146 Special page link with fragment
7148 [[Special:Version#anchor]]
7150 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7155 Nonexistent special page link with fragment
7157 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7159 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7166 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7168 <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>
7175 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7177 <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>!!!
7188 Bug 43661: Piped links with identical prefixes
7190 [[prefixed article|prefixed articles with spaces]]
7192 [[prefixed article|prefixed articlesaoeu]]
7194 [[Main Page|Main Page test]]
7196 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7197 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7198 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7204 Link with HTML entity in suffix / tail
7206 [[Main Page]]", [[Main Page]]a
7208 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7211 <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>
7215 Link with 3 brackets
7226 Link with 4 brackets
7230 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7235 Piped link with 3 brackets
7237 [[[main page|the main page]]]
7239 <p>[[[main page|the main page]]]
7244 Piped link with extlink-like text
7247 [[Main Page|This is a [bar]]]
7249 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7250 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7253 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7254 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7258 Link with multiple pipes
7260 [[Main Page|The|Main|Page]]
7262 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7266 # Note that parsoid does not munge anchor text; all non-space
7267 # characters are valid in HTML5 ids.
7269 Anchor containing a #. (bug 63430)
7271 [[Main Page#And#Link]]
7273 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7276 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7282 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7284 <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>
7289 Link with space in namespace
7291 [[User talk:Foo bar]]
7293 <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>
7298 MemoryAlpha:AlphaTest
7300 This is an article in the MemoryAlpha namespace
7301 (which shadows the memoryalpha interwiki link).
7305 Namespace takes precedence over interwiki link (bug 51680)
7307 [[MemoryAlpha:AlphaTest]]
7309 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7313 # The previous test doesn't work correctly in html2*, due to not recognizing the
7314 # link as an internal one. This one checks for the correct behavior.
7316 Link to namespace preferred over interwiki with correct rel attribute
7318 parsoid=html2wt,html2html
7320 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7322 [[MemoryAlpha:AlphaTest]]
7326 Piped link to namespace
7328 [[Meta:Disclaimers|The disclaimers]]
7330 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7337 [[Usually caused by a typo (oops}]]
7339 <p>[[Usually caused by a typo (oops}]]
7346 Just a test of an article title containing a percent.
7350 Link containing % (not as a hex sequence)
7354 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7357 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7360 # note that the parsoid HTML is identical to the previous test output,
7361 # so the previous test ensures that the html2wt mode will generate the
7362 # "not as a hex sequence" wikitext.
7364 Link containing % as a single hex sequence interpreted to char
7366 parsoid=wt2wt,wt2html,html2html
7370 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7373 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7377 Link containing % as a double hex sequence interpreted to hex sequence
7381 <p>[[7%2525 Solution]]
7385 # note that parsoid does not munge anchor text; all non-space
7386 # characters are valid in HTML5 anchors.
7388 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7389 Example for such a section: == < ==
7391 [[%23%3c]][[%23%3e]]
7393 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7396 <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>
7400 Link containing "<#" and ">#" as a hex sequences
7402 [[%3c%23]][[%3e%23]]
7404 <p>[[%3c%23]][[%3e%23]]
7409 Link containing an equals sign
7411 [[Special:BookSources/isbn=4-00-026157-6]]
7413 <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>
7416 <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>
7422 Just a test of an article title containing a tilde.
7425 # note that links containing signatures, like [[Foo~~~~]], are
7426 # massaged by the pre-save transform (PST) and so the tildes are never
7427 # seen by the parser.
7429 Link containing a tilde
7433 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7436 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7440 Link containing double-single-quotes '' (bug 4598)
7442 [[Lista d''e paise d''o munno]]
7444 <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>
7447 <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>
7451 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7453 Some [[Link|pretty ''italics'' and stuff]]!
7455 <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>!
7458 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7462 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7464 ''Some [[Link|pretty ''italics'' and stuff]]!''
7466 <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>
7471 Link with double quotes in title part (literal) and alternate part (interpreted)
7473 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7477 [[''Pentecoste''|Pentecoste]]
7479 [[''Pentecoste''|''Pentecoste'']]
7481 <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>
7482 </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>
7483 </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>
7484 </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>
7487 <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>
7488 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7489 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7490 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7494 Broken image links with HTML captions (bug 39700)
7496 [[File:Nonexistent|<script></script>]]
7497 [[File:Nonexistent|100x100px|<script></script>]]
7498 [[File:Nonexistent|<]]
7499 [[File:Nonexistent|a<i>b</i>c]]
7501 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7502 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7503 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7504 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7507 <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>
7508 <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>
7509 <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>
7510 <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>
7516 [[http://www.example.com]]
7518 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7521 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7525 Plain link to URL with link text
7527 [[http://www.example.com Link text]]
7529 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7534 Plain link to protocol-relative URL
7536 [[//www.example.com]]
7538 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7541 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7545 Plain link to protocol-relative URL with link text
7547 [[//www.example.com Link text]]
7549 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7554 Plain link to page with question mark in title
7560 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7561 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7566 # I'm fairly sure the expected result here is wrong.
7567 # We want these to be URL links, not pseudo-pages with URLs for titles....
7568 # However the current output is also pretty screwy.
7571 # I'm changing it to match the current output--it arguably makes more
7572 # sense in the light of the test above. Old expected result was:
7573 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7575 # But I think this test is bordering on "garbage in, garbage out" anyway.
7580 Piped link to URL: [[http://www.example.com|an example URL]]
7582 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7585 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7589 BUG 2: [[page|http://url/]] should link to page, not http://url/
7591 [[Main Page|http://url/]]
7593 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7596 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7599 # Parsoid does not mark self-links, by design.
7601 BUG 337: Escaped self-links should be bold
7605 [[Bug462]] [[Bug462]]
7607 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7610 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7612 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7616 Self-link to section should not be bold
7620 [[Main Page#section]]
7622 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7633 Self-link to numeric title
7639 <p><strong class="selflink">0</strong>
7644 Link to numeric-equivalent title
7650 <p><a href="/wiki/00" title="00">00</a>
7655 <nowiki> inside a link
7657 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7659 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7664 Non-breaking spaces in title
7666 [[ Main Page ]]
7668 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7673 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7679 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7684 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7690 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7695 Internal link with en linktrail: no apostrophes (bug 27473)
7701 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7706 Internal link with ca linktrail with apostrophes (bug 27473)
7712 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7717 Internal link with kaa linktrail with apostrophes (bug 27473)
7723 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7728 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7730 [[User:Foo/Test/63636:Bar|Test]]
7732 <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>
7735 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7739 Purely hash wikilink
7741 title=[[User:test/123]]
7745 <p><a href="#a">b</a>
7748 <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>
7752 1. Interaction of linktrail and template encapsulation
7758 <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>
7762 2. Interaction of linktrail and template encapsulation
7766 {{echo|Some [[Fool]]}}s
7768 <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>
7772 3. Interaction of linktrail and template encapsulation
7776 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7778 <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>
7788 Internal link with is link prefix
7792 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7794 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7805 Internal link with is link trail and link prefix
7809 [[mótmælendatrú|xxx]]ar
7811 mótmælenda[[söfnuður]]
7812 mótmælenda[[söfnuður|söfnuðir]]
7813 mótmælenda[[söfnuður|söfnuðir]]xxx
7815 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7816 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7817 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7818 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7819 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7824 Parsoid link trail escaping
7826 parsoid=html2wt,html2html
7828 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7834 Parsoid link prefix escaping
7837 parsoid=html2wt,html2html
7839 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7841 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7845 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7853 [http://wp.org ''foo'']
7855 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7856 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7857 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7858 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7863 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7867 [[Foo|{{echo|a}} b {{echo|c}}]]
7869 <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>
7873 Link with angle bracket after anchor
7877 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7880 <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>
7884 ### Interwiki links (see maintenance/interwiki.sql)
7888 Inline interwiki link
7890 parsoid=wt2html,wt2wt,html2html
7892 [[MeatBall:SoftSecurity]]
7894 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7897 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7901 Inline interwiki link with empty title (bug 2372)
7903 parsoid=wt2html,wt2wt,html2html
7907 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7910 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7914 Interwiki link encoding conversion (bug 1636)
7916 *[[Wikipedia:ro:Olteniţa]]
7917 *[[Wikipedia:ro:Olteniţa]]
7919 <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>
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></ul>
7924 <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 <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>
7930 Interwiki link with fragment (bug 2130)
7932 [[MeatBall:SoftSecurity#foo]]
7934 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7938 # Ideally the wikipedia: prefix here should be proto-relative too
7939 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7940 # define the 'en' prefix, and originally the test used 'wikipedia',
7941 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7944 Different interwiki prefixes mapping to the same URL
7952 [[:wikipedia:Foo|Foo]]
7954 [[wikipedia:en:Foo]]
7956 [[:wikipedia:en:Foo]]
7960 <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>
7962 <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>
7964 <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>
7966 <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>
7968 <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>
7970 <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>
7972 <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>
7976 Interwiki links that cannot be represented in wiki syntax
7979 [[meatball:ok#foo|ok with fragment]]
7980 [[meatball:ok_as_well?|ok ending with ? mark]]
7981 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7982 [http://de.wikipedia.org/wiki/#foo is just fragment]
7985 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7986 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7987 <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>
7988 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7989 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7992 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7993 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7994 <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>
7995 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7996 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8000 Interwiki links: trail
8002 [[wikipedia:Foo|Ba]]r
8004 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8007 <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>
8011 Local interwiki link
8013 parsoid=wt2html,wt2wt,html2html
8015 [[local:Template:Foo]]
8017 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8020 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8023 # Parsoid does not mark self-links, by design.
8025 Local interwiki link: self-link to current page
8028 parsoid=wt2html,wt2wt,html2html
8032 <p><strong class="selflink">local:Main Page</strong>
8035 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8039 Local interwiki link: prefix only (bug 64167)
8041 parsoid=wt2html,wt2wt,html2html
8045 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8048 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8052 Local interwiki link: with additional interwiki prefix (bug 61357)
8054 parsoid=wt2html,wt2wt,html2html
8056 [[local:meatball:Hello]]
8058 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8061 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8065 Multiple local interwiki link prefixes
8067 [[local:local:local:local:mi:local:Foo]]
8069 parsoid=wt2html,wt2wt,html2html
8071 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8074 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8078 ### Interlanguage links
8079 ### Language links (so that searching for '### language' matches..)
8085 parsoid=wt2html,wt2wt,html2html
8093 <p>Blah blah blah</p>
8094 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8098 Interlanguage link with spacing
8100 parsoid=wt2html,wt2wt,html2html
8108 <p>Blah blah blah</p>
8109 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8113 Double interlanguage link
8115 parsoid=wt2html,wt2wt,html2html
8124 <p>Blah blah blah</p>
8125 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8126 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8130 Interlanguage link variations
8132 parsoid=wt2html,wt2wt,html2html
8142 <p>Blah blah blah</p>
8143 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8144 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8145 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8149 Space and question mark encoding in interlanguage links (T95473)
8151 parsoid=wt2html,wt2wt,html2html
8159 <p>Blah blah blah</p>
8160 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8164 Interlanguage link, with prefix links
8174 <p>Blah blah blah</p>
8175 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8179 Double interlanguage link, with prefix links (bug 8897)
8190 <p>Blah blah blah</p>
8191 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8192 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8196 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8204 <p>Blah blah blah</p>
8205 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8209 Parsoid-specific test: Wikilinks with should RT properly
8215 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8220 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8224 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8225 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8227 He&nbsp;llo [[Foo|He&nbsp;llo]]
8229 He&nbsp;llo [[He&nbsp;llo]]
8233 Parsoid: handle constructor well
8239 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8240 </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>
8243 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8245 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8254 # Note that `ko` isn't a known interlanguage prefix
8256 Parsoid: recognize interlanguage links without a target page
8266 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8268 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8271 # Note that `ko` isn't a known interwiki prefix
8273 Parsoid: recognize interwiki links without a target page
8275 parsoid=wt2html,wt2wt,html2html
8281 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8282 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8285 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8286 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8290 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8294 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8297 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8301 Interlanguage link with preceding local interwiki link (bug 68085)
8303 parsoid=wt2html,wt2wt,html2html
8306 [[local:es:Spanish]]
8309 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8313 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8317 Looks like an interlanguage link, but is actually a local interwiki
8319 parsoid=wt2html,wt2wt,html2html
8325 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8329 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8333 ### Redirects, Parsoid-only
8337 1. Simple redirect to page
8339 #REDIRECT [[Main Page]]
8341 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8345 2. Other redirect variants
8347 #REDIRECT [[Main_Page]]
8349 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8352 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8353 # This tests the Parsoid bail-out code.
8355 3. Other redirect variants
8357 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8359 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8363 4. Redirect to a templated destination
8365 #REDIRECT [[{{echo|Foo}}bar]]
8367 <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"}]]}'/>
8373 parsoid=wt2html,wt2wt
8378 <li>REDIRECT [[]]</li></ol>
8382 Optional colon in #REDIRECT
8384 # the colon is archaic syntax. we support it for wt2html, but we
8385 # don't care that it roundtrips back to the modern syntax.
8386 parsoid=wt2html,html2html
8388 #REDIRECT:[[Main Page]]
8390 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8394 Whitespace in #REDIRECT with optional colon
8396 # the colon and gratuitous whitespace is archaic syntax. we support
8397 # it for wt2html, but we don't care that it roundtrips back to the
8398 # modern syntax (without extra whitespace)
8399 parsoid=wt2html,html2html
8406 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8410 Piped link in #REDIRECT
8412 # content after piped link is ignored. we support this syntax,
8413 # but don't care that the piped link is lost when we roundtrip this.
8416 #REDIRECT [[Main Page|bar]]
8418 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8422 Redirect to category (T104502)
8424 parsoid=wt2html,wt2wt
8426 #REDIRECT [[Category:Foo]]
8428 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8432 Redirect to category with URL encoding (T104502)
8436 #REDIRECT [[Category%3AFoo]]
8438 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8442 Redirect to category page
8444 #REDIRECT [[:Category:Foo]]
8446 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8450 Redirect to image page (1)
8452 #REDIRECT [[File:Wiki.png]]
8454 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8458 Redirect to image page (2)
8460 #REDIRECT [[Image:Wiki.png]]
8462 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8465 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8466 # Next test confirms this.
8468 Redirect to language (1) (T104918)
8470 parsoid=wt2html,wt2wt,html2html
8472 #REDIRECT [[en:File:Wiki.png]]
8474 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8478 Redirect to language (2) (T104918)
8480 #REDIRECT [[:en:File:Wiki.png]]
8482 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8486 Redirect to interwiki (T104918)
8488 #REDIRECT [[meatball:File:Wiki.png]]
8490 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8494 Non-English #REDIRECT
8498 #TILVÍSUN [[Main Page]]
8500 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8504 Redirect syntax under text isn't considered a redirect
8507 #redirect [[Main Page]]
8510 <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>
8513 # FIXME: Should hoist the redirect to the top of the page and ensure there
8520 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8540 Broken br tag sanitization
8548 # TODO: Fix html2html mode (bug 51055)!
8550 Parsoid: Broken br tag recognition
8563 Incorrecly removing closing slashes from correctly formed XHTML
8565 <br style="clear:both;" />
8567 <p><br style="clear:both;" />
8572 Failing to transform badly formed HTML into correct XHTML
8574 <br style="clear: left;">
8575 <br style="clear: right;">
8576 <br style="clear: both;">
8578 <p><br style="clear: left;" />
8579 <br style="clear: right;" />
8580 <br style="clear: both;" />
8584 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8585 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8587 Handling html with a div self-closing tag
8596 <p><div title />
8600 <p><div title=bar />
8601 <div title=bar/>
8603 <div title="bar/"></div>
8607 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8608 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8609 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8610 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8611 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8612 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8616 Handling html with a br self-closing tag
8643 Horizontal ruler (should it add that extra space?)
8658 Horizontal ruler -- 4+ dashes render hr
8667 Horizontal ruler -- eats additional dashes on the same line
8676 Horizontal ruler -- does not collapse dashes on consecutive lines
8687 Horizontal ruler -- <4 dashes render as plain text
8696 Horizontal ruler -- Supports content following dashes on same line
8708 ### Block-level elements
8717 <ul><li>Common list</li>
8719 <li>item 3</li></ul>
8730 <ol><li>Numbered list</li>
8732 <li> item 3</li></ol>
8746 ***#Number on level 4
8748 **#Number on level 3
8749 **#Number on level 3
8753 #** Level 3, but ordered
8756 <ol><li> with numbers</li></ol>
8757 <ul><li> and bullets</li></ul>
8758 <ol><li> and numbers</li></ol></li>
8760 <ul><li>bullet level 2
8761 <ul><li>bullet level 3
8762 <ol><li>Number on level 4</li></ol></li></ul></li>
8764 <ol><li>Number on level 3</li>
8765 <li>Number on level 3</li></ol></li></ul>
8766 <ol><li>number level 2</li></ol></li>
8768 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8769 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8780 <ul><li>bar</li></ul></li></ul>
8790 <ul><li><ul><li>foo</li></ul></li>
8796 Nested lists 3 (first element empty)
8802 <ul><li>bar</li></ul></li></ul>
8807 Nested lists 4 (first element empty)
8812 <ul><li><ul><li></li></ul></li>
8818 Nested lists 5 (both elements empty)
8823 <ul><li><ul><li></li></ul></li>
8829 Nested lists 6 (both elements empty)
8835 <ul><li></li></ul></li></ul>
8840 Nested lists 7 (skip initial nesting levels)
8844 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8849 Nested lists 8 (multiple nesting transitions)
8857 <ul><li><ul><li> bar</li></ul></li>
8858 <li> baz</li></ul></li>
8864 Nested lists 9 (extension interaction)
8870 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8874 1. Lists with start-of-line-transparent tokens before bullets: Comments
8887 2. Lists with start-of-line-transparent tokens before bullets: Template close
8892 <ul><li>foo bar</li>
8898 List items are not parsed correctly following a <pre> block (bug 785)
8904 <ul><li> <pre>foo</pre></li>
8905 <li> <pre>bar</pre></li>
8909 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8910 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8915 List items from template
8926 * notSOL{{inner list}}
8929 <ul><li> item 1</li>
8930 <li> item 2</li></ul>
8931 <ul><li> item 0</li>
8933 <li> item 2</li></ul>
8934 <ul><li> item 0</li>
8937 <li> item 2</li></ul>
8942 List interrupted by empty line or heading
8950 <ul><li> foo</li></ul>
8951 <ul><li><ul><li> bar</li></ul></li></ul>
8952 <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>
8953 <ul><li> Another list item</li></ul>
8958 Multiple list tags generated by templates
8979 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8982 <!--This line will NOT split the list-->
8984 <!--This line will NOT split the list either-->
8986 <!--foo--> <!----> <!--This line NOT split the list either-->
8997 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9000 <!--This line will NOT split the list-->
9002 <!--This line will NOT split the list either-->
9004 <!--foo--> <!----> <!--This line NOT split the list
9017 (The PHP parser relies on Tidy for the hack)
9019 parsoid=wt2html,wt2wt
9023 * {{echo|<li>templated li-hack}}
9024 * <!--foo--> <li> unsupported li-hack with preceding comments
9027 <li><li>not a li-hack
9034 <li>templated li-hack</li>
9035 <li>unsupported li-hack with preceding comments</li>
9038 <li>not a li-hack</li>
9043 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9070 Parsoid: Test of whitespace serialization with Templated bullets
9077 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9081 # ------------------------------------------------------------------------
9082 # The next set of tests are about Parsoid's ability to handle badly nested
9083 # tags (parse, minimize scope of fixup, and roundtrip back)
9084 # ------------------------------------------------------------------------
9087 Unbalanced closing block tags break a list
9088 (php parser relies on Tidy to fix up)
9106 # Parsoid fails this test, but it might be tricky to support properly.
9109 Unbalanced closing non-block tags don't break a list
9110 (php parser relies on Tidy to fix up)
9117 <li><span>a</span></li>
9118 <li><span>b</span></li>
9132 Unclosed formatting tags that straddle lists are closed and reopened
9133 (php parser relies on Tidy to fix up)
9135 parsoid=wt2html,wt2wt,html2html
9145 <ol><li> <s> a</s></li>
9146 <li><s> b </s></li></ol>
9151 1. List embedded in a formatting tag
9158 <li><small>foo</small></li>
9168 ## Ugly Parsoid output here
9169 ## Not sure what the right output is.
9171 2. List embedded in a formatting tag
9178 <li><small>a</small></li>
9179 <li><small>b</small></li>
9186 <li><small>b</small></li>
9190 # Ugly Parsoid and PHP parser output here
9191 # Not sure if we want to make this a test!
9194 ## 3. Unclosed formatting tags in list elements
9200 ## <li><small>a</small></li>
9201 ## <li><small><small>b</small></small></li>
9205 ## <li><small>a</small></li>
9207 ## <li><small>b</small></li>
9211 # This is a bug in the PHP parser + tidy combination.
9212 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9213 # and then fostered out of the table by tidy.)
9214 # We believe the Parsoid output to be correct.
9216 Table with missing opening <tr> tag
9218 parsoid=wt2html,wt2wt
9236 # Note that the current date is hard-coded as
9237 # 1970-01-01T00:02:03Z (a Thursday)
9238 # when running parser tests. The timezone is also fixed to GMT, so
9239 # local date will be identical to current date.
9242 Magic Word: {{CURRENTDAY}}
9251 Magic Word: {{CURRENTDAY2}}
9260 Magic Word: {{CURRENTDAYNAME}}
9269 Magic Word: {{CURRENTDOW}}
9278 Magic Word: {{CURRENTMONTH}}
9287 Magic Word: {{CURRENTMONTH1}}
9296 Magic Word: {{CURRENTMONTHABBREV}}
9298 {{CURRENTMONTHABBREV}}
9305 Magic Word: {{CURRENTMONTHNAME}}
9307 {{CURRENTMONTHNAME}}
9314 Magic Word: {{CURRENTMONTHNAMEGEN}}
9316 {{CURRENTMONTHNAMEGEN}}
9323 Magic Word: {{CURRENTTIME}}
9332 Magic Word: {{CURRENTHOUR}}
9341 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9350 Magic Word: {{CURRENTYEAR}}
9359 Magic Word: {{CURRENTTIMESTAMP}}
9361 {{CURRENTTIMESTAMP}}
9368 Magic Words LOCAL (UTC)
9372 * {{LOCALMONTHNAME}}
9373 * {{LOCALMONTHNAMEGEN}}
9374 * {{LOCALMONTHABBREV}}
9383 * {{LOCALTIMESTAMP}}
9398 <li> 19700101000203</li></ul>
9403 Magic Word: {{FULLPAGENAME}}
9405 title=[[User:Ævar Arnfjörð Bjarmason]]
9409 <p>User:Ævar Arnfjörð Bjarmason
9414 Magic Word: {{FULLPAGENAMEE}}
9416 title=[[User:Ævar Arnfjörð Bjarmason]]
9420 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9425 Magic Word: {{TALKSPACE}}
9427 title=[[User:Ævar Arnfjörð Bjarmason]]
9436 Magic Word: {{TALKSPACE}}, same namespace
9438 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9447 Magic Word: {{TALKSPACE}}, main namespace
9449 title=[[Parser Test]]
9458 Magic Word: {{TALKSPACEE}}
9460 title=[[User:Ævar Arnfjörð Bjarmason]]
9469 Magic Word: {{SUBJECTSPACE}}
9471 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9480 Magic Word: {{SUBJECTSPACE}}, same namespace
9482 title=[[User:Ævar Arnfjörð Bjarmason]]
9491 Magic Word: {{SUBJECTSPACE}}, main namespace
9493 title=[[Parser Test]]
9501 Magic Word: {{SUBJECTSPACEE}}
9503 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9512 Magic Word: {{NAMESPACE}}
9514 title=[[User:Ævar Arnfjörð Bjarmason]]
9523 Magic Word: {{NAMESPACEE}}
9525 title=[[User:Ævar Arnfjörð Bjarmason]]
9534 Magic Word: {{NAMESPACENUMBER}}
9536 title=[[User:Ævar Arnfjörð Bjarmason]]
9545 Magic Word: {{SUBPAGENAME}}
9547 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9556 Magic Word: {{SUBPAGENAMEE}}
9558 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9567 Magic Word: {{ROOTPAGENAME}}
9569 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9573 <p>Ævar Arnfjörð Bjarmason
9578 Magic Word: {{ROOTPAGENAMEE}}
9580 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9584 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9589 Magic Word: {{BASEPAGENAME}}
9591 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9595 <p>Ævar Arnfjörð Bjarmason
9600 Magic Word: {{BASEPAGENAMEE}}
9602 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9606 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9611 Magic Word: {{TALKPAGENAME}}
9613 title=[[User:Ævar Arnfjörð Bjarmason]]
9617 <p>User talk:Ævar Arnfjörð Bjarmason
9622 Magic Word: {{TALKPAGENAMEE}}
9624 title=[[User:Ævar Arnfjörð Bjarmason]]
9628 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9633 Magic Word: {{SUBJECTPAGENAME}}
9635 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9639 <p>User:Ævar Arnfjörð Bjarmason
9644 Magic Word: {{SUBJECTPAGENAMEE}}
9646 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9648 {{SUBJECTPAGENAMEE}}
9650 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9655 Magic Word: {{NUMBEROFFILES}}
9664 Magic Word: {{PAGENAME}}
9666 title=[[User:Ævar Arnfjörð Bjarmason]]
9670 <p>Ævar Arnfjörð Bjarmason
9675 Magic Word: {{PAGENAME}} with metacharacters
9677 title=[['foo & bar = baz']]
9681 <p><i>'foo & bar = baz'</i>
9684 <p><i>'foo & bar = baz'</i></p>
9688 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9690 title=[[*RFC 1234 http://example.com/]]
9694 <p>*RFC 1234 http://example.com/
9697 <p>*RFC 1234 http://example.com/</p>
9701 Magic Word: {{PAGENAMEE}}
9703 title=[[User:Ævar Arnfjörð Bjarmason]]
9707 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9712 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9714 title=[[*RFC 1234 http://example.com/]]
9718 <p>*RFC_1234_http://example.com/
9721 <p>*RFC_1234_http://example.com/</p>
9725 Magic Word: {{REVISIONID}}
9734 Magic Word: {{SCRIPTPATH}}
9743 Magic Word: {{STYLEPATH}}
9752 Magic Word: {{SERVER}}
9756 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9761 Magic Word: {{SERVERNAME}}
9770 Magic Word: {{SITENAME}}
9779 Case-sensitive magic words, when cased differently, should just be template transclusions
9786 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9787 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9788 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9789 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9794 Case-insensitive magic words should still work with weird casing.
9804 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9808 # From plwiki:PLOS_ONE
9810 Parsoid: Page property magic word with magic word contents
9812 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9814 <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>"}]]}'/>
9818 Parsoid: Template-generated DISPLAYTITLE
9820 {{{{echo|DISPLAYTITLE}}:Foo}}
9822 <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}}]}'/>
9826 Namespace 1 {{ns:1}}
9835 Namespace 1 {{ns:01}}
9844 Namespace 0 {{ns:0}} (bug 4783)
9852 Namespace 0 {{ns:00}} (bug 4783)
9860 Namespace -1 {{ns:-1}}
9869 Namespace User {{ns:User}}
9878 Namespace User talk {{ns:User_talk}}
9887 Namespace User talk {{ns:uSeR tAlK}}
9896 Namespace File {{ns:File}}
9905 Namespace File {{ns:Image}}
9914 Namespace (lang=de) Benutzer {{ns:User}}
9925 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9931 <p>Benutzer Diskussion
9939 {{urlencode:hi world?!}}
9940 {{urlencode:hi world?!|WIKI}}
9941 {{urlencode:hi world?!|PATH}}
9942 {{urlencode:hi world?!|QUERY}}
9952 Magic Word: prioritize type info over data-parsoid
9956 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9962 Magic Word: serialize on separate line (parsoid)
9964 parsoid=wt2wt,html2wt
9970 foo<meta property="mw:PageProp/notoc"/>bar
9974 Magic Word: rt non-english wikis
9981 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9985 __proto__ is treated as normal wikitext (T105997)
9997 Magic links: internal link to RFC (bug 479)
10001 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10004 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10008 Magic links: RFC (bug 479)
10012 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10015 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10019 Magic links: RFC (bug 65278)
10021 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10023 <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.
10026 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10030 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10032 RFC      822
10036 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10041 <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>
10047 Magic links: ISBN (bug 1937)
10051 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10054 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10058 Magic links: ISBN (bug 65278)
10060 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10062 <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.
10065 <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>
10069 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10071 ISBN      978 0 316 09811 3
10077 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10084 <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>
10092 Magic links: PMID incorrectly converts space to underscore
10096 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10099 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10103 Magic links: PMID (bug 65278)
10105 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10107 <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.
10110 <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>
10114 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10116 PMID      1234
10120 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10125 <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>
10130 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10131 # since these are ExtLinkText, not MagicLinkText
10133 Magic links: use appropriate serialization for "almost" magic links.
10135 X[[Special:BookSources/0978739256|foo]]
10137 X[//tools.ietf.org/html/rfc1234 foo]
10139 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10140 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10143 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10144 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10152 Nonexistent template
10154 {{thistemplatedoesnotexist}}
10156 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10161 Template with invalid target containing tags
10163 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10165 <p>{{a<b>b</b>|foo|a=b|a = b}}
10170 Template with invalid target containing unclosed tag
10172 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10174 <p>{{a<b>|foo|a=b|a = b}}</b>
10179 Template with invalid target containing wikilink
10183 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10186 <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>
10190 Template with just whitespace in it, bug #68421
10194 <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>
10200 This is a test template
10208 <p>This is a test template
10213 Template with explicit namespace
10217 <p>This is a test template
10225 This is a test template with parameter {{{param}}}
10231 {{paramtest|param=foo}}
10233 <p>This is a test template with parameter foo
10238 Template:paramtestnum
10240 [[{{{1}}}|{{{2}}}]]
10244 Template unnamed parameter
10246 {{paramtestnum|Main Page|the main page}}
10248 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10253 Template:templatesimple
10259 Template:templateredirect
10261 #redirect [[Template:templatesimple]]
10265 Template:templateasargtestnum
10271 Template:templateasargtest
10273 {{template{{{templ}}}}}
10277 Template:templateasargtest2
10283 Template with template name as unnamed argument
10285 {{templateasargtestnum|templatesimple}}
10292 Template with template name as argument
10294 {{templateasargtest|templ=simple}}
10301 Template with template name as argument (2)
10303 {{templateasargtest2|templ=templatesimple}}
10310 Template:templateasargtestdefault
10312 {{{{{templ|templatesimple}}}}}
10322 Template with default value
10324 {{templateasargtestdefault}}
10331 Template with default value (value set)
10333 {{templateasargtestdefault|templ=templa}}
10342 {{templateredirect}}
10347 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10351 Template with argument in separate line
10353 {{ templateasargtest |
10361 Template with complex template as argument
10364 param ={{ templateasargtest |
10365 templ = simple }}}}
10367 <p>This is a test template with parameter (test)
10372 Template with thumb image (with link in description)
10374 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10376 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>
10379 <p>This is a test template with parameter</p>
10380 <div class="thumb tright">
10381 <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>
10382 <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>
10386 <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>
10390 Template:complextemplate
10392 {{{1}}} {{paramtest|
10393 param ={{{param}}}}}
10397 Template with complex arguments
10400 param ={{ templateasargtest |
10401 templ = simple }}|[[Template:complextemplate|link]]}}
10403 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10408 BUG 553: link with two variables in a piped link
10411 |[[{{{1}}}|{{{2}}}]]
10416 <td>[[{{{1}}}|{{{2}}}]]
10421 <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>
10426 Abort table cell attribute parsing on wikilink
10429 | testing [[one|two]] | three || four
10430 | testing one two | three || four
10435 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10444 <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>
10445 <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>
10450 Don't abort table cell attribute parsing if wikilink is found in template arg
10453 | Test {{#tag:ref|One two "[[three]]" four}}
10457 <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>
10462 Magic variable as template parameter
10464 {{paramtest|param={{SITENAME}}}}
10466 <p>This is a test template with parameter MediaWiki
10473 [[{{{param}}}|link]]
10477 Template parameter as link source
10479 {{linktest|param=Main Page}}
10481 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10486 Template:paramtest2
10488 including another template, {{paramtest|param={{{arg}}}}}
10492 Template passing argument to another template
10494 {{paramtest2|arg='hmm'}}
10496 <p>including another template, This is a test template with parameter 'hmm'
10507 Template as link source
10511 [[{{linktest2}}|Main Page]]
10513 [[{{linktest2}}]]Page
10515 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10516 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10517 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10535 Template infinite loop
10539 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10544 Template from main namespace
10563 BUG 529: Template with table, not included at beginning of line
10582 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10602 BUG 41: Template parameters shown as broken links
10611 Template with targets containing wikilinks
10615 {{[[{{echo|foo}}]]}}
10617 {{{{echo|[[foo}}]]}}
10619 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10620 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10632 Templates: Double quotes as template target
10639 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10644 Template:MSGNW test
10646 ''None'' of '''this''' should be
10648 but rather passed unmodified
10656 # hmm, fix this or just deprecate msgnw and document its behavior?
10660 {{msgnw:MSGNW test}}
10662 <p>''None'' of '''this''' should be
10664  but rather passed unmodified
10665 {{test}}
10669 <!-- comment -->
10676 {{int:youhavenewmessages|lots of money|not!}}
10678 <p>You have lots of money (not!).
10683 int keyword - non-existing message
10694 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10698 <includeonly> and <noinclude> being included
10709 <onlyinclude>Foo</onlyinclude>bar
10713 <onlyinclude> being included
10725 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10729 <onlyinclude> and <includeonly> being included
10738 <includeonly> and <noinclude> on a page
10740 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10747 Un-closed <noinclude>
10754 <onlyinclude> on a page
10756 <onlyinclude>Foo</onlyinclude>bar
10763 Un-closed <onlyinclude>
10770 Self-closed noinclude, includeonly, onlyinclude tags
10781 Unbalanced includeonly and noinclude tags
10785 |b</noinclude></noinclude>
10786 |c</noinclude></includeonly>
10787 |d</includeonly></includeonly>
10796 <td>c</includeonly>
10798 <td>d</includeonly></includeonly>
10804 Template:Includeonly section
10807 ==Includeonly section==
10813 Bug 6563: Edit link generation for section shown by <includeonly>
10815 {{includeonly section}}
10817 <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>
10818 <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>
10822 # Uses same input as the contents of [[Template:Includeonly section]]
10824 Bug 6563: Section extraction for section shown by <includeonly>
10829 ==Includeonly section==
10837 Bug 6563: Edit link generation for section suppressed by <includeonly>
10840 ==Includeonly section==
10844 <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>
10849 Bug 6563: Section extraction for section suppressed by <includeonly>
10854 ==Includeonly section==
10862 Un-closed <includeonly>
10868 ## We used to, but no longer wt2wt this test since the default serializer
10869 ## will normalize the include directives to serialize on their own line.
10870 ## Selser will take care of preserving formatting in scenarios where they
10871 ## intermingled with other wikitext.
10873 Includes and comments at SOL
10875 parsoid=wt2html,html2html
10877 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10881 </noinclude>* stuff
10884 <includeonly>can have stuff</includeonly>=== here ===
10887 <h2><span class="mw-headline" id="hu">hu</span></h2>
10890 <ul><li> stuff</li>
10891 <li> here</li></ul>
10892 <h3><span class="mw-headline" id="here">here</span></h3>
10895 <!-- 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>
10897 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10899 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10900 <li> here</li></ul>
10902 <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>
10906 # TODO: test with DOM fragment reuse!
10908 Parsoid: DOM fragment reuse
10910 parsoid=wt2wt,wt2html
10912 a{{echo|b<table></table>c}}d
10924 <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>
10926 <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">
10927 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10928 </span><p about="#mwt2">cd</p>
10930 <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">
10932 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10934 </span><p about="#mwt3">b</p>
10938 Parsoid: Merge double tds (T52603)
10943 |{{echo|{{!}} foo}}
10947 <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>
10952 Parsoid: Merge double tds in nested transclusion content (T52603)
10958 |{{echo|{{!}} foo}}
10962 <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}}]}'>
10964 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10970 ### <includeonly> and <noinclude> in attributes
10973 0. includeonly around the entire attribute
10975 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10977 <p><span id="v2">bar</span>
10982 1. includeonly in html attr key
10984 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10986 <p><span id="foo">bar</span>
10991 2. includeonly in html attr value
10993 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
10994 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
10996 <p><span id="v1">bar</span>
10997 <span id="v1">bar</span>
11002 3. includeonly in part of an attr value
11004 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11006 <p><span style="color:red;">bar</span>
11011 4. includeonly in table attributes
11035 ### Token Stream Patcher tests
11037 ### These tests won't always pass wt2wt and other modes because
11038 ### on serialization, the table will be output on a new line.
11039 ### For now, we are blacklisting them, and using this to test selser.
11043 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11045 parsoid=wt2html,wt2wt
11047 {{echo|}}{| width = '100%'
11051 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11052 <tbody><tr><td>foo</td></tr>
11056 ## We used to, but no longer wt2wt this test since the default serializer
11057 ## will normalize the include directives to serialize on their own line.
11058 ## Selser will take care of preserving formatting in scenarios where they
11059 ## intermingled with other wikitext.
11061 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11065 <includeonly>a</includeonly>{| {{{b}}}
11069 <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}}}":""}}'>
11070 <tbody><tr><td>c</td></tr>
11076 ### Testing parsing of templates where a template arg
11077 ### has the same name as the template itself.
11083 {{{quote|{{{1}}}}}}
11087 Templates: Template Name/Arg clash: 1. Use of positional param
11096 Templates: Template Name/Arg clash: 2. Use of named param
11098 {{quote|quote=foo}}
11105 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11114 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11118 Templates: 1. Simple use
11127 Templates: 2. Inside a block tag
11129 <div>{{echo|Foo}}</div>
11130 <blockquote>{{echo|Foo}}</blockquote>
11133 <blockquote>Foo</blockquote>
11143 Templates: P-wrapping: 1a. Templates on consecutive lines
11154 Templates: P-wrapping: 1b. Templates on consecutive lines
11168 Templates: P-wrapping: 1c. Templates on consecutive lines
11171 {{echo|bar}} <div>baz</div>
11184 Templates: P-wrapping: 1d. Template preceded by comment-only line
11193 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11197 Templates: Inline Text: 1. Multiple template uses
11199 {{echo|Foo}}bar{{echo|baz}}
11206 Templates: Inline Text: 2. Back-to-back template uses
11208 {{echo|Foo}}{{echo|bar}}
11215 Templates: Block Tags: 1. Multiple template uses
11217 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11219 <div>Foo</div><div>bar</div><div>baz</div>
11224 Templates: Block Tags: 2. Back-to-back template uses
11226 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11228 <div>Foo</div><div>bar</div>
11232 # This is an edge case relating to paragraph wrapping.
11234 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11239 <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
11244 Templates: Links: 1. Simple example
11246 {{echo|[[Foo|bar]]}}
11248 <p><a href="/wiki/Foo" title="Foo">bar</a>
11253 Templates: Links: 2. Generation of link href
11255 [[{{echo|Foo}}|bar]]
11257 <p><a href="/wiki/Foo" title="Foo">bar</a>
11262 Templates: Links: 3. Generation of part of a link href
11264 [[Fo{{echo|o}}|bar]]
11266 [[Foo{{echo|bar}}]]
11268 [[Foo{{echo|bar}}baz]]
11270 [[Foo{{echo|bar}}|bar]]
11272 [[:Foo{{echo|bar}}]]
11274 [[:Foo{{echo|bar}}|bar]]
11276 <p><a href="/wiki/Foo" title="Foo">bar</a>
11277 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11278 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11279 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11280 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11281 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11286 Templates: Links: 4. Multiple templates generating link href
11288 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11290 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11295 Templates: Links: 5. Generation of link text
11297 [[Foo|{{echo|bar}}]]
11299 <p><a href="/wiki/Foo" title="Foo">bar</a>
11304 Templates: Links: 5. Nested templates (only outermost template should be marked)
11306 {{echo|[[{{echo|Foo}}|bar]]}}
11308 <p><a href="/wiki/Foo" title="Foo">bar</a>
11313 Templates: HTML Tag: 1. Generation of HTML attr. key
11315 <div {{echo|style}}="color:red;">foo</div>
11317 <div style="color:red;">foo</div>
11322 Templates: HTML Tag: 2. Generation of HTML attr. value
11324 <div style={{echo|'color:red;'}}>foo</div>
11326 <div style="color:red;">foo</div>
11331 Templates: HTML Tag: 3. Generation of HTML attr key and value
11333 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11335 <div style="color:red;">foo</div>
11340 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11342 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11344 <div title="This is a long title with just one piece templated">foo</div>
11349 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11351 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11353 <div title="This is a long title with just one piece templated">foo</div>
11358 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11360 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11362 <div title="This is a long title with just one piece templated">foo</div>
11366 # SSS FIXME: While it is great we added support for all this,
11367 # do we want to make this part of the spec? Maybe we want to
11368 # deprecate this kind of usage in the future?
11370 Templates: HTML Tag: 7. Generation of partial attribute key string
11372 <div st{{echo|yle}}="color:red;">foo</div>
11374 <div style="color:red;">foo</div>
11379 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11381 <div {{echo|1=id="v1"}}>bar</div>
11383 <div id="v1">bar</div>
11388 Templates: HTML Tag: 9. Multiple template-generated attributes
11390 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11392 <div id="v1" title="foo">bar</div>
11397 Templates: Support for templates generating attributes and content
11399 {| {{mixed_attr_content_template}}
11404 <table style="color:red;" title="T48811">
11414 <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|}"]}'>
11423 1. Entities and nowikis inside templated attributes should be handled correctly
11425 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11427 <div style="background:#f9f9f9;">foo</div>
11430 <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>
11434 2. Entities and nowikis inside templated attributes should be handled correctly
11437 |{{table_attribs_3}}
11442 <td style="background:#f9f9f9;">Foo
11447 <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>
11452 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11455 |{{table_attribs_3}}
11460 <td style="background:#f9f9f9;">Foo
11464 <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}}]}'>
11465 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11471 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11474 | {{table_attribs_6}} hi
11479 <td style="background: red;"> hi
11484 <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>
11489 Templates: HTML Tables: 1. Generating start of a HTML table
11491 {{echo|<table><tr><td>foo</td>}}</tr></table>
11493 <table><tr><td>foo</td></tr></table>
11498 Templates: HTML Tables: 2a. Generating middle of a HTML table
11500 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11502 <table><tr><td>foo</td></tr></table>
11507 Templates: HTML Tables: 2b. Generating middle of a HTML table
11509 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11511 <table><tr><td>foo</td></tr></table>
11516 Templates: HTML Tables: 3. Generating end of a HTML table
11518 <table><tr>{{echo|<td>foo</td></tr></table>}}
11520 <table><tr><td>foo</td></tr></table>
11525 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11527 {{echo|<table>}}<tr><td>foo</td></tr></table>
11529 <table><tr><td>foo</td></tr></table>
11534 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11536 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11538 <table><tr><td>foo</td></tr></table>
11543 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11545 <table><tr>{{echo|<td>}}foo</td></tr></table>
11547 <table><tr><td>foo</td></tr></table>
11552 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11554 <table><tr><td>foo{{echo|</td>}}</tr></table>
11556 <table><tr><td>foo</td></tr></table>
11561 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11563 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11565 <table><tr><td>foo</td></tr></table>
11570 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11572 <table><tr><td>foo</td></tr>{{echo|</table>}}
11574 <table><tr><td>foo</td></tr></table>
11579 Templates: HTML Tables: 5. Proper fostering of categories from inside
11581 parsoid=wt2html,wt2wt
11583 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11584 <!--Two categories (Bug 50330)-->
11585 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11587 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11588 <!--Two categories (Bug 50330)-->
11589 <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>
11593 Templates: Wiki Tables: 1a. Fostering of entire template content
11601 <tr><td></td></tr></table>
11613 Templates: Wiki Tables: 1b. Fostering of entire template content
11626 <tr><td></td></tr></table>
11640 Templates: Wiki Tables: 2. Fostering of partial template content
11650 <tr><td></td></tr></table>
11663 Templates: Wiki Tables: 3. td-content via multiple templates
11666 {{echo|{{pipe}}a}}{{echo|b}}
11677 Templates: Wiki Tables: 4. Templated tags, no content
11683 <tr><td></td></tr></table>
11688 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11702 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11715 ## This test case is very specific to Parsoid's internals
11716 ## and is hence only tested for Parsoid's code. Parsoid uses
11717 ## a <meta> marker tag for <ref> tags and they are expanded
11718 ## much later. We are verifying that this <meta> tag usage
11719 ## doesn't prevent foster parenting.
11721 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11723 {{PartialTable}}<ref>foo</ref>
11728 <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">
11732 <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>
11736 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11746 <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{{!}}}"]}'>
11747 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11751 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11756 Templates: Lists: Multi-line list-items via templates
11758 *{{echo|a {{nonexistent|
11760 *{{echo|b {{nonexistent|
11763 <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>
11764 <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>
11769 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11771 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11773 <p><i>ab</i>c<i>d</i>e
11778 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11779 (PHP parser generates misnested html)
11781 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11783 <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>
11787 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11788 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11790 parsoid=wt2html,wt2wt
11792 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11794 <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>
11795 <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>
11796 <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>
11800 Templates: Ugly nesting: 4. Divs opened/closed across templates
11802 a<div>b{{echo|c</div>d}}e
11813 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11819 |{{echo|foo</table>}}
11823 <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|}"]}'>
11827 <td>foo</td></tr></tbody></table><span about="#mwt1">
11828 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11833 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11843 <td>1. {{echo|foo </table>}}</td>
11845 <td>2. {{echo|baz </table>}}</td>
11858 <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>"]}'>
11863 <td>1. foo </td></tr></tbody></table></td>
11865 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11866 </span><span about="#mwt2">
11867 </span><span about="#mwt2">
11868 </span><span about="#mwt2">abc</span><span about="#mwt2">
11869 </span><span about="#mwt2">
11870 </span><span about="#mwt2">
11871 </span><span about="#mwt2">
11872 </span><span about="#mwt2">
11873 </span><span about="#mwt2">
11874 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11875 </span><span about="#mwt2">
11880 Templates: Ugly templates: 3. newline-only template parameter
11889 # This looks like a bug: a single newline triggers p/br for some reason.
11891 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11900 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11901 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11903 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11909 <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
11910 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11914 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11915 # that are "identical" and generate nesting cycles in the algorithm
11917 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11919 {{echo|<table><tr><td><table>}}
11923 <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"}'>
11924 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11925 </table></td></tr></tbody></table>
11929 Templates: Parameters substituted at the top-level
11931 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
11933 <p><i>who</i> me? <b>never!</b>
11936 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
11940 Parser Functions: 1. Simple example
11949 Parser Functions: 2. Nested use (only outermost should be marked up)
11958 ### Pre-save transform tests
11961 pre-save transform: subst:
11967 This is a test template
11971 pre-save transform: normal template
11981 pre-save transform: nonexistent template
11985 {{thistemplatedoesnotexist}}
11987 {{thistemplatedoesnotexist}}
11991 pre-save transform: subst magic variables
12000 # This is bug 89, which I fixed. -- wtm
12002 pre-save transform: subst: templates with parameters
12006 {{subst:paramtest|param="something else"}}
12008 This is a test template with parameter "something else"
12012 Template:nowikitest
12014 <nowiki>'''not wiki'''</nowiki>
12018 pre-save transform: nowiki in subst (bug 1188)
12022 {{subst:nowikitest}}
12024 <nowiki>'''not wiki'''</nowiki>
12028 Template:commenttest
12030 This template has <!-- a comment --> in it.
12034 pre-save transform: comment in subst (bug 1936)
12038 {{subst:commenttest}}
12040 This template has <!-- a comment --> in it.
12044 pre-save transform: unclosed tag
12048 <nowiki>'''not wiki'''
12050 <nowiki>'''not wiki'''
12054 pre-save transform: mixed tag case
12058 <NOwiki>'''not wiki'''</noWIKI>
12060 <NOwiki>'''not wiki'''</noWIKI>
12064 pre-save transform: unclosed comment in <nowiki>
12068 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12070 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12073 # Leading @ in this template definition works around a limitation
12074 # in parsoid's parserTests which otherwise strips the <span> from the
12075 # result (confusing it for a template wrapper)
12079 @<span onmouseover="alert('crap')">Oh no</span>
12083 (confirming safety of fix for subst bug 1936)
12085 {{Template:dangerous}}
12087 <p>@<span>Oh no</span>
12092 pre-save transform: comment containing gallery (bug 5024)
12096 <!-- <gallery>data</gallery> -->
12098 <!-- <gallery>data</gallery> -->
12102 pre-save transform: comment containing extension
12106 <!-- <tag>data</tag> -->
12108 <!-- <tag>data</tag> -->
12112 pre-save transform: comment containing nowiki
12116 <!-- <nowiki>data</nowiki> -->
12118 <!-- <nowiki>data</nowiki> -->
12122 pre-save transform: <noinclude> in subst (bug 3298)
12132 pre-save transform: <onlyinclude> in subst (bug 3298)
12136 {{subst:Includes2}}
12144 {{<includeonly>subst:</includeonly>Includes}}
12148 Template:SafeSubstTest
12150 {{<includeonly>safesubst:</includeonly>Includes}}
12154 bug 22297: safesubst: works during PST
12158 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12164 bug 22297: safesubst: works during normal parse
12173 subst: does not work during normal parse
12177 <p>{{subst:Includes}}
12182 pre-save transform: context links ("pipe trick")
12186 [[Article (context)|]]
12189 [[Bar:Article (context)|]]
12190 [[:Bar:Article (context)|]]
12192 [[|Article (context)]]
12196 [[Article (context)|Article]]
12197 [[Bar:Article|Article]]
12198 [[:Bar:Article|Article]]
12199 [[Bar:Article (context)|Article]]
12200 [[:Bar:Article (context)|Article]]
12202 [[Article (context)]]
12203 [[Bar:X (Y) Z|X (Y) Z]]
12204 [[:Bar:X (Y) Z|X (Y) Z]]
12208 pre-save transform: context links ("pipe trick") with interwiki prefix
12212 [[interwiki:Article|]]
12213 [[:interwiki:Article|]]
12214 [[interwiki:Bar:Article|]]
12215 [[:interwiki:Bar:Article|]]
12217 [[interwiki:Article|Article]]
12218 [[:interwiki:Article|Article]]
12219 [[interwiki:Bar:Article|Bar:Article]]
12220 [[:interwiki:Bar:Article|Bar:Article]]
12224 pre-save transform: context links ("pipe trick") with parens in title
12226 pst title=[[Somearticle (context)]]
12230 [[Article (context)|Article]]
12234 pre-save transform: context links ("pipe trick") with comma in title
12236 pst title=[[Someplace, Somewhere]]
12239 [[Otherplace, Elsewhere|]]
12240 [[Otherplace, Elsewhere, Anywhere|]]
12242 [[Otherplace, Somewhere|Otherplace]]
12243 [[Otherplace, Elsewhere|Otherplace]]
12244 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12248 pre-save transform: context links ("pipe trick") with parens and comma
12250 pst title=[[Someplace (IGNORED), Somewhere]]
12253 [[Otherplace (place), Elsewhere|]]
12255 [[Otherplace, Somewhere|Otherplace]]
12256 [[Otherplace (place), Elsewhere|Otherplace]]
12260 pre-save transform: context links ("pipe trick") with comma and parens
12262 pst title=[[Who, me? (context)]]
12265 [[Me, Myself, and I (1937 song)|]]
12267 [[Yes, you. (context)|Yes, you.]]
12268 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12272 pre-save transform: context links ("pipe trick") with namespace
12274 pst title=[[Ns:Somearticle]]
12278 [[Ns:Article|Article]]
12282 pre-save transform: context links ("pipe trick") with namespace and parens
12284 pst title=[[Ns:Somearticle (context)]]
12288 [[Ns:Article (context)|Article]]
12292 pre-save transform: context links ("pipe trick") with namespace and comma
12294 pst title=[[Ns:Somearticle, Context, Whatever]]
12298 [[Ns:Article, Context, Whatever|Article]]
12302 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12304 pst title=[[Ns:Somearticle, Context (context)]]
12308 [[Ns:Article (context)|Article]]
12312 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12314 pst title=[[Ns:Somearticle (IGNORED), Context]]
12318 [[Ns:Article, Context|Article]]
12322 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12326 [[Article(context)|]]
12327 [[Bar:Article(context)|]]
12328 [[:Bar:Article(context)|]]
12329 [[|Article(context)]]
12333 [[Article(context)|Article]]
12334 [[Bar:Article(context)|Article]]
12335 [[:Bar:Article(context)|Article]]
12336 [[Article(context)]]
12337 [[Bar:X(Y)Z|X(Y)Z]]
12338 [[:Bar:X(Y)Z|X(Y)Z]]
12342 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12346 [[Article (context)|]]
12347 [[Bar:Article (context)|]]
12348 [[:Bar:Article (context)|]]
12349 [[|Article (context)]]
12353 [[Article (context)|Article]]
12354 [[Bar:Article (context)|Article]]
12355 [[:Bar:Article (context)|Article]]
12356 [[Article (context)]]
12357 [[Bar:X (Y) Z|X (Y) Z]]
12358 [[:Bar:X (Y) Z|X (Y) Z]]
12362 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12366 [[Article(context)|]]
12367 [[Bar:Article(context)|]]
12368 [[:Bar:Article(context)|]]
12369 [[|Article(context)]]
12373 [[Article(context)|Article]]
12374 [[Bar:Article(context)|Article]]
12375 [[:Bar:Article(context)|Article]]
12376 [[Article(context)]]
12377 [[Bar:X(Y)Z|X(Y)Z]]
12378 [[:Bar:X(Y)Z|X(Y)Z]]
12382 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12386 [[Article (context), context|]]
12387 [[Article (context),context|]]
12388 [[Bar:Article (context), context|]]
12389 [[Bar:Article (context),context|]]
12390 [[:Bar:Article (context), context|]]
12391 [[:Bar:Article (context),context|]]
12393 [[Article (context), context|Article]]
12394 [[Article (context),context|Article]]
12395 [[Bar:Article (context), context|Article]]
12396 [[Bar:Article (context),context|Article]]
12397 [[:Bar:Article (context), context|Article]]
12398 [[:Bar:Article (context),context|Article]]
12402 pre-save transform: trim trailing empty lines
12406 Empty lines are trimmed
12412 Empty lines are trimmed
12416 pre-save transform: Signature expansion
12421 * <noinclude>~~~</noinclude>
12422 * <includeonly>~~~</includeonly>
12423 * <onlyinclude>~~~</onlyinclude>
12425 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12426 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12427 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12428 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12433 pre-save transform: Signature expansion in nowiki tags (bug 93)
12439 <nowiki>~~~~</nowiki>
12441 <includeonly><nowiki>~~~~</nowiki></includeonly>
12443 <noinclude><nowiki>~~~~</nowiki></noinclude>
12445 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12447 {{subst:Foo}} shall be converted to FOO
12449 As well as inside noinclude/onlyinclude
12450 <noinclude>{{subst:Foo}}</noinclude>
12451 <onlyinclude>{{subst:Foo}}</onlyinclude>
12453 But not inside includeonly
12454 <includeonly>{{subst:Foo}}</includeonly>
12458 <nowiki>~~~~</nowiki>
12460 <includeonly><nowiki>~~~~</nowiki></includeonly>
12462 <noinclude><nowiki>~~~~</nowiki></noinclude>
12464 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12466 FOO shall be converted to FOO
12468 As well as inside noinclude/onlyinclude
12469 <noinclude>FOO</noinclude>
12470 <onlyinclude>FOO</onlyinclude>
12472 But not inside includeonly
12473 <includeonly>{{subst:Foo}}</includeonly>
12477 Parsoid: Recognize nowiki with trailing space in tags
12481 <nowiki ><div>[[foo]]</nowiki >
12489 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12496 Parsoid: Recognize nowiki with odd capitalization
12500 <noWikI ><div>[[foo]]</Nowiki >
12502 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12507 Parsoid: Escape nowiki with trailing space in tags
12511 <p><nowiki > foo </nowiki ></p>
12512 <p>a<nowiki />b</p>
12513 <p>c<nowiki/ >d</p>
12515 <nowiki > foo </nowiki >
12523 Parsoid: Escape weird noWikI capitalizations
12527 <p><noWikI > foo </NoWikI ></p>
12529 <noWikI > foo </NoWikI >
12533 ### Message transform tests
12536 message transform: magic variables
12546 message transform: should not transform wiki markup
12556 message transform: <noinclude> in transcluded template (bug 4926)
12566 message transform: <onlyinclude> in transcluded template (bug 4926)
12576 {{#special:}} page name, known
12580 {{#special:Recentchanges}}
12582 Special:RecentChanges
12586 {{#special:}} page name with subpage, known
12590 {{#special:Recentchanges/param}}
12592 Special:RecentChanges/param
12596 {{#special:}} page name, unknown
12600 {{#special:foobar nonexistent}}
12602 Special:Foobar nonexistent
12606 {{#speciale:}} page name, known
12610 {{#speciale:Recentchanges}}
12612 Special:RecentChanges
12616 {{#speciale:}} page name with subpage, known
12620 {{#speciale:Recentchanges/param}}
12622 Special:RecentChanges/param
12626 {{#speciale:}} page name, unknown
12630 {{#speciale:foobar nonexistent}}
12632 Special:Foobar_nonexistent
12638 ### For Parsoid-specific tests, see
12639 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12644 parsoid=wt2html,wt2wt,html2html
12646 [[Image:foobar.jpg]]
12648 <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>
12651 <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>
12655 Simple image (using File: namespace, now canonical)
12657 [[File:Foobar.jpg]]
12659 <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>
12662 <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>
12666 Right-aligned image
12668 [[File:Foobar.jpg|right]]
12670 <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>
12673 <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>
12679 [[File:Foobar.jpg|right|Caption text]]
12681 <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>
12684 <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>
12688 Image with caption, bug 53312 #1
12690 [[File:Foobar.jpg|right|Caption page stuff]]
12692 <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>
12695 <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>
12699 Image with caption, bug 53312 #2
12701 [[File:Foobar.jpg|right|Caption page=]]
12703 <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>
12706 <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>
12710 Image with caption, bug 53312 #3
12712 [[File:Foobar.jpg|right|Caption page=stuff]]
12714 <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>
12717 <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>
12721 Allow empty links in image captions (Bug 60753)
12725 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12730 <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>
12733 <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>
12735 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12736 </figcaption></figure>
12740 Titles in unlinked images (T23454)
12742 [[File:Foobar.jpg|link=|stuff]]
12744 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12749 Link with empty target
12758 Image with link trail
12760 Linktrails should not work for images: [[File:Foobar.jpg]]s
12762 <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
12765 <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>
12769 Image with empty attribute
12771 parsoid=wt2html,wt2wt,html2html
12773 [[File:Foobar.jpg|right||Caption text]]
12775 <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>
12778 <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>
12782 1. Block image with individual attributes from templates
12784 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12786 <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>
12789 <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>
12793 2. Block Image with individual attributes from templates
12795 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12797 <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>
12800 <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>
12804 3. Inline image with individual attributes from templates
12806 [[File:Foobar.jpg|{{echo|50px}}]]
12808 <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>
12811 <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>
12814 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12815 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12817 Image with multiple attributes from the same template
12819 [[File:Foobar.jpg|{{image_attribs}}]]
12821 <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>
12824 <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>
12828 Image with link tails
12832 123[[File:Foobar.jpg]]456
12833 123[[File:Foobar.jpg|right]]456
12834 123[[File:Foobar.jpg|thumb]]456
12836 <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
12838 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
12839 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
12842 <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>
12844 <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>
12846 <div class="thumb tright">
12847 <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>
12848 <div class="thumbcaption">
12849 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12855 <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>
12856 <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>
12857 <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>
12861 Image with multiple captions -- only last one is accepted
12863 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12865 <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>
12868 <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>
12872 Image with multiple widths -- use last
12874 [[File:Foobar.jpg|200px|300px|caption]]
12876 <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>
12879 <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>
12883 Image with multiple alignments -- use first (bug 48664)
12887 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12889 [[File:Foobar.jpg|middle|text-top|caption]]
12891 <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>
12892 <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>
12895 <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>
12896 <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>
12900 Image with width attribute at different positions
12902 [[File:Foobar.jpg|200px|right|Caption]]
12903 [[File:Foobar.jpg|right|200px|Caption]]
12904 [[File:Foobar.jpg|right|Caption|200px]]
12906 <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>
12907 <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>
12908 <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>
12911 <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>
12912 <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>
12913 <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>
12916 # a sad bit of backward-compatibility
12918 Image with size specified with pxpx (bug 13500, 51628)
12920 parsoid=wt2html,wt2wt,html2html
12922 [[File:Foobar.jpg|20pxpx]]
12923 [[File:Foobar.jpg|200x20pxpx]]
12925 <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>
12926 <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>
12929 <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>
12933 Image with link parameter, wiki target
12935 [[File:Foobar.jpg|link=Main Page]]
12937 <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>
12940 <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>
12943 # parsoid bug 49293 (part 1)
12945 Image with link parameter, URL target
12947 [[File:Foobar.jpg|link=http://example.com/]]
12949 <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>
12952 <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>
12955 # parsoid bug 49293 (part 2)
12957 Image with link parameter, protocol-less URL target
12959 [[File:Foobar.jpg|link=//example.com/]]
12961 <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>
12964 <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>
12968 Escaping non-block captions (T107435)
12971 "modes": ["wt2wt"],
12973 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
12977 [[Image:Foobar.jpg|caption]]
12979 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
12982 # wgExternalLinkTarget not supported by Parsoid
12984 Image with link parameter, wgExternalLinkTarget
12986 [[Image:foobar.jpg|link=http://example.com/]]
12988 wgExternalLinkTarget='foobar'
12990 <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>
12995 Image with link parameter, wgNoFollowLinks set to false
12997 [[Image:foobar.jpg|link=http://example.com/]]
12999 wgNoFollowLinks=false
13001 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13006 Image with link parameter, wgNoFollowDomainExceptions
13008 [[Image:foobar.jpg|link=http://example.com/]]
13010 wgNoFollowDomainExceptions='example.com'
13012 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13016 # wgExternalLinkTarget not supported by Parsoid
13018 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13020 [[Image:foobar.jpg|link=http://example.com/|Title]]
13022 wgExternalLinkTarget='foobar'
13024 <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>
13029 Image with empty link parameter
13031 [[File:Foobar.jpg|link=]]
13033 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13036 <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>
13040 Image with link parameter (wiki target) and unnamed parameter
13042 [[File:Foobar.jpg|link=Main_Page|Title]]
13044 <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>
13047 <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>
13051 Image with link parameter (URL target) and unnamed parameter
13053 [[File:Foobar.jpg|link=http://example.com/|Title]]
13055 <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>
13058 <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>
13062 Thumbnail image with link parameter
13065 parsoid=wt2html,wt2wt,html2html
13067 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13069 <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>
13072 <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>
13076 Manually-specified thumbnail image
13080 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13082 <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>
13085 <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>
13089 Manually-specified thumbnail image with explicit link to wiki page
13092 parsoid=wt2html,wt2wt,html2html
13094 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13096 <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>
13099 <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>
13103 Manually-specified thumbnail image with explicit link to url
13106 parsoid=wt2html,wt2wt,html2html
13108 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13110 <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>
13113 <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>
13117 Manually-specified thumbnail image with explicit no link
13120 parsoid=wt2html,wt2wt,html2html
13122 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13124 <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>
13127 <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>
13131 Manually-specified thumbnail image with explicit link and alt text
13134 parsoid=wt2html,wt2wt,html2html
13136 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13138 <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>
13141 <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>
13145 Image with frame and link
13147 parsoid=wt2html,wt2wt,html2html
13149 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13151 <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>
13154 <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>
13158 Image with frame and link and explicit alt
13160 parsoid=wt2html,wt2wt,html2html
13162 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13164 <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>
13167 <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>
13171 Image with wiki markup in implicit alt
13173 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13175 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13177 <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>
13178 </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>
13181 <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>
13182 <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>
13186 Alt image option should handle most kinds of wikitext without barfing
13188 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13190 <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>
13193 <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>
13196 ###################
13197 # Conflicting image format options.
13198 # First option specified should 'win'.
13199 # All three cases in each test should be identical.
13202 Image with 'frameless' first.
13204 parsoid=wt2html,wt2wt,html2html
13206 [[File:Foobar.jpg|frameless|caption]]
13208 [[File:Foobar.jpg|frameless|frame|caption]]
13210 [[File:Foobar.jpg|frameless|thumb|caption]]
13212 <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>
13213 </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>
13214 </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>
13217 <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>
13218 <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>
13219 <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>
13223 Image with 'frame' first.
13225 parsoid=wt2html,wt2wt,html2html
13227 [[File:Foobar.jpg|frame|caption]]
13228 [[File:Foobar.jpg|frame|frameless|caption]]
13229 [[File:Foobar.jpg|frame|thumb|caption]]
13231 <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>
13232 <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>
13233 <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>
13236 <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>
13237 <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>
13238 <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>
13242 Image with 'thumb' first.
13244 parsoid=wt2html,wt2wt,html2html
13246 [[File:Foobar.jpg|thumb|caption]]
13247 [[File:Foobar.jpg|thumb|frameless|caption]]
13248 [[File:Foobar.jpg|thumb|frame|caption]]
13250 <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>
13251 <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>
13252 <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>
13255 <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>
13256 <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>
13257 <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>
13260 ###################
13262 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13263 # and https://phabricator.wikimedia.org/T64258
13264 # Foobar has actual size of 1941x220
13265 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13266 # a scalable format.
13267 # 2. Framed images always ignore size options; always render at default size.
13268 # 3. "Unspecified format" and border are the only types which can be
13272 Image: "unspecified format" and border enlarge
13274 parsoid=wt2html,wt2wt,html2html
13276 [[File:Foobar.jpg|2000px]]
13278 [[File:Foobar.jpg|border|2000px]]
13280 <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>
13281 </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>
13284 <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>
13285 <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>
13289 Image: "unspecified format" and border reduce
13291 parsoid=wt2html,wt2wt,html2html
13293 [[File:Foobar.jpg|1000px]]
13295 [[File:Foobar.jpg|border|1000px]]
13297 <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>
13298 </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>
13301 <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>
13302 <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>
13306 Image: thumbs reduce
13308 parsoid=wt2html,wt2wt,html2html
13310 [[File:Foobar.jpg|thumb|50px]]
13312 <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>
13315 <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>
13319 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13321 parsoid=wt2html,wt2wt,html2html
13323 [[File:Foobar.jpg|thumb|2000px]]
13325 [[File:Foobar.svg|thumb|2000px]]
13327 <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>
13328 <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>
13331 <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>
13332 <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>
13336 Image: frameless can reduce in size
13338 parsoid=wt2html,wt2wt,html2html
13340 [[File:Foobar.jpg|frameless|50px]]
13342 <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>
13345 <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>
13349 Image: bitmap frameless can't be enlarged past original size, but vector can
13351 parsoid=wt2html,wt2wt,html2html
13353 [[File:Foobar.jpg|frameless|2000px]]
13355 [[File:Foobar.svg|frameless|2000px]]
13357 <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>
13358 </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>
13361 <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>
13362 <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>
13366 Image: framed images are always unscaled.
13368 parsoid=wt2html,wt2wt,html2html
13370 [[File:Foobar.jpg|frame]]
13372 [[File:Foobar.jpg|frame|50px]]
13374 [[File:Foobar.jpg|frame|50x50px]]
13376 [[File:Foobar.jpg|frame|2000px]]
13378 <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>
13379 <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>
13380 <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>
13381 <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>
13384 <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>
13385 <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>
13386 <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>
13387 <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>
13390 ###################
13393 Link to image page- image page normally doesn't exists, hence edit link
13394 Add test with existing image page
13395 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13399 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13404 bug 18784 Link to non-existent image page with caption should use caption as link text
13406 [[:Image:test|caption]]
13408 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13413 Frameless image caption with a free URL
13415 [[File:Foobar.jpg|http://example.com]]
13417 <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>
13420 <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>
13424 Thumbnail image caption with a free URL
13428 [[File:Foobar.jpg|thumb|http://example.com]]
13430 <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>
13433 <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>
13437 Thumbnail image caption with a free URL and explicit alt
13440 parsoid=wt2html,wt2wt,html2html
13442 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13444 <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>
13447 <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>
13451 SVG thumbnails with no language set
13454 [[File:Foobar.svg|thumb|caption]]
13456 <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>
13459 <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>
13463 SVG thumbnails with language de
13465 parsoid=wt2html,wt2wt,html2html
13467 [[File:Foobar.svg|thumb|caption|lang=de]]
13469 <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>
13472 <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>
13476 SVG thumbnails with invalid language code
13478 parsoid=wt2html,wt2wt,html2html
13480 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13482 <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>
13485 <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>
13489 BUG 1887: A ISBN with a thumbnail
13491 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13493 <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>
13496 <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>
13500 BUG 1887: A RFC with a thumbnail
13502 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13504 <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>
13507 <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>
13511 BUG 1887: A mailto link with a thumbnail
13513 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13515 <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>
13518 <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>
13521 # Pending resolution to bug 368
13523 BUG 648: Frameless image caption with a link
13525 [[File:Foobar.jpg|text with a [[link]] in it]]
13527 <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>
13530 <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>
13534 BUG 648: Frameless image caption with a link (suffix)
13536 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13538 <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>
13541 <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>
13545 BUG 648: Frameless image caption with an interwiki link
13547 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13549 <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>
13552 <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>
13556 BUG 648: Frameless image caption with a piped interwiki link
13558 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13560 <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>
13563 <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>
13567 T107474: Frameless image caption with <nowiki>
13569 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13571 <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>
13575 Escape HTML special chars in image alt text
13577 [[File:Foobar.jpg|& < > "]]
13579 <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>
13582 <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>
13586 BUG 499: Alt text should have Ӓ, not &1234;
13588 [[File:Foobar.jpg|♀]]
13590 <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>
13593 <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>
13597 Broken image caption with link
13599 parsoid=wt2html,wt2wt,html2html
13601 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13603 <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.
13606 <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>
13610 Image caption containing another image
13612 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13614 <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>
13617 <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>
13621 Image: caption containing a newline
13623 [[File:Foobar.jpg|This
13626 <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>
13629 <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>
13633 Image: caption containing leading space
13634 (The leading space should not trigger nowiki escaping in wt2wt mode)
13636 [[File:Foobar.jpg|thumb| bar]]
13638 <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>
13641 <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>
13645 Image: caption containing a table
13647 parsoid=wt2html,wt2wt,html2html
13649 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13655 and some more text.]]
13657 <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>
13660 <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
13663 <tr><th>Foo </th><th>Bar</th></tr>
13666 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13670 Bug 3090: External links other than http: in image captions
13672 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13674 <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>
13677 <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>
13683 parsoid=wt2html,wt2wt,html2html
13685 [[Image:foobar.jpg|a|class=b]]
13687 <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>
13690 <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>
13694 Localized image handling (1).
13696 parsoid=wt2html,wt2wt,html2html
13699 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13701 <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>
13704 <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>
13708 Localized image handling (2).
13711 parsoid=wt2html,wt2wt,html2html
13714 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13716 <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>
13719 <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>
13723 "border", "frameless" and "class" attributes on an image.
13726 parsoid=wt2html,wt2wt,html2html
13728 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13730 <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>
13733 <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>
13736 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13738 Invalid image attributes (bug 62500)
13741 parsoid=wt2html,wt2wt,html2html
13743 [[File:Foobar.jpg|thumb|float|left|caption]]
13745 [[File:Foobar.jpg|thumb|righ|caption]]
13747 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13749 <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>
13750 <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>
13751 <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>
13754 <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>
13755 <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>
13756 <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>
13762 #REDIRECT [[File:Barfoo.jpg]]
13765 # FIXME: Parsoid should run this test -- but we'd need to teach the
13766 # mockAPI about the redirected Barfoo.jpg image.
13770 [[Image:Barfoo.jpg]]
13772 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13777 Missing image with uploads disabled
13781 [[File:Foobaz.jpg]]
13783 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13786 <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>
13789 # Parsoid-specific testing for images
13790 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13791 # Currently imperfect due to a flaw in the Parsoid testrunner
13793 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13797 Parsoid-specific image handling - simple image with size and middle alignment
13799 [[File:Foobar.jpg|middle|50px]]
13801 <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>
13805 Parsoid-specific image handling - simple image with size, middle alignment,
13806 non-standard namespace alias
13808 parsoid=wt2wt,wt2html,html2html
13810 [[Image:Foobar.jpg|middle|50px]]
13812 <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>
13816 Parsoid-specific image handling - simple image with size and middle alignment
13819 [[File:Foobar.jpg|50px|middle]]
13821 <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>
13825 Parsoid-specific image handling - simple image with size and middle alignment
13826 and non-standard namespace name
13828 parsoid=wt2html,wt2wt,html2html
13830 [[Image:Foobar.jpg|50px|middle]]
13832 <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>
13836 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13838 [[File:Foobar.jpg|500x10px|baseline|caption]]
13840 <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>
13844 Parsoid-specific image handling - simple image with border and size spec
13846 [[File:Foobar.jpg|50px|border|caption]]
13848 <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>
13852 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13854 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13856 <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>
13860 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13863 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13865 <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>
13869 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13871 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13873 <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>
13877 Parsoid-specific image handling - thumbnail with specific size, halign,
13878 valign, and caption (existing content)
13880 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13882 <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>
13886 Parsoid-specific image handling - framed image with specific size and caption
13889 parsoid=wt2html,wt2wt,html2html
13891 [[File:Foobar.jpg|frame|500x50px|caption]]
13893 <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>
13897 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13900 parsoid=wt2html,wt2wt,html2html
13902 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13904 <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>
13908 Parsoid-specific image handling - frameless image with specific size, border, and caption
13910 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13912 <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>
13916 Parsoid-specific image handling - simple image with a formatted caption
13918 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13920 <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>
13924 Parsoid-specific image handling - caption with a template in it
13926 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13928 <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>
13932 Parsoid-specific image handling - caption with unbalanced tags in it
13934 parsoid=wt2html,wt2wt,html2html
13937 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13941 <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>
13946 Parsoid-specific image handling - empty caption (1)
13948 parsoid=wt2html,wt2wt
13950 [[File:Foobar.jpg|thumb|]]
13952 <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>
13955 # empty captions don't get serialized unless we're in the "round trip" case
13957 Parsoid-specific image handling - empty caption (2)
13961 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13962 <a href="./File:Foobar.jpg">
13963 <img resource="./File:Foobar.jpg"
13964 src="//example.com/images/3/3a/Foobar.jpg"
13965 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13966 height="25" width="220"/>
13968 <figcaption></figcaption>
13971 [[File:Foobar.jpg|thumb]]
13975 Parsoid-specific image handling - whitespace caption
13977 [[File:Foobar.jpg|thumb| ]]
13979 <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>
13983 Parsoid-specific image handling - lang option
13986 [[File:Foobar.svg|lang=de|caption]]
13990 <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>
13994 ## Edge case bugs in Parsoid from T93580
13996 T93580: 1. Templated <ref> inside block images
13998 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14002 <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>
14004 <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>
14008 T93580: 2. <ref> inside inline images
14010 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14014 <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>
14016 <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>
14020 T93580: 3. Templated <ref> inside inline images
14022 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14026 <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>
14028 <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>
14035 Subpage test/subpage
14043 subpage title=[[Subpage test]]
14047 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14052 Subpage noslash link
14054 subpage title=[[Subpage test]]
14058 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14063 Subpage test/1/2/subpage
14069 Relative subpage noslash link
14071 parsoid=wt2wt,wt2html,html2html
14072 subpage title=[[Subpage test/1/2/3/4]]
14078 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14079 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14082 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14083 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14087 Parsoid: dot-slash prefixed wikilinks
14097 </p><p>[[././baz/]]
14102 </p><p>[[././baz/]]
14107 Render invalid page names as plain text (bug 51090)
14120 [[{{echo|./../foo}}|bar]]
14121 [[{{echo|foo/.}}|bar]]
14122 [[{{echo|foo/..}}|bar]]
14123 [[{{echo|foo~~~~bar}}]]
14124 [[{{echo|foo>bar}}]]
14125 [[{{echo|foo././bar}}]]
14126 [[{{echo|foo{bar}}]]
14127 [[{{echo|foo}bar}}]]
14128 [[{{echo|foo[bar}}]]
14129 [[{{echo|foo]bar}}]]
14130 [[{{echo|foo<bar}}]]
14132 <p>[[./../foo|bar]]
14142 </p><p>[[./../foo|bar]]
14155 <p>[[./../foo|bar]]
14166 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14167 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14168 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14169 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14170 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14171 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14172 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14173 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14174 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14175 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14176 [[<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>
14184 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14189 BUG 561: {{/Subpage}}
14191 subpage title=[[Page]]
14195 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14203 Category:MediaWiki User's Guide
14211 [[:Category:MediaWiki User's Guide]]
14213 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14222 [[Category:MediaWiki User's Guide]]
14224 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14228 PAGESINCATEGORY invalid title fatal (r33546 fix)
14230 {{PAGESINCATEGORY:<bogus>}}
14237 Category with different sort key
14241 [[Category:MediaWiki User's Guide|Foo]]
14243 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14247 Category with identical sort key
14251 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14253 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14257 Category with empty sort key
14262 [[Category:MediaWiki User's Guide|]]
14264 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14268 Category with empty sort key and parentheses
14273 [[Category:Foo (bar)|]]
14275 [[Category:Foo (bar)|Foo]]
14278 ## We used to, but no longer wt2wt this test since the default serializer
14279 ## will normalize all categories to serialize on their own line.
14280 ## This wikitext usage is going to be fairly uncommon in production and
14281 ## selser will take care of preserving formatting in those scenarios.
14283 Category with link tail
14289 123[[Category:Foo]]456
14291 123[[Category:Foo]]456
14293 <p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
14297 Category with template
14302 [[Category:{{echo|Foo}}]]
14304 [[Category:{{echo|Foo}}]]
14308 Category with template in sort key
14313 [[Category:Foo|{{echo|Bar}}]]
14315 [[Category:Foo|{{echo|Bar}}]]
14319 Category with template in sort key and title
14324 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14326 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14329 ## We used to, but no longer wt2wt this test since the default serializer
14330 ## will normalize all categories to serialize on their own line.
14331 ## This wikitext usage is going to be fairly uncommon in production and
14332 ## selser will take care of preserving formatting in those scenarios.
14334 Category / paragraph interactions
14338 Foo [[Category:Baz]] Bar
14340 Foo [[Category:Baz]]
14348 [[Category:Baz]] Bar
14361 {{echo|[[Category:Baz]]}}
14374 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14375 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14376 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14377 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14378 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Baz]]"}},"i":0}}]}'/></p>
14379 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14382 ## We used to, but no longer wt2wt this test since the default serializer
14383 ## will normalize all categories to serialize on their own line.
14384 ## This wikitext usage is going to be fairly uncommon in production and
14385 ## selser will take care of preserving formatting in those scenarios.
14387 ## The whitespace on the empty line is part of the test. Please do not delete
14389 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14395 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14397 {{echo|[[Category:Foo]] and so should this!}}
14399 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14404 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14406 <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>
14409 ## Parsoid will not try to wt2wt this while preserving newlines because
14410 ## it suppresses excess newlines within list items -- and we don't want to
14411 ## introduce a special case just for categories, which is, in reality somewhat
14412 ## odd behavior -- categories are unlikely to be used in list items like this
14413 ## in top-level pages and are only likely to show up in template-generated
14414 ## list items where this RT-ing is a non-issue.
14416 ## The whitespace on the empty line is part of the test. Please do not delete
14418 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14424 [[Category:Foo]] and this should be part of the same list item
14427 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14429 <ul><li>This and this should be part of the same list item</li>
14430 <li>So should this and this should be part of the same list item</li></ul>
14433 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14434 <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>
14438 ## Newlines and categories that follow the last item of a list
14439 ## are treated differently because this (list followed by categories)
14440 ## is an extremely common pattern on wikis.
14442 3. Categories and newlines: newline suppression for last list item should RT properly
14455 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14457 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14458 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14462 4. Categories and newlines: newline suppression for last list item should RT properly
14470 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14472 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14475 ## only wt2html for this to make sure the algo only applies to the rightmost path
14477 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14490 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14492 <ul><li> d</li></ul></li></ul>
14493 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14496 ## We used to, but no longer wt2wt this test since the default serializer
14497 ## will normalize all categories to serialize on their own line.
14498 ## This wikitext usage is going to be fairly uncommon in production and
14499 ## selser will take care of preserving formatting in those scenarios.
14501 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14505 * a [[Category:Foo]]
14507 <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>
14510 # This test also demonstrates because of newline+category tunneling
14511 # through the list hander, template wrapping doesn't expand to the
14512 # containing list when the list item swallows the category.
14514 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14519 <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</span><span about="#mwt1">
14520 </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>
14524 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14528 {{echo|[[Category:Foo]]
14532 <ul><li> a</li></ul>
14534 <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">
14535 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14536 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14540 Parsoid: Serialize link to category page with colon escape
14546 [[:Category:Foo|Bar]]
14549 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14550 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14554 # We used to, but no longer wt2wt this test since the default serializer
14555 # will normalize all categories to serialize on their own line.
14556 # This wikitext usage is going to be fairly uncommon in production and
14557 # selser will take care of preventing whitespace insertion if this
14558 # occurs in an article.
14560 # html2html disabled for the same reason (whitespace insertion between
14563 # html2wt disabled because it localizes the "Category" namespace.
14565 Link prefix/suffixes aren't applied to category links
14575 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14579 Parsoid: Serialize link to file page with colon escape
14585 [[:File:Foo.png|Bar]]
14588 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14589 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14594 Parsoid: Serialize a genuine category link without colon escape
14599 [[Category:Foo|Bar]]
14601 <link rel="mw:PageProp/Category" href="./Category:Foo">
14602 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14606 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14610 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14612 [[Category:Toxine bactérienne]]
14616 Parsoid: Defaultsort
14618 {{DEFAULTSORT:Foo}}
14620 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14624 Parsoid: Defaultsort (template-generated)
14626 {{{{echo|DEFAULTSORT}}:Foo}}
14628 <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}}]}'/>
14632 ### Inter-language links
14635 Interlanguage links
14643 es:Alimento fr:Nourriture zh:食品
14645 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14646 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14647 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14651 Duplicate interlanguage links (bug 24502)
14662 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14663 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14664 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14665 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14672 Basic section headings
14679 ===Smaller headline===
14682 <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>
14685 <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>
14688 <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>
14694 Section headings with TOC
14697 === Subheadline 1 ===
14698 ===== Skipping a level =====
14699 ====== Skipping a level ======
14703 ===Another headline===
14705 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14707 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14709 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14711 <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>
14713 <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>
14720 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14722 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14728 <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>
14729 <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>
14730 <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>
14731 <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>
14732 <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>
14735 <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>
14740 TOC anchors don't collide
14748 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14750 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14751 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14752 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14753 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14757 <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>
14758 <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>
14759 <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>
14760 <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>
14764 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14766 Handling of sections up to level 6 and beyond
14769 == Level 2 Heading==
14770 === Level 3 Heading===
14771 ==== Level 4 Heading====
14772 ===== Level 5 Heading=====
14773 ====== Level 6 Heading======
14774 ======= Level 7 Heading=======
14775 ======== Level 8 Heading========
14776 ========= Level 9 Heading=========
14777 ========== Level 10 Heading==========
14779 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14781 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14783 <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>
14785 <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>
14787 <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>
14789 <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>
14791 <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>
14792 <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>
14793 <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>
14794 <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>
14795 <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>
14809 <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>
14810 <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>
14811 <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>
14812 <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>
14813 <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>
14814 <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>
14815 <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>
14816 <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>
14817 <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>
14818 <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>
14823 TOC regression (T11764)
14827 ==== title 1.1.1 ====
14832 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14834 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14836 <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>
14838 <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>
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 for heading containing <span id="..."></span> (T96153)
14865 ==<span id="old-anchor"></span>New title==
14867 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14869 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14873 <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>
14878 TOC with wgMaxTocLevel=3 (bug 6204)
14884 ==== title 1.1.1 ====
14889 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14891 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14893 <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>
14894 <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>
14897 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14899 <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>
14905 <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>
14906 <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>
14907 <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>
14908 <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>
14909 <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>
14910 <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>
14915 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14921 ====Section 1.1.1====
14922 ====Section 1.1.1.1====
14925 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14927 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14929 <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>
14932 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14936 <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>
14937 <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>
14938 <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>
14939 <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>
14940 <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>
14946 Resolving duplicate section names
14951 <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>
14952 <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>
14957 Resolving duplicate section names with differing case (bug 10721)
14962 <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>
14963 <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>
14975 Template with sections, __NOTOC__
14982 <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>
14983 <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>
14984 <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>
14985 <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>
14990 __NOEDITSECTION__ keyword
14996 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
14997 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15002 Link inside a section heading
15004 ==Section with a [[Main Page|link]] in it==
15006 <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>
15011 TOC regression (T14077)
15018 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15020 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15022 <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>
15025 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15029 <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>
15030 <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>
15031 <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>
15036 BUG 1219 URL next to image (good)
15038 http://example.com [[File:Foobar.jpg]]
15040 <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>
15043 <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>
15047 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15050 The line above must have a trailing space!
15053 But just in case it doesn't...
15055 <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>
15056 <p>The line above must have a trailing space!
15058 <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>
15059 <p>But just in case it doesn't...
15064 Header with special characters (bug 25462)
15066 The tooltips shall not show entities to the user (ie. be double escaped)
15083 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15085 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15087 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15088 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15089 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15090 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15091 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15095 <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>
15098 <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>
15101 <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>
15104 <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>
15107 <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>
15113 Header with space, plus and underscore as entity
15115 Id should not contain + for spaces
15117 == Space between Text ==
15120 == Space-Entity between Text ==
15123 == Plus+between+Text ==
15126 == Plus-Entity+between+Text ==
15129 == Underscore_between_Text ==
15132 == Underscore-Entity_between_Text ==
15135 [[#Space between Text]]
15136 [[#Space-Entity between Text]]
15137 [[#Plus+between+Text]]
15138 [[#Plus-Entity+between+Text]]
15139 [[#Underscore_between_Text]]
15140 [[#Underscore-Entity_between_Text]]
15142 <p>Id should not contain + for spaces
15144 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15146 <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>
15147 <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>
15148 <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>
15149 <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>
15150 <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>
15151 <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>
15155 <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>
15158 <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>
15161 <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>
15164 <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>
15167 <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>
15170 <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>
15172 </p><p><a href="#Space_between_Text">#Space between Text</a>
15173 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15174 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15175 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15176 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15177 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15182 Headers with excess '=' characters
15183 (Are similar tests necessary beyond the 1st level?)
15187 =''italic'' heading==
15188 ==''italic'' heading=
15190 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15192 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15193 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15194 <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>
15195 <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>
15199 <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>
15200 <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>
15201 <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>
15202 <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>
15207 HTML headers vs TOC (bug 23393)
15208 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15220 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15222 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15224 <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>
15225 <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>
15228 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15230 <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>
15231 <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>
15237 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15238 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15239 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15240 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15241 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15242 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15247 Single-line or multiline-comments can follow headings
15249 parsoid=wt2html,wt2wt
15257 <h2><span class="mw-headline" id="foo">foo</span></h2>
15258 <h2><span class="mw-headline" id="bar">bar</span></h2>
15259 <h2><span class="mw-headline" id="baz">baz</span></h2>
15264 BUG 1219 URL next to image (broken)
15266 http://example.com[[File:Foobar.jpg]]
15268 <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>
15271 <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>
15275 Bug 1186 news: in the middle of text
15277 http://en.wikinews.org/wiki/Wikinews:Workplace
15279 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15285 Namespaced link must have a title
15294 Namespaced link must have a title (bad fragment version)
15296 [[Project:#fragment]]
15298 <p>[[Project:#fragment]]
15304 ### HTML tags and HTML attributes
15308 div with no attributes
15310 <div>HTML rocks</div>
15312 <div>HTML rocks</div>
15317 div with double-quoted attribute
15319 <div id="rock">HTML rocks</div>
15321 <div id="rock">HTML rocks</div>
15326 div with single-quoted attribute
15328 <div id='rock'>HTML rocks</div>
15330 <div id="rock">HTML rocks</div>
15335 div with unquoted attribute
15337 <div id=rock>HTML rocks</div>
15339 <div id="rock">HTML rocks</div>
15344 div with illegal double attributes
15346 <div id="a" id="b">HTML rocks</div>
15348 <div id="b">HTML rocks</div>
15352 # FIXME: produce empty string instead of "class" in the PHP parser, following
15355 div with empty attribute value, space before equals
15359 <div class =>HTML rocks</div>
15361 <div class="">HTML rocks</div>
15366 div with multiple empty attribute values
15370 <div id= title=>HTML rocks</div>
15372 <div id="" title="">HTML rocks</div>
15377 table with multiple empty attribute values
15385 <table title="" id="">
15386 <tbody><tr><td> hi</td></tr>
15391 div with braces in attribute value
15393 <div title="{}">Foo</div>
15395 <div title="{}">Foo</div>
15398 <div title="{}">Foo</div>
15401 # This it very inconsistent in the PHP parser: it returns
15402 # class="class" if there is a space between the name and the equal sign (see
15403 # 'div with empty attribute value, space before equals'), but strips the
15404 # attribute completely if the space is missing. We hope that not much content
15405 # depends on this, so are implementing the behavior below in Parsoid for
15406 # consistencies' sake.
15407 # FIXME: fix this behavior in the PHP parser?
15409 div with empty attribute value, no space before equals
15411 parsoid=wt2html,html2html
15413 <div class=>HTML rocks</div>
15415 <div>HTML rocks</div>
15418 <div class="">HTML rocks</div>
15422 HTML multiple attributes correction
15424 <p class="error" class="awesome">Awesome!</p>
15426 <p class="awesome">Awesome!</p>
15431 Table multiple attributes correction
15434 !+ class="error" class="awesome"| status
15439 <th class="awesome"> status
15447 <DIV ID="x">HTML ROCKS</DIV>
15449 <div id="x">HTML ROCKS</div>
15454 Non-ASCII pseudo-tags are rendered as text
15463 Pseudo-tag with URL 'name' renders as url link
15465 <http://example.com/>
15467 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15472 text with amp in the middle of nowhere
15476 <p>Remember AT&T?
15481 text with character entity: eacute
15483 I always thought é was a cute letter.
15485 <p>I always thought é was a cute letter.
15488 <p>I always thought é was a cute letter.</p>
15492 text with entity-escaped character entity-like string: eacute
15494 I always thought &eacute; was a cute letter.
15496 <p>I always thought &eacute; was a cute letter.
15501 text with undefined character entity: xacute
15503 I always thought &xacute; was a cute letter.
15505 <p>I always thought &xacute; was a cute letter.
15512 <data value="5">five</data>
15513 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15514 <mark>This highlighted text</mark>
15516 <p><data value="5">five</data>
15517 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15518 <mark>This highlighted text</mark>
15523 HTML tag with leading space is parsed as text
15527 <p>< div>foo< /div>
15532 ### Nesting tests (see bug 41545, 50604, 51081)
15535 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15536 # Note that html2wt is considerably more difficult if we use <b> in
15537 # the test case, instead of <big>
15539 Ensure that HTML adoption agency algorithm is properly implemented.
15541 <big>X<big>Y</big>Z</big>
15543 <p><big>X<big>Y</big>Z</big>
15547 # This was bug 41545 in the PHP parser.
15548 # Note that tidy doesn't handle this correctly.
15552 <kbd>X<kbd>Y</kbd>Z</kbd>
15554 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15558 # The following cases were bug 51081 in the PHP parser.
15559 # Note that there are some other nestable tags (b, i, etc) which are
15560 # not covered; see bug 51081 for discussion.
15562 # Note that tidy doesn't handle this correctly.
15566 <em>X<em>Y</em>Z</em>
15568 <p><em>X<em>Y</em>Z</em>
15572 # Note that tidy doesn't handle this correctly.
15574 Nesting of <strong>
15576 <strong>X<strong>Y</strong>Z</strong>
15578 <p><strong>X<strong>Y</strong>Z</strong>
15587 <p><q>X<q>Y</q>Z</q></p>
15590 # Note that tidy doesn't handle this correctly.
15594 <ruby>X<ruby>Y</ruby>Z</ruby>
15596 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15600 # Note that tidy doesn't handle this correctly.
15604 <bdo>X<bdo>Y</bdo>Z</bdo>
15606 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15618 [[Media:Foobar.jpg]]
15620 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15625 Media link with text
15627 [[Media:Foobar.jpg|A neat file to look at]]
15629 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15633 # FIXME: this is still bad HTML tag nesting
15634 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15636 Media link with nasty text
15638 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15640 <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>
15643 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15644 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15648 Media link to nonexistent file (bug 1702)
15650 [[Media:No such.jpg]]
15652 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15657 Image link to nonexistent file (bug 1850 - good)
15659 [[File:No_such.jpg]]
15661 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15664 <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>
15668 :Image link to nonexistent file (bug 1850 - bad)
15670 [[:Image:No such.jpg]]
15672 <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>
15675 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15681 Character reference normalization in link text (bug 1938)
15683 [[Main Page|this&that]]
15685 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15692 Test for unicode normalization
15694 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15698 (bug 19451) Links should refer to the normalized form.
15706 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15707 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15708 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15709 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15710 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15715 Empty attribute crash test (bug 2067)
15717 <font color="">foo</font>
15719 <p><font color="">foo</font>
15724 Empty attribute crash test single-quotes (bug 2067)
15726 <font color=''>foo</font>
15728 <p><font color="">foo</font>
15733 Attribute test: equals, then nothing
15735 <font color=>foo</font>
15737 <p><font>foo</font>
15742 Attribute test: unquoted value
15744 <font color=x>foo</font>
15746 <p><font color="x">foo</font>
15751 Attribute test: unquoted but illegal value (hash)
15753 <font color=#x>foo</font>
15755 <p><font color="#x">foo</font>
15759 # Parsoid does not serialize to empty attribute syntax,
15760 # so wt2wt and html2wt cases are skipped
15762 Attribute test: no value (T54330)
15764 parsoid=wt2html,html2html
15766 <font color>foo</font>
15768 <p><font color="">foo</font>
15771 <p><font color="">foo</font></p>
15775 Bug 2095: link with three closing brackets
15779 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15782 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15786 Bug 2095: link with pipe and three closing brackets
15788 [[Main Page|link]]]
15790 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15793 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15797 Bug 2095: link with pipe and three closing brackets, version 2
15799 [[Main Page|[http://example.com/]]]
15801 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15804 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15813 Template:Dangerous attribute
15815 " onmouseover="alert(document.cookie)
15819 Template:Dangerous style attribute
15821 border-size: expression(alert(document.cookie))
15827 <div style="float: right; {{{1}}}">Magic div</div>
15831 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15833 <div title="{{test}}"></div>
15835 <div title="This is a test template"></div>
15839 # Parsoid has enough context to handle this case
15841 Bug 2304: HTML attribute safety (dangerous template; 2309)
15843 <div title="{{dangerous attribute}}"></div>
15845 <div title=""></div>
15848 <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>
15852 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15854 <div style="{{dangerous style attribute}}"></div>
15856 <div style="/* insecure input */"></div>
15861 Bug 2304: HTML attribute safety (safe parameter; 2309)
15863 {{div style|width: 200px}}
15865 <div style="float: right; width: 200px">Magic div</div>
15870 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15872 {{div style|width: expression(alert(document.cookie))}}
15874 <div style="/* insecure input */">Magic div</div>
15879 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15881 {{div style|"><script>alert(document.cookie)</script>}}
15883 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15888 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
15890 {{div style|" ><script>alert(document.cookie)</script>}}
15892 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15897 Bug 2304: HTML attribute safety (link)
15899 <div title="[[Main Page]]"></div>
15901 <div title="[[Main Page]]"></div>
15906 Bug 2304: HTML attribute safety (italics)
15908 <div title="''foobar''"></div>
15910 <div title="''foobar''"></div>
15915 Bug 2304: HTML attribute safety (bold)
15917 <div title="'''foobar'''"></div>
15919 <div title="'''foobar'''"></div>
15925 Bug 2304: HTML attribute safety (ISBN)
15927 <div title="ISBN 1234567890"></div>
15929 <div title="ISBN 1234567890"></div>
15934 Bug 2304: HTML attribute safety (RFC)
15936 <div title="RFC 1234"></div>
15938 <div title="RFC 1234"></div>
15943 Bug 2304: HTML attribute safety (PMID)
15945 <div title="PMID 1234567890"></div>
15947 <div title="PMID 1234567890"></div>
15952 Bug 2304: HTML attribute safety (web link)
15954 <div title="http://example.com/"></div>
15956 <div title="http://example.com/"></div>
15961 Bug 2304: HTML attribute safety (named web link)
15963 <div title="[http://example.com/ link]"></div>
15965 <div title="[http://example.com/ link]"></div>
15970 Bug 3244: HTML attribute safety (extension; safe)
15972 <div style="<nowiki>background:blue</nowiki>"></div>
15974 <div style="background:blue"></div>
15979 Bug 3244: HTML attribute safety (extension; unsafe)
15981 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
15983 <div style="/* insecure input */"></div>
15987 # More MSIE fun discovered by Tom Gilder
15990 MSIE CSS safety test: spurious slash
15992 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
15994 <div style="/* insecure input */">evil</div>
15999 MSIE CSS safety test: hex code
16001 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16003 <div style="/* insecure input */">evil</div>
16008 MSIE CSS safety test: comment in url
16010 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16012 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16017 MSIE CSS safety test: comment in expression
16019 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16021 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16026 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16028 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16030 <p style="/* invalid control char */">A</p>
16035 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16037 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16038 <div style="top:EXPRESSION(alert())">B</div>
16040 <p style="/* insecure input */">A</p>
16041 <div style="/* insecure input */">B</div>
16046 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16048 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16049 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16051 <div style="/* insecure input */">A</div>
16052 <p style="/* insecure input */">B</p>
16057 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16059 <div style="background-image:url⁽javascript:alert())">A</div>
16060 <div style="background-image:url₍javascript:alert())">B</div>
16061 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16063 <div style="/* insecure input */">A</div>
16064 <div style="/* insecure input */">B</div>
16065 <p style="/* insecure input */">C</p>
16069 # FIXME: Parsoid fails to sanitize this! See T58846.
16074 title="data:text/html,<img src=1 onerror=alert(1)>"
16075 style="-o-link:attr(title);-o-link-source:current">X</div>
16077 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16082 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16084 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16085 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16086 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16087 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16088 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16089 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16090 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16092 <p style="/* insecure input */">A</p>
16093 <p style="/* insecure input */">B</p>
16094 <p style="/* insecure input */">C</p>
16095 <p style="/* insecure input */">D</p>
16096 <p style="/* insecure input */">E</p>
16097 <p style="/* insecure input */">F</p>
16098 <p style="/* insecure input */">G</p>
16103 Table attribute legitimate extension
16106 !+ style="<nowiki>color:blue</nowiki>"| status
16111 <th style="color:blue"> status
16117 Table attribute safety
16120 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16125 <th style="/* insecure input */"> status
16131 CSS line continuation 1
16133 <div style="background-image: u\ rl(test.jpg);"></div>
16135 <div style="/* insecure input */"></div>
16140 CSS line continuation 2
16142 <div style="background-image: u\ rl(test.jpg); "></div>
16144 <div style="/* invalid control char */"></div>
16155 Expansion of multi-line templates in attribute values (bug 6255)
16157 <div style="background: {{identity|#00FF00}}">-</div>
16159 <div style="background: #00FF00">-</div>
16165 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16167 <div style="background:
16170 <div style="background: #00FF00">-</div>
16173 <div style="background:
16178 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16180 <div style="background: #00FF00">-</div>
16182 <div style="background: #00FF00">-</div>
16187 evil <math>-wiki-tags without Extension:Math enabled
16189 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16191 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16195 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16198 Parser hook: empty input
16211 Parser hook: empty input using terminated empty elements
16224 Parser hook: empty input using terminated empty elements (space before)
16237 Parser hook: basic input
16251 Parser hook: case insensitive
16265 Parser hook: case insensitive, redux
16278 Parser hook: nested tags
16282 <tag><tag></tag></tag>
16293 Parser hook: basic arguments
16295 <tag width=200 height = "100" depth = '50' square></tag>
16310 Parser hook: argument containing a forward slash (bug 5344)
16312 <tag filename='/tmp/bla'></tag>
16317 'filename' => '/tmp/bla',
16324 Parser hook: empty input using terminated empty elements (bug 2374)
16337 # </tag> should be output literally since there is no matching tag that begins it
16339 Parser hook: basic arguments using terminated empty elements (bug 2374)
16341 <tag width=200 height = "100" depth = '50' square/>
16360 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16364 Parser hook: static parser hook not inside a comment
16366 <statictag>hello, world</statictag>
16367 <statictag action=flush/>
16375 Parser hook: static parser hook inside a comment
16377 <!-- <statictag>hello, world</statictag> -->
16378 <statictag action=flush/>
16384 # Nested template calls; this case was broken by Parser.php rev 1.506,
16388 Template:One-parameter
16390 (My parameter is: {{{1}}})
16394 Template:Map-one-parameter
16396 {{{{{1}}}|{{{2}}}}}
16400 Nested template calls
16402 {{Map-one-parameter|One-parameter|param}}
16404 <p>(My parameter is: param)
16413 # HTML+Tidy effectively strips out the empty tags completely
16414 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16415 # which Tidy would have done for the PHP parser had there been content inside it.
16417 Sanitizer: Closing of open tags
16419 <s></s><table></table>
16421 <s></s><table></table>
16424 <p><s></s></p><table></table>
16428 Sanitizer: Closing of open but not closed tags
16437 Sanitizer: Closing of closed but not open tags
16447 Sanitizer: Closing of closed but not open table tags
16451 Table not started</td></tr></table>
16453 <p>Table not started</p>
16455 <p>Table not started</p>
16459 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16461 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16463 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16467 # In HTML5, the restrictions are that id must contain at least one character,
16468 # and must not contain any space characters.
16470 Sanitizer: Validating the contents of the id attribute (bug 4515)
16474 <br id="" /><br id="a space" />
16479 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16481 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16485 <br id="foo" /><br id="foo" />
16487 Something need to be done. foo-2 ?
16491 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16494 <meta itemprop="hello" content="world">
16495 <meta http-equiv="refresh" content="5">
16496 <meta itemprop="hello" http-equiv="refresh" content="5">
16497 <link itemprop="hello" href="{{SERVER}}">
16498 <link rel="stylesheet" href="{{SERVER}}">
16499 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16503 <p> <meta itemprop="hello" content="world" />
16504 <meta http-equiv="refresh" content="5">
16505 <meta itemprop="hello" content="5" />
16507 <link itemprop="hello" href="http://example.org" />
16508 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16509 <link itemprop="hello" href="http://example.org" />
16515 Language converter: output gets cut off unexpectedly (bug 5757)
16519 this bit is safe: }-
16521 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16523 then we get cut off here: }-
16525 all additional text is vanished
16527 <p>this bit is safe: }-
16528 </p><p>but if we add a conversion instance: xxx
16529 </p><p>then we get cut off here: }-
16530 </p><p>all additional text is vanished
16535 Self closed html pairs (bug 5487)
16538 <center><font id="bug" />Centered text</center>
16539 <div><font id="bug2" />In div text</div>
16541 <center><font id="bug" />Centered text</center>
16542 <div><font id="bug2" />In div text</div>
16551 Punctuation: nbsp before exclamation
16555 <p>C'est grave !
16560 Punctuation: CSS !important (bug 11874)
16562 <div style="width:50% !important">important</div>
16564 <div style="width:50% !important">important</div>
16569 Punctuation: CSS ! important (bug 11874; with space after)
16571 <div style="width:50% ! important">important</div>
16573 <div style="width:50% ! important">important</div>
16578 HTML bullet list, closed tags (bug 5497)
16591 <ul data-parsoid='{"stx":"html"}'>
16592 <li data-parsoid='{"stx":"html"}'>One</li>
16593 <li data-parsoid='{"stx":"html"}'>Two</li>
16599 HTML bullet list, unclosed tags (bug 5497)
16611 <ul data-parsoid='{"stx":"html"}'>
16612 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16613 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16619 HTML ordered list, closed tags (bug 5497)
16632 <ol data-parsoid='{"stx":"html"}'>
16633 <li data-parsoid='{"stx":"html"}'>One</li>
16634 <li data-parsoid='{"stx":"html"}'>Two</li>
16640 HTML ordered list, unclosed tags (bug 5497)
16653 <ol data-parsoid='{"stx":"html"}'>
16654 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16655 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16661 HTML nested bullet list, closed tags (bug 5497)
16686 HTML nested bullet list, open tags (bug 5497)
16723 HTML nested ordered list, closed tags (bug 5497)
16748 HTML nested ordered list, open tags (bug 5497)
16785 HTML ordered list item with parameters oddity
16787 <ol><li id="fragment">One</li>
16790 <ol><li id="fragment">One</li>
16795 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16797 bug 5918: autonumbering
16799 [http://first/] [http://second] [ftp://ftp]
16803 [mailto:enclosed@mail.tld With target]
16805 [mailto:enclosed@mail.tld]
16807 mailto:inline@mail.tld
16809 <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>
16810 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16811 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16812 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16813 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16816 <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>
16817 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16818 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16819 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16820 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16825 # Security and HTML correctness
16826 # From Nick Jenkins' fuzz testing
16830 Fuzz testing: Parser13
16845 Fuzz testing: Parser14
16850 <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>
16851 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16853 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16859 <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>
16861 <div id="toc" class="toc">
16862 <div id="toctitle">
16866 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16873 Fuzz testing: Parser14-table
16878 <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>
16879 <table style="__TOC__">
16884 <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>
16885 <table style="__TOC__">
16892 # Known to produce bogus xml (extra </td>)
16894 Fuzz testing: Parser16
16923 Fuzz testing: Parser21
16926 ! irc://{{ftp://a" onmouseover="alert('hello world');"
16931 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
16941 Fuzz testing: Parser22
16943 http://===r:::https://b
16947 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
16955 # Known to produce bad XML for now
16957 Fuzz testing: Parser24
16964 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
16965 <br style="onmouseover='alert(document.cookie);' " />
16967 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16972 <u class="|">}}}} >
16973 <br style="onmouseover='alert(document.cookie);'" />
16975 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
16984 # Note: the current result listed for this is not what the original one was,
16985 # but the original bug was JavaScript injection, which is fixed in any case.
16986 # It's not clear that the original result listed was any more correct than the
16987 # current one. Original result:
16990 # <li class="||">
16991 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
16993 Fuzz testing: Parser25 (bug 6055)
16999 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17001 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17006 Fuzz testing: URL adjacent extension (with space, clean)
17008 http://example.com <nowiki>junk</nowiki>
17010 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17013 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17017 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17019 http://example.com<nowiki>junk</nowiki>
17021 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17024 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17028 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17030 http://example.com<pre>junk</pre>
17032 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17035 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17040 <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>
17044 Fuzz testing: image with bogus manual thumbnail
17046 [[Image:foobar.jpg|thumbnail= ]]
17048 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17051 <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>
17055 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17057 <pre dir=" "></pre>
17059 <pre dir=" "></pre>
17064 Parsing optional HTML elements (Bug 6171)
17069 <td> Some tabular data</td>
17070 <td> More tabular data ...
17071 <td> And yet som tabular data</td>
17077 <td> Some tabular data</td>
17078 <td> More tabular data ...
17079 </td><td> And yet som tabular data</td>
17086 Correct handling of <td>, <tr> (Bug 6171)
17091 <td> Some tabular data</td>
17092 <td> More tabular data ...</td>
17093 <td> And yet som tabular data</td>
17099 <td> Some tabular data</td>
17100 <td> More tabular data ...</td>
17101 <td> And yet som tabular data</td>
17109 Parsing crashing regression (fr:JavaScript)
17113 <p></body></x>
17118 Inline wiki vs wiki block nesting
17124 <p><b>Bold paragraph</b>
17125 </p><p>New wiki paragraph
17129 # FIXME: The current php output is documented
17130 # and desired output is the parsoid target.
17132 Inline HTML vs wiki block nesting
17138 <p><b>Bold paragraph
17139 </p><p>New wiki paragraph</b>
17142 <p><b>Bold paragraph</b>
17143 </p><p>New wiki paragraph
17147 # Original result was this:
17148 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17150 # While that might be marginally more intuitive, maybe, the six-apostrophe
17151 # construct is clearly pathological and the result stated here (which is what
17152 # the parser actually does) is about as reasonable as anything.
17154 Mixing markup for italics and bold
17157 '''bold''''''bold''bolditalics'''''
17159 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17167 Article for special page transclusion test
17171 Special page transclusion
17174 {{Special:Prefixindex/Xyzzyx}}
17176 <div class="mw-prefixindex-body"><ul class="mw-prefixindex-list"><li> <a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a> </li>
17182 Special page transclusion twice (bug 5021)
17185 {{Special:Prefixindex/Xyzzyx}}
17186 {{Special:Prefixindex/Xyzzyx}}
17188 <div class="mw-prefixindex-body"><ul class="mw-prefixindex-list"><li> <a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a> </li>
17190 <div class="mw-prefixindex-body"><ul class="mw-prefixindex-list"><li> <a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a> </li>
17196 Transclusion of default MediaWiki message
17198 {{MediaWiki:Mainpage}}
17205 Transclusion of nonexistent MediaWiki message
17207 {{MediaWiki:Mainpagexxx}}
17209 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17214 Transclusion of MediaWiki message with underscore
17216 {{MediaWiki:history_short}}
17223 Transclusion of MediaWiki message with space
17225 {{MediaWiki:history short}}
17232 Invalid header with following text
17242 Section extraction test (section 0)
17262 Section extraction test (section 1)
17284 Section extraction test (section 2)
17305 Section extraction test (section 3)
17325 Section extraction test (section 4)
17349 Section extraction test (section 5)
17369 Section extraction test (section 6)
17390 Section extraction test (section 7)
17410 Section extraction test (section 8)
17430 Section extraction test (section 9)
17451 Section extraction test (section 10)
17471 Section extraction test (nonexistent section 11)
17490 Section extraction test with bogus heading (section 1)
17495 ==bogus== not a legal section
17499 ==bogus== not a legal section
17503 Section extraction test with bogus heading (section 2)
17508 ==bogus== not a legal section
17515 Section extraction test with comment after heading (section 1)
17527 Section extraction test with comment after heading (section 2)
17539 Section extraction test with bogus <nowiki> heading (section 1)
17544 ==bogus== <nowiki>not a legal section</nowiki>
17548 ==bogus== <nowiki>not a legal section</nowiki>
17552 Section extraction test with bogus <nowiki> heading (section 2)
17557 ==bogus== <nowiki>not a legal section</nowiki>
17563 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17564 # instead of respecting commented sections
17566 Section extraction prefixed by comment (section 1)
17577 Section extraction prefixed by comment (section 2)
17587 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17588 # instead of respecting HTML-style headings
17590 Section extraction, mixed wiki and html (section 1)
17606 Section extraction, mixed wiki and html (section 2)
17622 # Formerly testing for bug 3342
17624 Section extraction, heading surrounded by <noinclude>
17628 <noinclude>==unmarked==</noinclude>
17634 # Test behavior of bug 19910
17636 Sectiion with all-equals
17641 The line above must have a trailing space
17644 But just in case it doesn't...
17648 But just in case it doesn't...
17652 Section replacement test (section 0)
17683 Section replacement test (section 1)
17712 Section replacement test (section 2)
17742 Section replacement test (section 3)
17773 Section replacement test (section 4)
17800 Section replacement test (section 5)
17831 Section replacement test (section 6)
17861 Section replacement test (section 7)
17892 Section replacement test (section 8)
17923 Section replacement test (section 9)
17952 Section replacement test (section 10)
17982 Section replacement test with initial whitespace (bug 13728)
17986 Preformatted initial line
17990 Preformatted initial line
17997 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18009 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18022 Section extraction, <pre> around bogus header (bug 10309)
18039 Section replacement, <pre> around bogus header (bug 10309)
18041 noxml replace=2,"xxx"
18061 Handling of 
 in URLs
18065 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18068 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18070 a</a></li></ul></li></ul>
18074 Handling of %0A in URLs
18078 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18081 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18085 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18087 5 quotes, code coverage +1 line
18094 <p><b><i></i></b></p>
18097 # same html as previous, but wikitext adjusted to match parsoid html2wt
18098 # note that wt2html and html2html will put the <i> before the <b>
18100 5 quotes, code coverage +1 line w/ nowiki (1)
18102 parsoid=wt2wt,html2wt
18104 '''''<nowiki/>'''''
18109 <p><b><i></i></b></p>
18112 # same as previous, just swapping the <i> and <b>
18114 5 quotes, code coverage +1 line w/ nowiki (2)
18116 '''''<nowiki/>'''''
18121 <p><i><b></b></i></p>
18125 Special:Search page linking.
18129 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18134 {{!}} is a magic word
18136 {{!}} is a magic word there and {{!}} is still a magic word here
18137 | is not a magic word here but {{!}} is still a magic word here
18139 <p>| is a magic word there and | is still a magic word here
18140 | is not a magic word here but | is still a magic word here
18143 <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
18144 | 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>
18151 title=[[Parser test]]
18156 * {{FULLPAGENAMEE}}
18158 * {{BASEPAGENAMEE}}
18162 * {{ROOTPAGENAMEE}}
18164 * {{TALKPAGENAMEE}}
18165 * {{SUBJECTPAGENAME}}
18166 * {{SUBJECTPAGENAMEE}}
18169 * {{NAMESPACENUMBER}}
18173 * {{SUBJECTSPACEE}}
18174 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18176 <ul><li> Parser test</li>
18177 <li> Parser_test</li>
18178 <li> Parser test</li>
18179 <li> Parser_test</li>
18180 <li> Parser test</li>
18181 <li> Parser_test</li>
18182 <li> Parser test</li>
18183 <li> Parser_test</li>
18184 <li> Parser test</li>
18185 <li> Parser_test</li>
18186 <li> Talk:Parser test</li>
18187 <li> Talk:Parser_test</li>
18188 <li> Parser test</li>
18189 <li> Parser_test</li>
18197 <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>
18200 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18210 image4 |300px| centre
18211 image5.svg| http://///////
18216 <ul class="gallery mw-gallery-traditional">
18217 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18218 <div class="thumb" style="height: 150px;">Image1.png</div>
18219 <div class="gallerytext">
18222 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18223 <div class="thumb" style="height: 150px;">Image2.gif</div>
18224 <div class="gallerytext">
18229 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18230 <div class="thumb" style="height: 150px;">Image3</div>
18231 <div class="gallerytext">
18234 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18235 <div class="thumb" style="height: 150px;">Image4</div>
18236 <div class="gallerytext">
18241 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18242 <div class="thumb" style="height: 150px;">Image5.svg</div>
18243 <div class="gallerytext">
18244 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18248 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18249 <div class="thumb" style="height: 150px;">* image6</div>
18250 <div class="gallerytext">
18258 Gallery (with options)
18260 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18261 File:Nonexistent.jpg|caption
18262 File:Nonexistent.jpg
18263 image:foobar.jpg|some '''caption''' [[Main Page]]
18265 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18268 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18269 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18270 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18271 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18272 <div class="gallerytext">
18277 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18278 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18279 <div class="gallerytext">
18282 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18283 <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>
18284 <div class="gallerytext">
18285 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18289 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18290 <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>
18291 <div class="gallerytext">
18294 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18295 <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>
18296 <div class="gallerytext">
18306 Gallery with link that has fragment
18309 image:foobar.jpg|link=Main_Page
18310 image:foobar.jpg|link=Main_Page#section
18311 image:foobar.jpg|link=Main Page#section|caption
18314 <ul class="gallery mw-gallery-traditional">
18315 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18316 <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>
18317 <div class="gallerytext">
18320 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18321 <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>
18322 <div class="gallerytext">
18325 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18326 <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>
18327 <div class="gallerytext">
18337 Gallery with wikitext inside caption
18340 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18341 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18344 <ul class="gallery mw-gallery-traditional">
18345 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18346 <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>
18347 <div class="gallerytext">
18348 <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>
18352 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18353 <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>
18354 <div class="gallerytext">
18355 <p>This is a test template
18364 gallery (with showfilename option)
18366 <gallery showfilename>
18367 File:Nonexistent.jpg|caption
18368 File:Nonexistent.jpg
18369 image:foobar.jpg|some '''caption''' [[Main Page]]
18373 <ul class="gallery mw-gallery-traditional">
18374 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18375 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18376 <div class="gallerytext">
18377 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18382 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18383 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18384 <div class="gallerytext">
18385 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18389 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18390 <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>
18391 <div class="gallerytext">
18392 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18393 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18397 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18398 <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>
18399 <div class="gallerytext">
18400 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18409 Gallery (with namespace-less filenames)
18412 File:Nonexistent.jpg
18418 <ul class="gallery mw-gallery-traditional">
18419 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18420 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18421 <div class="gallerytext">
18424 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18425 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18426 <div class="gallerytext">
18429 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18430 <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>
18431 <div class="gallerytext">
18434 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18435 <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>
18436 <div class="gallerytext">
18444 HTML Hex character encoding (spells the word "JavaScript")
18446 parsoid=wt2html,wt2wt,html2html
18448 JavaScript
18450 <p>JavaScript
18455 <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>
18459 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18463 <p>&#xsee;&#XSEE;
18466 <p>&#xsee;&#XSEE;</p>
18470 HTML Hex character encoding mixed case
18472 parsoid=wt2html,wt2wt,html2html
18481 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18484 # See: http://www.w3.org/TR/html5/syntax.html#character-references
18485 # Note that U+000C (form feed) is not a valid XML character, so
18486 # it is banned even though allowed in HTML5.
18488 Illegal character references (T106578)
18493 ; Control (low): 
18494 ; Control (high):  Ÿ
18495 ; Surrogate: ��
18496 ; This is an okay astral character: 💩
18505 <dt>Control (low)</dt>
18507 <dt>Control (high)</dt>
18508 <dd>&#x7F; &#x9F;</dd>
18510 <dd>&#xD83D;&#xDCA9;</dd>
18511 <dt>This is an okay astral character</dt>
18517 __FORCETOC__ override
18529 ISBN 978-0-1234-56 789
18531 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18534 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18536 <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>
18540 ISBN followed by 5 spaces
18551 ISBN ISBN 1234567890
18553 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18556 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18559 # Uppercase X and lowercase x as well
18570 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18571 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
18572 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18573 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
18574 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18575 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
18578 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18579 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
18580 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18581 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
18582 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
18583 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
18587 ISBN with empty prefix (parsoid test)
18591 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18594 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
18598 Bug 22905: <abbr> followed by ISBN followed by </a>
18600 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18602 <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>
18605 <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>
18613 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18618 Double RFC with a wiki link
18622 <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>
18631 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18634 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18638 Centre-aligned image
18640 [[Image:foobar.jpg|centre]]
18642 <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>
18649 [[Image:foobar.jpg|none]]
18651 <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>
18656 Width + Height sized image (using px) (height is ignored)
18658 [[Image:foobar.jpg|640x480px]]
18660 <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>
18665 Width-sized image (using px, no following whitespace)
18667 [[Image:foobar.jpg|640px]]
18669 <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>
18674 Width-sized image (using px, with following whitespace - test regression from r39467)
18676 [[Image:foobar.jpg|640px ]]
18678 <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>
18683 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18685 [[Image:foobar.jpg| 640px]]
18687 <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>
18692 Image with page parameter
18696 [[File:LoremIpsum.djvu|page=2]]
18698 <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>
18701 <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>
18705 Another italics / bold test
18713 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18719 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18722 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18727 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18729 Images with the "|" character in the comment
18731 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18733 <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>
18736 <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>
18740 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18742 <html><script>alert(1);</script></html>
18744 <p><html><script>alert(1);</script></html>
18749 HTML with raw HTML ($wgRawHtml==true)
18753 <html><script>alert(1);</script></html>
18755 <p><script>alert(1);</script>
18760 Parents of subpages, one level up
18762 subpage title=[[Subpage test/L1/L2/L3]]
18766 <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>
18772 Parents of subpages, one level up, not named
18774 subpage title=[[Subpage test/L1/L2/L3]]
18778 <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>
18785 Parents of subpages, two levels up
18787 subpage title=[[Subpage test/L1/L2/L3]]
18793 <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
18794 </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>
18799 Parents of subpages, two levels up, without trailing slash or name.
18801 subpage title=[[Subpage test/L1/L2/L3]]
18810 Parents of subpages, two levels up, with lots of extra trailing slashes.
18812 subpage title=[[Subpage test/L1/L2/L3]]
18816 <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>
18821 Subpage test/L1/L2/L3Sibling
18827 Transclusion of a sibling page (one level up)
18829 subpage title=[[Subpage test/L1/L2/L3]]
18838 Transclusion of a child page
18840 subpage title=[[Subpage test/L1/L2]]
18849 Non-transclusion because of too many up levels
18851 subpage title=[[Subpage test/L1/L2/L3]]
18853 {{../../../../More than parent}}
18855 <p>{{../../../../More than parent}}
18860 Definition list code coverage
18866 <dl><dt> title  </dt>
18868 <dt> title </dt>
18874 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18875 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18876 <dt>title</dt><dd> def</dd></dl>
18880 Don't fall for the self-closing div
18882 <div>hello world</div/>
18884 <div>hello world</div>
18893 <p>[[:Template:Msg]]
18902 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18906 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18908 Always escape literal '>' in output, not just after '<'
18922 <p>This is a test template
18923 This is a test template
18935 Inclusion of !userCanEdit() content
18939 <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>
18945 Out-of-order TOC heading levels
18954 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
18956 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
18958 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
18959 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
18962 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
18964 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
18965 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
18971 <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>
18972 <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>
18973 <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>
18974 <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>
18975 <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>
18976 <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>
18982 ISBN with a dummy number
18992 ISBN with space-delimited number
18996 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19002 ISBN with multiple spaces, no number
19021 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19022 </p><p>ISBN 12345678901
19028 ISBN with trailing year (bug 8110)
19030 ISBN 1-234-56789-0 - 2006
19032 ISBN 1 234 56789 0 - 2006
19034 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19035 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19043 {{anchorencode:foo bar©#%n}}
19045 <p>foo_bar.C2.A9.23.25n
19050 anchorencode trims spaces
19052 {{anchorencode: __pretty__please__}}
19059 anchorencode deals with links
19061 {{anchorencode: [[hello|world]] [[hi]]}}
19068 anchorencode deals with templates
19070 {{anchorencode: {{Foo}} }}
19077 anchorencode encodes like the TOC generator: (bug 18431)
19079 === _ +:.3A%3A&&]] ===
19080 {{anchorencode: _ +:.3A%3A&&]] }}
19083 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19084 <p>.2B:.3A.253A.26.26.5D.5D
19089 Bug 6200: blockquotes and paragraph formatting
19110 Bug 8293: Use of center tag ruins paragraph formatting
19131 Parsing of overlapping (improperly nested) inline html tags
19133 <span><s>x</span></s>
19135 <p><span><s>x</span></s></span>
19138 <p><span><s>x</s></span>
19143 ### Language variants related tests
19146 Self-link in language variants
19148 title=[[Dunav]] language=sr
19150 Both [[Dunav]] and [[Дунав]] are names for this river.
19152 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19163 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19165 title=[[Duna]] language=sr
19167 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19169 <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.
19174 Link to a section of a variant of this title shouldn't be parsed as self-link
19176 title=[[Duna]] language=sr
19178 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19180 <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.
19185 Link to pages in language variants
19189 Main Page can be written as [[Маин Паге]]
19191 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19197 Multiple links to pages in language variants
19201 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19203 <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>.
19209 Simple template in language variants
19215 <p>This is a test template
19221 Template with explicit namespace in language variants
19227 <p>This is a test template
19233 Basic test for template parameter in language variants
19237 {{парамтест|param=foo}}
19239 <p>This is a test template with parameter foo
19245 Simple category in language variants
19249 [[Category:МедиаWики Усер'с Гуиде]]
19251 <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>
19267 ## We used to, but no longer wt2wt this test since the default serializer
19268 ## will normalize all categories to serialize on their own line.
19269 ## This wikitext usage is going to be fairly uncommon in production and
19270 ## selser will take care of preserving formatting in those scenarios.
19272 Don't convert blue categorylinks to another variant (bug 33210)
19278 [[A]][[Category:分类]]
19280 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
19282 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19283 <link rel="mw:PageProp/Category" href="Category:分类"/>
19287 Stripping -{}- tags (language variants)
19291 Latin proverb: -{Ne nuntium necare}-
19293 <p>Latin proverb: Ne nuntium necare
19299 Prevent conversion with -{}- tags (language variants)
19301 language=sr variant=sr-ec
19303 Latinski: -{Ne nuntium necare}-
19305 <p>Латински: Ne nuntium necare
19311 Prevent conversion of text with -{}- tags (language variants)
19313 language=sr variant=sr-ec
19315 Latinski: -{Ne nuntium necare}-
19317 <p>Латински: Ne nuntium necare
19323 Prevent conversion of links with -{}- tags (language variants)
19325 language=sr variant=sr-ec
19329 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19335 -{}- tags within headlines (within html for parserConvert())
19337 language=sr variant=sr-ec
19341 <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>
19347 Explicit definition of language variant alternatives
19349 language=zh variant=zh-tw
19351 -{zh:China;zh-tw:Taiwan}-, not China
19353 <p>Taiwan, not China
19359 Conversion around HTML tags
19361 language=sr variant=sr-ec
19363 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19364 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19367 <span title="ЛаCтин">ски</span>
19373 Explicit session-wise language variant mapping (A flag and - flag)
19375 language=zh variant=zh-tw
19377 Taiwan is not China.
19378 But -{A|zh:China;zh-tw:Taiwan}- is China,
19379 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19380 and -{China}- is China.
19382 <p>Taiwan is not China.
19383 But Taiwan is Taiwan,
19384 (This should be stripped!)
19385 and China is China.
19390 Explicit session-wise language variant mapping (H flag for hide)
19392 language=zh variant=zh-tw
19394 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19397 <p>(This should be stripped!)
19403 Adding explicit conversion rule for title (T flag)
19405 language=zh variant=zh-tw showtitle
19407 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19410 <p>Should be stripped!
19415 Testing that changing the language variant here in the tests actually works
19417 language=zh variant=zh showtitle
19419 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19422 <p>Should be stripped!
19427 Recursive conversion of alt and title attrs shouldn't clear converter state
19429 language=zh variant=zh-cn showtitle
19431 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19432 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19436 Should be stripped<span title="Exclamation">!</span>
19441 Bug 24072: more test on conversion rule for title
19443 language=zh variant=zh-tw showtitle
19445 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19446 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19449 <p>This should be stripped!
19450 This won't take interferes with the title rule.
19455 Partly disable title conversion if variant == main language code
19457 language=zh variant=zh title=[[ZH]] showtitle
19459 -{T|zh-cn:CN;zh-tw:TW}-
19467 Partly disable title conversion if variant == main language code, more
19469 language=zh variant=zh title=[[ZH]] showtitle
19479 Raw output of variant escape tags (R flag)
19481 language=zh variant=zh-tw
19483 Raw: -{R|zh:China;zh-tw:Taiwan}-
19485 <p>Raw: zh:China;zh-tw:Taiwan
19490 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19492 language=zh variant=zh-cn
19494 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19501 Conversion rules from [numeric-only string] to [something else] (T48634)
19503 language=zh variant=zh-cn
19505 -{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
19512 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19514 language=zh variant=zh-cn
19516 -{H|zh-cn:foo;zh-tw:;}-foobar
19523 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19525 language=zh variant=zh-cn
19527 -{H|=>zh-cn:foo;}-foobar
19534 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19536 language=zh variant=zh-cn
19545 Nested using of manual convert syntax
19547 language=zh variant=zh-hk
19549 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19551 <p>Nested: Hello Hong Kong!
19556 Proper conversion of text in external links
19558 language=sr variant=sr-ec
19560 http://www.google.com
19561 gopher://www.google.com
19562 [http://www.google.com http://www.google.com]
19563 [gopher://www.google.com gopher://www.google.com]
19564 [https://www.google.com irc://www.google.com]
19565 [ftp://www.google.com www.google.com/ftp://dir]
19566 [//www.google.com www.google.com]
19568 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19569 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19570 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19571 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19572 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19573 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19574 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19579 Do not convert roman numbers to language variants
19581 language=sr variant=sr-ec
19585 <p>Фридрих IV је цар.
19590 Unclosed language converter markup "-{"
19601 Don't convert raw rule "-{R|=>}-" to "=>"
19612 Don't break link parsing if language converter markup is in the caption.
19614 language=sr variant=sr-ec
19616 [[Main Page|-{R|main page}-]]
19618 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19622 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19624 Don't break image parsing if language converter markup is in the caption.
19628 [[File:Foobar.jpg|-{R|caption}-]]
19630 <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>
19634 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19636 Don't break list handling if language converter markup is in the item.
19638 language=zh variant=zh-cn
19640 ;-{zh-cn:AAA;zh-tw:BBB}-
19642 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19649 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19651 Don't break table handling if language converter markup is in the cell.
19653 language=sr variant=sr-ec
19676 Bug 529: Uncovered bullet
19685 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19686 # Templates in Wikipedia rely on this behavior, as tidy has always been
19687 # enabled there. These tests are normally run *without* tidy, so specify the
19688 # full output here.
19689 # To test realistic parsing behavior, apply a tidy-like transformation to both
19690 # the expected output and your parser's output.
19692 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19694 ******* Foo {{bullet}}
19696 <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>
19702 Bug 529: Uncovered table already at line-start
19725 Bug 529: Uncovered bullet in parser function result
19727 * Foo {{lc:{{bullet}} }}
19735 Bug 5678: Double-parsed template argument
19737 {{lc:{{{1}}}|hello}}
19744 Bug 5678: Double-parsed template invocation
19746 {{lc:{{paramtest {{!}} param = hello }} }}
19748 <p>{{paramtest | param = hello }}
19753 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19756 title=[[Main Page]]
19758 {{PRVNÍVELKÉ:ěščř}}
19759 {{prvnívelké:ěščř}}
19779 Morwen/13: Unclosed link followed by heading
19786 <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>
19791 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19798 <h1><span class="mw-headline" id="heading">heading</span></h1>
19803 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19810 <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>
19825 Paragraphs inside divs (no extra line breaks)
19837 Paragraphs inside divs (extra line break on open)
19852 Paragraphs inside divs (extra line break on close)
19867 Paragraphs inside divs (extra line break on open and close)
19884 Nesting tags, paragraphs on lines which begin with <div>
19886 <div></div><strong>A
19889 <p><strong>A</strong></p>
19890 <p><strong>B</strong></p>
19898 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19900 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19902 <blockquote>Line one
19904 Line two</blockquote>
19906 <blockquote>Line one
19907 Line two</blockquote>
19911 <p>Line one Line two</p>
19916 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19921 Line two</blockquote>
19926 Line two</blockquote>
19931 Line two</blockquote>
19935 Bug 6200: paragraphs inside blockquotes (extra line break on close)
19937 <blockquote>Line one
19942 <blockquote>Line one
19955 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
19977 Paragraphs inside blockquotes/divs (no extra line breaks)
19979 <blockquote><div>Line one
19981 Line two</div></blockquote>
19983 <blockquote><div>Line one
19984 Line two</div></blockquote>
19989 Paragraphs inside blockquotes/divs (extra line break on open)
19994 Line two</div></blockquote>
19999 Line two</div></blockquote>
20004 Paragraphs inside blockquotes/divs (extra line break on close)
20006 <blockquote><div>Line one
20009 </div></blockquote>
20011 <blockquote><div>Line one
20014 </div></blockquote>
20019 Paragraphs inside blockquotes/divs (extra line break on open and close)
20025 </div></blockquote>
20031 </div></blockquote>
20036 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20038 wgLinkHolderBatchSize=0
20044 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20045 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20046 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20051 Free external link invading image caption
20053 [[Image:Foobar.jpg|thumb|http://x|hello]]
20055 <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>
20060 Bug 15196: localised external link numbers
20064 [http://en.wikipedia.org/]
20066 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20069 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20073 Multibyte character in padleft
20075 {{padleft:-Hello|7|Æ}}
20082 Multibyte character in padright
20084 {{padright:Hello-|7|Æ}}
20091 formatdate parser function
20093 {{#formatdate:2009-03-24}}
20095 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20100 formatdate parser function, with default format
20102 {{#formatdate:2009-03-24|mdy}}
20104 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20109 Spacing of numbers in formatted dates
20111 {{#formatdate:January 15}}
20113 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20118 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
20120 language=nl title=[[MediaWiki:Common.css]]
20122 {{#formatdate:2009-03-24|dmy}}
20124 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20137 Edit comment with link
20141 I like the [[Main Page]] a lot
20143 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20147 Edit comment with link and link text
20151 I like the [[Main Page|best pages]] a lot
20153 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20157 Edit comment with link and link text with suffix
20161 I like the [[Main Page|best page]]s a lot
20163 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20167 Edit comment with section link (non-local, eg in history list)
20169 comment title=[[Main Page]]
20171 /* External links */ removed bogus entries
20173 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20177 Edit comment with section link and text before it (non-local, eg in history list)
20179 comment title=[[Main Page]]
20181 pre-comment text /* External links */ removed bogus entries
20183 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>
20187 Edit comment with section link (local, eg in diff view)
20189 comment local title=[[Main Page]]
20191 /* External links */ removed bogus entries
20193 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20197 Edit comment with subpage link (bug 14080)
20201 title=[[Subpage test]]
20203 Poked at a [[/subpage]] here...
20205 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20209 Edit comment with subpage link and link text (bug 14080)
20213 title=[[Subpage test]]
20215 Poked at a [[/subpage|neat little page]] here...
20217 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20221 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20224 title=[[Subpage test]]
20226 Poked at a [[/subpage]] here...
20228 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20232 Edit comment with bare anchor link (local, as on diff)
20236 title=[[Main Page]]
20240 <a href="#section">#section</a>
20244 Edit comment with bare anchor link (non-local, as on history)
20247 title=[[Main Page]]
20251 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20255 Anchor starting with underscore
20259 <p><a href="#_ref">One</a>
20264 Id starting with underscore
20266 <div id="_ref"></div>
20268 <div id="_ref"></div>
20273 Space normalisation on autocomment (bug 22784)
20276 title=[[Main Page]]
20278 /* __hello__world__ */
20280 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20284 percent-encoding and + signs in comments (Bug 26410)
20288 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20290 <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>
20293 # Parsoid doesn't support this yet: see bug 73581
20294 # but it *should* omit the 'src' attribute if the image is bad.
20295 # PHP side of tests was disabled in
20296 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20297 # because of issues in the PHP parserTests infrastructure
20298 # (but the output below is indeed what the PHP side emits)
20300 Bad images - basic functionality
20303 !! DISABLED/html/php
20305 <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>
20309 Bad images - bug 16039: text after bad image disappears
20314 !! DISABLED/html/php
20320 <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>
20325 Verify that displaytitle works (bug #22501) no displaytitle
20329 wgAllowDisplayTitle=true
20330 wgRestrictDisplayTitle=false
20332 this is not the the title
20335 <p>this is not the the title
20340 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20345 wgAllowDisplayTitle=true
20346 wgRestrictDisplayTitle=false
20348 this is not the the title
20349 {{DISPLAYTITLE:whatever}}
20352 <p>this is not the the title
20357 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20362 wgAllowDisplayTitle=true
20363 wgRestrictDisplayTitle=true
20365 this is not the the title
20366 {{DISPLAYTITLE:whatever}}
20369 <p>this is not the the title
20374 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20379 wgAllowDisplayTitle=true
20380 wgRestrictDisplayTitle=true
20382 this is not the the title
20383 {{DISPLAYTITLE:screen}}
20386 <p>this is not the the title
20391 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20396 wgAllowDisplayTitle=false
20398 this is not the the title
20399 {{DISPLAYTITLE:screen}}
20402 <p>this is not the the title
20403 <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>
20408 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20413 wgAllowDisplayTitle=false
20415 this is not the the title
20418 <p>this is not the the title
20423 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20428 wgAllowDisplayTitle=true
20429 wgRestrictDisplayTitle=true
20431 this is not the the title
20432 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20434 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20435 <p>this is not the the title
20440 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20445 wgAllowDisplayTitle=true
20446 wgRestrictDisplayTitle=true
20448 this is not the the title
20449 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20451 <span style="color: red;">s</span>creen
20452 <p>this is not the the title
20457 Page status indicators: Empty name is invalid
20461 <indicator name=" "></indicator>
20462 <indicator></indicator>
20464 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20465 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20470 Page status indicators: Weird syntaxes that are okay
20474 <indicator name="empty" />
20475 <indicator name="name"></indicator>
20484 Page status indicators: Torture test
20488 <indicator name="01">hello world</indicator>
20489 <indicator name="02">[[Main Page]]</indicator>
20490 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20491 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20492 <indicator name="05">* foo
20494 <indicator name="06"><nowiki>foo</nowiki></indicator>
20495 <indicator name="07"> Preformatted</indicator>
20496 <indicator name="08"><div>Broken tag</indicator>
20497 <indicator name="09">{| class=wikitable
20500 <indicator name="10">Two
20502 paragraphs</indicator>
20505 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20506 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" />
20507 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>
20508 05=<ul><li> foo</li>
20512 07=<pre>Preformatted
20514 08=<div>Broken tag</div>
20516 09=<table class="wikitable">
20533 preload: check <noinclude> and <includeonly>
20537 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20543 preload: check <onlyinclude>
20547 Goodbye <onlyinclude>Hello world</onlyinclude>
20553 preload: can pass tags through if we want to
20557 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20559 <includeonly>Hello world</includeonly>
20563 preload: check that it doesn't try to do tricks
20567 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20569 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20573 Play a bit with r67090 and bug 3158
20575 <div style="width:50% !important"> </div>
20576 <div style="width:50% !important"> </div>
20577 <div style="width:50% !important"> </div>
20578 <div style="border : solid;"> </div>
20580 <div style="width:50% !important"> </div>
20581 <div style="width:50% !important"> </div>
20582 <div style="width:50% !important"> </div>
20583 <div style="border : solid;"> </div>
20586 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20587 <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>
20588 <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>
20589 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20594 HTML5 data attributes
20596 <span data-foo="bar">Baz</span>
20597 <p data-abc-def_hij="">Quuz</p>
20599 <p><span data-foo="bar">Baz</span>
20601 <p data-abc-def_hij="">Quuz</p>
20606 percent-encoding and + signs in internal links (Bug 26410)
20608 [[User:+%]] [[Page+title%]]
20609 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20610 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20611 [[%33%45]] [[%33%45+]]
20613 <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>
20614 <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>
20615 <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>
20616 <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>
20619 <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>
20620 <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>
20621 <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>
20622 <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>
20626 Special characters in embedded file links (bug 27679)
20628 [[File:Contains & ampersand.jpg]]
20629 [[File:Does not exist.jpg|Title with & ampersand]]
20631 <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>
20632 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20635 <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>
20636 <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>
20640 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20642 Text's been normalized?
20644 <p>Text's been normalized?
20649 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20651 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20653 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20658 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20660 [http://www.example.org/ ideograms]
20662 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20667 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20669 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20671 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20695 Bug 31098 Template which includes system messages which includes the template
20699 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20700 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20705 Bug31490 Turkish: ucfirst 'blah'
20716 Bug31490 Turkish: ucfirst 'ix'
20727 Bug31490 Turkish: lcfirst 'BLAH'
20738 Bug31490 Turkish: ucfırst (with a dotless i)
20744 <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>
20749 Bug31490 ucfırst (with a dotless i) with English language
20755 <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>
20760 Bug 26375: TOC with italics
20762 title=[[Main Page]]
20765 == ''Lost'' episodes ==
20767 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20769 <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>
20773 <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>
20778 Bug 26375: TOC with bold
20780 title=[[Main Page]]
20783 == '''should be bold''' then normal text ==
20785 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20787 <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>
20791 <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>
20796 Bug 33845: Headings become cursive in TOC when they contain an image
20798 title=[[Main Page]]
20801 == Image [[Image:foobar.jpg]] ==
20803 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20805 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20809 <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>
20814 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20816 title=[[Main Page]]
20819 == <blockquote>Quote</blockquote> ==
20821 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20823 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20827 <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>
20831 <div id="toc" class="toc">
20832 <div id="toctitle">
20836 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20840 <h2><span class="mw-headline" id="Quote"></span></h2>
20842 <p><span class="mw-headline" id="Quote">Quote</span></p>
20844 <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>
20848 Unclosed tags in TOC
20850 title=[[Main Page]]
20854 <small>Hanc marginis exiguitas non caperet.</small>
20857 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20859 <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>
20863 <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>
20864 <p><small>Hanc marginis exiguitas non caperet.</small>
20870 Multiple tags in TOC
20873 == <i>Foo</i> <b>Bar</b> ==
20875 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20877 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20879 <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>
20880 <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>
20884 <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>
20885 <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>
20889 <div id="toc" class="toc">
20890 <div id="toctitle">
20894 <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>
20895 <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>
20899 <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>
20900 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20902 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20904 <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>
20907 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
20908 # html5 tag parsing.
20910 Tags with parameters in TOC
20915 == <sup class="in-h2">Hello</sup> ==
20917 == <sup class="a > b">Evilbye</sup> ==
20919 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20921 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
20922 <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>
20926 <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>
20927 <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>
20930 <meta property="mw:PageProp/toc" />
20931 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
20933 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
20937 span tags with directionality in TOC
20940 == <span dir="ltr">C++</span> ==
20942 == <span dir="rtl">זבנג!</span> ==
20944 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
20946 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
20948 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
20950 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20952 <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>
20953 <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>
20954 <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>
20955 <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>
20956 <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>
20960 <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>
20961 <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>
20962 <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>
20963 <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>
20964 <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>
20969 Bug 72884: bdi element in ToC
20972 == <bdi>test</bdi> ==
20974 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20976 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
20980 <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>
20984 # Note that the html output does not have the <p></p>, but the
20985 # html+tidy output *does*. This is because the empty <p></p> is
20986 # removed by the sanitizer, but only when tidy is *not* enabled (!).
20988 Empty <p> tag in TOC, removed by Sanitizer (T92892)
20993 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20995 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
20999 <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>
21003 <div id="toc" class="toc">
21004 <div id="toctitle">
21008 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21012 <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>
21018 == {{int:headline_sample}} ==
21022 Bug 32057: Title needed when expanding <h> nodes.
21024 title=[[Main Page]]
21028 <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>
21033 Strip marker in urlencode
21035 {{urlencode:x<nowiki/>y}}
21036 {{urlencode:x<nowiki/>y|wiki}}
21037 {{urlencode:x<nowiki/>y|path}}
21038 {{urlencode:x<pre id="one">two</pre>y}}
21066 Strip marker in formatNum
21068 {{formatnum:1<nowiki/>2}}
21069 {{formatnum:1<nowiki/>2|R}}
21077 Check noCommafy in formatNum
21081 {{formatnum:123456.78}}
21082 {{formatnum:123456.78|NOSEP}}
21090 Wrong option for formatNum (bug 56199)
21092 {{formatnum:1,234.56|Random}}
21093 {{formatnum:1,234.56|EVERYTHING}}
21094 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21103 Strip marker in grammar
21107 {{grammar:elative|foo<nowiki/>bar}}
21114 Strip marker in padleft
21116 {{padleft:|2|x<nowiki/>y}}
21123 Strip marker in padright
21125 {{padright:|2|x<nowiki/>y}}
21132 Strip marker in anchorencode
21134 {{anchorencode:x<nowiki/>y}}
21141 nowiki inside link inside heading (bug 18295)
21143 ==[[foo|x<nowiki>y</nowiki>z]]==
21145 <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>
21150 new support for bdi element (bug 31817)
21152 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21154 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21159 Ignore pipe between table row attributes
21163 |- id=foo | style='color: red'
21171 <tr id="foo" style="color: red">
21178 Gallery override link with WikiLink (bug 34852)
21181 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21184 <ul class="gallery mw-gallery-traditional">
21185 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21186 <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>
21187 <div class="gallerytext">
21197 Gallery override link with absolute external link (bug 34852)
21200 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21203 <ul class="gallery mw-gallery-traditional">
21204 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21205 <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>
21206 <div class="gallerytext">
21216 Gallery override link with malicious javascript (bug 34852)
21219 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21222 <ul class="gallery mw-gallery-traditional">
21223 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21224 <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>
21225 <div class="gallerytext">
21235 Gallery with invalid title as link (bug 43964)
21238 File:foobar.jpg|link=<
21241 <ul class="gallery mw-gallery-traditional">
21242 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21243 <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>
21244 <div class="gallerytext">
21252 Language parser function
21261 Padleft and padright as substr
21263 {{padleft:|3|abcde}}
21264 {{padright:|3|abcde}}
21272 Special parser function
21274 {{#special:RandomPage}}
21275 {{#special:BaDtItLe}}
21276 {{#special:Foobar}}
21285 Bug 34939 - Case insensitive link parsing ([HttP://])
21287 [HttP://MediaWiki.Org/]
21289 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21292 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21296 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21298 [HttP://MediaWiki.Org/ MediaWiki]
21300 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21305 Bug 34939 - Case insensitive link parsing (HttP://)
21307 HttP://MediaWiki.Org/
21309 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21312 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21330 <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>
21331 <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>
21332 <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>
21333 <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>
21334 <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>
21340 ### Parsoid-specific tests
21341 ### Parsoid-PHP parser incompatibilities
21344 1. SOL-sensitive wikitext tokens as template-args
21346 parsoid=wt2html,wt2wt
21352 <span about="#mwt1" typeof="mw:Transclusion">
21353 </span><ul about="#mwt1"><li>a</li>
21355 <span about="#mwt2" typeof="mw:Transclusion">
21356 </span><ol about="#mwt2"><li>a</li>
21358 <span about="#mwt3" typeof="mw:Transclusion">
21359 </span><dl about="#mwt3"><dd>a</dd>
21363 #### -----------------------------------------------------------------
21364 #### Parsoid-specific functionality tests
21365 #### -----------------------------------------------------------------
21367 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21368 # We know wt2wt will fail, but we expect selser to pass.
21369 # Due to the nature of our testing, wt2wt and selser tests will enter the
21370 # blacklist and we'll catch selser regressions based on changes to the
21371 # blacklist entries for selser tests.
21373 1. Bad treebuilder fixup of formatting elt is cleaned up
21375 parsoid=wt2html,wt2wt
21380 [[Image:Foobar.jpg|right|Test]]
21387 <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>
21394 2. Bad treebuilder fixup of formatting elt is cleaned up
21396 parsoid=wt2html,wt2wt
21398 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21400 <small>[[Image:Foobar.jpg|right|300px]]</small>
21404 <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>
21406 <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>
21410 3. Bad treebuilder fixup of formatting elt is cleaned up
21412 parsoid=wt2html,wt2wt
21414 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21416 <p><small><b>foo</b></small></p>
21417 <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>
21418 <p><small><b>bar</b></small></p>
21422 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21424 parsoid=wt2html,wt2wt
21426 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21428 <p><b><small></small></b></p>
21429 <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>
21433 #### ----------------------------------------------------------------
21434 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
21435 #### tags. Parsoid's output for these tags differs from that of the
21437 #### ----------------------------------------------------------------
21440 Ref: 1. ref-location should be replaced with an index span
21445 B <ref name="x">foo</ref>
21449 <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>
21450 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>
21451 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>
21452 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21453 <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>
21454 <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>
21455 <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>
21460 Ref: 2. ref-tags with identical names should all get the same index
21464 A <ref name="x">foo</ref>
21468 <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>
21469 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>
21470 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21471 <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>
21476 Ref: 3. spaces in ref-names should be ignored
21480 A <ref name="x">foo</ref>
21481 B <ref name=" x " />
21485 <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>
21486 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>
21487 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>
21488 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21489 <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>
21493 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21495 Ref: 4. 'constructor' should be accepted as a valid ref-name
21499 A <ref name="constructor">foo</ref>
21502 <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>
21503 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21504 <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>
21509 Ref: 5. body should accept generic wikitext
21514 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
21519 <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>
21521 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21522 <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>
21528 Ref: 6. indent-pres should not be output in ref-body
21540 <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>
21542 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21543 <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
21551 Ref: 7. No p-wrapping in ref-body
21570 <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>
21572 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21573 <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
21588 Ref: 8. transclusion wikitext has lower precedence
21592 A <ref> foo {{echo|</ref> B C}}
21596 <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>
21597 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21598 <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>
21603 Ref: 9. unclosed comments should not leak out of ref-body
21607 A <ref> foo <!--</ref> B C
21610 <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>
21611 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21612 <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>
21617 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21621 A <ref> <b> foo </ref> B C
21625 <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>
21628 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21629 <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>
21634 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21642 <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
21643 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>
21644 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21645 <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>
21646 <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>
21651 Ref: 12. ref-tags act as trailing newline migration barrier
21653 <!--the newline at the end of this line moves out of the p tag-->a
21655 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21661 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21664 <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>
21665 <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>
21668 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21669 <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>
21670 <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>
21674 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21683 <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
21684 <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>
21685 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21686 <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>
21687 <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
21693 Ref: 14. A nested ref-tag should be emitted as plain text
21697 <ref>foo <ref>bar</ref> baz</ref>
21701 <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>
21703 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21704 <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>
21709 Ref: 15. ref-tags with identical names should get identical indexes
21713 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21714 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21718 <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>
21719 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>
21721 <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>
21725 ## We don't bother wt2wt-ing non-standard whitespace
21727 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21735 <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>
21736 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21737 <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>
21741 Ref: 17. Generate valid HTML5 id/about attributes
21745 <ref name="a b">foo</ref>
21749 <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>
21752 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21753 <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>
21758 Ref: 18. T58916: Extension attributes should be parsed as plain text
21762 <ref name="{{echo|a}}">foo</ref>
21766 <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>
21769 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21770 <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>
21775 Ref: 19. ref-tags with identical name encodings should get identical indexes
21779 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21783 <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>
21785 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21786 <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>
21791 Ref: 20. ref-tags with identical names but different content should keep it
21795 A <ref name="foo">Foo one</ref>
21796 B <ref name="foo">Foo two</ref>
21797 C <ref name="foo" />
21801 <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>
21802 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>
21803 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>
21805 <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>
21810 References: 1. references tag without any refs should be handled properly
21814 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21818 References: 2. references tag with group only outputs references from that group
21820 A <ref group="a">foo</ref>
21821 B <ref group="b">bar</ref>
21824 <references group="a" />
21826 <references group="b" />
21828 <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>
21829 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>
21830 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>
21832 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21833 <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>
21835 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21836 <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>
21838 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21839 <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>
21844 References: 3. ref list should be cleared after processing references
21854 <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>
21856 <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>
21859 <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>
21861 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21862 <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>
21867 References: 4. only referenced group should be cleared after processing references
21869 A <ref group="a">afoo</ref>
21872 <references group="a" />
21878 <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>
21879 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>
21881 <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>
21884 <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>
21886 <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>
21891 References: 5. ref tags in references should be processed while ignoring all other content
21894 B <ref name="b">bar</ref>
21897 <ref name="a">foo</ref>
21898 This should just get lost.
21901 <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>
21902 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>
21905 <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>
21910 References: 6. <references /> from a transclusion
21912 <ref>Foo</ref> {{echo|<references />}}
21914 <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>
21919 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21921 A <ref>foo bar for a</ref>
21922 B <ref group="X" name="b" />
21926 <references group="X">
21927 <ref name="b">foo</ref>
21930 <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>
21931 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>
21934 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21935 <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>
21938 <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"}}'>
21939 <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>
21944 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
21946 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
21949 <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>
21950 <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>
21954 # This test only works in wt2html now as the <references /> are always generated
21955 # unless selser is active. Once T72722 is fixed, we should add a changes test
21956 # here to ensure that unrelated changes don't add the new <references /> in
21959 References: 9. Generate missing references list at the end
21962 B <ref group="inexistent">bar</ref>
21964 <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>
21965 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21966 <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>
21968 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
21969 <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>
21974 References: 10. New <references/> shouldn't be added for unrelated edits.
21977 "modes": ["selser"],
21978 "changes": [["#x", "remove"]],
21982 Unrelated text<span id="x"> that's going to disappear</span>.
21990 Entities in ref name
21992 <ref name="test & me">hi</ref>
21995 <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>
21996 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21997 <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>
22001 # This test is wt2html only because we're permitting the serializer to produce
22002 # dirty diffs, normalizing the unclosed references to the self-closed version.
22004 Generate references for unclosed references tag
22012 <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>
22013 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22014 <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>
22018 New reference serializes on its own line
22020 parsoid=wt2wt,html2wt
22025 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22028 #### ----------------------------------------------------------------
22029 #### Parsoid-only testing of Parsoid's impl of LST
22030 #### Not implemented yet, see
22031 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22032 #### ----------------------------------------------------------------
22035 LST Sections: 1. Simple section start and end
22037 <section begin="2011-05-16" />
22038 <section end="2014-04-10 (MW 1.23wmf22)" />
22040 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22041 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22044 #--------- Test stripping of empty nodes in template content ----------
22046 Empty LI and TR nodes should be stripped from template content
22051 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22055 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22068 Empty LI and TR nodes should not be stripped from top-level content
22095 Empty TR nodes should not be stripped if they have any attributes set
22097 {{EmptyTRWithHTMLAttrTest}}
22099 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22100 <tr align="center"></tr>
22101 <tr><td>foo</td></tr>
22102 <tr align="center"></tr>
22103 <tr><td>bar</td></tr>
22107 #### ----------------------------------------------------------------
22108 #### The following section of tests are primarily to test
22109 #### wikitext escaping capabilities of Parsoid. Given that
22110 #### escaping can be done any number of ways, the wikitext (input)
22111 #### is always adjusted to reflect how Parsoid adds nowiki
22114 #### We are marking several tests as parsoid-only since the
22115 #### HTML in the result section is different from what the
22116 #### PHP parser generates for it.
22117 #### ----------------------------------------------------------------
22120 #### --------------- Headings ---------------
22122 #### 1. Nested inside html <h1>=foo=</h1>
22123 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22124 #### 3. Nested inside html with wikitext split by html tags
22125 #### 4. No escape needed
22126 #### 5. Empty headings <h1></h1>
22127 #### 6. Heading chars in SOL context
22128 #### ----------------------------------------
22130 Headings: 0. Unnested
22140 <p>=foo<i>a</i>=</p>
22142 <nowiki>=foo=</nowiki>
22144 <nowiki> </nowiki>=foo=
22146 <nowiki>=foo=</nowiki>
22148 =foo''a''<nowiki>=</nowiki>
22151 # New headings and existing headings are handled differently
22153 Headings: 1. Nested inside html
22161 <h1 data-parsoid=''>=foo=</h1>
22162 <h2 data-parsoid=''>=foo=</h2>
22163 <h3 data-parsoid=''>=foo=</h3>
22164 <h4 data-parsoid=''>=foo=</h4>
22165 <h5 data-parsoid=''>=foo=</h5>
22166 <h6 data-parsoid=''>=foo=</h6>
22174 =<nowiki>=foo=</nowiki>=
22175 ==<nowiki>=foo=</nowiki>==
22176 ===<nowiki>=foo=</nowiki>===
22177 ====<nowiki>=foo=</nowiki>====
22178 =====<nowiki>=foo=</nowiki>=====
22179 ======<nowiki>=foo=</nowiki>======
22184 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22193 <nowiki>*</nowiki>bar
22199 <nowiki>=bar=</nowiki>
22203 Headings: 3. Nested inside html with wikitext split by html tags
22207 <h1>=<b>bold</b>foo=</h1>
22209 = ='''bold'''<nowiki>foo=</nowiki> =
22213 Headings: 4a. No escaping needed (testing just h1 and h2)
22224 <h1><i>=</i>foo=</h1>
22244 Headings: 4b. No escaping needed (inside p-tags)
22259 Headings: 5. Empty headings
22263 <h1 data-parsoid='{}'></h1>
22265 <h2 data-parsoid='{}'></h2>
22267 <h3 data-parsoid='{}'></h3>
22269 <h4 data-parsoid='{}'></h4>
22271 <h5 data-parsoid='{}'></h5>
22273 <h6 data-parsoid='{}'></h6>
22283 =====<nowiki/>=====
22285 ======<nowiki/>======
22289 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22299 <nowiki>=a=</nowiki>
22301 <nowiki>=a=</nowiki>
22303 <nowiki>=a=</nowiki>
22307 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22320 <nowiki>=a=</nowiki>
22323 <nowiki>=a=</nowiki>
22326 <nowiki>=a=</nowiki>
22331 Headings: 6c. Heading chars in SOL context (leading newline break)
22339 <nowiki>=b=</nowiki>
22343 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22347 <!--c0--><p>=a=</p>
22349 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22351 <!--c0--><nowiki>=a=</nowiki>
22353 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22357 Headings: 6d. Heading chars in SOL context (No escaping needed)
22367 Headings: 7. Insert a newline between new content and headings
22373 <h2 data-parsoid='{}'>A</h2>
22374 <p data-parsoid='{}'>a</p>
22384 #### --------------- Lists ---------------
22385 #### 0. Outside nests (*foo, etc.)
22386 #### 1. Nested inside html <ul><li>*foo</li></ul>
22387 #### 2. Inside definition lists
22388 #### 3. Only bullets at start should be escaped
22389 #### 4. No escapes needed
22390 #### 5. No unnecessary escapes
22391 #### 6. Escape bullets in SOL position
22392 #### 7. Escape bullets in a multi-line context
22393 #### ----------------------------------------
22396 Lists: 0. Outside nests
22406 <nowiki>*</nowiki>foo
22408 <nowiki>#</nowiki>foo
22410 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
22414 Lists: 1. Nested inside html
22418 <ul><li>*foo</li></ul>
22419 <ul><li>#foo</li></ul>
22420 <ul><li>:foo</li></ul>
22421 <ul><li>;foo</li></ul>
22422 <ol><li>*foo</li></ol>
22423 <ol><li>#foo</li></ol>
22424 <ol><li>:foo</li></ol>
22425 <ol><li>;foo</li></ol>
22428 *<nowiki>*foo</nowiki>
22430 *<nowiki>#foo</nowiki>
22432 *<nowiki>:foo</nowiki>
22434 *<nowiki>;foo</nowiki>
22436 #<nowiki>*foo</nowiki>
22438 #<nowiki>#foo</nowiki>
22440 #<nowiki>:foo</nowiki>
22442 #<nowiki>;foo</nowiki>
22446 Lists: 2. Inside definition lists
22450 <dl><dt>;foo</dt></dl>
22451 <dl><dt>:foo</dt></dl>
22454 <dl><dd>:foo</dd></dl>
22457 ;<nowiki>;foo</nowiki>
22459 ;<nowiki>:foo</nowiki>
22461 ;<nowiki>:foo</nowiki>
22464 :<nowiki>:foo</nowiki>
22468 Lists: 3. Only bullets at start of text should be escaped
22472 <ul><li>*foo*bar</li></ul>
22473 <ul><li>*foo<i>it</i>*bar</li></ul>
22476 *<nowiki>*foo*bar</nowiki>
22478 *<nowiki>*foo</nowiki>''it''*bar
22482 Lists: 4. No escapes needed
22495 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22499 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22513 Lists: 5. No unnecessary escapes
22517 <ul><li> bar <span>[[foo]]</span></li></ul>
22518 <ul><li> =bar <span>[[foo]]</span></li></ul>
22519 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22520 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22521 <ul><li> =bar <span>foo]]</span>=</li></ul>
22522 <ul><li> <s></s>: a</li></ul>
22523 <ul><li> <i>* foo</i></li></ul>
22526 * bar <span><nowiki>[[foo]]</nowiki></span>
22528 * =bar <span><nowiki>[[foo]]</nowiki></span>
22530 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22532 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22534 * =bar <span>foo]]</span>=
22542 Lists: 6. Escape bullets in SOL position
22546 <p><!--cmt-->*foo</p>
22548 <!--cmt--><nowiki>*</nowiki>foo
22552 Lists: 7. Escape bullets in a multi-line context
22561 <nowiki>*</nowiki>b
22565 Lists: 8. Escape colons only if not present in tags
22569 <dl><dt>a:b<i>c:d</i></dt></dl>
22571 ; <nowiki>a:b</nowiki>''c:d''
22574 #### --------------- HRs ---------------
22575 #### 1. Single line
22576 #### -----------------------------------
22579 HRs: 1. Single line
22587 ----<nowiki>----</nowiki>
22592 #### --------------- Tables ---------------
22593 #### 1a. Simple example
22594 #### 1b. No escaping needed (!foo)
22595 #### 1c. No escaping needed (|foo)
22596 #### 1d. No escaping needed (|}foo)
22598 #### 2a. Nested in td (<td>foo|bar</td>)
22599 #### 2b. Nested in td (<td>foo||bar</td>)
22600 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22602 #### 3a. Nested in th (<th>foo!bar</th>)
22603 #### 3b. Nested in th (<th>foo!!bar</th>)
22604 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22608 #### 4c. No escaping needed
22609 #### --------------------------------------
22612 Tables: 1a. Simple example
22620 <nowiki>{|</nowiki>
22625 Tables: 1b. No escaping needed
22636 Tables: 1c. No escaping needed
22647 Tables: 1d. No escaping needed
22658 Tables: 2a. Nested in td
22663 <td>foo|bar</td></tr>
22664 <tr><td>x<div>a|b</div></td>
22668 |<nowiki>foo|bar</nowiki>
22670 |x<div><nowiki>a|b</nowiki></div>
22686 Tables: 2b. Nested in td
22692 <td>a<i>b||c</i></td>
22693 <td>a<i><div>b||c</div></i></td>
22694 </tr></tbody></table>
22697 |<nowiki>foo||bar</nowiki>
22698 |a''<nowiki>b||c</nowiki>''
22699 |a''<div><nowiki>b||c</nowiki></div>''
22708 <td>a<i><div>b||c</div></i>
22714 Tables: 2c. Nested in td -- no escaping needed
22732 Tables: 3a. Nested in th
22750 Tables: 3b. Nested in th
22755 <tr><th>foo!!bar</th>
22756 <th><i>foo|bar</i></th>
22757 <th><i>foo!!bar</i></th>
22758 <th><i><span>foo!!bar</span></i></th>
22759 </tr></tbody></table>
22762 !<nowiki>foo!!bar</nowiki>
22763 !''<nowiki>foo|bar</nowiki>''
22764 !''<nowiki>foo!!bar</nowiki>''
22765 !''<span><nowiki>foo!!bar</nowiki></span>''
22774 <th><i>foo!!bar</i>
22776 <th><i><span>foo!!bar</span></i>
22782 Tables: 3c. Nested in th
22787 <tr><th>foo||bar</th>
22788 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22789 </tr></tbody></table>
22792 !<nowiki>foo||bar</nowiki>
22793 !<nowiki>foo||bar</nowiki>
22806 Tables: 4a. Escape -
22825 |<nowiki>-bar</nowiki>
22830 Tables: 4b. Escape +
22849 |<nowiki>+bar</nowiki>
22854 Tables: 4c. No escaping needed
22859 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22860 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22866 <div>a|b</div></td>
22911 Tables: 4d. No escaping needed
22916 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22917 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22918 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22929 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22939 T97430: Don't emit empty nowiki pairs around marker meta tags
22943 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22944 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
22946 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22947 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
22951 Unclosed xmlish element in table line shouldn't eat end delimiters
22956 <tbody><tr><td> <foo</td>
22957 <td> bar></td></tr>
22974 #### --------------- Links ----------------
22975 #### 1. Quote marks in link text
22976 #### 2. Wikilinks: Escapes needed
22977 #### 3. Wikilinks: No escapes needed
22978 #### 4. Extlinks: Escapes needed
22979 #### 5. Extlinks: No escapes needed
22980 #### --------------------------------------
22982 Links 1. WikiLinks: No escapes needed
22986 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
22987 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
22988 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
22992 [[Foo|x [Foobar] x]]
22994 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
22995 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
22996 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23001 Links 2. WikiLinks: Escapes needed
23005 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23006 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23007 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23008 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23009 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23010 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23011 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23012 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23013 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23014 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23016 [[Foo|<nowiki>Foobar]</nowiki>]]
23017 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23018 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23019 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23020 [[Foo|<nowiki>|Bar</nowiki>]]
23021 [[Foo|<nowiki>]]bar</nowiki>]]
23022 [[Foo|<nowiki>[[bar</nowiki>]]
23023 [[Foo|<nowiki>x [[ y</nowiki>]]
23024 [[Foo|<nowiki>x ]] y</nowiki>]]
23025 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23027 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23028 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23029 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23030 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23031 <a href="/wiki/Foo" title="Foo">|Bar</a>
23032 <a href="/wiki/Foo" title="Foo">]]bar</a>
23033 <a href="/wiki/Foo" title="Foo">[[bar</a>
23034 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23035 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23036 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23041 Links 3. WikiLinks: No escapes needed
23045 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23046 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23051 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23052 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23057 Links 4. ExtLinks: Escapes needed
23061 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23062 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23063 <p>[http://google.com]</p>
23064 <p>[http://google.com google]</p>
23066 [http://google.com <nowiki>[google]</nowiki>]
23067 [http://google.com <nowiki>google]</nowiki>]
23069 <nowiki>[http://google.com]</nowiki>
23071 <nowiki>[http://google.com google]</nowiki>
23074 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23075 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23076 </p><p>[http://google.com]
23077 </p><p>[http://google.com google]
23082 Links 5. ExtLinks: No escapes needed
23086 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23088 [http://google.com [google]
23090 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23095 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23099 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23100 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23101 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23102 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23103 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23104 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23105 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23106 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23107 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23108 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23109 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23110 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23111 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23114 x<nowiki/>http://example.com<nowiki/>y
23115 http://example.com<nowiki/>?x
23116 http://example.com<nowiki/>&x
23117 http://example.com<nowiki/>'x
23118 http://example.com<nowiki/>,x
23119 http://example.com<nowiki/>.x
23120 http://example.com<nowiki/>;x
23121 http://example.com<nowiki/>:x
23122 http://example.com<nowiki/>;x
23123 http://example.com<nowiki/>!x
23124 http://example.com<nowiki/>=x
23125 http://example.com<nowiki/>(x)
23126 http://example.com(x<nowiki/>)
23130 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23135 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23137 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23138 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23139 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23140 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23141 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23147 "http://example.com"
23148 (http://example.com)
23149 (http://example.com) foo
23150 http://example.com,
23151 http://example.com, foo
23154 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23156 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23157 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23158 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23159 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23160 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23165 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23169 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23170 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23172 http://example.com.,;:!?\
23173 -http://example.com:
23175 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23176 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23181 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23185 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23186 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23187 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23191 X<nowiki/>RFC 123<nowiki/>y
23195 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23199 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23200 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23201 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23208 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23209 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23210 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23215 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23219 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23220 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23221 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23225 X<nowiki/>PMID 123<nowiki/>y
23229 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23233 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23234 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23235 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23242 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23243 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23244 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23249 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23253 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23254 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23255 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23258 ISBN 1234567890<nowiki/>1
23259 ISBN 1234567890<nowiki/>x
23260 a<nowiki/>ISBN 1234567890<nowiki/>b
23264 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23268 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23272 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23277 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23281 <p>this is not a link: http://example.com
23284 <nowiki>this is not a link: http://example.com</nowiki>
23288 Links 15. Link trails can't become link prefixes.
23293 <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>
23295 [[Söfnuður]]-[[00]]
23297 <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>
23301 #### --------------- Quotes ---------------
23302 #### 1. Quotes inside <b> and <i>
23303 #### 2. Link fragments separated by <i> and <b> tags
23304 #### 3. Link fragments inside <i> and <b>
23305 #### 4. No escaping needed
23306 #### --------------------------------------
23308 1a. Quotes inside <b> and <i>
23319 <b>foo'<i>bar'</i>baz</b>
23328 <i>fools'<span> errand</span></i>
23329 <i><span>fool</span>'s errand</i>
23330 '<i>foo</i> bar '<i>baz</i>
23331 a|!*#-:;+-~[]{}b'<i>x</i>
23335 ''<nowiki>''foo''</nowiki>''
23336 ''<nowiki>'''foo'''</nowiki>''
23338 '''<nowiki/>'foo''''
23339 '''<nowiki>''foo''</nowiki>'''
23340 '''<nowiki>'''foo'''</nowiki>'''
23341 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23342 '''foo'''<nowiki/>'s
23348 '''foo'''<nowiki/>'
23349 ''''foo'''<nowiki/>'
23350 ''fools'<span> errand</span>''
23351 ''<span>fool</span>'s errand''
23352 '<nowiki/>''foo'' bar '''baz''
23353 a|!*#-:;+-~[]{}b'''x''
23357 1b. Quotes inside <b> and <i> with other tags on same line
23361 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23362 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23363 <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>
23364 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23365 '<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>
23366 '<i>foo</i> <div title="name">test</div>
23367 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23368 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23369 <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>
23372 '''a'' foo ''[[bar]]''
23373 ''a''' foo ''[[bar]]''
23374 ''a''' foo '''{{echo|[[bar]]}}'''
23375 [[foo]] x'''[[bar]]''
23376 '''foo'' <ref>test</ref>
23377 '''foo'' <div title="name">test</div>
23378 '''foo'' and <br> bar
23383 2. Link fragments separated by <i> and <b> tags
23387 <p>[[<i>foo</i>hello]]</p>
23388 <p>[[<b>foo</b>hello]]</p>
23390 [[''foo''<nowiki>hello]]</nowiki>
23392 [['''foo'''<nowiki>hello]]</nowiki>
23395 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23396 # this is one of the shortcomings of this format
23398 3. Link fragments inside <i> and <b>
23402 <p><i>[[foo</i>]]</p>
23403 <p><b>[[foo</b>]]</p>
23405 ''[[foo''<nowiki>]]</nowiki>
23407 '''[[foo'''<nowiki>]]</nowiki>
23411 4. No escaping needed
23415 <p>'<span><i>bar</i></span>'
23416 '<span><b>bar</b></span>'
23420 '<span>''bar''</span>'
23421 '<span>'''bar'''</span>'
23425 #### ----------- Paragraphs ---------------
23426 #### 1. No unnecessary escapes
23427 #### --------------------------------------
23430 1. No unnecessary escapes
23434 <p>bar <span>[[foo]]</span>
23435 </p><p>=bar <span>[[foo]]</span>
23436 </p><p>[[bar <span>[[foo]]</span>
23437 </p><p>]]bar <span>[[foo]]</span>
23438 </p><p>=bar <span>foo]]</span>=
23441 bar <span><nowiki>[[foo]]</nowiki></span>
23443 =bar <span><nowiki>[[foo]]</nowiki></span>
23445 [[bar <span><nowiki>[[foo]]</nowiki></span>
23447 ]]bar <span><nowiki>[[foo]]</nowiki></span>
23449 =bar <span>foo]]</span><nowiki>=</nowiki>
23452 #### ----------------------- PRE --------------------------
23453 #### 1. Leading whitespace in SOL context should be escaped
23454 #### ------------------------------------------------------
23456 1. Leading whitespace in SOL context should be escaped
23479 <nowiki> </nowiki>a
23481 <nowiki> </nowiki> a
23485 <nowiki> </nowiki> a
23487 <nowiki> </nowiki>a
23490 <nowiki> </nowiki>b
23513 2. Leading whitespace in non-indent-pre contexts should not be escaped
23517 <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>
23518 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23519 <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>
23529 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
23548 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
23552 <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>
23554 [[File:Foobar.jpg|thumb|caption]]
23558 5. Nowiki escaping should account for indent-pres
23568 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23581 #### --------------- Behavior Switches --------------------
23584 1. Valid behavior switches should be escaped
23591 <nowiki>__TOC__</nowiki>
23592 ''<nowiki>__TOC__</nowiki>''
23596 2. Invalid behavior switches should not be escaped
23607 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23609 Behavior switches should be SOL-transparent
23613 <meta property="mw:PageProp/toc" />
23615 <!-- this one's bogus -->
23618 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23620 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23624 <!-- this one's bogus -->
23633 #### --------------- HTML tags ---------------
23636 #### 3. multi-line html tag
23637 #### 4. extension tags
23638 #### -----------------------------------------
23644 <a href="http://google.com">google</a>
23646 <a href="http://google.com">google</a>
23654 <ul><li> <div>foo</div></li>
23655 <li> <div style="color:red">foo</div></li>
23656 <li> <td></li></ul>
23659 * <nowiki><div>foo</div></nowiki>
23660 * <nowiki><div style="color:red">foo</div></nowiki>
23661 * <nowiki><td></nowiki>
23665 3. multi-line html tag
23684 <p><ref>foo</ref>
23685 </p><p><ref>bar
23686 </p><p>baz</ref>
23689 <nowiki><ref>foo</ref></nowiki>
23691 <nowiki><ref>bar</nowiki>
23693 baz<nowiki></ref></nowiki>
23696 #### --------------- Others ---------------
23702 <p><nowiki>foo</nowiki>
23705 <nowiki>foo</nowiki>
23708 ## The quote-char in the input is necessary for triggering the bug
23710 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
23719 #----------- End of wikitext escaping tests --------------
23723 Tag-like HTML structures are passed through as text
23745 </p><p>1<d e>f
23750 HTML tag with necessary entities in attributes
23752 <span title="&amp;">foo</span>
23754 <p><span title="&amp;">foo</span>
23759 HTML tag with 'unnecessary' entity encoding in attributes
23761 <span title="&">foo</span>
23763 <p><span title="&">foo</span>
23768 HTML tag with broken attribute value quoting
23770 <span title="Hello world>Foo</span>
23772 <p><span title="Hello world">Foo</span>
23775 <p><span title="Hello world">Foo</span>
23780 Table with broken attribute value quoting
23783 | title="Hello world|Foo
23788 <td title="Hello world">Foo
23794 <td title="Hello world">Foo
23800 Table with broken attribute value quoting on consecutive lines
23803 | title="Hello world|Foo
23804 | style="color:red|Bar
23809 <td title="Hello world">Foo
23811 <td style="color:red">Bar
23817 <td title="Hello world">Foo
23818 </td><td style="color: red">Bar
23819 </td></tr></tbody></table>
23824 2. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23834 1. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23844 Accept empty td cell attribute
23847 | align="center" | foo || |
23852 <td align="center"> foo </td>
23859 Non-empty attributes in th-cells
23862 ! Foo !! style="color: red" | Bar
23868 <th style="color: red"> Bar
23874 Accept empty attributes in th-cells
23889 Empty table rows go away
23910 ### Parsoid-centric tests for testing RTing of inter-element separators
23911 ### Edge cases not tested by existing parser tests and specific to
23912 ### Parsoid-specific serialization strategies.
23916 RT-ed inter-element separators should be valid separators
23928 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
23932 # Parsoid-only since PHP parser relies on Tidy for correct output
23934 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
23948 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
23949 <p>bar</p></small></td></tr>
23953 <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>
23957 # Note that the "style" attribute is really a template parameter here.
23958 # The = would have to be {{=}} if you wanted the literal.
23960 Empty TD followed by TD with tpl-generated attribute
23965 |{{echo|style='color:red'}}|foo
23979 Indented table with an empty td
23997 ## We have some newline diffs RT-ing this edge case
23998 ## and it is not important enough -- we seem to be emitting
23999 ## at most 2 newlines after a </tr> and this is unrelated to
24000 ## the issue from T85627 that this is testing.
24002 Indented table with blank lines in between (T85627)
24021 Indented block & table
24035 <div data-parsoid='{"stx":"html"}'>foo</div>
24037 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24042 Indent and comment before table row
24057 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24058 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24062 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24064 Empty TR followed by a template-generated TR
24070 {{echo|<tr><td>foo</td></tr>}}
24076 <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}}]}'>
24081 ## PHP and parsoid output differ for this, and since this is primarily
24082 ## for testing Parsoid's serializer, marking this Parsoid only
24084 Empty TR followed by mixed-ws-comment line should RT correctly
24100 <!--c--> </tr><!--d-->
24106 Multi-line image caption generated by templates with/without trailing newlines
24108 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24109 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24111 <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>
24112 <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>
24116 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24120 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24122 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24124 <includeonly>foo</includeonly>
24132 ## PHP emits broken html for this, and since this is primarily
24133 ## a Parsoid serializer test, marking this Parsoid only
24135 Improperly nested inline or quotes tags with whitespace in between
24137 <span> <s>x</span> </s>
24140 <p><span> <s>x</s></span><s> </s>
24141 <b> <i>x</i></b><i> </i>
24146 Encapsulate protected attributes from wt
24148 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24150 <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>
24154 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24155 ## Having nested or stray pre tags results in the attempt to add duplicates,
24156 ## causing an assertion fail. This test tries to prevent that situation.
24158 Ensure ParagraphWrapper can deal with stray closing pre tags
24168 1. Ensure fostered text content is wrapped in element nodes
24172 <table>hi</table><table>ho</table>
24181 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24183 parsoid=wt2html,wt2wt
24192 <tbody><tr><td> a</td></tr>
24197 Encapsulation properly handles null DSR information from foster box
24199 parsoid=wt2html,wt2wt
24201 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24203 <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>
24207 1. Encapsulate foster-parented transclusion content
24209 parsoid=wt2wt,wt2html
24211 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24213 <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>
24223 2. Encapsulate foster-parented transclusion content
24225 parsoid=wt2wt,wt2html
24227 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24229 <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>
24240 3. Encapsulate foster-parented transclusion content
24242 parsoid=wt2wt,wt2html
24244 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24246 <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>"]}">
24259 4. Encapsulate foster-parented transclusion content
24261 parsoid=wt2wt,wt2html
24263 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24265 <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>"]}">
24278 5. Encapsulate foster-parented transclusion content
24280 parsoid=wt2wt,wt2html
24282 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24284 <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>
24299 6. Encapsulate foster-parented transclusion content
24301 parsoid=wt2wt,wt2html
24303 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24305 <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>
24321 7. Encapsulate foster-parented transclusion content
24323 parsoid=wt2wt,wt2html
24325 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24327 <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>
24337 # Note that the wt is broken on purpose: the = should be {{=}} if you
24338 # don't want it to be a template parameter key.
24340 8. Encapsulate foster-parented transclusion content
24342 parsoid=wt2wt,wt2html
24345 }}{|{{echo|style='color:red'}}
24350 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24352 <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>
24363 9. Encapsulate foster-parented transclusion content
24365 parsoid=wt2wt,wt2html
24367 <table>{{echo|hi</table>hello}}
24369 <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>
24373 Table in fosterable position
24375 parsoid=wt2html,wt2wt
24384 <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">
24386 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24392 # Parsoid only for bug 64747
24394 Properly encapsulate empty-content transclusions in fosterable positions
24402 <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":["","","",""]}]]}'>
24408 Support <object> element with .data attribute
24412 <object data="test.swf"></object>
24414 <object data="test.swf"></object>
24418 Don't block XML namespace declaration
24420 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24422 <p><span>MediaWiki</span>
24425 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
24428 # -----------------------------------------------------------------
24429 # The following section of tests are primarily to spec requirements
24430 # around serialization of new/edited content.
24432 # All these tests are marked Parsoid html2wt and html2html only
24433 # ----------------------------------------------------------------
24435 # 'mi' is a localinterwiki prefix as well as a language
24437 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
24441 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
24448 New wikilinks should be serialized properly
24452 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
24453 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
24460 New wiki links (href variations)
24464 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24465 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
24466 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
24467 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
24472 [[Toxine bactérienne]]
24476 New wiki links (content string variations)
24480 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24481 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
24482 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
24486 [[Foo_bar|./Foo_bar]]
24490 New category links (href variations)
24494 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
24495 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
24496 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
24498 [[Category:Toxine bactérienne]]
24499 [[Category:Toxine bactérienne]]
24500 [[Category:Toxine bactérienne]]
24504 New sol transparent links don't need indent-pre nowiki protection
24509 <link rel="mw:PageProp/redirect" href="./Main_Page">
24510 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
24511 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
24513 #WEITERLEITUNG [[Main Page]]
24514 <!-- this is good --> [[Category:Good]]
24515 <!-- this is great --> [[Kategorie:Great]]
24519 New interlanguage links (href variations)
24523 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
24524 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
24525 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
24527 [[es:Toxine bactérienne]]
24528 [[es:Toxine_bactérienne]]
24529 [[es:Toxine_bactérienne]]
24533 Image: Modifying size of an image (1)
24536 "modes": ["wt2wt"],
24538 ["img[height]", "attr", "height", "22"],
24539 ["img[width]", "attr", "width", "200"]
24543 [[Image:Foobar.jpg|230x230px]]
24545 [[Image:Foobar.jpg|200x200px]]
24549 Image: Modifying size of an image (2)
24552 "modes": ["wt2wt"],
24554 ["img[height]", "attr", "height", "100"],
24555 ["img[width]", "attr", "width", "500"]
24559 [[Image:Foobar.jpg|230x230px]]
24561 [[Image:Foobar.jpg|500x500px]]
24564 # Change in size is ignored so long as class='mw-default-size'
24566 Image: Modifying size of an image (3)
24569 "modes": ["wt2wt"],
24571 ["figure[class]", "removeClass", "mw-default-size"],
24572 ["figure img", "attr", "height", "19"],
24573 ["figure img", "attr", "width", "170"]
24577 [[Image:Foobar.jpg|thumb]]
24579 [[Image:Foobar.jpg|thumb|170x170px]]
24583 Image: Modifying alignment of an image (bug 48665)
24586 "modes": ["wt2wt"],
24588 ["figure[class]", "removeClass", "mw-halign-right"],
24589 ["figure[class]", "addClass", "mw-halign-left"]
24593 [[Image:Foobar.jpg|thumb|caption|right]]
24595 [[Image:Foobar.jpg|thumb|caption|left]]
24599 Image: Modifying mw-default-size of an frameless image (bug 62805)
24602 "modes": ["wt2wt"],
24604 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24608 [[Image:Foobar.jpg|frameless|right]]
24610 [[Image:Foobar.jpg|frameless|right|220x220px]]
24614 Image: Modifying valign of an image (bug 49221)
24617 "modes": ["wt2wt"],
24619 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24620 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24624 [[File:Foobar.jpg|20px|middle]]
24626 [[File:Foobar.jpg|20px|text-top]]
24630 Image: Modifying alt attribute of an image (bug 56400)
24633 "modes": ["wt2wt"],
24635 ["img[alt]", "attr", "alt", "some alternate edited text"]
24639 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24641 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24645 Image: Modifying caption of an image
24648 "modes": ["wt2wt"],
24650 ["figcaption", "text", "new caption"]
24654 [[Image:Foobar.jpg|thumb|original caption]]
24656 [[Image:Foobar.jpg|thumb|new caption]]
24660 Image: empty alt attribute (bug 48924)
24664 [[File:Foobar.jpg|thumb|alt=|bar]]
24666 <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>
24670 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
24676 <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>
24678 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
24682 Image: Block level image should have \n before and after
24685 [[File:Foobar.jpg|right|thumb|150x150px]]
24689 <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>
24694 Image: New block level image should have \n before and after (existing content)
24697 [[File:Foobar.jpg|right|thumb|150x150px]]
24701 <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>
24706 Image: upright option (parsoid)
24708 [[File:Foobar.jpg|thumb|upright|caption]]
24709 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
24710 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
24712 <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>
24713 <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>
24714 <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>
24718 Image: upright option is ignored on inline and frame images (parsoid)
24720 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
24722 <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>
24726 Image: from basic HTML (1)
24730 <span typeof="mw:Image">
24731 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24734 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24738 Image: from basic HTML (2)
24742 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24744 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24748 Image: from basic HTML (3)
24752 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24754 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24758 Image: from basic HTML (4)
24762 <img src="./File:Foobar.jpg">
24764 [[File:Foobar.jpg|link=]]
24768 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24773 <li><p>foo</p></li>
24780 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24784 <ul> <li>foo</li></ul>
24790 Don't strip leading whitespace when handling indent-pre suppressing tags
24795 <tr><td> indented row</td></tr>
24798 <b>This is very bold of you!</b>
24801 indented cell (no pre-wrapping!)
24811 '''This is very bold of you!'''
24815 indented cell (no pre-wrapping!)
24823 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24841 <nowiki> </nowiki><span>bar</span>
24844 <nowiki> </nowiki></span>bar2
24847 <nowiki> </nowiki><span>bar</span>
24850 <nowiki> </nowiki><span>foo</span>
24855 Lists: Dont insert newlines in a serialized list item.
24859 <ul><li>a<br>b</li><li>c</li></ul>
24866 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
24869 "modes": ["html2wt"],
24870 "scrubWikitext": false
24873 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24874 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24876 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24877 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24879 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
24881 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24883 == hello there [[Category:A1]] ==
24885 == [[Category:A2]] hi pal ==
24887 == <!--foo--> [[Category:A3]] how goes it ==
24889 == it goes well [[Category:A4]] <!--bar--> ==
24891 ==howdy [[Category:A5]] ==
24897 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
24900 "modes": ["html2wt"],
24901 "scrubWikitext": true
24904 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24905 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24907 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24908 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24910 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24918 <!--foo--> [[Category:A3]]
24923 [[Category:A4]] <!--bar-->
24931 Headings: Don't hoist metas that come from templates
24934 "modes": ["html2wt"],
24935 "scrubWikitext": true
24938 <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>
24940 == {{echo|foo [[Category:Foo]]}} ==
24944 Headings: Category in ref isn't hoisted
24947 "modes": ["html2wt"],
24948 "scrubWikitext": true
24951 <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>
24953 <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>
24956 [[Category:Baz]] </ref> ==
24962 Parsoid: Serialize positional parameters with = in them as named parameter
24966 <p about="#mwt1" typeof="mw:Transclusion"
24967 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
24969 <p about="#mwt1" typeof="mw:Transclusion"
24970 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
24972 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24973 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24974 <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>
24978 {{echo|1 = f=oo|2 = bar}}
24980 <!--Orig params with data-parsoid has heuristics for handling = chars-->
24981 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
24982 {{echo|<nowiki>f=oo</nowiki>|bar}}
24986 Parsoid: Serialize positional parameters with = in extlink as named parameter
24990 <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>
24992 {{echo|1 = http://stuff?is=ok}}
24996 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25000 <div>a<p>b</p></div>
25021 Substrings resembling wikitext in hrefs should not get nowiki escapes
25025 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25031 Enforce single-line context in the serializer
25038 <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">
25039 </span><span about="#mwt1">you</span> </h2>
25041 <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>
25043 <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
25044 there</span></li></ol>
25056 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25063 </tbody></table></dd></dl>
25067 == hi {{bogus|there
25078 * foo '''bar''' baz
25090 Serialize new placeholder space without spans
25094 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25096 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25098 <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>
25104 <ref>foo : bar</ref>ok
25108 #-----------------------
25109 # Tag minimization tests
25110 #-----------------------
25113 1. I/B quote minimization: wikitext-only tags should be combined
25117 <p><i>A</i><i>B</i></p>
25118 <p><b>A</b><b>B</b></p>
25119 <p><i>A</i><b><i>B</i></b></p>
25120 <p><b>A</b><i><b>B</b></i></p>
25121 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25122 <p><i><b>A</b></i><i><b>B</b></i></p>
25123 <p><i><b>A</b></i><b><i>B</i></b></p>
25124 <p><b><i>A</i></b><i><b>B</b></i></p>
25144 2. I/B quote minimization: wikitext and html tags should not be combined
25148 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25149 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25153 ''A''<nowiki/>'''<i>B</i>'''
25157 3. I/B quote minimization: templated content stops minimization
25161 <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>
25162 <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>
25164 ''A''{{echo|''B''}}
25166 ''A''{{echo|'''''B'''''}}
25170 4. I/B quote minimization: new content should be mimimized with adjacent old content
25174 <p><i>A</i><i>B</i></p>
25175 <p><b>A</b><b>B</b></p>
25176 <p><i>A</i><b><i>B</i></b></p>
25186 5a. Merge adjacent quote nodes if they've been edited
25189 "modes": ["wt2wt", "selser"],
25191 ["p", "contents", "remove", ":contains('b')"]
25201 5b. Merge adjacent quote nodes if they've been edited
25204 "modes": ["wt2wt", "selser"],
25210 ''a''<span id="x">b</span>''c''
25216 1. Merge adjacent link nodes as long as at least one element is new
25219 "modes": ["html2wt"],
25220 "scrubWikitext": true
25223 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25224 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25225 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25229 [[Football|Foot]][[Football|ball]]
25233 2. Merge adjacent link nodes and enable additional normalizations
25236 "modes": ["html2wt"],
25237 "scrubWikitext": true
25240 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25242 [[Football|''Football'']]
25246 3. Don't merge adjacent link nodes if scrubWikitext is false
25249 "modes": ["html2wt"],
25250 "scrubWikitext": false
25253 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25255 [[Football|Foot]][[Football|ball]]
25258 #------------------------------
25259 # End of tag minimization tests
25260 #------------------------------
25263 Bug 54262: New entities
25267 <span typeof="mw:Entity"> </span>
25272 ## Note that there is no wikitext output for 'unknownproperty' ##
25273 ## Unknown magic words are silently dropped ##
25280 <meta property='mw:PageProp/toc' />
25281 <meta property='mw:PageProp/notoc' />
25282 <meta property='mw:PageProp/forcetoc' />
25283 <meta property='mw:PageProp/index' />
25284 <meta property='mw:PageProp/noindex' />
25285 <meta property='mw:PageProp/nogallery' />
25286 <meta property='mw:PageProp/noeditsection' />
25287 <meta property='mw:PageProp/notitleconvert' />
25288 <meta property='mw:PageProp/nocontentconvert' />
25289 <meta property='mw:PageProp/unknownproperty' />
25299 __NOCONTENTCONVERT__
25303 Consecutive <pre>s should not get merged
25305 parsoid=html2wt,html2html
25307 <pre>a</pre><pre>b</pre>
25335 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
25339 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
25341 [[Special:BookSources/1234567890|ISBN 1234567895]]
25345 Edited RFC links not serializable as RFC links should serialize as extlinks
25349 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
25351 [//tools.ietf.org/html/rfc123 New RFC]
25355 Edited PMID links not serializable as PMID links should serialize as extlinks
25359 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
25361 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
25365 WTS of autolinks with trailing/surrounding context
25369 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25370 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25371 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25372 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25373 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25374 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
25376 http://cscott.net'''foo'''
25378 http://cscott.net<b>foo</b>
25380 '''http://cscott.net'''
25382 '''http://cscott.net '''
25384 '''http://cscott.net<nowiki/>x'''
25386 http://cscott.net<nowiki/>x
25390 WTS of autolinks with nowikis (round-trip)
25392 x<nowiki/>http://cscott.net<nowiki/>x
25394 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
25397 # this is the "easy" test because it leaves in place all the
25398 # data-parsoid information indicating this is an autolink
25400 WTS of autolinks with escapes (editing)
25403 "modes": ["wt2wt"],
25405 [ "meta", "remove" ]
25409 x<nowiki/>http://cscott.net<nowiki/>x
25411 x<nowiki/>http://cscott.net<nowiki/>x
25415 WTS of edited autolink-like text (T103364)
25418 "modes": ["wt2wt"],
25420 [ "span[typeof]", "removeAttr", "typeof" ]
25424 Not a link: <nowiki>http://example.com</nowiki>.
25426 Not a link: <span><nowiki>http://example.com</nowiki></span>.
25430 WTS of newly-authored autolink-like text (T103364)
25434 <p>http://example.com is not a link.</p>
25436 <nowiki>http://example.com is not a link.</nowiki>
25440 WTS of autolink-like text after an autolink (T108563)
25444 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
25446 http://example.com<nowiki> http://example.com is not a link.</nowiki>
25450 Magic links inside links (not autolinked)
25452 [[Foo|http://example.com]]
25455 [[Foo|ISBN 123456789x]]
25457 [http://foo.com http://example.com]
25458 [http://foo.com RFC 1234]
25459 [http://foo.com PMID 1234]
25460 [http://foo.com ISBN 123456789x]
25462 <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>
25463 <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>
25465 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
25466 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
25467 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
25468 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
25470 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
25471 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
25472 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
25473 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
25477 Magic links inside image captions (autolinked)
25479 [[File:Foobar.jpg|thumb|http://example.com]]
25480 [[File:Foobar.jpg|thumb|RFC 1234]]
25481 [[File:Foobar.jpg|thumb|PMID 1234]]
25482 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
25484 <div class="thumb tright">
25485 <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>
25486 <div class="thumbcaption">
25487 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25488 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
25491 <div class="thumb tright">
25492 <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>
25493 <div class="thumbcaption">
25494 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25495 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
25498 <div class="thumb tright">
25499 <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>
25500 <div class="thumbcaption">
25501 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25502 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
25505 <div class="thumb tright">
25506 <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>
25507 <div class="thumbcaption">
25508 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25509 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
25513 <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>
25514 <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>
25515 <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>
25516 <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>
25520 WTS of magic word text (T109371)
25525 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
25526 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
25528 <nowiki>RFC 1234</nowiki>
25530 [http://foo.com RFC 1234]
25536 Edited Redirect link should emit a non-piped wikitext link
25540 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
25546 T75121: Infer extension name from typeOf if data-mw is not present
25548 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25550 <div typeOf="mw:Extension/foo"></div>
25555 # Note that the <p> wrapping isn't present in PHP parser output
25556 # The important thing for this test is that P-wrapping doesn't
25557 # interfere with the <nowiki> protection for leading - in <td>
25558 # (which isn't necessary for <th>).
25560 T88318: p-wrapped dash in table.
25562 parsoid=html2wt,wt2wt
25565 <tr><th><p>-</p></th><th><p>- </p></th></tr>
25566 <tr><td><p>-</p></td><td><p>- </p></td></tr>
25567 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
25574 |<nowiki>-</nowiki>
25575 |<nowiki>- </nowiki>
25594 <td><small>-</small></td>
25606 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
25611 <td id='mwAc'>foo</td>
25612 <td id='serialize-this'>bar</td>
25617 | id="serialize-this" |bar
25622 Parsoid-like element ids should not be serialized to wikitext unless shadowed
25626 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
25628 <div id="hello">ok</div>
25635 "modes": ["wt2wt"],
25637 [ "#xyz", "before", "<b>before</b> stuff " ],
25638 [ "#xyz", "after", " stuff <i>after</i>" ],
25639 [ "#xyz", "html", "x <b>y</b> z" ]
25643 <span id="xyz">hello</span>
25645 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
25649 Never serialize a-tag as html, regardless of what data-parsoid has to say
25651 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25653 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
25658 ## SSS FIXME: This is broken output nevertheless.
25659 ## What might be a reasonable non-broken output for this?
25660 ## This is an edge case unlikely to be seen in production
25661 ## that I am not wasting more time on this right now.
25663 Never serialize a-tag as html, no matter what attributes it has
25665 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25667 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
25669 [http://boo.org http://boohoo.org]
25672 # Misnested is an indication that selser can reuse the source but these have
25673 # shown to sneak through on occasion. See T101768.
25674 # The original wikitext here is: [http://test.com [[one]] two three]
25676 Strip span tags added to mark as misnested
25680 <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>
25682 [http://test.com][[one]] two three
25685 # --------------------------------------------
25686 # Tests spec'ing wikitext serialization norms |
25687 # --------------------------------------------
25690 1. Categories should always be serialized on their own line
25694 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
25702 2. Categories that are part of templates should not introduce a line break
25704 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
25706 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span>bar</span> [[Category:baz]]"}},"i":0}}]}'>bar</span><span about="#mwt1"> </span><link rel="mw:PageProp/Category" href="./Category:Baz" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:baz"}}'/> bar</p>
25710 Lists: Add space after bullets
25717 <li><span> baz</span></li>
25722 * <span> baz</span>
25726 1. Headings: Add space before/after == (T53744)
25733 <h2><span> baz</span></h2>
25741 == <span> baz</span> ==
25745 2. Headings: Add space before/after == even after hoisted content
25748 "modes": ["html2wt"],
25749 "scrubWikitext": true
25752 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
25760 1. Headings: suppress newly created empty headings
25763 "modes": ["html2wt"],
25764 "scrubWikitext": true
25772 2. Headings: don't suppress empty headings if scrubWikitext is false
25782 3. Headings: suppress empty headings on edits
25785 "modes": ["selser"],
25786 "scrubWikitext": true,
25792 ==<span id="x">foo</span>==
25797 1. WT Quote Tags: suppress newly created empty style tags
25800 "modes": ["html2wt"],
25801 "scrubWikitext": true
25809 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
25815 ''<nowiki/>'''''<nowiki/>'''
25819 3. WT Quote Tags: suppress empty style tags on edits
25822 "modes": ["selser"],
25823 "scrubWikitext": true,
25829 '''<span id="x">foo</span>'''
25834 1. Anchors: suppress newly created empty anchors
25837 "modes": ["html2wt"],
25838 "scrubWikitext": true
25841 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
25846 2. Anchors: don't suppress empty anchors if scrubWikitext is false
25849 "modes": ["html2wt"],
25850 "scrubWikitext": false
25853 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
25859 3. Anchors: suppress empty anchors on edits
25862 "modes": ["selser"],
25863 "scrubWikitext": true,
25869 [[Test|<span id="x">foo</span>]]
25874 3a. Anchors: do not suppress numbered extlinks
25877 "modes": ["wt2wt"],
25878 "scrubWikitext": true
25883 <a rel="mw:ExtLink" href="http://foo.com"></a>
25887 3b. Anchors: do not suppress numbered extlinks
25890 "modes": ["wt2wt"],
25891 "scrubWikitext": true,
25897 [http://foo.com <span id="x">foo</span>]
25903 Normalizations should be restricted to edited content
25906 "modes": ["selser"],
25907 "scrubWikitext": true,
25909 [ "h1", "before", "<i></i>"]
25923 1. Multiple normalizations (html2wt)
25926 "modes": ["html2wt"],
25927 "scrubWikitext": true
25931 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
25932 </a><b><i></i></b>x</p>
25941 2. Multiple normalizations (selser)
25944 "modes": ["selser"],
25945 "scrubWikitext": true,
25947 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
25951 <span id="x">foo</span>
25953 <span id="x">foo</span>
25959 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
25962 "modes": ["html2wt"],
25963 "scrubWikitext": true
25975 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
25982 <nowiki> </nowiki>hi
25984 <nowiki> </nowiki> hello
25988 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
25991 "modes": ["html2wt"],
25992 "scrubWikitext": true
26001 baz bang</td></tr></table>
26007 bar<span>boo</span></p>
26023 bar<span>boo</span>
26027 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26030 "modes": ["selser"],
26031 "scrubWikitext": true,
26033 [ "p", "html", " a\n b" ]
26044 1. New links that end in spaces
26047 "modes": ["html2wt"],
26048 "scrubWikitext": false
26051 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26052 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26053 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26055 [[Berlin ]]<nowiki/>is the capital of Germany.
26059 [[Boston ]] is a city.
26063 2. New links that end in spaces
26066 "modes": ["html2wt"],
26067 "scrubWikitext": true
26070 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26071 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26072 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26074 [[Berlin]] is the capital of Germany.
26078 [[Boston]] is a city.
26082 1. Table cells with escapable prefixes
26085 "modes": ["html2wt"],
26086 "scrubWikitext": false
26090 <tr><td>a</td></tr>
26091 <tr><td>-</td></tr>
26092 <tr><td>+</td></tr>
26098 |<nowiki>-</nowiki>
26100 |<nowiki>+</nowiki>
26105 2. Table cells with escapable prefixes
26108 "modes": ["html2wt"],
26109 "scrubWikitext": true
26113 <tr><td>a</td></tr>
26114 <tr><td>-</td></tr>
26115 <tr><td>+</td></tr>
26128 3a. Table cells with escapable prefixes after edits
26131 "modes": ["selser"],
26132 "scrubWikitext": true,
26134 [ "table tbody tr:first-child td:first-child", "remove"]
26148 3b. Table cells with escapable prefixes after edits
26151 "modes": ["selser"],
26152 "scrubWikitext": true,
26154 [ "table tbody tr:first-child td:first-child", "html", "-" ],
26161 |<span id="x">foo</span>+
26170 # FIXME: This test will fail because
26171 # normalization doesn't realize that the id attribute
26172 # will eliminate the escapable scenario
26174 4a. Table cells without escapable prefixes after edits
26177 "modes": ["selser"],
26178 "scrubWikitext": true,
26180 [ "#x", "html", "-" ]
26193 ## This tests normalizer's ability to discriminate between
26194 ## cells having identical content.
26196 4b. Table cells without escapable prefixes after edits
26199 "modes": ["selser"],
26200 "scrubWikitext": true,
26202 [ "td", "html", "-" ]
26215 ## This tests normalizer's ability to not be tripped by
26216 ## comments (and whitespace)
26218 4c. Table cells without escapable prefixes after edits
26221 "modes": ["selser"],
26222 "scrubWikitext": true,
26224 [ "table tbody tr td:first-child", "remove" ]
26239 ## This tests normalizer's ability to handle HTML cells
26241 4d. Table cells without escapable prefixes after edits
26244 "modes": ["selser"],
26245 "scrubWikitext": true,
26247 [ "td", "html", "-" ]
26252 <tr><td>a</td></tr>
26256 <tr><td>-</td></tr>
26260 ## T111151 Remove font elements without attributes
26262 5a. font tags without attributes should be dropped in scrubWikitext mode
26265 "modes": ["html2wt"],
26266 "scrubWikitext": true
26270 <font><font>bar</font></font>
26271 <font class="x">boo</font>
26275 <font class="x">boo</font>
26279 5b. font tags should not be dropped without scrubWikitext being enabled
26282 "modes": ["html2wt"],
26283 "scrubWikitext": false
26292 Escape nowiki DOM elements
26296 <nowiki><i>foo</i></nowiki>
26298 <nowiki>''foo''</nowiki>
26301 # ---------------------------------------------------
26302 # End of tests spec'ing wikitext serialization norms |
26303 # ---------------------------------------------------
26305 # -----------------------------------------------------------------
26306 # End of section for Parsoid-only html2wt tests for serialization
26308 # -----------------------------------------------------------------
26310 # -----------------------------------------------------------------
26311 # The following section of tests are primarily to spec behavior of
26312 # the selective serializer. All these tests have manual selser
26313 # changes. The automated selser changes for all tests handle the
26314 # wide variation of changes, but these tests here capture specs
26315 # deterministically.
26316 # ----------------------------------------------------------------
26320 Selser: New comments should not be lost
26323 "modes": ["selser"],
26325 [ "#a", "after", "<!--c1-->" ],
26326 [ "#b", "before", "<!--c2-->" ]
26330 <span id="a">a</span>
26332 <span id="b">b</span>
26334 <span id="a">a</span><!--c1-->
26336 <!--c2--><span id="b">b</span>
26341 Selser: Check for validity of DSR before using it
26344 "modes": ["selser"],
26346 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
26350 <span id="a">a</span>
26352 {{DISPLAYTITLE:foo}}
26353 <span id="a">a</span>
26357 1. DOMDiff: Changes to <ref> content should be looked up using id
26360 "modes": ["selser"],
26362 ["#X", "after", "bar"],
26363 ["#Y", "after", "baz"]
26367 X <ref><span id="X">foo</span></ref>
26370 <ref name="a"><span id="Y">foo</span></ref>
26373 X <ref><span id="X">foo</span>bar</ref>
26376 <ref name="a"><span id="Y">foo</span>baz</ref>
26381 2. DOMDiff: Changes to <ref> content should be looked up using id
26384 "modes": ["selser"],
26386 ["#Z", "after", "bar"]
26390 A <ref>foo bar for a</ref>
26391 B <ref group="X" name="b" />
26395 <references group="X">
26396 <ref name="b"><span id="Z">foo</span></ref>
26399 A <ref>foo bar for a</ref>
26400 B <ref group="X" name="b" />
26404 <references group="X">
26405 <ref name="b"><span id="Z">foo</span>bar</ref>
26419 <li class="mw-empty-li"></li>
26420 <li class="mw-empty-li"></li>