1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # 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)
1340 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1344 Isolated close tags should be treated as literal text (bug 52760)
1352 <p><s.foo>s</p>
1354 <p><s.foo>s</p>
1358 ### Special characters
1362 Bare pipe character (bug 52363)
1371 Bare pipe character from a template (bug 52363)
1380 ### <nowiki> test cases
1384 <nowiki> unordered list
1386 <nowiki>* This is not an unordered list item.</nowiki>
1388 <p>* This is not an unordered list item.
1391 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1397 <nowiki>Lorem ipsum dolor
1405 <p>Lorem ipsum dolor
1414 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1426 :There is not nowiki.
1427 :There is <nowiki>nowiki</nowiki>.
1429 #There is not nowiki.
1430 #There is <nowiki>nowiki</nowiki>.
1432 *There is not nowiki.
1433 *There is <nowiki>nowiki</nowiki>.
1435 <dl><dd>There is not nowiki.</dd>
1436 <dd>There is nowiki.</dd></dl>
1437 <ol><li>There is not nowiki.</li>
1438 <li>There is nowiki.</li></ol>
1439 <ul><li>There is not nowiki.</li>
1440 <li>There is nowiki.</li></ul>
1443 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1444 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1446 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1447 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1449 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1450 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1454 Entities inside <nowiki>
1456 <nowiki><</nowiki>
1463 Entities inside template parameters
1469 <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>
1473 Properly escape nowiki when combined with other wiki markup
1477 <p>* </nowiki> tag</p>
1479 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1483 T93824: Put escaped HTML tags inside nowiki
1487 <p><h2>foo</h2></p>
1489 <nowiki><h2>foo</h2></nowiki>
1493 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1497 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1498 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1499 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1501 This text: L'[[Foo]]
1502 This text: L<nowiki>''</nowiki>[[Foo]]
1503 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1506 # This test fails because wikitext whitespace is not normalized before comparing.
1508 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1512 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1515 This text : L<nowiki>''</nowiki>[[Foo]]
1518 # This test and the next one are html2wt only as they test that incorrect wikitext
1519 # passed in template arguments gets escaped or wrapped in nowikis where required.
1521 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1525 <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>
1526 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1528 {{echo|foo{{!}}bar}}
1529 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1533 T53961: Output correct nowikis in template arguments
1537 <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>
1538 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1539 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1540 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1541 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1544 {{echo|a <nowiki>}}</nowiki> b}}
1545 {{echo|<nowiki>a [[ b</nowiki>}}
1546 {{echo|a {{!}} <nowiki>{{ ]]</nowiki>}}
1547 {{echo|a <nowiki>}</nowiki>}}
1551 Cases where "!!" needs nowiki protection
1556 <tr><th>this needs protection !! here</th></tr>
1560 <tr><th>this does not need
1561 protection !! here</th></tr>
1565 !<nowiki>this needs protection !! here</nowiki>
1578 Comments and Indent-Pre
1580 <!-- comment 1 --> asdf
1582 <!-- comment 1 --> asdf
1585 <!-- comment 1 --> asdf
1586 <!-- comment 2 -->xyz
1588 <!-- comment 1 --> asdf
1589 <!-- comment 2 --> xyz
1645 asdf<!-- comment 1 -->jkl
1655 <!-- foo --> b <!-- bar -->
1669 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1675 Comment semantics and delimiters
1677 <!-- --><!----><!-----><!------>
1681 <!-- --><!----><!-----><!------>
1685 Comment semantics and delimiters, redux
1687 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1688 -- foo -- funky huh? ... -->
1692 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1693 -- foo -- funky huh? ... -->
1697 Comment semantics and delimiters: directors cut
1699 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1700 everything starting with < followed by !-- until the first -- and > we see,
1701 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1707 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1708 everything starting with < followed by !-- until the first -- and > we see,
1709 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1714 Comment semantics: nesting
1716 <!--<!-- no, we're not going to do anything fancy here -->-->
1721 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1724 # Parsoid closes the unclosed comment, even if it means a slight
1727 Comment semantics: unclosed comment at end
1729 parsoid=wt2html,html2html
1731 <!--This comment will run out to the end of the document
1735 <!--This comment will run out to the end of the document-->
1739 Comment semantics: normalize comments to play nice with XML and browsers
1741 <!-- Browsers --!> think this is closed -->
1742 <!--> This would normally be text -->
1743 <!---> As would this -->
1744 <!-- XML doesn't like trailing dashes -------->
1745 <!-- Nor doubled hyphens -- anywhere in the data -->
1746 But this is not a comment.
1748 <p>But this is not a comment.
1751 <!-- Browsers --!> think this is closed -->
1752 <!--> This would normally be text -->
1753 <!---> As would this -->
1754 <!-- XML doesn't like trailing dashes -------->
1755 <!-- Nor doubled hyphens -- anywhere in the data -->
1756 <p>But this is not a comment.</p>
1760 Comment semantics: round-trip even text which contains encoded -->
1762 <!-- hello & goodbye - > --> --&gt; --&xx -->
1764 <!-- hello & goodbye - > --> --&gt; --&xx -->
1768 Comment in template title
1777 Comment on its own line post-expand
1789 Comment on its own line post-expand with non-significant whitespace
1801 Multiple comments should still parse as SOL-transparent
1803 parsoid=wt2html,wt2wt
1806 <!--c2--><!--c3--><!--c4-->*b
1815 <!--c2--><!--c3--><!--c4-->
1822 ### paragraph wrapping tests
1837 Block tag on one line (<div>)
1853 Block tag on one line (<blockquote>)
1855 a <blockquote>foo</blockquote>
1859 a <blockquote>foo</blockquote>
1871 Block tag on both lines (<div>)
1888 Block tag on both lines (<blockquote>)
1890 a <blockquote>foo</blockquote>
1892 b <blockquote>foo</blockquote>
1894 a <blockquote>foo</blockquote>
1895 b <blockquote>foo</blockquote>
1909 Multiple lines without block tags
1933 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1934 # So, we have a separate section for Parsoid. We don't want
1935 # to mimic this stripping behavior in Parsoid. It affects
1936 # editing experience and also requires us to maintain additional
1939 Empty lines between lines with block tags
1977 <div data-parsoid='{"stx":"html"}'></div>
1980 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1983 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1985 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1988 <div data-parsoid='{"stx":"html"}'>e</div>
1991 ## PHP parser emits output which is broken
1993 Unclosed HTML p-tags should be handled properly
2006 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2011 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2012 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2015 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2019 a [[Category:A1]] [[Category:A2]]
2024 <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"/>
2028 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2034 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2038 ### Preformatted text
2047 And a [[Main Page|link]]
2053 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2058 Tabs don't trigger preformatted text
2062 This is preformatted text.
2068 <pre>This is preformatted text.
2073 preformatted text.</p>
2074 <pre>This is preformatted text.
2079 Space before tab needs nowiki pre protection
2085 <nowiki> </nowiki> a
2089 Ident preformatting with inline content
2100 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2117 Regression with preformatted in <center>
2131 Bug 52763: Preformatted in <blockquote>
2137 indented cell (no pre-wrapping!)
2147 <p> indented cell (no pre-wrapping!)
2155 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2172 Bug 15491: <ins>/<del> in blockquote
2175 Foo <del>bar</del> <ins>baz</ins> quux
2179 <p>Foo <del>bar</del> <ins>baz</ins> quux
2185 # Note that the p-wrapping is newline sensitive, which could be
2186 # considered a bug: tidy will wrap only the 'Foo' in the example
2187 # below in a <p> tag. (see comment 23-25 of bug #6200)
2189 Bug 15491: <ins>/<del> in blockquote (2)
2191 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2194 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2200 <del>bar</del> <ins>baz</ins> quux</blockquote>
2204 <pre> with attributes (bug 3202)
2206 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2208 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2213 <pre> with width attribute (bug 3202)
2215 <pre width="8">Narrow screen goodies</pre>
2217 <pre width="8">Narrow screen goodies</pre>
2222 <pre> with forbidden attribute (bug 3202)
2224 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2226 <pre width="8">Narrow screen goodies</pre>
2231 Entities inside <pre>
2240 <pre> with forbidden attribute values (bug 3202)
2242 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2244 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2249 <nowiki> inside <pre> (bug 13238)
2257 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2265 <pre><nowiki>Foo</nowiki></pre>
2270 <nowiki> and <pre> preference (first one wins)
2299 <pre data-parsoid='{"stx":"html","strippedNL":true}'><nowiki>
2301 <p><span typeof="mw:Placeholder" data-parsoid='{"src":"</nowiki>"}'></nowiki></span>
2304 <p><span typeof="mw:Nowiki">
2313 </pre> inside nowiki
2315 <nowiki></pre></nowiki>
2321 # Parsoid doesn't strip empty tags, like Tidy does.
2323 Empty pre; pre inside other HTML tags (bug 54946)
2325 parsoid=wt2html,wt2wt
2356 HTML pre followed by indent-pre
2366 # Note that tidy removes the empty <p> tags from the start and end.
2367 # Parsoid does not, by design.
2371 <p><pre>foo</pre></p>
2377 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2381 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2389 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2399 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2411 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2432 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2436 {{echo| foo}}{{echo| bar}}
2441 {{echo|<!--cmt--> foo}}
2443 <!--cmt-->{{echo| foo}}
2445 {{echo|{{echo| }}bar}}
2463 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2500 Pres with newline attributes
2505 <pre class="one two">hi</pre>
2509 two" data-parsoid='{"stx":"html"}'>hi</pre>
2513 Things that look like <pre> tags aren't treated as such
2515 Barack Obama <President> of the United States
2516 <President></President>
2518 <p>Barack Obama <President> of the United States
2519 <President></President>
2523 ## PHP parser discards the "<pre " string
2525 Handle broken pre-like tags (bug 64025)
2529 {{echo|<pre <pre>x</pre>}}
2531 <table><pre </table>
2534 <table><pre></pre></table>
2537 <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>
2546 Parsoid: handle pre with space after attribute
2550 <pre style="width:50%;" >{{echo|foo}}</pre>
2552 <pre style="width:50%;">{{echo|foo}}</pre>
2555 <pre style="width:50%;">{{echo|foo}}</pre>
2558 # TODO / maybe: fix wt2wt for this
2560 Parsoid: Don't paragraph-wrap fosterable content
2586 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2614 #--------------------------------------------------------------------
2615 # Transclusion parameter whitespace stripping tests
2616 # Behavior is different for positional and named parameters
2617 #--------------------------------------------------------------------
2619 Templates: Strip leading and trailing whitespace from named-param values
2623 {{echo|1= {{echo|b}} }}
2636 <ul><li> d</li></ul>
2641 Templates: Don't strip whitespace from positional-param values
2645 {{echo|{{echo|b}} }}
2677 <ul><li> f</li></ul>
2685 Templates: Handle empty comment-and-ws-only lines correctly
2688 <!--should be ignored-->
2689 <!--should be ignored as well-->
2698 Templates: Handle comments in the target
2701 <!-- should be ignored -->
2704 {{echo<!-- should be ignored -->
2707 {{echo<!-- should be ignored -->|foo}}
2709 {{<!-- should be ignored -->echo|foo}}
2711 <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>
2713 <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>
2715 <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>
2717 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2721 Templates: Handle comments in parameter names (bug 67657)
2724 <!-- should be ignored -->
2728 <!-- should be ignored -->
2731 {{echo|1<!-- should be ignored --> = foo}}
2733 {{echo|<!-- should be ignored -->1 = foo}}
2735 <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>
2737 <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>
2739 <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>
2741 <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>
2745 Templates: Other wikitext in parameter names (bug 67657)
2749 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2755 #--------------------------------------------------------------------
2756 # Transclusion parameter escaping tests
2757 #--------------------------------------------------------------------
2759 Templates: Parsoid parameter escaping test 1
2761 {{echo|[foo]|{{echo|[bar]}}}}
2765 <p about="#mwt1" typeof="mw:Transclusion"
2766 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2770 Parsoid: Pipes in external links in template parameter
2772 {{echo|[{{echo|http://example.com}} link]}}
2774 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2776 <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>
2780 Parsoid: pipe in transclusion parameter
2782 {{echo|http://foo.com/a|b}}
2784 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2786 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2787 typeof="mw:Transclusion"
2788 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>
2792 Parsoid: Pipe in external link target and content in template parameter
2794 parsoid=html2wt,wt2wt
2796 {{echo|[http://foo.com/a|b a|b]}}
2798 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2800 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2801 typeof="mw:Transclusion"
2802 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2803 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2807 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2811 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2813 <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>
2817 Templates: Don't escape already nowiki-escaped text in template parameters
2819 parsoid=html2wt,wt2wt
2821 {{echo|foo<nowiki>|</nowiki>bar}}
2822 {{echo|<nowiki><div></nowiki>}}
2823 {{echo|<nowiki></nowiki>}}
2825 <p>foo|bar <div></p>
2827 <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>
2828 <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>
2829 <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>
2835 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2837 parsoid=html2wt,wt2wt
2839 {{echo|{{echo|1=bar}}}}
2843 <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>
2848 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2854 <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>
2859 Templates: Preserve blank parameter names
2865 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2869 Templates: Preserve blank parameter names in other positions
2871 {{blank_param|bar|=foo}}
2875 <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
2880 ### Parsoid-centric tests for testing RT edge cases for pre
2884 1a. Indent-Pre and Comments
2897 1b. Indent-Pre and Comments
2910 1c. Indent-Pre and Comments
2923 1d. Indent-Pre and Comments
2924 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2937 2a. Indent-Pre and tables
2958 2b. Indent-Pre and tables
2974 2c. Indent-Pre and tables (bug 42252)
2991 2d. Indent-Pre and tables
3008 <tbody><tr><td> b</td></tr>
3013 2e. Indent-Pre and table-line syntax
3026 2f. Indent-pre started by table-line syntax
3045 3a. Indent-Pre and block tags (single-line html)
3049 c <blockquote> foo </blockquote>
3054 c <blockquote> foo </blockquote>
3055 <pre><span> foo </span>
3058 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3059 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3060 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3061 <pre><span> foo </span>
3078 3b. Indent-Pre and block tags (multi-line html)
3083 <pre>a <span>foo</span>
3088 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3089 b <div data-parsoid='{"stx":"html"}'> foo </div>
3099 3c. Indent-Pre and block tags (pre-content on separate line)
3163 4. Indent-Pre and extension tags
3169 a <ul class="gallery mw-gallery-traditional">
3170 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3171 <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>
3172 <div class="gallerytext">
3179 <ul class="gallery mw-gallery-traditional">
3180 <li class="gallerybox" style="width: 155px">
3181 <div style="width: 155px">
3182 <div class="thumb" style="width: 150px;">
3183 <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>
3185 <div class="gallerytext"></div>
3192 Table wikitext syntax outside wiki-tables
3195 ! not a table heading
3198 | class="foo bar" | baz
3205 ! not a table heading
3208 | class="foo bar" | baz
3217 Render paragraphs when indent-pre is suppressed in blocklevels
3234 4. Multiple spaces at start-of-line
3252 ## NOTE: the leading white-space chars on empty line are significant
3254 5a. White-space in indent-pre
3266 ## NOTE: the leading white-space chars on empty line are significant
3268 5b. White-space in indent-pre
3287 5c. White-space in indent-pre
3300 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3323 7a. Indent-pre and category links
3325 parsoid=wt2html,wt2wt
3327 [[Category:foo]] <!-- No pre-wrapping -->
3328 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3331 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3332 <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 -->
3335 ## We used to, but no longer wt2wt this test since the default serializer
3336 ## will normalize all categories to serialize on their own line.
3337 ## This wikitext usage is going to be fairly uncommon in production and
3338 ## selser will take care of preserving formatting in those scenarios.
3340 7b. Indent-pre and category links
3345 [[Category:foo]] {{echo|b}}
3347 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3348 <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>
3352 Indent-Pre: Newlines in comments shouldn't affect sol state
3366 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3370 HTML-pre: 1. embedded newlines
3405 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3407 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3411 <pre data-parsoid='{"stx":"html"}'>
3416 <pre data-parsoid='{"stx":"html"}'>
3424 HTML-pre: big spaces
3460 <pre data-parsoid='{"stx":"html"}'>
3479 HTML-pre: 2: indented text
3492 HTML-pre: 3: other wikitext
3511 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3520 ### Definition lists
3527 <dl><dt> name </dt>
3528 <dd> Definition</dd></dl>
3533 Definition list for indentation only
3537 <dl><dd> Indented text</dd></dl>
3542 Definition list with no space
3547 <dd>Definition</dd></dl>
3552 Definition list with URL link
3554 ; http://example.com/ : definition
3556 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3557 <dd> definition</dd></dl>
3562 Definition list with bracketed URL link
3564 ;[http://www.example.com/ Example]:Something about it
3566 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3567 <dd>Something about it</dd></dl>
3572 Definition list with wikilink containing colon
3574 ; [[Help:FAQ]]: The least-read page on Wikipedia
3576 <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>
3577 <dd> The least-read page on Wikipedia</dd></dl>
3581 # At Brion's and JeLuF's insistence... :)
3583 Definition list with news link containing colon
3585 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3587 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3588 <dd> This isn't even a real newsgroup!</dd></dl>
3591 <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>
3595 Malformed definition list with colon
3597 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3599 <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>
3604 Definition lists: colon in external link text
3606 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3608 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3609 <dd> OK, I made that up</dd></dl>
3614 Definition lists: colon in HTML attribute
3616 ;<b style="display: inline">bold</b>
3618 <dl><dt><b style="display: inline">bold</b></dt></dl>
3623 Definition lists: self-closed tag
3625 ;one<br/>two : two-line fun
3627 <dl><dt>one<br />two </dt>
3628 <dd> two-line fun</dd></dl>
3633 Bug 11748: Literal closing tags
3637 <dd>test test test test test</dd>
3639 <dd>test test test test test</dd>
3644 <dd>test test test test test</dd>
3646 <dd>test test test test test</dd>
3652 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3655 ; term : description
3660 <dl><dt> term </dt>
3661 <dd> description</dd></dl>
3662 <ul><li> unordered</li></ul>
3669 Definition list with empty definition and following paragraph
3681 Nested definition lists using html syntax
3690 Definition Lists: No nesting: Multiple dd's
3703 Definition Lists: Indentation: Regular
3711 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3716 Definition Lists: Indentation: Missing 1st level
3722 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3727 Definition Lists: Indentation: Multi-level indent
3731 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3736 Definition Lists: Hacky use to indent tables
3743 should be left alone
3745 <dl><dd><dl><dd><table>
3750 </td></tr></table></dd></dl></dd></dl>
3752 should be left alone
3757 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3765 should be left alone
3768 <dl><dd><dl><dd><table><tr>
3771 </tr></table><!-- bar --></dd></dl></dd></dl>
3773 should be left alone</p>
3777 Definition Lists: Hacky use to indent tables, with comment before table
3783 <dl><dd><dl><dd><!-- foo --><table><tr>
3785 </tr></table></dd></dl></dd></dl>
3788 # The trailing whitespace in this test is to catch a regression in
3789 # Parsoid after T54473.
3791 Definition Lists: Hacky use to indent tables (WS-insensitive)
3800 </td></tr></table></dd></dl>
3804 <tbody><tr><td>a</td></tr>
3805 </tbody></table> </dd></dl>
3808 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3809 ## as an empty dt item. It also ignores all but the last ";" when followed
3810 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3811 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3814 ## Ex: ";;t2 ::d2" is transformed into:
3826 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3827 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3838 ## All Parsoid only definition list tests have this difference.
3840 ## See also: https://phabricator.wikimedia.org/T8569
3841 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3844 Table / list interaction: indented table with lists in table contents
3859 <ul><li> b</li></ul>
3863 <ul><li> d</li></ul>
3864 </td></tr></table></dd></dl>
3869 Table / list interaction: lists nested in tables nested in indented lists
3892 </td></tr></table></dd></dl>
3899 Definition Lists: Nesting: Multi-level (Parsoid only)
3929 Definition Lists: Nesting: Test 2 (Parsoid only)
3956 Definition Lists: Nesting: Test 3 (Parsoid only)
3999 Definition Lists: Nesting: Test 4
4004 <dl><dd><dl><dd><dl><dt>t3</dt>
4005 <dd>d3</dd></dl></dd></dl></dd></dl>
4010 ## The Parsoid team believes the following three test exposes a
4011 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4012 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4013 ## It also exposes a "misfeature" in tidy, which doesn't like
4014 ## <dl> tags with a single <dt> child; it converts the <dt> into
4015 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4017 Definition Lists: Mixed Lists: Test 1
4023 <dl><dd><dl><dt><ul><li> foo</li>
4024 <li> bar</li></ul></dt></dl>
4025 <dl><dt> baz</dt></dl></dd></dl>
4060 Definition Lists: Mixed Lists: Test 2
4065 <ul><li><dl><dd> d1</dd>
4066 <dd> d2</dd></dl></li></ul>
4072 Definition Lists: Mixed Lists: Test 3
4077 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4078 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4084 Definition Lists: Mixed Lists: Test 4
4089 <ul><li><dl><dt>d1 </dt>
4092 <dd>d4</dd></dl></li></ul>
4098 Definition Lists: Mixed Lists: Test 5
4104 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4110 Definition Lists: Mixed Lists: Test 6
4115 <ol><li><ul><li><dl><dd>d1
4116 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4122 Definition Lists: Mixed Lists: Test 7
4127 <dl><dd><ul><li> d1</li>
4128 <li> d2</li></ul></dd></dl>
4134 Definition Lists: Mixed Lists: Test 8
4139 <dl><dd><ul><li> d1</li></ul>
4140 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4146 Definition Lists: Mixed Lists: Test 9
4150 <ul><li><dl><dt>foo </dt>
4151 <dd>bar</dd></dl></li></ul>
4157 Definition Lists: Mixed Lists: Test 10
4161 <ul><li><ol><li><dl><dt>foo </dt>
4162 <dd>bar</dd></dl></li></ol></li></ul>
4166 # The Parsoid team disagrees with the PHP parser's seemingly-random
4167 # rules regarding dd/dt on the next two tests. Parsoid is more
4168 # consistent, and recognizes the shared nesting and keeps the
4169 # still-open tags around until the nesting is complete.
4170 # (And tidy again converts <dt> to <dd> before 'bar'.)
4173 Definition Lists: Mixed Lists: Test 11
4178 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4179 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4180 <dl><dt>boo </dt>
4181 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4236 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4237 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4241 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4242 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4251 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4253 # * The test is wrong, there are two colons where there should be :;
4254 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4256 Definition Lists: Weird Ones: Test 1
4258 *#;*::;; foo : bar (who uses this?)
4260 <ul><li><ol><li><dl><dt> foo </dt>
4261 <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>
4280 <dt>bar (who uses this?)</dt>
4312 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4313 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4325 Definition Lists: colons occurring in tags
4343 <dt><span>a:b</span></dt>
4370 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4372 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4373 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4374 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4375 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4377 <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>
4378 <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>
4379 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4383 Definition Lists: colons and tables 1
4395 </td></tr></table></dd></dl>
4399 </td></tr></table></dd></dl>
4403 # Parsoid's output (as documented below) differs from php's in this case.
4404 # This is probably a bug. If we fixup parsoid to match php's output, the
4405 # above test should pass and the below test case can be removed. It is
4406 # unclear which output is more desirable.
4409 Definition Lists: colons and tables 2
4421 </td></tr></table></dd>
4425 </td></tr></table></dd></dl>
4429 Definition Lists: template interaction
4431 ::{{definition_list}}
4434 ::{{definition_list}}
4439 <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">
4440 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4442 <dl><dd data-parsoid='{}'>one
4443 <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">
4444 </span><dd about="#mwt2">two
4446 <dd>three</dd></dl></dd>
4447 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4455 External links: non-bracketed
4457 Non-bracketed: http://example.com
4459 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4463 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4465 External links: numbered
4467 Numbered: [http://example.com]
4468 Numbered: [http://example.net]
4469 Numbered: [http://example.com]
4471 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4472 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4473 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4476 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4477 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4478 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4482 External links: specified text
4484 Specified text: [http://example.com link]
4486 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4491 External links: trail
4493 Linktrails should not work for external links: [http://example.com link]s
4495 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4500 External links: dollar sign in URL
4502 http://example.com/1$2345
4504 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4508 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4510 External links: dollar sign in URL (autonumber)
4512 [http://example.com/1$2345]
4514 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4517 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4521 External links: open square bracket forbidden in URL (bug 4377)
4523 parsoid=wt2html,wt2wt,html2html
4525 http://example.com/1[2345
4527 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4530 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4534 External links: open square bracket forbidden in URL (named) (bug 4377)
4536 parsoid=wt2html,html2html
4538 [http://example.com/1[2345]
4540 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4543 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4546 # parsoid adds a space before the link name
4548 External links: open square bracket forbidden in URL (named) (bug 4377)
4551 [http://example.com/1 [2345]
4553 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4558 External links: nowiki in URL link text (bug 6230)
4560 [http://example.com/ <nowiki>''example site''</nowiki>]
4562 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4567 External links: newline forbidden in text (bug 6230 regression check)
4569 [http://example.com/ first
4572 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4578 External links: Pipe char between url and text
4580 [http://example.com | link]
4582 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4587 External links: protocol-relative URL in brackets
4589 [//example.com/ Test]
4591 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4595 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4597 External links: protocol-relative URL in brackets without text
4601 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4604 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4608 External links: protocol-relative URL in free text is left alone
4612 <p>//example.com/Foo
4617 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4619 foo//example.com/Foo
4621 <p>foo//example.com/Foo
4626 External links: with no contents
4628 [http://en.wikipedia.org/wiki/Foo]
4630 [[wikipedia:Foo|Bar]]
4632 [[wikipedia:Foo|<span>Bar</span>]]
4634 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4635 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4636 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4639 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4640 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4641 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4645 External links: Free with trailing punctuation
4655 http://example.com/url_with_(brackets)
4656 (http://example.com/url_without_brackets)
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<
4664 http://example.com/url_with_entity<
4665 http://example.com/url_with_entity<
4667 <p><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">http://example.com</a>?
4674 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4675 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4676 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</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><
4684 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4685 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4688 <p><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">http://example.com</a>?
4695 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4696 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4697 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</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>
4700 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
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":"&nbsp;","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":"&#xA0;","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":"&#160;","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":"&lt;","srcContent":"<"}'><</span>
4705 <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>
4706 <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>
4710 External links: tricky Parsoid html2html case
4712 parsoid=wt2html,wt2wt,html2html
4714 http://example.com/url_with_entity&amp;
4716 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4719 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4723 External links: Free with trailing quotes (T113666)
4725 '''News:''' Stuff here
4729 <p><b>News:</b> Stuff here
4730 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4733 <p><b>News:</b> Stuff here</p>
4734 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4738 External links: Lone protocols are never linked (T105697)
4757 External links: No preceding word characters allowed (bug 65278)
4759 NOPEhttp://example.com
4760 N0http://example.com
4761 ok:http://example.com
4762 ok-http://example.com
4764 <p>NOPEhttp://example.com
4765 N0http://example.com
4766 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4767 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4774 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4776 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4781 External image from https
4783 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4785 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4790 External image (when not allowed)
4792 wgAllowExternalImages=0
4794 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4796 <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>
4801 Link to non-http image, no img tag
4803 Link to non-http image, no img tag: ftp://example.com/test.jpg
4805 <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>
4810 External links: terminating separator
4812 Terminating separator: http://example.com/thing,
4814 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4819 External links: intervening separator
4821 Intervening separator: http://example.com/1,2,3
4823 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4828 External links: old bug with URL in query
4830 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4832 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4837 External links: old URL-in-URL bug, mixed protocols
4839 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4841 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4846 External links: URL in text
4848 URL in text: [http://example.com http://example.com]
4850 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4855 External links: Clickable images
4857 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4859 <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>
4862 <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>
4866 External links: raw ampersand
4868 Old & use: http://x&y
4870 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4875 External links: encoded ampersand
4877 Old & use: http://x&y
4879 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4882 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4886 External links: encoded equals (bug 6102)
4888 http://example.com/?foo=bar
4890 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4893 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4897 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4898 ## does it number them. As discussed in bug 53505, we can identify
4899 ## autonumbered links via CSS.
4903 External links: [raw ampersand]
4905 Old & use: [http://x&y]
4907 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4910 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4913 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4914 # mode will return the [raw ampersand] wikitext
4916 External links: [encoded ampersand]
4918 parsoid=wt2html,wt2wt,html2html
4920 Old & use: [http://x&y]
4922 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4925 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4929 External links: [raw equals]
4931 [http://example.com/?foo=bar]
4933 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4936 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4939 # note that parsoid html is identical to [raw equals] case; so html2wt
4940 # mode will return the [raw equals] wikitext
4942 External links: [encoded equals] (bug 6102)
4944 parsoid=wt2html,wt2wt,html2html
4946 [http://example.com/?foo=bar]
4948 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4951 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4954 # xxx parsoid strips the IDN character, so the round-trip tests will
4955 # obviously fail and are disabled. --cscott
4957 External links: [IDN ignored character reference in hostname; strip it right off]
4959 parsoid=wt2html,wt2wt,html2html
4961 [http://e‌xample.com/]
4963 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4966 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4969 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4970 # Where an external link could easily circumvent the sanitization of the text of
4971 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4972 # test demands a higher standard. That's a bit strange.
4976 # http://example.com -> [http://example.com|http://example.com]
4977 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4979 # The first example is sanitized, but the second is not. Any security benefits
4980 # from this production are trivial to circumvent. Either remove this test and
4981 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4982 # the test accordingly.
4986 # xxx parsoid strips the IDN character, so the round-trip tests will
4987 # obviously fail and are disabled. --cscott
4989 External links: IDN ignored character reference in hostname; strip it right off
4991 parsoid=wt2html,html2html
4993 http://e‌xample.com/
4995 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4998 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5002 External links: www.jpeg.org (bug 554)
5006 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5010 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5012 External links: URL within URL (original bug 2)
5014 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5016 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5019 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5023 BUG 361: URL inside bracketed URL
5025 [http://www.example.com/foo http://www.example.com/bar]
5027 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5032 BUG 361: URL within URL, not bracketed
5034 http://www.example.com/foo?=http://www.example.com/bar
5036 <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>
5041 BUG 289: ">"-token in URL-tail
5043 http://www.example.com/<hello>
5045 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5050 BUG 289: literal ">"-token in URL-tail
5052 http://www.example.com/<b>html</b>
5054 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5057 <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>
5061 BUG 289: ">"-token in bracketed URL
5063 [http://www.example.com/<hello> stuff]
5065 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5070 BUG 289: literal ">"-token in bracketed URL
5072 [http://www.example.com/<b>html</b> stuff]
5074 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5079 BUG 289: literal double quote at end of URL
5081 http://www.example.com/"hello"
5083 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5088 BUG 289: literal double quote in bracketed URL
5090 [http://www.example.com/"hello" stuff]
5092 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5097 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5099 [http://www.example.com test]
5101 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5106 External links: link text with spaces
5108 [http://www.example.com a b c]
5109 [http://www.example.com ''a'' ''b'']
5111 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5112 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5117 External links: wiki links within external link (Bug 3695)
5119 parsoid=wt2html,html2html
5121 [http://example.com [[wikilink]] embedded in ext link]
5123 <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>
5126 <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>
5130 BUG 787: Links with one slash after the url protocol are invalid
5134 [http:/example.com title]
5136 <p>http:/example.com
5137 </p><p>[http:/example.com title]
5142 Bracketed external links with template-generated invalid target
5144 [{{echo|http:/example.com}} title]
5146 <p>[http:/example.com title]
5151 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5153 ''[http://example.com text'']
5154 [http://example.com '''text]'''
5155 ''Something [http://example.com in italic'']
5156 ''Something [http://example.com mixed''''', even bold]'''
5157 '''''Now [http://example.com both''''']
5159 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5160 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5161 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5162 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5163 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5169 Bug 4781: %26 in URL
5171 http://www.example.com/?title=AT%26T
5173 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5176 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5179 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5180 # % is actually legal in HTML5. Any change in output would need testing though.
5182 Bug 4781, 5267: %25 in URL
5184 http://www.example.com/?title=100%25_Bran
5186 <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>
5189 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5193 Bug 4781, 5267: %28, %29 in URL
5195 http://www.example.com/?title=Ben-Hur_%281959_film%29
5197 <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>
5200 <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>
5205 Bug 4781: %26 in autonumber URL
5207 [http://www.example.com/?title=AT%26T]
5209 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5212 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5216 Bug 4781, 5267: %26 in autonumber URL
5218 [http://www.example.com/?title=100%25_Bran]
5220 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5223 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5227 Bug 4781, 5267: %28, %29 in autonumber URL
5229 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5231 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5234 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5239 Bug 4781: %26 in bracketed URL
5241 [http://www.example.com/?title=AT%26T link]
5243 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5246 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5250 Bug 4781, 5267: %25 in bracketed URL
5252 [http://www.example.com/?title=100%25_Bran link]
5254 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5259 Bug 4781, 5267: %28, %29 in bracketed URL
5261 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5263 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5266 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5270 External link containing a period in the anchor. (bug 63947)
5272 [//foo.org/bar#baz. bang]
5274 [//foo.org/bar. bang]
5276 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5277 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5280 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5281 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5285 External link containing a single quote. (bug 63947)
5289 [//foo.org/bar'baz bang]
5291 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5292 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5295 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5296 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5300 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5302 Some [http://example.com/ pretty ''italics'' and stuff]!
5304 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5309 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5311 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5313 <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>
5318 External link containing double-single-quotes with no space separating the url from text in italics
5320 [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]].]
5322 <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>
5325 <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>
5327 <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>
5331 External link with comments in link text
5333 [http://www.google.com Google <!-- comment -->]
5335 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5338 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5342 External link to bare IPv4 address
5344 [http://192.168.0.1 Link]
5346 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5349 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5353 URL-encoding in URL functions (single parameter)
5355 {{localurl:Some page|amp=&}}
5357 <p>/index.php?title=Some_page&amp=&
5362 URL-encoding in URL functions (multiple parameters)
5364 {{localurl:Some page|q=?&=&}}
5366 <p>/index.php?title=Some_page&q=?&amp=&
5373 http://example.com/index.php?foozoid%5B%5D=bar
5375 http://example.com/index.php?foozoid[]=bar
5377 <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>
5378 </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>
5381 <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>
5383 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5387 IPv6 urls, autolink format (T23261)
5389 http://[2404:130:0:1000::187:2]/index.php
5391 Examples from RFC 2373, section 2.2:
5392 * http://[1080::8:800:200C:417A]/unicast
5393 * http://[FF01::101]/multicast
5394 * http://[::1]/loopback
5395 * http://[::]/unspecified
5396 * http://[::13.1.68.3]/ipv4compat
5397 * http://[::FFFF:129.144.52.38]/ipv4compat
5399 Examples from RFC 2732, section 2:
5400 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5401 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5402 * http://[3ffe:2a00:100:7031::1]
5403 * http://[1080::8:800:200C:417A]/foo
5404 * http://[::192.9.5.5]/ipng
5405 * http://[::FFFF:129.144.52.38]:80/index.html
5406 * http://[2010:836B:4179::836B:4179]
5409 <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>
5410 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5412 <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>
5413 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5414 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5415 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5416 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5417 <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>
5418 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5420 <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>
5421 <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>
5422 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5423 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5424 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5425 <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>
5426 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5429 <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>
5431 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5432 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5433 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5434 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5435 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5436 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5437 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5439 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5440 <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>
5441 <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>
5442 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5443 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5444 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5445 <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>
5446 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5450 IPv6 urls, bracketed format (T23261)
5452 [http://[2404:130:0:1000::187:2]/index.php test]
5454 Examples from RFC 2373, section 2.2:
5455 * [http://[1080::8:800:200C:417A] unicast]
5456 * [http://[FF01::101] multicast]
5457 * [http://[::1]/ loopback]
5458 * [http://[::] unspecified]
5459 * [http://[::13.1.68.3] ipv4compat]
5460 * [http://[::FFFF:129.144.52.38] ipv4compat]
5462 Examples from RFC 2732, section 2:
5463 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5464 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5465 * [http://[3ffe:2a00:100:7031::1] 3]
5466 * [http://[1080::8:800:200C:417A]/foo 4]
5467 * [http://[::192.9.5.5]/ipng 5]
5468 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5469 * [http://[2010:836B:4179::836B:4179] 7]
5472 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5473 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5475 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5476 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5477 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5478 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5479 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5480 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5481 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5483 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5484 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5485 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5486 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5487 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5488 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5489 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5492 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5494 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5495 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5496 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5497 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5498 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5499 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5500 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5502 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5503 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5504 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5505 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5506 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5507 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5508 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5509 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5513 Non-extlinks in brackets
5522 [{{echo|foo}} ''bar'']
5523 [{{echo|foo}}l's] errand
5524 [{{echo|foo}}l's errand]
5526 [url=http://example.com]
5527 [http:// bare protocols don't count]
5540 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5541 [http:// bare protocols don't count]
5549 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5550 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5551 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5552 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5553 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5554 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5555 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5556 [http:// bare protocols don't count]</p>
5560 Percent encoding in external links
5562 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5564 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5567 <p><a rel="mw:ExtLink"
5568 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5572 Use url link syntax for links where the content is equal the link target
5576 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5579 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5583 Parenthesis in external links, especially URL links
5587 http://example.com/test)
5589 http://example.com/(test)
5591 http://example.com/((test)
5593 (http://example.com/(test))
5595 (http://example.com/(test)))))
5597 http://example.com/a)b
5599 [http://example.com) foo]
5601 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</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/(test))">http://example.com/(test))</a>
5606 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5607 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5608 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5611 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</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/(test))">http://example.com/(test))</a></p>
5616 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5617 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5618 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5622 Parenthesis in external links, w/ transclusion or comment
5624 (http://example.com/{{echo|hi}})
5626 (http://example.com<!-- hi -->)
5628 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5629 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5632 <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>
5634 <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>
5638 Serialize <a> tags with invalid link targets as plain text
5640 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5642 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5643 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5644 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5645 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5648 <nowiki>*</nowiki>text
5649 <nowiki>[[foo]]</nowiki>
5650 <nowiki>*a [[foo]]</nowiki>
5654 mw:ExtLink -vs- mw:WikiLink (T94723)
5658 <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>
5659 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5660 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5661 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5663 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5664 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5669 [[wikipedia:Foo|Bar]]
5670 [[wikipedia:Foo|Bar]]
5672 [[wikipedia:European_Robin|European Robin]]
5673 [[wikipedia:European_Robin|European Robin]]
5677 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5681 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5683 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5694 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5696 Normal text. '''''Bold italic text.''''' Normal text.
5698 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5699 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5704 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5705 # parser strips. The wikitext contains just the first half of the bold
5708 Unclosed and unmatched quotes
5710 '''''Bold italic text '''with bold deactivated''' in between.'''''
5712 '''''Bold italic text ''with italic deactivated'' in between.'''''
5716 ..spanning two paragraphs (should not work).'''
5718 '''Bold tag left open
5720 ''Italic tag left open
5724 <!-- Unmatching number of opening, closing tags: -->
5725 '''This year''''s election ''should'' beat '''last year''''s.
5727 ''Tom'''s car is bigger than ''Susan'''s.
5729 Plain ''italic'''s plain
5731 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5732 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5733 </p><p><b>Bold text..</b>
5734 </p><p>..spanning two paragraphs (should not work).
5735 </p><p><b>Bold tag left open</b>
5736 </p><p><i>Italic tag left open</i>
5738 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5739 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5740 </p><p>Plain <i>italic'</i>s plain
5743 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5744 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5745 </p><p><b>Bold text..</b>
5746 </p><p>..spanning two paragraphs (should not work).<b></b>
5747 </p><p><b>Bold tag left open</b>
5748 </p><p><i>Italic tag left open</i>
5751 <!-- Unmatching number of opening, closing tags: -->
5752 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5753 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5754 </p><p>Plain <i>italic'</i>s plain
5761 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5764 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5765 # is the bare minimum required by the spec, see:
5766 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5767 # Parsoid team replies: empty table tags are legal in HTML5
5769 A table with no data.
5782 A table with stray table end tags on start tag line (wt2html)
5786 {|style="color: red;"|}
5788 {|style="color: red;" |}
5792 {|style="color: red;"|} id="foo"
5796 {|style="color: red;" |} id="foo"
5800 <table style="color: red;"></table>
5802 <table style="color: red;">
5808 <table style="color: red;" id="foo">
5814 <table style="color: red;" id="foo">
5823 A table with no data (take 2)
5831 # A table with nothing but a caption is invalid XHTML, we might want to render
5832 # this as <p>caption</p>
5833 # Parsoid team replies: table with only a caption is legal in HTML5
5835 A table with nothing but a caption
5843 </caption><tr><td></td></tr></table>
5846 <table><caption> caption</caption></table>
5850 A table with caption with default-spaced attributes and a table row
5853 |+ style="color: red;" | caption1
5859 <caption style="color: red;"> caption1
5868 A table with captions with non-default spaced attributes and a table row
5871 |+style="color: red;"|caption2
5872 |+ style="color: red;"| caption3
5878 <caption style="color: red;">caption2
5880 <caption style="color: red;"> caption3
5889 Table td-cell syntax variations
5893 | foo bar foo || baz
5894 | style='color:red;' | baz
5895 | style='color:red;' || baz
5902 <td> foo bar foo </td>
5905 <td style="color:red;"> baz
5907 <td> style='color:red;' </td>
5935 Simple table but with multiple dashes for row wikitext
5954 Multiplication table
5956 {| border="1" cellpadding="2"
5957 |+Multiplication table
5959 ! × !! 1 !! 2 !! 3
5977 <table border="1" cellpadding="2">
5978 <caption>Multiplication table
6025 Accept "||" in table headings
6040 Accept "!!" in table data
6054 <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>
6059 Accept "||" in indented table headings
6069 </th></tr></table></dd></dl>
6074 Accept "!!" in templates
6088 <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>
6092 Accept "!!" in table headings after newline
6109 <p>b!!c</p></th></tr>
6114 Accept "!!" in table data of mixed wikitext / html syntax
6118 <tr><td>b!!c</td></tr>
6131 <tbody><tr><th>a</th></tr>
6132 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6137 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6154 Accept "| !" at start of line in tables (ignore !-attribute)
6158 | !style="color:red" | bar
6170 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 +/-
6174 |style='color:red;'|+1
6175 |style='color:blue;'|-1
6187 <td style="color:red;">+1
6189 <td style="color:blue;">-1
6213 |rowspan=2| Cell 2, row 1 (and 2)
6224 <td rowspan="2"> Cell 2, row 1 (and 2)
6242 {| bgcolor=#ABCDEF border=2
6247 |the original table again
6255 <table bgcolor="#ABCDEF" border="2">
6263 <td>the original table again
6269 Invalid attributes in table cell (bug 1830)
6283 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6287 | title="foo<nowiki>|</nowiki>" |bar
6288 | title="foo<nowiki>|</nowiki>" bar
6295 <td title="foo|">bar
6297 <td> title="foo|" bar
6302 <tbody><tr><td title="foo">bar</td>
6303 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6304 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6308 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6309 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6310 # *2wt modes will fail.
6312 Table security: embedded pipes
6314 parsoid=wt2html,html2html
6317 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6321 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6322 <td>]" onmouseover="alert(document.cookie)">test
6330 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6333 # FIXME: The output seems broken. Filed as T110268.
6335 ! and || in td attributes should not be parsed as <th>/<td>
6340 | style="color: red !important;" data-contrived="put this here ||" | foo
6345 <td> style="color: red !important;" data-contrived="put this here </td>
6351 <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>
6356 Indented table markup mixed with indented pre content (proposed in bug 6200)
6361 Text that should be rendered preformatted
6369 <pre>Text that should be rendered preformatted
6378 1. Template-generated table cell attributes and cell content
6383 || {{table_attribs_5}}
6384 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6385 |align=center {{table_attribs}}
6386 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6391 <td style="color:red;">Foo
6393 <td style="color:red;">Foo
6395 <td> style="color:red;"</td>
6398 <td style="color:red;">Foo
6400 <td align="center" style="color:red;">Foo
6402 <td align="center" style="color:red;">Foo
6408 2. Template-generated table cell attributes and cell content
6411 |{{table_attribs_2}}
6416 <td style="color:red;">Foo
6424 <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>
6425 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6430 3. Template-generated table cell attributes and cell content
6433 !align=center {{table_header_cells}}
6435 |align=center {{table_cells}}
6440 <th align="center" style="color:red;">Foo</th>
6441 <th style="color:red;"><i>Bar</i></th>
6442 <th style="color:brown;"><i>Foo</i> and Baz
6445 <td align="center" style="color:red;">Foo</td>
6446 <td style="color:red;"><i>Bar</i></td>
6447 <td style="color:brown;"><i>Foo</i> and Baz
6452 <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>
6453 <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>
6458 4. Template-generated table cell attributes and cell content inside a templated table
6461 !align=center {{table_header_cells}}
6463 |align=center {{table_cells}}
6468 <th align="center" style="color:red;">Foo</th>
6469 <th style="color:red;"><i>Bar</i></th>
6470 <th style="color:brown;"><i>Foo</i> and Baz
6473 <td align="center" style="color:red;">Foo</td>
6474 <td style="color:red;"><i>Bar</i></td>
6475 <td style="color:brown;"><i>Foo</i> and Baz
6479 <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}}]}'>
6480 <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>
6482 <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>
6486 ## Edge case fix to prevent future regressions
6488 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6491 |{{table_attribs_7}}
6496 <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>
6498 <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>
6502 Table with row followed by newlines and table heading
6520 Table with empty line following the start tag
6537 # FIXME: Preserve the attribute properly (with an empty string as value) in
6538 # the PHP parser. Parsoid implements the behavior below.
6540 Table attributes with empty value
6550 </td></tr></tbody></table>
6555 Wikitext table with a lot of comments
6578 Wikitext table comments represented in parsoid dom
6580 {|<!--c1--><!--c2-->
6591 <table><!--c1--><!--c2-->
6592 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6593 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6598 Wikitext table with double-line table cell
6615 Table cell with a single comment
6632 Table-cell after a comment-only-empty-line
6649 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6651 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6657 Build table with {{!}}
6659 {{{!}} class="wikitable"
6662 {{!}}- style="color:red;"
6663 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6666 <table class="wikitable">
6672 <tr style="color:red;">
6674 <td style="color:red;"> second data
6680 Build table with pipe as data
6682 {| class="wikitable"
6685 |- style="color:red;"
6686 | data || style="color:red;" | second data
6688 | style="color:red;" | data with | || style="color:red;" | second data with |
6690 || data with | ||| second data with |
6693 <table class="wikitable">
6699 <tr style="color:red;">
6701 <td style="color:red;"> second data
6704 <td style="color:red;"> data with | </td>
6705 <td style="color:red;"> second data with |
6708 <td> data with | </td>
6709 <td> second data with |
6715 Build table with wikilink
6717 {| class="wikitable"
6718 ! header || second header
6719 |- style="color:red;"
6720 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6722 | data || second data [[Main Page|link|text with pipe]]
6725 <table class="wikitable">
6730 <tr style="color:red;">
6731 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6732 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6736 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6741 # The expected HTML structure in this test is debatable. The PHP parser does
6742 # not parse this kind of table at all. The main focus for Parsoid is on
6743 # round-tripping, so this output is ok for now. TODO: revisit!
6745 Wikitext table with html-syntax row
6755 <td>foo</td></tr></tbody></table>
6758 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6759 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6760 ## PHP parser, which tidy then compounds by fostering the content
6761 ## entirely out of the table. Parsoid recognizes the table context
6762 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6763 ## depends on PHP's treatment of broken table markup!
6765 Implicit <td> after a |-
6767 parsoid=wt2html,html2html
6787 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6789 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6791 parsoid=wt2html,html2html
6824 <tr><td><pre>a</pre></td></tr>
6825 <tr><td> b</td></tr>
6830 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6831 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6833 Lists should be recognized in an implicit <td> context
6835 parsoid=wt2html,html2html
6862 Table cells not properly parsed in an implicit-td context
6866 {{table_attribs_4}} || a || b
6871 <td style="background-color:#DC241f;" width="10px"></td>
6878 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6879 <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>
6884 Parsoid: Round-trip tables directly followed by content (bug 51219)
6886 parsoid=wt2html,wt2wt
6911 Parsoid: Default to a newline after tables in new content (bug 51219)
6916 <tr><td>foo</td></tr></tbody></table> bar
6918 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6923 <nowiki> </nowiki>bar
6931 Parsoid: newline inducing block nodes don't suppress <nowiki>
6943 Parsoid: Row-syntax table headings followed by comment & table cells
6945 parsoid=wt2html,wt2wt
6949 <!-- foo --> || baz || quux
6963 <tbody><tr><th> foo </th><th> bar
6964 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6969 Parsoid: Recover better from broken table attributes
6989 <p>foo</p></td></tr>
6994 Tables: Digest broken attributes on table and tr tag
7011 Strip unsupported table tags
7059 Testing serialization after deletion of table cells
7062 "modes": ["wt2wt", "selser"],
7070 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7083 Plain link, capitalized
7087 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7092 Plain link, uncapitalized
7096 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7103 [[Main Page|The Main Page]]
7105 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7110 Piped link with comment in link text
7112 [[Main Page|The Main<!--front--> Page]]
7114 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7119 Piped link with multiple pipe characters in link text
7121 [[Main Page||The|Main|Page|]]
7123 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7126 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7130 Piped link with no link text
7132 [[Thomas Bek (bishop of St David's)|]]
7134 <p>[[Thomas Bek (bishop of St David's)|]]
7137 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7145 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7150 Broken link with fragment
7152 [[Zigzagzogzagzig#zug]]
7154 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7159 Special page link with fragment
7161 [[Special:Version#anchor]]
7163 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7168 Nonexistent special page link with fragment
7170 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7172 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7179 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7181 <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>
7188 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7190 <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>!!!
7201 Bug 43661: Piped links with identical prefixes
7203 [[prefixed article|prefixed articles with spaces]]
7205 [[prefixed article|prefixed articlesaoeu]]
7207 [[Main Page|Main Page test]]
7209 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7210 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7211 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7217 Link with HTML entity in suffix / tail
7219 [[Main Page]]", [[Main Page]]a
7221 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7224 <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>
7228 Link with 3 brackets
7239 Link with 4 brackets
7243 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7248 Piped link with 3 brackets
7250 [[[main page|the main page]]]
7252 <p>[[[main page|the main page]]]
7257 Piped link with extlink-like text
7260 [[Main Page|This is a [bar]]]
7262 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7263 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7266 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7267 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7271 Link with multiple pipes
7273 [[Main Page|The|Main|Page]]
7275 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7279 # Note that parsoid does not munge anchor text; all non-space
7280 # characters are valid in HTML5 ids.
7282 Anchor containing a #. (bug 63430)
7284 [[Main Page#And#Link]]
7286 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7289 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7295 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7297 <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>
7302 Link with space in namespace
7304 [[User talk:Foo bar]]
7306 <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>
7311 MemoryAlpha:AlphaTest
7313 This is an article in the MemoryAlpha namespace
7314 (which shadows the memoryalpha interwiki link).
7318 Namespace takes precedence over interwiki link (bug 51680)
7320 [[MemoryAlpha:AlphaTest]]
7322 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7326 # The previous test doesn't work correctly in html2*, due to not recognizing the
7327 # link as an internal one. This one checks for the correct behavior.
7329 Link to namespace preferred over interwiki with correct rel attribute
7331 parsoid=html2wt,html2html
7333 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7335 [[MemoryAlpha:AlphaTest]]
7339 Piped link to namespace
7341 [[Meta:Disclaimers|The disclaimers]]
7343 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7350 [[Usually caused by a typo (oops}]]
7352 <p>[[Usually caused by a typo (oops}]]
7359 Just a test of an article title containing a percent.
7363 Link containing % (not as a hex sequence)
7367 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7370 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7373 # note that the parsoid HTML is identical to the previous test output,
7374 # so the previous test ensures that the html2wt mode will generate the
7375 # "not as a hex sequence" wikitext.
7377 Link containing % as a single hex sequence interpreted to char
7379 parsoid=wt2wt,wt2html,html2html
7383 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7386 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7390 Link containing % as a double hex sequence interpreted to hex sequence
7394 <p>[[7%2525 Solution]]
7398 # note that parsoid does not munge anchor text; all non-space
7399 # characters are valid in HTML5 anchors.
7401 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7402 Example for such a section: == < ==
7404 [[%23%3c]][[%23%3e]]
7406 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7409 <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>
7413 Link containing "<#" and ">#" as a hex sequences
7415 [[%3c%23]][[%3e%23]]
7417 <p>[[%3c%23]][[%3e%23]]
7422 Link containing an equals sign
7424 [[Special:BookSources/isbn=4-00-026157-6]]
7426 <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>
7429 <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>
7435 Just a test of an article title containing a tilde.
7438 # note that links containing signatures, like [[Foo~~~~]], are
7439 # massaged by the pre-save transform (PST) and so the tildes are never
7440 # seen by the parser.
7442 Link containing a tilde
7446 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7449 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7453 Link containing double-single-quotes '' (bug 4598)
7455 [[Lista d''e paise d''o munno]]
7457 <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>
7460 <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>
7464 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7466 Some [[Link|pretty ''italics'' and stuff]]!
7468 <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>!
7471 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7475 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7477 ''Some [[Link|pretty ''italics'' and stuff]]!''
7479 <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>
7484 Link with double quotes in title part (literal) and alternate part (interpreted)
7486 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7490 [[''Pentecoste''|Pentecoste]]
7492 [[''Pentecoste''|''Pentecoste'']]
7494 <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>
7495 </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>
7496 </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>
7497 </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>
7500 <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>
7501 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7502 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7503 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7507 Broken image links with HTML captions (bug 39700)
7509 [[File:Nonexistent|<script></script>]]
7510 [[File:Nonexistent|100x100px|<script></script>]]
7511 [[File:Nonexistent|<]]
7512 [[File:Nonexistent|a<i>b</i>c]]
7514 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7515 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7516 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7517 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7520 <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>
7521 <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>
7522 <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>
7523 <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>
7529 [[http://www.example.com]]
7531 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7534 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7538 Plain link to URL with link text
7540 [[http://www.example.com Link text]]
7542 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7547 Plain link to protocol-relative URL
7549 [[//www.example.com]]
7551 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7554 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7558 Plain link to protocol-relative URL with link text
7560 [[//www.example.com Link text]]
7562 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7567 Plain link to page with question mark in title
7573 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7574 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7579 # I'm fairly sure the expected result here is wrong.
7580 # We want these to be URL links, not pseudo-pages with URLs for titles....
7581 # However the current output is also pretty screwy.
7584 # I'm changing it to match the current output--it arguably makes more
7585 # sense in the light of the test above. Old expected result was:
7586 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7588 # But I think this test is bordering on "garbage in, garbage out" anyway.
7593 Piped link to URL: [[http://www.example.com|an example URL]]
7595 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7598 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7602 BUG 2: [[page|http://url/]] should link to page, not http://url/
7604 [[Main Page|http://url/]]
7606 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7609 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7612 # Parsoid does not mark self-links, by design.
7614 BUG 337: Escaped self-links should be bold
7618 [[Bug462]] [[Bug462]]
7620 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7623 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7625 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7629 Self-link to section should not be bold
7633 [[Main Page#section]]
7635 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7646 Self-link to numeric title
7652 <p><strong class="selflink">0</strong>
7657 Link to numeric-equivalent title
7663 <p><a href="/wiki/00" title="00">00</a>
7668 <nowiki> inside a link
7670 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7672 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7677 Non-breaking spaces in title
7679 [[ Main Page ]]
7681 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7686 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7692 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7697 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7703 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7708 Internal link with en linktrail: no apostrophes (bug 27473)
7714 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7719 Internal link with ca linktrail with apostrophes (bug 27473)
7725 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7730 Internal link with kaa linktrail with apostrophes (bug 27473)
7736 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7741 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7743 [[User:Foo/Test/63636:Bar|Test]]
7745 <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>
7748 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7752 Purely hash wikilink
7754 title=[[User:test/123]]
7758 <p><a href="#a">b</a>
7761 <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>
7765 1. Interaction of linktrail and template encapsulation
7771 <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>
7775 2. Interaction of linktrail and template encapsulation
7779 {{echo|Some [[Fool]]}}s
7781 <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>
7785 3. Interaction of linktrail and template encapsulation
7789 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7791 <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>
7801 Internal link with is link prefix
7805 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7807 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7818 Internal link with is link trail and link prefix
7822 [[mótmælendatrú|xxx]]ar
7824 mótmælenda[[söfnuður]]
7825 mótmælenda[[söfnuður|söfnuðir]]
7826 mótmælenda[[söfnuður|söfnuðir]]xxx
7828 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7829 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7830 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7831 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7832 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7837 Parsoid link trail escaping
7839 parsoid=html2wt,html2html
7841 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7847 Parsoid link prefix escaping
7850 parsoid=html2wt,html2html
7852 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7854 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7858 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7866 [http://wp.org ''foo'']
7868 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7869 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7870 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7871 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7876 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7880 [[Foo|{{echo|a}} b {{echo|c}}]]
7882 <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>
7886 Link with angle bracket after anchor
7890 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7893 <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>
7897 ### Interwiki links (see maintenance/interwiki.sql)
7901 Inline interwiki link
7903 parsoid=wt2html,wt2wt,html2html
7905 [[MeatBall:SoftSecurity]]
7907 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7910 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7914 Inline interwiki link with empty title (bug 2372)
7916 parsoid=wt2html,wt2wt,html2html
7920 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7923 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7927 Interwiki link encoding conversion (bug 1636)
7929 *[[Wikipedia:ro:Olteniţa]]
7930 *[[Wikipedia:ro:Olteniţa]]
7932 <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>
7933 <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>
7937 <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>
7938 <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>
7943 Interwiki link with fragment (bug 2130)
7945 [[MeatBall:SoftSecurity#foo]]
7947 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7951 # Ideally the wikipedia: prefix here should be proto-relative too
7952 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7953 # define the 'en' prefix, and originally the test used 'wikipedia',
7954 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7957 Different interwiki prefixes mapping to the same URL
7965 [[:wikipedia:Foo|Foo]]
7967 [[wikipedia:en:Foo]]
7969 [[:wikipedia:en:Foo]]
7973 <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>
7975 <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>
7977 <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>
7979 <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>
7981 <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>
7983 <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>
7985 <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>
7989 Interwiki links that cannot be represented in wiki syntax
7992 [[meatball:ok#foo|ok with fragment]]
7993 [[meatball:ok_as_well?|ok ending with ? mark]]
7994 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7995 [http://de.wikipedia.org/wiki/#foo is just fragment]
7998 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7999 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8000 <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>
8001 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8002 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8005 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8006 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8007 <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>
8008 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8009 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8013 Interwiki links: trail
8015 [[wikipedia:Foo|Ba]]r
8017 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8020 <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>
8024 Local interwiki link
8026 parsoid=wt2html,wt2wt,html2html
8028 [[local:Template:Foo]]
8030 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8033 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8036 # Parsoid does not mark self-links, by design.
8038 Local interwiki link: self-link to current page
8041 parsoid=wt2html,wt2wt,html2html
8045 <p><strong class="selflink">local:Main Page</strong>
8048 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8052 Local interwiki link: prefix only (bug 64167)
8054 parsoid=wt2html,wt2wt,html2html
8058 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8061 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8065 Local interwiki link: with additional interwiki prefix (bug 61357)
8067 parsoid=wt2html,wt2wt,html2html
8069 [[local:meatball:Hello]]
8071 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8074 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8078 Multiple local interwiki link prefixes
8080 [[local:local:local:local:mi:local:Foo]]
8082 parsoid=wt2html,wt2wt,html2html
8084 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8087 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8091 ### Interlanguage links
8092 ### Language links (so that searching for '### language' matches..)
8098 parsoid=wt2html,wt2wt,html2html
8106 <p>Blah blah blah</p>
8107 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8111 Interlanguage link with spacing
8113 parsoid=wt2html,wt2wt,html2html
8121 <p>Blah blah blah</p>
8122 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8126 Double interlanguage link
8128 parsoid=wt2html,wt2wt,html2html
8137 <p>Blah blah blah</p>
8138 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8139 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8143 Interlanguage link variations
8145 parsoid=wt2html,wt2wt,html2html
8155 <p>Blah blah blah</p>
8156 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8157 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8158 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8162 Space and question mark encoding in interlanguage links (T95473)
8164 parsoid=wt2html,wt2wt,html2html
8172 <p>Blah blah blah</p>
8173 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8177 Interlanguage link, with prefix links
8187 <p>Blah blah blah</p>
8188 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8192 Double interlanguage link, with prefix links (bug 8897)
8203 <p>Blah blah blah</p>
8204 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8205 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8209 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8217 <p>Blah blah blah</p>
8218 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8222 Parsoid-specific test: Wikilinks with should RT properly
8228 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8233 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8237 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8238 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8240 He&nbsp;llo [[Foo|He&nbsp;llo]]
8242 He&nbsp;llo [[He&nbsp;llo]]
8246 Parsoid: handle constructor well
8252 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8253 </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>
8256 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8258 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8267 # Note that `ko` isn't a known interlanguage prefix
8269 Parsoid: recognize interlanguage links without a target page
8279 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8281 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8284 # Note that `ko` isn't a known interwiki prefix
8286 Parsoid: recognize interwiki links without a target page
8288 parsoid=wt2html,wt2wt,html2html
8294 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8295 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8298 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8299 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8303 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8307 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8310 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8314 Interlanguage link with preceding local interwiki link (bug 68085)
8316 parsoid=wt2html,wt2wt,html2html
8319 [[local:es:Spanish]]
8322 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8326 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8330 Looks like an interlanguage link, but is actually a local interwiki
8332 parsoid=wt2html,wt2wt,html2html
8338 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8342 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8346 ### Redirects, Parsoid-only
8350 1. Simple redirect to page
8352 #REDIRECT [[Main Page]]
8354 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8358 2. Other redirect variants
8360 #REDIRECT [[Main_Page]]
8362 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8365 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8366 # This tests the Parsoid bail-out code.
8368 3. Other redirect variants
8370 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8372 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8376 4. Redirect to a templated destination
8378 #REDIRECT [[{{echo|Foo}}bar]]
8380 <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"}]]}'/>
8386 parsoid=wt2html,wt2wt
8391 <li>REDIRECT [[]]</li></ol>
8395 Optional colon in #REDIRECT
8397 # the colon is archaic syntax. we support it for wt2html, but we
8398 # don't care that it roundtrips back to the modern syntax.
8399 parsoid=wt2html,html2html
8401 #REDIRECT:[[Main Page]]
8403 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8407 Whitespace in #REDIRECT with optional colon
8409 # the colon and gratuitous whitespace is archaic syntax. we support
8410 # it for wt2html, but we don't care that it roundtrips back to the
8411 # modern syntax (without extra whitespace)
8412 parsoid=wt2html,html2html
8419 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8423 Piped link in #REDIRECT
8425 # content after piped link is ignored. we support this syntax,
8426 # but don't care that the piped link is lost when we roundtrip this.
8429 #REDIRECT [[Main Page|bar]]
8431 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8435 Redirect to category (T104502)
8437 parsoid=wt2html,wt2wt
8439 #REDIRECT [[Category:Foo]]
8441 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8445 Redirect to category with URL encoding (T104502)
8449 #REDIRECT [[Category%3AFoo]]
8451 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8455 Redirect to category page
8457 #REDIRECT [[:Category:Foo]]
8459 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8463 Redirect to image page (1)
8465 #REDIRECT [[File:Wiki.png]]
8467 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8471 Redirect to image page (2)
8473 #REDIRECT [[Image:Wiki.png]]
8475 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8478 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8479 # Next test confirms this.
8481 Redirect to language (1) (T104918)
8483 parsoid=wt2html,wt2wt,html2html
8485 #REDIRECT [[en:File:Wiki.png]]
8487 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8491 Redirect to language (2) (T104918)
8493 #REDIRECT [[:en:File:Wiki.png]]
8495 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8499 Redirect to interwiki (T104918)
8501 #REDIRECT [[meatball:File:Wiki.png]]
8503 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8507 Non-English #REDIRECT
8511 #TILVÍSUN [[Main Page]]
8513 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8517 Redirect syntax under text isn't considered a redirect
8520 #redirect [[Main Page]]
8523 <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>
8526 # FIXME: Should hoist the redirect to the top of the page and ensure there
8533 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8553 Broken br tag sanitization
8561 # TODO: Fix html2html mode (bug 51055)!
8563 Parsoid: Broken br tag recognition
8576 Incorrecly removing closing slashes from correctly formed XHTML
8578 <br style="clear:both;" />
8580 <p><br style="clear:both;" />
8585 Failing to transform badly formed HTML into correct XHTML
8587 <br style="clear: left;">
8588 <br style="clear: right;">
8589 <br style="clear: both;">
8591 <p><br style="clear: left;" />
8592 <br style="clear: right;" />
8593 <br style="clear: both;" />
8597 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8598 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8600 Handling html with a div self-closing tag
8609 <p><div title />
8613 <p><div title=bar />
8614 <div title=bar/>
8616 <div title="bar/"></div>
8620 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8621 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8622 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8623 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8624 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8625 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8629 Handling html with a br self-closing tag
8656 Horizontal ruler (should it add that extra space?)
8671 Horizontal ruler -- 4+ dashes render hr
8680 Horizontal ruler -- eats additional dashes on the same line
8689 Horizontal ruler -- does not collapse dashes on consecutive lines
8700 Horizontal ruler -- <4 dashes render as plain text
8709 Horizontal ruler -- Supports content following dashes on same line
8721 ### Block-level elements
8730 <ul><li>Common list</li>
8732 <li>item 3</li></ul>
8743 <ol><li>Numbered list</li>
8745 <li> item 3</li></ol>
8759 ***#Number on level 4
8761 **#Number on level 3
8762 **#Number on level 3
8766 #** Level 3, but ordered
8769 <ol><li> with numbers</li></ol>
8770 <ul><li> and bullets</li></ul>
8771 <ol><li> and numbers</li></ol></li>
8773 <ul><li>bullet level 2
8774 <ul><li>bullet level 3
8775 <ol><li>Number on level 4</li></ol></li></ul></li>
8777 <ol><li>Number on level 3</li>
8778 <li>Number on level 3</li></ol></li></ul>
8779 <ol><li>number level 2</li></ol></li>
8781 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8782 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8793 <ul><li>bar</li></ul></li></ul>
8803 <ul><li><ul><li>foo</li></ul></li>
8809 Nested lists 3 (first element empty)
8815 <ul><li>bar</li></ul></li></ul>
8820 Nested lists 4 (first element empty)
8825 <ul><li><ul><li></li></ul></li>
8831 Nested lists 5 (both elements empty)
8836 <ul><li><ul><li></li></ul></li>
8842 Nested lists 6 (both elements empty)
8848 <ul><li></li></ul></li></ul>
8853 Nested lists 7 (skip initial nesting levels)
8857 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8862 Nested lists 8 (multiple nesting transitions)
8870 <ul><li><ul><li> bar</li></ul></li>
8871 <li> baz</li></ul></li>
8877 Nested lists 9 (extension interaction)
8883 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8887 1. Lists with start-of-line-transparent tokens before bullets: Comments
8900 2. Lists with start-of-line-transparent tokens before bullets: Template close
8905 <ul><li>foo bar</li>
8911 List items are not parsed correctly following a <pre> block (bug 785)
8917 <ul><li> <pre>foo</pre></li>
8918 <li> <pre>bar</pre></li>
8922 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8923 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8928 List items from template
8939 * notSOL{{inner list}}
8942 <ul><li> item 1</li>
8943 <li> item 2</li></ul>
8944 <ul><li> item 0</li>
8946 <li> item 2</li></ul>
8947 <ul><li> item 0</li>
8950 <li> item 2</li></ul>
8955 List interrupted by empty line or heading
8963 <ul><li> foo</li></ul>
8964 <ul><li><ul><li> bar</li></ul></li></ul>
8965 <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>
8966 <ul><li> Another list item</li></ul>
8971 Multiple list tags generated by templates
8992 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8995 <!--This line will NOT split the list-->
8997 <!--This line will NOT split the list either-->
8999 <!--foo--> <!----> <!--This line NOT split the list either-->
9010 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9013 <!--This line will NOT split the list-->
9015 <!--This line will NOT split the list either-->
9017 <!--foo--> <!----> <!--This line NOT split the list
9030 (The PHP parser relies on Tidy for the hack)
9032 parsoid=wt2html,wt2wt
9036 * {{echo|<li>templated li-hack}}
9037 * <!--foo--> <li> unsupported li-hack with preceding comments
9040 <li><li>not a li-hack
9047 <li>templated li-hack</li>
9048 <li>unsupported li-hack with preceding comments</li>
9051 <li>not a li-hack</li>
9056 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9083 Parsoid: Test of whitespace serialization with Templated bullets
9090 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9094 # ------------------------------------------------------------------------
9095 # The next set of tests are about Parsoid's ability to handle badly nested
9096 # tags (parse, minimize scope of fixup, and roundtrip back)
9097 # ------------------------------------------------------------------------
9100 Unbalanced closing block tags break a list
9101 (php parser relies on Tidy to fix up)
9119 # Parsoid fails this test, but it might be tricky to support properly.
9122 Unbalanced closing non-block tags don't break a list
9123 (php parser relies on Tidy to fix up)
9130 <li><span>a</span></li>
9131 <li><span>b</span></li>
9145 Unclosed formatting tags that straddle lists are closed and reopened
9146 (php parser relies on Tidy to fix up)
9148 parsoid=wt2html,wt2wt,html2html
9158 <ol><li> <s> a</s></li>
9159 <li><s> b </s></li></ol>
9164 1. List embedded in a formatting tag
9171 <li><small>foo</small></li>
9181 ## Ugly Parsoid output here
9182 ## Not sure what the right output is.
9184 2. List embedded in a formatting tag
9191 <li><small>a</small></li>
9192 <li><small>b</small></li>
9199 <li><small>b</small></li>
9203 # Ugly Parsoid and PHP parser output here
9204 # Not sure if we want to make this a test!
9207 ## 3. Unclosed formatting tags in list elements
9213 ## <li><small>a</small></li>
9214 ## <li><small><small>b</small></small></li>
9218 ## <li><small>a</small></li>
9220 ## <li><small>b</small></li>
9224 # This is a bug in the PHP parser + tidy combination.
9225 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9226 # and then fostered out of the table by tidy.)
9227 # We believe the Parsoid output to be correct.
9229 Table with missing opening <tr> tag
9231 parsoid=wt2html,wt2wt
9249 # Note that the current date is hard-coded as
9250 # 1970-01-01T00:02:03Z (a Thursday)
9251 # when running parser tests. The timezone is also fixed to GMT, so
9252 # local date will be identical to current date.
9255 Magic Word: {{CURRENTDAY}}
9264 Magic Word: {{CURRENTDAY2}}
9273 Magic Word: {{CURRENTDAYNAME}}
9282 Magic Word: {{CURRENTDOW}}
9291 Magic Word: {{CURRENTMONTH}}
9300 Magic Word: {{CURRENTMONTH1}}
9309 Magic Word: {{CURRENTMONTHABBREV}}
9311 {{CURRENTMONTHABBREV}}
9318 Magic Word: {{CURRENTMONTHNAME}}
9320 {{CURRENTMONTHNAME}}
9327 Magic Word: {{CURRENTMONTHNAMEGEN}}
9329 {{CURRENTMONTHNAMEGEN}}
9336 Magic Word: {{CURRENTTIME}}
9345 Magic Word: {{CURRENTHOUR}}
9354 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9363 Magic Word: {{CURRENTYEAR}}
9372 Magic Word: {{CURRENTTIMESTAMP}}
9374 {{CURRENTTIMESTAMP}}
9381 Magic Words LOCAL (UTC)
9385 * {{LOCALMONTHNAME}}
9386 * {{LOCALMONTHNAMEGEN}}
9387 * {{LOCALMONTHABBREV}}
9396 * {{LOCALTIMESTAMP}}
9411 <li> 19700101000203</li></ul>
9416 Magic Word: {{FULLPAGENAME}}
9418 title=[[User:Ævar Arnfjörð Bjarmason]]
9422 <p>User:Ævar Arnfjörð Bjarmason
9427 Magic Word: {{FULLPAGENAMEE}}
9429 title=[[User:Ævar Arnfjörð Bjarmason]]
9433 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9438 Magic Word: {{TALKSPACE}}
9440 title=[[User:Ævar Arnfjörð Bjarmason]]
9449 Magic Word: {{TALKSPACE}}, same namespace
9451 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9460 Magic Word: {{TALKSPACE}}, main namespace
9462 title=[[Parser Test]]
9471 Magic Word: {{TALKSPACEE}}
9473 title=[[User:Ævar Arnfjörð Bjarmason]]
9482 Magic Word: {{SUBJECTSPACE}}
9484 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9493 Magic Word: {{SUBJECTSPACE}}, same namespace
9495 title=[[User:Ævar Arnfjörð Bjarmason]]
9504 Magic Word: {{SUBJECTSPACE}}, main namespace
9506 title=[[Parser Test]]
9514 Magic Word: {{SUBJECTSPACEE}}
9516 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9525 Magic Word: {{NAMESPACE}}
9527 title=[[User:Ævar Arnfjörð Bjarmason]]
9536 Magic Word: {{NAMESPACEE}}
9538 title=[[User:Ævar Arnfjörð Bjarmason]]
9547 Magic Word: {{NAMESPACENUMBER}}
9549 title=[[User:Ævar Arnfjörð Bjarmason]]
9558 Magic Word: {{SUBPAGENAME}}
9560 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9569 Magic Word: {{SUBPAGENAMEE}}
9571 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9580 Magic Word: {{ROOTPAGENAME}}
9582 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9586 <p>Ævar Arnfjörð Bjarmason
9591 Magic Word: {{ROOTPAGENAMEE}}
9593 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9597 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9602 Magic Word: {{BASEPAGENAME}}
9604 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9608 <p>Ævar Arnfjörð Bjarmason
9613 Magic Word: {{BASEPAGENAMEE}}
9615 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9619 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9624 Magic Word: {{TALKPAGENAME}}
9626 title=[[User:Ævar Arnfjörð Bjarmason]]
9630 <p>User talk:Ævar Arnfjörð Bjarmason
9635 Magic Word: {{TALKPAGENAMEE}}
9637 title=[[User:Ævar Arnfjörð Bjarmason]]
9641 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9646 Magic Word: {{SUBJECTPAGENAME}}
9648 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9652 <p>User:Ævar Arnfjörð Bjarmason
9657 Magic Word: {{SUBJECTPAGENAMEE}}
9659 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9661 {{SUBJECTPAGENAMEE}}
9663 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9668 Magic Word: {{NUMBEROFFILES}}
9677 Magic Word: {{PAGENAME}}
9679 title=[[User:Ævar Arnfjörð Bjarmason]]
9683 <p>Ævar Arnfjörð Bjarmason
9688 Magic Word: {{PAGENAME}} with metacharacters
9690 title=[['foo & bar = baz']]
9694 <p><i>'foo & bar = baz'</i>
9697 <p><i>'foo & bar = baz'</i></p>
9701 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9703 title=[[*RFC 1234 http://example.com/]]
9707 <p>*RFC 1234 http://example.com/
9710 <p>*RFC 1234 http://example.com/</p>
9714 Magic Word: {{PAGENAMEE}}
9716 title=[[User:Ævar Arnfjörð Bjarmason]]
9720 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9725 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9727 title=[[*RFC 1234 http://example.com/]]
9731 <p>*RFC_1234_http://example.com/
9734 <p>*RFC_1234_http://example.com/</p>
9738 Magic Word: {{REVISIONID}}
9747 Magic Word: {{SCRIPTPATH}}
9756 Magic Word: {{STYLEPATH}}
9765 Magic Word: {{SERVER}}
9769 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9774 Magic Word: {{SERVERNAME}}
9783 Magic Word: {{SITENAME}}
9792 Case-sensitive magic words, when cased differently, should just be template transclusions
9799 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9800 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9801 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9802 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9807 Case-insensitive magic words should still work with weird casing.
9817 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9821 # From plwiki:PLOS_ONE
9823 Parsoid: Page property magic word with magic word contents
9825 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9827 <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>"}]]}'/>
9831 Parsoid: Template-generated DISPLAYTITLE
9833 {{{{echo|DISPLAYTITLE}}:Foo}}
9835 <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}}]}'/>
9839 Namespace 1 {{ns:1}}
9848 Namespace 1 {{ns:01}}
9857 Namespace 0 {{ns:0}} (bug 4783)
9865 Namespace 0 {{ns:00}} (bug 4783)
9873 Namespace -1 {{ns:-1}}
9882 Namespace User {{ns:User}}
9891 Namespace User talk {{ns:User_talk}}
9900 Namespace User talk {{ns:uSeR tAlK}}
9909 Namespace File {{ns:File}}
9918 Namespace File {{ns:Image}}
9927 Namespace (lang=de) Benutzer {{ns:User}}
9938 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9944 <p>Benutzer Diskussion
9952 {{urlencode:hi world?!}}
9953 {{urlencode:hi world?!|WIKI}}
9954 {{urlencode:hi world?!|PATH}}
9955 {{urlencode:hi world?!|QUERY}}
9965 Magic Word: prioritize type info over data-parsoid
9969 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9975 Magic Word: serialize on separate line (parsoid)
9977 parsoid=wt2wt,html2wt
9983 foo<meta property="mw:PageProp/notoc"/>bar
9987 Magic Word: rt non-english wikis
9994 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9998 __proto__ is treated as normal wikitext (T105997)
10010 Magic links: internal link to RFC (bug 479)
10014 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10017 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10021 Magic links: RFC (bug 479)
10025 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10028 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10032 Magic links: RFC (bug 65278)
10034 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10036 <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.
10039 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10043 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10045 RFC      822
10049 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10054 <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>
10060 Magic links: ISBN (bug 1937)
10064 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10067 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10071 Magic links: ISBN (bug 65278)
10073 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10075 <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.
10078 <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>
10082 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10084 ISBN      978 0 316 09811 3
10090 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10097 <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>
10105 Magic links: PMID incorrectly converts space to underscore
10109 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10112 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10116 Magic links: PMID (bug 65278)
10118 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10120 <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.
10123 <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>
10127 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10129 PMID      1234
10133 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10138 <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>
10143 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10144 # since these are ExtLinkText, not MagicLinkText
10146 Magic links: use appropriate serialization for "almost" magic links.
10148 X[[Special:BookSources/0978739256|foo]]
10150 X[//tools.ietf.org/html/rfc1234 foo]
10152 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10153 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10156 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10157 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10165 Nonexistent template
10167 {{thistemplatedoesnotexist}}
10169 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10174 Template with invalid target containing tags
10176 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10178 <p>{{a<b>b</b>|foo|a=b|a = b}}
10183 Template with invalid target containing unclosed tag
10185 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10187 <p>{{a<b>|foo|a=b|a = b}}</b>
10192 Template with invalid target containing wikilink
10196 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10199 <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>
10203 Template with just whitespace in it, bug #68421
10207 <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>
10213 This is a test template
10221 <p>This is a test template
10226 Template with explicit namespace
10230 <p>This is a test template
10238 This is a test template with parameter {{{param}}}
10244 {{paramtest|param=foo}}
10246 <p>This is a test template with parameter foo
10251 Template:paramtestnum
10253 [[{{{1}}}|{{{2}}}]]
10257 Template unnamed parameter
10259 {{paramtestnum|Main Page|the main page}}
10261 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10266 Template:templatesimple
10272 Template:templateredirect
10274 #redirect [[Template:templatesimple]]
10278 Template:templateasargtestnum
10284 Template:templateasargtest
10286 {{template{{{templ}}}}}
10290 Template:templateasargtest2
10296 Template with template name as unnamed argument
10298 {{templateasargtestnum|templatesimple}}
10305 Template with template name as argument
10307 {{templateasargtest|templ=simple}}
10314 Template with template name as argument (2)
10316 {{templateasargtest2|templ=templatesimple}}
10323 Template:templateasargtestdefault
10325 {{{{{templ|templatesimple}}}}}
10335 Template with default value
10337 {{templateasargtestdefault}}
10344 Template with default value (value set)
10346 {{templateasargtestdefault|templ=templa}}
10355 {{templateredirect}}
10360 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10364 Template with argument in separate line
10366 {{ templateasargtest |
10374 Template with complex template as argument
10377 param ={{ templateasargtest |
10378 templ = simple }}}}
10380 <p>This is a test template with parameter (test)
10385 Template with thumb image (with link in description)
10387 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10389 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>
10392 <p>This is a test template with parameter</p>
10393 <div class="thumb tright">
10394 <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>
10395 <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>
10399 <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>
10403 Template:complextemplate
10405 {{{1}}} {{paramtest|
10406 param ={{{param}}}}}
10410 Template with complex arguments
10413 param ={{ templateasargtest |
10414 templ = simple }}|[[Template:complextemplate|link]]}}
10416 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10421 BUG 553: link with two variables in a piped link
10424 |[[{{{1}}}|{{{2}}}]]
10429 <td>[[{{{1}}}|{{{2}}}]]
10434 <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>
10439 Abort table cell attribute parsing on wikilink
10442 | testing [[one|two]] | three || four
10443 | testing one two | three || four
10448 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10457 <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>
10458 <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>
10463 Don't abort table cell attribute parsing if wikilink is found in template arg
10466 | Test {{#tag:ref|One two "[[three]]" four}}
10470 <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>
10475 Magic variable as template parameter
10477 {{paramtest|param={{SITENAME}}}}
10479 <p>This is a test template with parameter MediaWiki
10486 [[{{{param}}}|link]]
10490 Template parameter as link source
10492 {{linktest|param=Main Page}}
10494 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10499 Template:paramtest2
10501 including another template, {{paramtest|param={{{arg}}}}}
10505 Template passing argument to another template
10507 {{paramtest2|arg='hmm'}}
10509 <p>including another template, This is a test template with parameter 'hmm'
10520 Template as link source
10524 [[{{linktest2}}|Main Page]]
10526 [[{{linktest2}}]]Page
10528 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10529 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10530 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10548 Template infinite loop
10552 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10557 Template from main namespace
10576 BUG 529: Template with table, not included at beginning of line
10595 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10615 BUG 41: Template parameters shown as broken links
10624 Template with targets containing wikilinks
10628 {{[[{{echo|foo}}]]}}
10630 {{{{echo|[[foo}}]]}}
10632 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10633 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10645 Templates: Double quotes as template target
10652 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10657 Template:MSGNW test
10659 ''None'' of '''this''' should be
10661 but rather passed unmodified
10669 # hmm, fix this or just deprecate msgnw and document its behavior?
10673 {{msgnw:MSGNW test}}
10675 <p>''None'' of '''this''' should be
10677  but rather passed unmodified
10678 {{test}}
10682 <!-- comment -->
10689 {{int:youhavenewmessages|lots of money|not!}}
10691 <p>You have lots of money (not!).
10696 int keyword - non-existing message
10707 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10711 <includeonly> and <noinclude> being included
10722 <onlyinclude>Foo</onlyinclude>bar
10726 <onlyinclude> being included
10738 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10742 <onlyinclude> and <includeonly> being included
10751 <includeonly> and <noinclude> on a page
10753 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10760 Un-closed <noinclude>
10767 <onlyinclude> on a page
10769 <onlyinclude>Foo</onlyinclude>bar
10776 Un-closed <onlyinclude>
10783 Self-closed noinclude, includeonly, onlyinclude tags
10794 Unbalanced includeonly and noinclude tags
10798 |b</noinclude></noinclude>
10799 |c</noinclude></includeonly>
10800 |d</includeonly></includeonly>
10809 <td>c</includeonly>
10811 <td>d</includeonly></includeonly>
10817 Template:Includeonly section
10820 ==Includeonly section==
10826 Bug 6563: Edit link generation for section shown by <includeonly>
10828 {{includeonly section}}
10830 <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>
10831 <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>
10835 # Uses same input as the contents of [[Template:Includeonly section]]
10837 Bug 6563: Section extraction for section shown by <includeonly>
10842 ==Includeonly section==
10850 Bug 6563: Edit link generation for section suppressed by <includeonly>
10853 ==Includeonly section==
10857 <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>
10862 Bug 6563: Section extraction for section suppressed by <includeonly>
10867 ==Includeonly section==
10875 Un-closed <includeonly>
10881 ## We used to, but no longer wt2wt this test since the default serializer
10882 ## will normalize the include directives to serialize on their own line.
10883 ## Selser will take care of preserving formatting in scenarios where they
10884 ## intermingled with other wikitext.
10886 Includes and comments at SOL
10888 parsoid=wt2html,html2html
10890 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10894 </noinclude>* stuff
10897 <includeonly>can have stuff</includeonly>=== here ===
10900 <h2><span class="mw-headline" id="hu">hu</span></h2>
10903 <ul><li> stuff</li>
10904 <li> here</li></ul>
10905 <h3><span class="mw-headline" id="here">here</span></h3>
10908 <!-- 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>
10910 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10912 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10913 <li> here</li></ul>
10915 <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>
10919 # TODO: test with DOM fragment reuse!
10921 Parsoid: DOM fragment reuse
10923 parsoid=wt2wt,wt2html
10925 a{{echo|b<table></table>c}}d
10937 <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>
10939 <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">
10940 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10941 </span><p about="#mwt2">cd</p>
10943 <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">
10945 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10947 </span><p about="#mwt3">b</p>
10951 Parsoid: Merge double tds (T52603)
10956 |{{echo|{{!}} foo}}
10960 <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>
10965 Parsoid: Merge double tds in nested transclusion content (T52603)
10971 |{{echo|{{!}} foo}}
10975 <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}}]}'>
10977 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10983 ### <includeonly> and <noinclude> in attributes
10986 0. includeonly around the entire attribute
10988 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10990 <p><span id="v2">bar</span>
10995 1. includeonly in html attr key
10997 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10999 <p><span id="foo">bar</span>
11004 2. includeonly in html attr value
11006 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11007 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11009 <p><span id="v1">bar</span>
11010 <span id="v1">bar</span>
11015 3. includeonly in part of an attr value
11017 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11019 <p><span style="color:red;">bar</span>
11024 4. includeonly in table attributes
11048 ### Token Stream Patcher tests
11050 ### These tests won't always pass wt2wt and other modes because
11051 ### on serialization, the table will be output on a new line.
11052 ### For now, we are blacklisting them, and using this to test selser.
11056 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11058 parsoid=wt2html,wt2wt
11060 {{echo|}}{| width = '100%'
11064 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11065 <tbody><tr><td>foo</td></tr>
11069 ## We used to, but no longer wt2wt this test since the default serializer
11070 ## will normalize the include directives to serialize on their own line.
11071 ## Selser will take care of preserving formatting in scenarios where they
11072 ## intermingled with other wikitext.
11074 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11078 <includeonly>a</includeonly>{| {{{b}}}
11082 <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}}}":""}}'>
11083 <tbody><tr><td>c</td></tr>
11089 ### Testing parsing of templates where a template arg
11090 ### has the same name as the template itself.
11096 {{{quote|{{{1}}}}}}
11100 Templates: Template Name/Arg clash: 1. Use of positional param
11109 Templates: Template Name/Arg clash: 2. Use of named param
11111 {{quote|quote=foo}}
11118 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11127 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11131 Templates: 1. Simple use
11140 Templates: 2. Inside a block tag
11142 <div>{{echo|Foo}}</div>
11143 <blockquote>{{echo|Foo}}</blockquote>
11146 <blockquote>Foo</blockquote>
11156 Templates: P-wrapping: 1a. Templates on consecutive lines
11167 Templates: P-wrapping: 1b. Templates on consecutive lines
11181 Templates: P-wrapping: 1c. Templates on consecutive lines
11184 {{echo|bar}} <div>baz</div>
11197 Templates: P-wrapping: 1d. Template preceded by comment-only line
11206 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11210 Templates: Inline Text: 1. Multiple template uses
11212 {{echo|Foo}}bar{{echo|baz}}
11219 Templates: Inline Text: 2. Back-to-back template uses
11221 {{echo|Foo}}{{echo|bar}}
11228 Templates: Block Tags: 1. Multiple template uses
11230 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11232 <div>Foo</div><div>bar</div><div>baz</div>
11237 Templates: Block Tags: 2. Back-to-back template uses
11239 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11241 <div>Foo</div><div>bar</div>
11245 # This is an edge case relating to paragraph wrapping.
11247 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11252 <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
11257 Templates: Links: 1. Simple example
11259 {{echo|[[Foo|bar]]}}
11261 <p><a href="/wiki/Foo" title="Foo">bar</a>
11266 Templates: Links: 2. Generation of link href
11268 [[{{echo|Foo}}|bar]]
11270 <p><a href="/wiki/Foo" title="Foo">bar</a>
11275 Templates: Links: 3. Generation of part of a link href
11277 [[Fo{{echo|o}}|bar]]
11279 [[Foo{{echo|bar}}]]
11281 [[Foo{{echo|bar}}baz]]
11283 [[Foo{{echo|bar}}|bar]]
11285 [[:Foo{{echo|bar}}]]
11287 [[:Foo{{echo|bar}}|bar]]
11289 <p><a href="/wiki/Foo" title="Foo">bar</a>
11290 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11291 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11292 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11293 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11294 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11299 Templates: Links: 4. Multiple templates generating link href
11301 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11303 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11308 Templates: Links: 5. Generation of link text
11310 [[Foo|{{echo|bar}}]]
11312 <p><a href="/wiki/Foo" title="Foo">bar</a>
11317 Templates: Links: 5. Nested templates (only outermost template should be marked)
11319 {{echo|[[{{echo|Foo}}|bar]]}}
11321 <p><a href="/wiki/Foo" title="Foo">bar</a>
11326 Templates: HTML Tag: 1. Generation of HTML attr. key
11328 <div {{echo|style}}="color:red;">foo</div>
11330 <div style="color:red;">foo</div>
11335 Templates: HTML Tag: 2. Generation of HTML attr. value
11337 <div style={{echo|'color:red;'}}>foo</div>
11339 <div style="color:red;">foo</div>
11344 Templates: HTML Tag: 3. Generation of HTML attr key and value
11346 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11348 <div style="color:red;">foo</div>
11353 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11355 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11357 <div title="This is a long title with just one piece templated">foo</div>
11362 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11364 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11366 <div title="This is a long title with just one piece templated">foo</div>
11371 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11373 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11375 <div title="This is a long title with just one piece templated">foo</div>
11379 # SSS FIXME: While it is great we added support for all this,
11380 # do we want to make this part of the spec? Maybe we want to
11381 # deprecate this kind of usage in the future?
11383 Templates: HTML Tag: 7. Generation of partial attribute key string
11385 <div st{{echo|yle}}="color:red;">foo</div>
11387 <div style="color:red;">foo</div>
11392 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11394 <div {{echo|1=id="v1"}}>bar</div>
11396 <div id="v1">bar</div>
11401 Templates: HTML Tag: 9. Multiple template-generated attributes
11403 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11405 <div id="v1" title="foo">bar</div>
11410 Templates: Support for templates generating attributes and content
11412 {| {{mixed_attr_content_template}}
11417 <table style="color:red;" title="T48811">
11427 <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|}"]}'>
11436 1. Entities and nowikis inside templated attributes should be handled correctly
11438 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11440 <div style="background:#f9f9f9;">foo</div>
11443 <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>
11447 2. Entities and nowikis inside templated attributes should be handled correctly
11450 |{{table_attribs_3}}
11455 <td style="background:#f9f9f9;">Foo
11460 <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>
11465 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11468 |{{table_attribs_3}}
11473 <td style="background:#f9f9f9;">Foo
11477 <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}}]}'>
11478 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11484 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11487 | {{table_attribs_6}} hi
11492 <td style="background: red;"> hi
11497 <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>
11502 Templates: HTML Tables: 1. Generating start of a HTML table
11504 {{echo|<table><tr><td>foo</td>}}</tr></table>
11506 <table><tr><td>foo</td></tr></table>
11511 Templates: HTML Tables: 2a. Generating middle of a HTML table
11513 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11515 <table><tr><td>foo</td></tr></table>
11520 Templates: HTML Tables: 2b. Generating middle of a HTML table
11522 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11524 <table><tr><td>foo</td></tr></table>
11529 Templates: HTML Tables: 3. Generating end of a HTML table
11531 <table><tr>{{echo|<td>foo</td></tr></table>}}
11533 <table><tr><td>foo</td></tr></table>
11538 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11540 {{echo|<table>}}<tr><td>foo</td></tr></table>
11542 <table><tr><td>foo</td></tr></table>
11547 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11549 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11551 <table><tr><td>foo</td></tr></table>
11556 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11558 <table><tr>{{echo|<td>}}foo</td></tr></table>
11560 <table><tr><td>foo</td></tr></table>
11565 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11567 <table><tr><td>foo{{echo|</td>}}</tr></table>
11569 <table><tr><td>foo</td></tr></table>
11574 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11576 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11578 <table><tr><td>foo</td></tr></table>
11583 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11585 <table><tr><td>foo</td></tr>{{echo|</table>}}
11587 <table><tr><td>foo</td></tr></table>
11592 Templates: HTML Tables: 5. Proper fostering of categories from inside
11594 parsoid=wt2html,wt2wt
11596 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11597 <!--Two categories (Bug 50330)-->
11598 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11600 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11601 <!--Two categories (Bug 50330)-->
11602 <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>
11606 Templates: Wiki Tables: 1a. Fostering of entire template content
11614 <tr><td></td></tr></table>
11626 Templates: Wiki Tables: 1b. Fostering of entire template content
11639 <tr><td></td></tr></table>
11653 Templates: Wiki Tables: 2. Fostering of partial template content
11663 <tr><td></td></tr></table>
11676 Templates: Wiki Tables: 3. td-content via multiple templates
11679 {{echo|{{pipe}}a}}{{echo|b}}
11690 Templates: Wiki Tables: 4. Templated tags, no content
11696 <tr><td></td></tr></table>
11701 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11715 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11728 ## This test case is very specific to Parsoid's internals
11729 ## and is hence only tested for Parsoid's code. Parsoid uses
11730 ## a <meta> marker tag for <ref> tags and they are expanded
11731 ## much later. We are verifying that this <meta> tag usage
11732 ## doesn't prevent foster parenting.
11734 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11736 {{PartialTable}}<ref>foo</ref>
11741 <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">
11745 <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>
11749 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11759 <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{{!}}}"]}'>
11760 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11764 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11769 Templates: Lists: Multi-line list-items via templates
11771 *{{echo|a {{nonexistent|
11773 *{{echo|b {{nonexistent|
11776 <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>
11777 <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>
11782 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11784 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11786 <p><i>ab</i>c<i>d</i>e
11791 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11792 (PHP parser generates misnested html)
11794 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11796 <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>
11800 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11801 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11803 parsoid=wt2html,wt2wt
11805 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11807 <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>
11808 <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>
11809 <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>
11813 Templates: Ugly nesting: 4. Divs opened/closed across templates
11815 a<div>b{{echo|c</div>d}}e
11826 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11832 |{{echo|foo</table>}}
11836 <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|}"]}'>
11840 <td>foo</td></tr></tbody></table><span about="#mwt1">
11841 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11846 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11856 <td>1. {{echo|foo </table>}}</td>
11858 <td>2. {{echo|baz </table>}}</td>
11871 <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>"]}'>
11876 <td>1. foo </td></tr></tbody></table></td>
11878 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11879 </span><span about="#mwt2">
11880 </span><span about="#mwt2">
11881 </span><span about="#mwt2">abc</span><span about="#mwt2">
11882 </span><span about="#mwt2">
11883 </span><span about="#mwt2">
11884 </span><span about="#mwt2">
11885 </span><span about="#mwt2">
11886 </span><span about="#mwt2">
11887 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11888 </span><span about="#mwt2">
11893 Templates: Ugly templates: 3. newline-only template parameter
11902 # This looks like a bug: a single newline triggers p/br for some reason.
11904 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11913 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11914 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11916 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11922 <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
11923 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11927 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11928 # that are "identical" and generate nesting cycles in the algorithm
11930 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11932 {{echo|<table><tr><td><table>}}
11936 <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"}'>
11937 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11938 </table></td></tr></tbody></table>
11942 Templates: Parameters substituted at the top-level
11944 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
11946 <p><i>who</i> me? <b>never!</b>
11949 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
11953 Parser Functions: 1. Simple example
11962 Parser Functions: 2. Nested use (only outermost should be marked up)
11971 ### Pre-save transform tests
11974 pre-save transform: subst:
11980 This is a test template
11984 pre-save transform: normal template
11994 pre-save transform: nonexistent template
11998 {{thistemplatedoesnotexist}}
12000 {{thistemplatedoesnotexist}}
12004 pre-save transform: subst magic variables
12013 # This is bug 89, which I fixed. -- wtm
12015 pre-save transform: subst: templates with parameters
12019 {{subst:paramtest|param="something else"}}
12021 This is a test template with parameter "something else"
12025 Template:nowikitest
12027 <nowiki>'''not wiki'''</nowiki>
12031 pre-save transform: nowiki in subst (bug 1188)
12035 {{subst:nowikitest}}
12037 <nowiki>'''not wiki'''</nowiki>
12041 Template:commenttest
12043 This template has <!-- a comment --> in it.
12047 pre-save transform: comment in subst (bug 1936)
12051 {{subst:commenttest}}
12053 This template has <!-- a comment --> in it.
12057 pre-save transform: unclosed tag
12061 <nowiki>'''not wiki'''
12063 <nowiki>'''not wiki'''
12067 pre-save transform: mixed tag case
12071 <NOwiki>'''not wiki'''</noWIKI>
12073 <NOwiki>'''not wiki'''</noWIKI>
12077 pre-save transform: unclosed comment in <nowiki>
12081 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12083 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12086 # Leading @ in this template definition works around a limitation
12087 # in parsoid's parserTests which otherwise strips the <span> from the
12088 # result (confusing it for a template wrapper)
12092 @<span onmouseover="alert('crap')">Oh no</span>
12096 (confirming safety of fix for subst bug 1936)
12098 {{Template:dangerous}}
12100 <p>@<span>Oh no</span>
12105 pre-save transform: comment containing gallery (bug 5024)
12109 <!-- <gallery>data</gallery> -->
12111 <!-- <gallery>data</gallery> -->
12115 pre-save transform: comment containing extension
12119 <!-- <tag>data</tag> -->
12121 <!-- <tag>data</tag> -->
12125 pre-save transform: comment containing nowiki
12129 <!-- <nowiki>data</nowiki> -->
12131 <!-- <nowiki>data</nowiki> -->
12135 pre-save transform: <noinclude> in subst (bug 3298)
12145 pre-save transform: <onlyinclude> in subst (bug 3298)
12149 {{subst:Includes2}}
12157 {{<includeonly>subst:</includeonly>Includes}}
12161 Template:SafeSubstTest
12163 {{<includeonly>safesubst:</includeonly>Includes}}
12167 bug 22297: safesubst: works during PST
12171 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12177 bug 22297: safesubst: works during normal parse
12186 subst: does not work during normal parse
12190 <p>{{subst:Includes}}
12195 pre-save transform: context links ("pipe trick")
12199 [[Article (context)|]]
12202 [[Bar:Article (context)|]]
12203 [[:Bar:Article (context)|]]
12205 [[|Article (context)]]
12209 [[Article (context)|Article]]
12210 [[Bar:Article|Article]]
12211 [[:Bar:Article|Article]]
12212 [[Bar:Article (context)|Article]]
12213 [[:Bar:Article (context)|Article]]
12215 [[Article (context)]]
12216 [[Bar:X (Y) Z|X (Y) Z]]
12217 [[:Bar:X (Y) Z|X (Y) Z]]
12221 pre-save transform: context links ("pipe trick") with interwiki prefix
12225 [[interwiki:Article|]]
12226 [[:interwiki:Article|]]
12227 [[interwiki:Bar:Article|]]
12228 [[:interwiki:Bar:Article|]]
12230 [[interwiki:Article|Article]]
12231 [[:interwiki:Article|Article]]
12232 [[interwiki:Bar:Article|Bar:Article]]
12233 [[:interwiki:Bar:Article|Bar:Article]]
12237 pre-save transform: context links ("pipe trick") with parens in title
12239 pst title=[[Somearticle (context)]]
12243 [[Article (context)|Article]]
12247 pre-save transform: context links ("pipe trick") with comma in title
12249 pst title=[[Someplace, Somewhere]]
12252 [[Otherplace, Elsewhere|]]
12253 [[Otherplace, Elsewhere, Anywhere|]]
12255 [[Otherplace, Somewhere|Otherplace]]
12256 [[Otherplace, Elsewhere|Otherplace]]
12257 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12261 pre-save transform: context links ("pipe trick") with parens and comma
12263 pst title=[[Someplace (IGNORED), Somewhere]]
12266 [[Otherplace (place), Elsewhere|]]
12268 [[Otherplace, Somewhere|Otherplace]]
12269 [[Otherplace (place), Elsewhere|Otherplace]]
12273 pre-save transform: context links ("pipe trick") with comma and parens
12275 pst title=[[Who, me? (context)]]
12278 [[Me, Myself, and I (1937 song)|]]
12280 [[Yes, you. (context)|Yes, you.]]
12281 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12285 pre-save transform: context links ("pipe trick") with namespace
12287 pst title=[[Ns:Somearticle]]
12291 [[Ns:Article|Article]]
12295 pre-save transform: context links ("pipe trick") with namespace and parens
12297 pst title=[[Ns:Somearticle (context)]]
12301 [[Ns:Article (context)|Article]]
12305 pre-save transform: context links ("pipe trick") with namespace and comma
12307 pst title=[[Ns:Somearticle, Context, Whatever]]
12311 [[Ns:Article, Context, Whatever|Article]]
12315 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12317 pst title=[[Ns:Somearticle, Context (context)]]
12321 [[Ns:Article (context)|Article]]
12325 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12327 pst title=[[Ns:Somearticle (IGNORED), Context]]
12331 [[Ns:Article, Context|Article]]
12335 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12339 [[Article(context)|]]
12340 [[Bar:Article(context)|]]
12341 [[:Bar:Article(context)|]]
12342 [[|Article(context)]]
12346 [[Article(context)|Article]]
12347 [[Bar:Article(context)|Article]]
12348 [[:Bar:Article(context)|Article]]
12349 [[Article(context)]]
12350 [[Bar:X(Y)Z|X(Y)Z]]
12351 [[:Bar:X(Y)Z|X(Y)Z]]
12355 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12359 [[Article (context)|]]
12360 [[Bar:Article (context)|]]
12361 [[:Bar:Article (context)|]]
12362 [[|Article (context)]]
12366 [[Article (context)|Article]]
12367 [[Bar:Article (context)|Article]]
12368 [[:Bar:Article (context)|Article]]
12369 [[Article (context)]]
12370 [[Bar:X (Y) Z|X (Y) Z]]
12371 [[:Bar:X (Y) Z|X (Y) Z]]
12375 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12379 [[Article(context)|]]
12380 [[Bar:Article(context)|]]
12381 [[:Bar:Article(context)|]]
12382 [[|Article(context)]]
12386 [[Article(context)|Article]]
12387 [[Bar:Article(context)|Article]]
12388 [[:Bar:Article(context)|Article]]
12389 [[Article(context)]]
12390 [[Bar:X(Y)Z|X(Y)Z]]
12391 [[:Bar:X(Y)Z|X(Y)Z]]
12395 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12399 [[Article (context), context|]]
12400 [[Article (context),context|]]
12401 [[Bar:Article (context), context|]]
12402 [[Bar:Article (context),context|]]
12403 [[:Bar:Article (context), context|]]
12404 [[:Bar:Article (context),context|]]
12406 [[Article (context), context|Article]]
12407 [[Article (context),context|Article]]
12408 [[Bar:Article (context), context|Article]]
12409 [[Bar:Article (context),context|Article]]
12410 [[:Bar:Article (context), context|Article]]
12411 [[:Bar:Article (context),context|Article]]
12415 pre-save transform: trim trailing empty lines
12419 Empty lines are trimmed
12425 Empty lines are trimmed
12429 pre-save transform: Signature expansion
12434 * <noinclude>~~~</noinclude>
12435 * <includeonly>~~~</includeonly>
12436 * <onlyinclude>~~~</onlyinclude>
12438 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12439 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12440 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12441 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12446 pre-save transform: Signature expansion in nowiki tags (bug 93)
12452 <nowiki>~~~~</nowiki>
12454 <includeonly><nowiki>~~~~</nowiki></includeonly>
12456 <noinclude><nowiki>~~~~</nowiki></noinclude>
12458 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12460 {{subst:Foo}} shall be converted to FOO
12462 As well as inside noinclude/onlyinclude
12463 <noinclude>{{subst:Foo}}</noinclude>
12464 <onlyinclude>{{subst:Foo}}</onlyinclude>
12466 But not inside includeonly
12467 <includeonly>{{subst:Foo}}</includeonly>
12471 <nowiki>~~~~</nowiki>
12473 <includeonly><nowiki>~~~~</nowiki></includeonly>
12475 <noinclude><nowiki>~~~~</nowiki></noinclude>
12477 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12479 FOO shall be converted to FOO
12481 As well as inside noinclude/onlyinclude
12482 <noinclude>FOO</noinclude>
12483 <onlyinclude>FOO</onlyinclude>
12485 But not inside includeonly
12486 <includeonly>{{subst:Foo}}</includeonly>
12490 Parsoid: Recognize nowiki with trailing space in tags
12494 <nowiki ><div>[[foo]]</nowiki >
12502 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12509 Parsoid: Recognize nowiki with odd capitalization
12513 <noWikI ><div>[[foo]]</Nowiki >
12515 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12520 Parsoid: Escape nowiki with trailing space in tags
12524 <p><nowiki > foo </nowiki ></p>
12525 <p>a<nowiki />b</p>
12526 <p>c<nowiki/ >d</p>
12528 <nowiki > foo </nowiki >
12536 Parsoid: Escape weird noWikI capitalizations
12540 <p><noWikI > foo </NoWikI ></p>
12542 <noWikI > foo </NoWikI >
12546 ### Message transform tests
12549 message transform: magic variables
12559 message transform: should not transform wiki markup
12569 message transform: <noinclude> in transcluded template (bug 4926)
12579 message transform: <onlyinclude> in transcluded template (bug 4926)
12589 {{#special:}} page name, known
12593 {{#special:Recentchanges}}
12595 Special:RecentChanges
12599 {{#special:}} page name with subpage, known
12603 {{#special:Recentchanges/param}}
12605 Special:RecentChanges/param
12609 {{#special:}} page name, unknown
12613 {{#special:foobar nonexistent}}
12615 Special:Foobar nonexistent
12619 {{#speciale:}} page name, known
12623 {{#speciale:Recentchanges}}
12625 Special:RecentChanges
12629 {{#speciale:}} page name with subpage, known
12633 {{#speciale:Recentchanges/param}}
12635 Special:RecentChanges/param
12639 {{#speciale:}} page name, unknown
12643 {{#speciale:foobar nonexistent}}
12645 Special:Foobar_nonexistent
12651 ### For Parsoid-specific tests, see
12652 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12657 parsoid=wt2html,wt2wt,html2html
12659 [[Image:foobar.jpg]]
12661 <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>
12664 <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>
12668 Simple image (using File: namespace, now canonical)
12670 [[File:Foobar.jpg]]
12672 <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>
12675 <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>
12679 Right-aligned image
12681 [[File:Foobar.jpg|right]]
12683 <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>
12686 <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>
12692 [[File:Foobar.jpg|right|Caption text]]
12694 <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>
12697 <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>
12701 Image with caption, bug 53312 #1
12703 [[File:Foobar.jpg|right|Caption page stuff]]
12705 <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>
12708 <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>
12712 Image with caption, bug 53312 #2
12714 [[File:Foobar.jpg|right|Caption page=]]
12716 <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>
12719 <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>
12723 Image with caption, bug 53312 #3
12725 [[File:Foobar.jpg|right|Caption page=stuff]]
12727 <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>
12730 <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>
12734 Allow empty links in image captions (Bug 60753)
12738 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12743 <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>
12746 <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>
12748 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12749 </figcaption></figure>
12753 Titles in unlinked images (T23454)
12755 [[File:Foobar.jpg|link=|stuff]]
12757 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12762 Link with empty target
12771 Image with link trail
12773 Linktrails should not work for images: [[File:Foobar.jpg]]s
12775 <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
12778 <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>
12782 Image with empty attribute
12784 parsoid=wt2html,wt2wt,html2html
12786 [[File:Foobar.jpg|right||Caption text]]
12788 <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>
12791 <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>
12795 1. Block image with individual attributes from templates
12797 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12799 <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>
12802 <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>
12806 2. Block Image with individual attributes from templates
12808 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12810 <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>
12813 <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>
12817 3. Inline image with individual attributes from templates
12819 [[File:Foobar.jpg|{{echo|50px}}]]
12821 <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>
12824 <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>
12827 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12828 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12830 Image with multiple attributes from the same template
12832 [[File:Foobar.jpg|{{image_attribs}}]]
12834 <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>
12837 <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>
12841 Image with link tails
12845 123[[File:Foobar.jpg]]456
12846 123[[File:Foobar.jpg|right]]456
12847 123[[File:Foobar.jpg|thumb]]456
12849 <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
12851 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
12852 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
12855 <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>
12857 <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>
12859 <div class="thumb tright">
12860 <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>
12861 <div class="thumbcaption">
12862 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12868 <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>
12869 <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>
12870 <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>
12874 Image with multiple captions -- only last one is accepted
12876 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12878 <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>
12881 <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>
12885 Image with multiple widths -- use last
12887 [[File:Foobar.jpg|200px|300px|caption]]
12889 <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>
12892 <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>
12896 Image with multiple alignments -- use first (bug 48664)
12900 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12902 [[File:Foobar.jpg|middle|text-top|caption]]
12904 <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>
12905 <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>
12908 <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>
12909 <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>
12913 Image with width attribute at different positions
12915 [[File:Foobar.jpg|200px|right|Caption]]
12916 [[File:Foobar.jpg|right|200px|Caption]]
12917 [[File:Foobar.jpg|right|Caption|200px]]
12919 <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>
12920 <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>
12921 <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>
12924 <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>
12925 <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>
12926 <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>
12929 # a sad bit of backward-compatibility
12931 Image with size specified with pxpx (bug 13500, 51628)
12933 parsoid=wt2html,wt2wt,html2html
12935 [[File:Foobar.jpg|20pxpx]]
12936 [[File:Foobar.jpg|200x20pxpx]]
12938 <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>
12939 <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>
12942 <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>
12946 Image with link parameter, wiki target
12948 [[File:Foobar.jpg|link=Main Page]]
12950 <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>
12953 <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>
12956 # parsoid bug 49293 (part 1)
12958 Image with link parameter, URL target
12960 [[File:Foobar.jpg|link=http://example.com/]]
12962 <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>
12965 <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>
12968 # parsoid bug 49293 (part 2)
12970 Image with link parameter, protocol-less URL target
12972 [[File:Foobar.jpg|link=//example.com/]]
12974 <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>
12977 <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>
12981 Escaping non-block captions (T107435)
12984 "modes": ["wt2wt"],
12986 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
12990 [[Image:Foobar.jpg|caption]]
12992 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
12995 # wgExternalLinkTarget not supported by Parsoid
12997 Image with link parameter, wgExternalLinkTarget
12999 [[Image:foobar.jpg|link=http://example.com/]]
13001 wgExternalLinkTarget='foobar'
13003 <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>
13008 Image with link parameter, wgNoFollowLinks set to false
13010 [[Image:foobar.jpg|link=http://example.com/]]
13012 wgNoFollowLinks=false
13014 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13019 Image with link parameter, wgNoFollowDomainExceptions
13021 [[Image:foobar.jpg|link=http://example.com/]]
13023 wgNoFollowDomainExceptions='example.com'
13025 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13029 # wgExternalLinkTarget not supported by Parsoid
13031 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13033 [[Image:foobar.jpg|link=http://example.com/|Title]]
13035 wgExternalLinkTarget='foobar'
13037 <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>
13042 Image with empty link parameter
13044 [[File:Foobar.jpg|link=]]
13046 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13049 <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>
13053 Image with link parameter (wiki target) and unnamed parameter
13055 [[File:Foobar.jpg|link=Main_Page|Title]]
13057 <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>
13060 <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>
13064 Image with link parameter (URL target) and unnamed parameter
13066 [[File:Foobar.jpg|link=http://example.com/|Title]]
13068 <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>
13071 <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>
13075 Thumbnail image with link parameter
13078 parsoid=wt2html,wt2wt,html2html
13080 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13082 <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>
13085 <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>
13089 Manually-specified thumbnail image
13093 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13095 <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>
13098 <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>
13102 Manually-specified thumbnail image with explicit link to wiki page
13105 parsoid=wt2html,wt2wt,html2html
13107 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13109 <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>
13112 <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>
13116 Manually-specified thumbnail image with explicit link to url
13119 parsoid=wt2html,wt2wt,html2html
13121 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13123 <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>
13126 <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>
13130 Manually-specified thumbnail image with explicit no link
13133 parsoid=wt2html,wt2wt,html2html
13135 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13137 <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>
13140 <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>
13144 Manually-specified thumbnail image with explicit link and alt text
13147 parsoid=wt2html,wt2wt,html2html
13149 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13151 <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>
13154 <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>
13158 Image with frame and link
13160 parsoid=wt2html,wt2wt,html2html
13162 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13164 <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>
13167 <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>
13171 Image with frame and link and explicit alt
13173 parsoid=wt2html,wt2wt,html2html
13175 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13177 <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>
13180 <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>
13184 Image with wiki markup in implicit alt
13186 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13188 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13190 <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>
13191 </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>
13194 <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>
13195 <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>
13199 Alt image option should handle most kinds of wikitext without barfing
13201 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13203 <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>
13206 <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>
13209 ###################
13210 # Conflicting image format options.
13211 # First option specified should 'win'.
13212 # All three cases in each test should be identical.
13215 Image with 'frameless' first.
13217 parsoid=wt2html,wt2wt,html2html
13219 [[File:Foobar.jpg|frameless|caption]]
13221 [[File:Foobar.jpg|frameless|frame|caption]]
13223 [[File:Foobar.jpg|frameless|thumb|caption]]
13225 <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>
13226 </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>
13227 </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>
13230 <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>
13231 <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>
13232 <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>
13236 Image with 'frame' first.
13238 parsoid=wt2html,wt2wt,html2html
13240 [[File:Foobar.jpg|frame|caption]]
13241 [[File:Foobar.jpg|frame|frameless|caption]]
13242 [[File:Foobar.jpg|frame|thumb|caption]]
13244 <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>
13245 <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>
13246 <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>
13249 <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>
13250 <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>
13251 <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>
13255 Image with 'thumb' first.
13257 parsoid=wt2html,wt2wt,html2html
13259 [[File:Foobar.jpg|thumb|caption]]
13260 [[File:Foobar.jpg|thumb|frameless|caption]]
13261 [[File:Foobar.jpg|thumb|frame|caption]]
13263 <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>
13264 <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>
13265 <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>
13268 <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>
13269 <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>
13270 <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>
13273 ###################
13275 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13276 # and https://phabricator.wikimedia.org/T64258
13277 # Foobar has actual size of 1941x220
13278 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13279 # a scalable format.
13280 # 2. Framed images always ignore size options; always render at default size.
13281 # 3. "Unspecified format" and border are the only types which can be
13285 Image: "unspecified format" and border enlarge
13287 parsoid=wt2html,wt2wt,html2html
13289 [[File:Foobar.jpg|2000px]]
13291 [[File:Foobar.jpg|border|2000px]]
13293 <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>
13294 </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>
13297 <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>
13298 <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>
13302 Image: "unspecified format" and border reduce
13304 parsoid=wt2html,wt2wt,html2html
13306 [[File:Foobar.jpg|1000px]]
13308 [[File:Foobar.jpg|border|1000px]]
13310 <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>
13311 </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>
13314 <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>
13315 <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>
13319 Image: thumbs reduce
13321 parsoid=wt2html,wt2wt,html2html
13323 [[File:Foobar.jpg|thumb|50px]]
13325 <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>
13328 <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>
13332 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13334 parsoid=wt2html,wt2wt,html2html
13336 [[File:Foobar.jpg|thumb|2000px]]
13338 [[File:Foobar.svg|thumb|2000px]]
13340 <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>
13341 <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>
13344 <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>
13345 <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>
13349 Image: frameless can reduce in size
13351 parsoid=wt2html,wt2wt,html2html
13353 [[File:Foobar.jpg|frameless|50px]]
13355 <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>
13358 <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>
13362 Image: bitmap frameless can't be enlarged past original size, but vector can
13364 parsoid=wt2html,wt2wt,html2html
13366 [[File:Foobar.jpg|frameless|2000px]]
13368 [[File:Foobar.svg|frameless|2000px]]
13370 <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>
13371 </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>
13374 <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>
13375 <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>
13379 Image: framed images are always unscaled.
13381 parsoid=wt2html,wt2wt,html2html
13383 [[File:Foobar.jpg|frame]]
13385 [[File:Foobar.jpg|frame|50px]]
13387 [[File:Foobar.jpg|frame|50x50px]]
13389 [[File:Foobar.jpg|frame|2000px]]
13391 <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>
13392 <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>
13393 <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>
13394 <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>
13397 <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>
13398 <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>
13399 <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>
13400 <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>
13403 ###################
13406 Link to image page- image page normally doesn't exists, hence edit link
13407 Add test with existing image page
13408 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13412 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13417 bug 18784 Link to non-existent image page with caption should use caption as link text
13419 [[:Image:test|caption]]
13421 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13426 Frameless image caption with a free URL
13428 [[File:Foobar.jpg|http://example.com]]
13430 <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>
13433 <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>
13437 Thumbnail image caption with a free URL
13441 [[File:Foobar.jpg|thumb|http://example.com]]
13443 <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>
13446 <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>
13450 Thumbnail image caption with a free URL and explicit alt
13453 parsoid=wt2html,wt2wt,html2html
13455 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13457 <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>
13460 <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>
13464 SVG thumbnails with no language set
13467 [[File:Foobar.svg|thumb|caption]]
13469 <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>
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" 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 language de
13478 parsoid=wt2html,wt2wt,html2html
13480 [[File:Foobar.svg|thumb|caption|lang=de]]
13482 <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>
13485 <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>
13489 SVG thumbnails with invalid language code
13491 parsoid=wt2html,wt2wt,html2html
13493 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13495 <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>
13498 <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>
13502 BUG 1887: A ISBN with a thumbnail
13504 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13506 <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>
13509 <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>
13513 BUG 1887: A RFC with a thumbnail
13515 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13517 <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>
13520 <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>
13524 BUG 1887: A mailto link with a thumbnail
13526 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13528 <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>
13531 <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>
13534 # Pending resolution to bug 368
13536 BUG 648: Frameless image caption with a link
13538 [[File:Foobar.jpg|text with a [[link]] in it]]
13540 <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>
13543 <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>
13547 BUG 648: Frameless image caption with a link (suffix)
13549 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13551 <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>
13554 <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>
13558 BUG 648: Frameless image caption with an interwiki link
13560 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13562 <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>
13565 <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>
13569 BUG 648: Frameless image caption with a piped interwiki link
13571 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13573 <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>
13576 <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>
13580 T107474: Frameless image caption with <nowiki>
13582 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13584 <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>
13588 Escape HTML special chars in image alt text
13590 [[File:Foobar.jpg|& < > "]]
13592 <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>
13595 <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>
13599 BUG 499: Alt text should have Ӓ, not &1234;
13601 [[File:Foobar.jpg|♀]]
13603 <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>
13606 <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>
13610 Broken image caption with link
13612 parsoid=wt2html,wt2wt,html2html
13614 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13616 <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.
13619 <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>
13623 Image caption containing another image
13625 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13627 <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>
13630 <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>
13634 Image: caption containing a newline
13636 [[File:Foobar.jpg|This
13639 <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>
13642 <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>
13646 Image: caption containing leading space
13647 (The leading space should not trigger nowiki escaping in wt2wt mode)
13649 [[File:Foobar.jpg|thumb| bar]]
13651 <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>
13654 <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>
13658 Image: caption containing a table
13660 parsoid=wt2html,wt2wt,html2html
13662 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13668 and some more text.]]
13670 <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>
13673 <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
13676 <tr><th>Foo </th><th>Bar</th></tr>
13679 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13683 Bug 3090: External links other than http: in image captions
13685 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13687 <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>
13690 <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>
13696 parsoid=wt2html,wt2wt,html2html
13698 [[Image:foobar.jpg|a|class=b]]
13700 <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>
13703 <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>
13707 Localized image handling (1).
13709 parsoid=wt2html,wt2wt,html2html
13712 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13714 <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>
13717 <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>
13721 Localized image handling (2).
13724 parsoid=wt2html,wt2wt,html2html
13727 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13729 <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>
13732 <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>
13736 "border", "frameless" and "class" attributes on an image.
13739 parsoid=wt2html,wt2wt,html2html
13741 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13743 <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>
13746 <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>
13749 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13751 Invalid image attributes (bug 62500)
13754 parsoid=wt2html,wt2wt,html2html
13756 [[File:Foobar.jpg|thumb|float|left|caption]]
13758 [[File:Foobar.jpg|thumb|righ|caption]]
13760 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13762 <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>
13763 <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>
13764 <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>
13767 <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>
13768 <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>
13769 <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>
13775 #REDIRECT [[File:Barfoo.jpg]]
13778 # FIXME: Parsoid should run this test -- but we'd need to teach the
13779 # mockAPI about the redirected Barfoo.jpg image.
13783 [[Image:Barfoo.jpg]]
13785 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13790 Missing image with uploads disabled
13794 [[File:Foobaz.jpg]]
13796 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13799 <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>
13802 # Parsoid-specific testing for images
13803 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13804 # Currently imperfect due to a flaw in the Parsoid testrunner
13806 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13810 Parsoid-specific image handling - simple image with size and middle alignment
13812 [[File:Foobar.jpg|middle|50px]]
13814 <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>
13818 Parsoid-specific image handling - simple image with size, middle alignment,
13819 non-standard namespace alias
13821 parsoid=wt2wt,wt2html,html2html
13823 [[Image:Foobar.jpg|middle|50px]]
13825 <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>
13829 Parsoid-specific image handling - simple image with size and middle alignment
13832 [[File:Foobar.jpg|50px|middle]]
13834 <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>
13838 Parsoid-specific image handling - simple image with size and middle alignment
13839 and non-standard namespace name
13841 parsoid=wt2html,wt2wt,html2html
13843 [[Image:Foobar.jpg|50px|middle]]
13845 <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>
13849 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13851 [[File:Foobar.jpg|500x10px|baseline|caption]]
13853 <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>
13857 Parsoid-specific image handling - simple image with border and size spec
13859 [[File:Foobar.jpg|50px|border|caption]]
13861 <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>
13865 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13867 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13869 <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>
13873 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13876 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13878 <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>
13882 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13884 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13886 <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>
13890 Parsoid-specific image handling - thumbnail with specific size, halign,
13891 valign, and caption (existing content)
13893 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13895 <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>
13899 Parsoid-specific image handling - framed image with specific size and caption
13902 parsoid=wt2html,wt2wt,html2html
13904 [[File:Foobar.jpg|frame|500x50px|caption]]
13906 <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>
13910 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13913 parsoid=wt2html,wt2wt,html2html
13915 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13917 <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>
13921 Parsoid-specific image handling - frameless image with specific size, border, and caption
13923 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13925 <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>
13929 Parsoid-specific image handling - simple image with a formatted caption
13931 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13933 <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>
13937 Parsoid-specific image handling - caption with a template in it
13939 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} 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 <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>
13945 Parsoid-specific image handling - caption with unbalanced tags in it
13947 parsoid=wt2html,wt2wt,html2html
13950 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13954 <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>
13959 Parsoid-specific image handling - empty caption (1)
13961 parsoid=wt2html,wt2wt
13963 [[File:Foobar.jpg|thumb|]]
13965 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption></figcaption></figure>
13968 # empty captions don't get serialized unless we're in the "round trip" case
13970 Parsoid-specific image handling - empty caption (2)
13974 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13975 <a href="./File:Foobar.jpg">
13976 <img resource="./File:Foobar.jpg"
13977 src="//example.com/images/3/3a/Foobar.jpg"
13978 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13979 height="25" width="220"/>
13981 <figcaption></figcaption>
13984 [[File:Foobar.jpg|thumb]]
13988 Parsoid-specific image handling - whitespace caption
13990 [[File:Foobar.jpg|thumb| ]]
13992 <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>
13996 Parsoid-specific image handling - lang option
13999 [[File:Foobar.svg|lang=de|caption]]
14003 <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>
14007 ## Edge case bugs in Parsoid from T93580
14009 T93580: 1. Templated <ref> inside block images
14011 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14015 <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>
14017 <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>
14021 T93580: 2. <ref> inside inline images
14023 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14027 <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>
14029 <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>
14033 T93580: 3. Templated <ref> inside inline images
14035 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14039 <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>
14041 <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>
14048 Subpage test/subpage
14056 subpage title=[[Subpage test]]
14060 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14065 Subpage noslash link
14067 subpage title=[[Subpage test]]
14071 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14076 Subpage test/1/2/subpage
14082 Relative subpage noslash link
14084 parsoid=wt2wt,wt2html,html2html
14085 subpage title=[[Subpage test/1/2/3/4]]
14091 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14092 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14095 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14096 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14100 Parsoid: dot-slash prefixed wikilinks
14110 </p><p>[[././baz/]]
14115 </p><p>[[././baz/]]
14120 Render invalid page names as plain text (bug 51090)
14133 [[{{echo|./../foo}}|bar]]
14134 [[{{echo|foo/.}}|bar]]
14135 [[{{echo|foo/..}}|bar]]
14136 [[{{echo|foo~~~~bar}}]]
14137 [[{{echo|foo>bar}}]]
14138 [[{{echo|foo././bar}}]]
14139 [[{{echo|foo{bar}}]]
14140 [[{{echo|foo}bar}}]]
14141 [[{{echo|foo[bar}}]]
14142 [[{{echo|foo]bar}}]]
14143 [[{{echo|foo<bar}}]]
14145 <p>[[./../foo|bar]]
14155 </p><p>[[./../foo|bar]]
14168 <p>[[./../foo|bar]]
14179 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14180 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14181 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14182 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14183 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14184 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14185 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14186 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14187 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14188 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14189 [[<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>
14197 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14202 BUG 561: {{/Subpage}}
14204 subpage title=[[Page]]
14208 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14216 Category:MediaWiki User's Guide
14224 [[:Category:MediaWiki User's Guide]]
14226 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14235 [[Category:MediaWiki User's Guide]]
14237 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14241 PAGESINCATEGORY invalid title fatal (r33546 fix)
14243 {{PAGESINCATEGORY:<bogus>}}
14250 Category with different sort key
14254 [[Category:MediaWiki User's Guide|Foo]]
14256 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14260 Category with identical sort key
14264 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14266 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14270 Category with empty sort key
14275 [[Category:MediaWiki User's Guide|]]
14277 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14281 Category with empty sort key and parentheses
14286 [[Category:Foo (bar)|]]
14288 [[Category:Foo (bar)|Foo]]
14291 ## We used to, but no longer wt2wt this test since the default serializer
14292 ## will normalize all categories to serialize on their own line.
14293 ## This wikitext usage is going to be fairly uncommon in production and
14294 ## selser will take care of preserving formatting in those scenarios.
14296 Category with link tail
14302 123[[Category:Foo]]456
14304 123[[Category:Foo]]456
14306 <p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
14310 Category with template
14315 [[Category:{{echo|Foo}}]]
14317 [[Category:{{echo|Foo}}]]
14321 Category with template in sort key
14326 [[Category:Foo|{{echo|Bar}}]]
14328 [[Category:Foo|{{echo|Bar}}]]
14332 Category with template in sort key and title
14337 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14339 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14342 ## We used to, but no longer wt2wt this test since the default serializer
14343 ## will normalize all categories to serialize on their own line.
14344 ## This wikitext usage is going to be fairly uncommon in production and
14345 ## selser will take care of preserving formatting in those scenarios.
14347 Category / paragraph interactions
14351 Foo [[Category:Baz]] Bar
14353 Foo [[Category:Baz]]
14361 [[Category:Baz]] Bar
14374 {{echo|[[Category:Baz]]}}
14387 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14388 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14389 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14390 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14391 <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>
14392 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14395 ## We used to, but no longer wt2wt this test since the default serializer
14396 ## will normalize all categories to serialize on their own line.
14397 ## This wikitext usage is going to be fairly uncommon in production and
14398 ## selser will take care of preserving formatting in those scenarios.
14400 ## The whitespace on the empty line is part of the test. Please do not delete
14402 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14408 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14410 {{echo|[[Category:Foo]] and so should this!}}
14412 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14417 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14419 <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>
14422 ## Parsoid will not try to wt2wt this while preserving newlines because
14423 ## it suppresses excess newlines within list items -- and we don't want to
14424 ## introduce a special case just for categories, which is, in reality somewhat
14425 ## odd behavior -- categories are unlikely to be used in list items like this
14426 ## in top-level pages and are only likely to show up in template-generated
14427 ## list items where this RT-ing is a non-issue.
14429 ## The whitespace on the empty line is part of the test. Please do not delete
14431 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14437 [[Category:Foo]] and this should be part of the same list item
14440 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14442 <ul><li>This and this should be part of the same list item</li>
14443 <li>So should this and this should be part of the same list item</li></ul>
14446 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14447 <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>
14451 ## Newlines and categories that follow the last item of a list
14452 ## are treated differently because this (list followed by categories)
14453 ## is an extremely common pattern on wikis.
14455 3. Categories and newlines: newline suppression for last list item should RT properly
14468 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14470 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14471 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14475 4. Categories and newlines: newline suppression for last list item should RT properly
14483 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14485 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14488 ## only wt2html for this to make sure the algo only applies to the rightmost path
14490 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14503 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14505 <ul><li> d</li></ul></li></ul>
14506 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14509 ## We used to, but no longer wt2wt this test since the default serializer
14510 ## will normalize all categories to serialize on their own line.
14511 ## This wikitext usage is going to be fairly uncommon in production and
14512 ## selser will take care of preserving formatting in those scenarios.
14514 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14518 * a [[Category:Foo]]
14520 <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>
14523 # This test also demonstrates because of newline+category tunneling
14524 # through the list hander, template wrapping doesn't expand to the
14525 # containing list when the list item swallows the category.
14527 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14532 <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
14533 </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>
14537 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14541 {{echo|[[Category:Foo]]
14545 <ul><li> a</li></ul>
14547 <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">
14548 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14549 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14553 Parsoid: Serialize link to category page with colon escape
14559 [[:Category:Foo|Bar]]
14562 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14563 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14567 # We used to, but no longer wt2wt this test since the default serializer
14568 # will normalize all categories to serialize on their own line.
14569 # This wikitext usage is going to be fairly uncommon in production and
14570 # selser will take care of preventing whitespace insertion if this
14571 # occurs in an article.
14573 # html2html disabled for the same reason (whitespace insertion between
14576 # html2wt disabled because it localizes the "Category" namespace.
14578 Link prefix/suffixes aren't applied to category links
14588 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14592 Parsoid: Serialize link to file page with colon escape
14598 [[:File:Foo.png|Bar]]
14601 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14602 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14607 Parsoid: Serialize a genuine category link without colon escape
14612 [[Category:Foo|Bar]]
14614 <link rel="mw:PageProp/Category" href="./Category:Foo">
14615 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14619 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14623 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14625 [[Category:Toxine bactérienne]]
14629 Parsoid: Defaultsort
14631 {{DEFAULTSORT:Foo}}
14633 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14637 Parsoid: Defaultsort (template-generated)
14639 {{{{echo|DEFAULTSORT}}:Foo}}
14641 <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}}]}'/>
14645 ### Inter-language links
14648 Interlanguage links
14656 es:Alimento fr:Nourriture zh:食品
14658 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14659 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14660 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14664 Duplicate interlanguage links (bug 24502)
14675 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14676 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14677 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14678 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14685 Basic section headings
14692 ===Smaller headline===
14695 <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>
14698 <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>
14701 <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>
14707 Section headings with TOC
14710 === Subheadline 1 ===
14711 ===== Skipping a level =====
14712 ====== Skipping a level ======
14716 ===Another headline===
14718 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14720 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14722 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14724 <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>
14726 <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>
14733 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14735 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14741 <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>
14742 <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>
14743 <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>
14744 <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>
14745 <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>
14748 <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>
14753 TOC anchors don't collide
14761 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14763 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14764 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14765 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14766 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14770 <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>
14771 <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>
14772 <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>
14773 <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>
14777 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14779 Handling of sections up to level 6 and beyond
14782 == Level 2 Heading==
14783 === Level 3 Heading===
14784 ==== Level 4 Heading====
14785 ===== Level 5 Heading=====
14786 ====== Level 6 Heading======
14787 ======= Level 7 Heading=======
14788 ======== Level 8 Heading========
14789 ========= Level 9 Heading=========
14790 ========== Level 10 Heading==========
14792 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14794 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14796 <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>
14798 <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>
14800 <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>
14802 <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>
14804 <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>
14805 <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>
14806 <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>
14807 <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>
14808 <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>
14822 <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>
14823 <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>
14824 <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>
14825 <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>
14826 <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>
14827 <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>
14828 <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>
14829 <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>
14830 <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>
14831 <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>
14836 TOC regression (T11764)
14840 ==== title 1.1.1 ====
14845 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14847 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14849 <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>
14851 <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>
14854 <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>
14857 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14859 <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>
14865 <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>
14866 <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>
14867 <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>
14868 <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>
14869 <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>
14870 <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>
14875 TOC for heading containing <span id="..."></span> (T96153)
14878 ==<span id="old-anchor"></span>New title==
14880 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14882 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14886 <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>
14891 TOC with wgMaxTocLevel=3 (bug 6204)
14897 ==== title 1.1.1 ====
14902 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14904 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14906 <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>
14907 <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>
14910 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14912 <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>
14918 <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>
14919 <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>
14920 <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>
14921 <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>
14922 <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>
14923 <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>
14928 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14934 ====Section 1.1.1====
14935 ====Section 1.1.1.1====
14938 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14940 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14942 <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>
14945 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14949 <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>
14950 <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>
14951 <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>
14952 <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>
14953 <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>
14959 Resolving duplicate section names
14964 <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>
14965 <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>
14970 Resolving duplicate section names with differing case (bug 10721)
14975 <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>
14976 <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>
14988 Template with sections, __NOTOC__
14995 <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>
14996 <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>
14997 <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>
14998 <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>
15003 __NOEDITSECTION__ keyword
15009 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15010 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15015 Link inside a section heading
15017 ==Section with a [[Main Page|link]] in it==
15019 <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>
15024 TOC regression (T14077)
15031 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15033 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15035 <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>
15038 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15042 <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>
15043 <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>
15044 <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>
15049 BUG 1219 URL next to image (good)
15051 http://example.com [[File:Foobar.jpg]]
15053 <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>
15056 <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>
15060 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15063 The line above must have a trailing space!
15066 But just in case it doesn't...
15068 <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>
15069 <p>The line above must have a trailing space!
15071 <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>
15072 <p>But just in case it doesn't...
15077 Header with special characters (bug 25462)
15079 The tooltips shall not show entities to the user (ie. be double escaped)
15096 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15098 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15100 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15101 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15102 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15103 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15104 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15108 <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>
15111 <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>
15114 <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>
15117 <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>
15120 <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>
15126 Header with space, plus and underscore as entity
15128 Id should not contain + for spaces
15130 == Space between Text ==
15133 == Space-Entity between Text ==
15136 == Plus+between+Text ==
15139 == Plus-Entity+between+Text ==
15142 == Underscore_between_Text ==
15145 == Underscore-Entity_between_Text ==
15148 [[#Space between Text]]
15149 [[#Space-Entity between Text]]
15150 [[#Plus+between+Text]]
15151 [[#Plus-Entity+between+Text]]
15152 [[#Underscore_between_Text]]
15153 [[#Underscore-Entity_between_Text]]
15155 <p>Id should not contain + for spaces
15157 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15159 <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>
15160 <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>
15161 <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>
15162 <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>
15163 <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>
15164 <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>
15168 <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>
15171 <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>
15174 <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>
15177 <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>
15180 <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>
15183 <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>
15185 </p><p><a href="#Space_between_Text">#Space between Text</a>
15186 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15187 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15188 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15189 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15190 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15195 Headers with excess '=' characters
15196 (Are similar tests necessary beyond the 1st level?)
15200 =''italic'' heading==
15201 ==''italic'' heading=
15203 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15205 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15206 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15207 <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>
15208 <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>
15212 <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>
15213 <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>
15214 <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>
15215 <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>
15220 HTML headers vs TOC (bug 23393)
15221 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15233 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15235 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15237 <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>
15238 <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>
15241 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15243 <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>
15244 <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>
15250 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15251 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15252 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15253 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15254 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15255 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15260 Single-line or multiline-comments can follow headings
15262 parsoid=wt2html,wt2wt
15270 <h2><span class="mw-headline" id="foo">foo</span></h2>
15271 <h2><span class="mw-headline" id="bar">bar</span></h2>
15272 <h2><span class="mw-headline" id="baz">baz</span></h2>
15277 BUG 1219 URL next to image (broken)
15279 http://example.com[[File:Foobar.jpg]]
15281 <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>
15284 <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>
15288 Bug 1186 news: in the middle of text
15290 http://en.wikinews.org/wiki/Wikinews:Workplace
15292 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15298 Namespaced link must have a title
15307 Namespaced link must have a title (bad fragment version)
15309 [[Project:#fragment]]
15311 <p>[[Project:#fragment]]
15317 ### HTML tags and HTML attributes
15321 div with no attributes
15323 <div>HTML rocks</div>
15325 <div>HTML rocks</div>
15330 div with double-quoted attribute
15332 <div id="rock">HTML rocks</div>
15334 <div id="rock">HTML rocks</div>
15339 div with single-quoted attribute
15341 <div id='rock'>HTML rocks</div>
15343 <div id="rock">HTML rocks</div>
15348 div with unquoted attribute
15350 <div id=rock>HTML rocks</div>
15352 <div id="rock">HTML rocks</div>
15357 div with illegal double attributes
15359 <div id="a" id="b">HTML rocks</div>
15361 <div id="b">HTML rocks</div>
15365 # FIXME: produce empty string instead of "class" in the PHP parser, following
15368 div with empty attribute value, space before equals
15372 <div class =>HTML rocks</div>
15374 <div class="">HTML rocks</div>
15379 div with multiple empty attribute values
15383 <div id= title=>HTML rocks</div>
15385 <div id="" title="">HTML rocks</div>
15390 table with multiple empty attribute values
15398 <table title="" id="">
15399 <tbody><tr><td> hi</td></tr>
15404 div with braces in attribute value
15406 <div title="{}">Foo</div>
15408 <div title="{}">Foo</div>
15411 <div title="{}">Foo</div>
15414 # This it very inconsistent in the PHP parser: it returns
15415 # class="class" if there is a space between the name and the equal sign (see
15416 # 'div with empty attribute value, space before equals'), but strips the
15417 # attribute completely if the space is missing. We hope that not much content
15418 # depends on this, so are implementing the behavior below in Parsoid for
15419 # consistencies' sake.
15420 # FIXME: fix this behavior in the PHP parser?
15422 div with empty attribute value, no space before equals
15424 parsoid=wt2html,html2html
15426 <div class=>HTML rocks</div>
15428 <div>HTML rocks</div>
15431 <div class="">HTML rocks</div>
15435 HTML multiple attributes correction
15437 <p class="error" class="awesome">Awesome!</p>
15439 <p class="awesome">Awesome!</p>
15444 Table multiple attributes correction
15447 !+ class="error" class="awesome"| status
15452 <th class="awesome"> status
15460 <DIV ID="x">HTML ROCKS</DIV>
15462 <div id="x">HTML ROCKS</div>
15467 Non-ASCII pseudo-tags are rendered as text
15476 Pseudo-tag with URL 'name' renders as url link
15478 <http://example.com/>
15480 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15485 text with amp in the middle of nowhere
15489 <p>Remember AT&T?
15494 text with character entity: eacute
15496 I always thought é was a cute letter.
15498 <p>I always thought é was a cute letter.
15501 <p>I always thought é was a cute letter.</p>
15505 text with entity-escaped character entity-like string: eacute
15507 I always thought &eacute; was a cute letter.
15509 <p>I always thought &eacute; was a cute letter.
15514 text with undefined character entity: xacute
15516 I always thought &xacute; was a cute letter.
15518 <p>I always thought &xacute; was a cute letter.
15525 <data value="5">five</data>
15526 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15527 <mark>This highlighted text</mark>
15529 <p><data value="5">five</data>
15530 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15531 <mark>This highlighted text</mark>
15536 HTML tag with leading space is parsed as text
15540 <p>< div>foo< /div>
15545 ### Nesting tests (see bug 41545, 50604, 51081)
15548 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15549 # Note that html2wt is considerably more difficult if we use <b> in
15550 # the test case, instead of <big>
15552 Ensure that HTML adoption agency algorithm is properly implemented.
15554 <big>X<big>Y</big>Z</big>
15556 <p><big>X<big>Y</big>Z</big>
15560 # This was bug 41545 in the PHP parser.
15561 # Note that tidy doesn't handle this correctly.
15565 <kbd>X<kbd>Y</kbd>Z</kbd>
15567 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15571 # The following cases were bug 51081 in the PHP parser.
15572 # Note that there are some other nestable tags (b, i, etc) which are
15573 # not covered; see bug 51081 for discussion.
15575 # Note that tidy doesn't handle this correctly.
15579 <em>X<em>Y</em>Z</em>
15581 <p><em>X<em>Y</em>Z</em>
15585 # Note that tidy doesn't handle this correctly.
15587 Nesting of <strong>
15589 <strong>X<strong>Y</strong>Z</strong>
15591 <p><strong>X<strong>Y</strong>Z</strong>
15600 <p><q>X<q>Y</q>Z</q></p>
15603 # Note that tidy doesn't handle this correctly.
15607 <ruby>X<ruby>Y</ruby>Z</ruby>
15609 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15613 # Note that tidy doesn't handle this correctly.
15617 <bdo>X<bdo>Y</bdo>Z</bdo>
15619 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15631 [[Media:Foobar.jpg]]
15633 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15638 Media link with text
15640 [[Media:Foobar.jpg|A neat file to look at]]
15642 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15646 # FIXME: this is still bad HTML tag nesting
15647 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15649 Media link with nasty text
15651 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15653 <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>
15656 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15657 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15661 Media link to nonexistent file (bug 1702)
15663 [[Media:No such.jpg]]
15665 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15670 Image link to nonexistent file (bug 1850 - good)
15672 [[File:No_such.jpg]]
15674 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15677 <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>
15681 :Image link to nonexistent file (bug 1850 - bad)
15683 [[:Image:No such.jpg]]
15685 <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>
15688 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15694 Character reference normalization in link text (bug 1938)
15696 [[Main Page|this&that]]
15698 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15705 Test for unicode normalization
15707 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15711 (bug 19451) Links should refer to the normalized form.
15719 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15720 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15721 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15722 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15723 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15728 Empty attribute crash test (bug 2067)
15730 <font color="">foo</font>
15732 <p><font color="">foo</font>
15737 Empty attribute crash test single-quotes (bug 2067)
15739 <font color=''>foo</font>
15741 <p><font color="">foo</font>
15746 Attribute test: equals, then nothing
15748 <font color=>foo</font>
15750 <p><font>foo</font>
15755 Attribute test: unquoted value
15757 <font color=x>foo</font>
15759 <p><font color="x">foo</font>
15764 Attribute test: unquoted but illegal value (hash)
15766 <font color=#x>foo</font>
15768 <p><font color="#x">foo</font>
15772 # Parsoid does not serialize to empty attribute syntax,
15773 # so wt2wt and html2wt cases are skipped
15775 Attribute test: no value (T54330)
15777 parsoid=wt2html,html2html
15779 <font color>foo</font>
15781 <p><font color="">foo</font>
15784 <p><font color="">foo</font></p>
15788 Bug 2095: link with three closing brackets
15792 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15795 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15799 Bug 2095: link with pipe and three closing brackets
15801 [[Main Page|link]]]
15803 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15806 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15810 Bug 2095: link with pipe and three closing brackets, version 2
15812 [[Main Page|[http://example.com/]]]
15814 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15817 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15826 Template:Dangerous attribute
15828 " onmouseover="alert(document.cookie)
15832 Template:Dangerous style attribute
15834 border-size: expression(alert(document.cookie))
15840 <div style="float: right; {{{1}}}">Magic div</div>
15844 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15846 <div title="{{test}}"></div>
15848 <div title="This is a test template"></div>
15852 # Parsoid has enough context to handle this case
15854 Bug 2304: HTML attribute safety (dangerous template; 2309)
15856 <div title="{{dangerous attribute}}"></div>
15858 <div title=""></div>
15861 <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>
15865 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15867 <div style="{{dangerous style attribute}}"></div>
15869 <div style="/* insecure input */"></div>
15874 Bug 2304: HTML attribute safety (safe parameter; 2309)
15876 {{div style|width: 200px}}
15878 <div style="float: right; width: 200px">Magic div</div>
15883 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15885 {{div style|width: expression(alert(document.cookie))}}
15887 <div style="/* insecure input */">Magic div</div>
15892 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15894 {{div style|"><script>alert(document.cookie)</script>}}
15896 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15901 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
15903 {{div style|" ><script>alert(document.cookie)</script>}}
15905 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15910 Bug 2304: HTML attribute safety (link)
15912 <div title="[[Main Page]]"></div>
15914 <div title="[[Main Page]]"></div>
15919 Bug 2304: HTML attribute safety (italics)
15921 <div title="''foobar''"></div>
15923 <div title="''foobar''"></div>
15928 Bug 2304: HTML attribute safety (bold)
15930 <div title="'''foobar'''"></div>
15932 <div title="'''foobar'''"></div>
15938 Bug 2304: HTML attribute safety (ISBN)
15940 <div title="ISBN 1234567890"></div>
15942 <div title="ISBN 1234567890"></div>
15947 Bug 2304: HTML attribute safety (RFC)
15949 <div title="RFC 1234"></div>
15951 <div title="RFC 1234"></div>
15956 Bug 2304: HTML attribute safety (PMID)
15958 <div title="PMID 1234567890"></div>
15960 <div title="PMID 1234567890"></div>
15965 Bug 2304: HTML attribute safety (web link)
15967 <div title="http://example.com/"></div>
15969 <div title="http://example.com/"></div>
15974 Bug 2304: HTML attribute safety (named web link)
15976 <div title="[http://example.com/ link]"></div>
15978 <div title="[http://example.com/ link]"></div>
15983 Bug 3244: HTML attribute safety (extension; safe)
15985 <div style="<nowiki>background:blue</nowiki>"></div>
15987 <div style="background:blue"></div>
15992 Bug 3244: HTML attribute safety (extension; unsafe)
15994 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
15996 <div style="/* insecure input */"></div>
16000 # More MSIE fun discovered by Tom Gilder
16003 MSIE CSS safety test: spurious slash
16005 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16007 <div style="/* insecure input */">evil</div>
16012 MSIE CSS safety test: hex code
16014 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16016 <div style="/* insecure input */">evil</div>
16021 MSIE CSS safety test: comment in url
16023 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16025 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16030 MSIE CSS safety test: comment in expression
16032 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16034 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16039 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16041 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16043 <p style="/* invalid control char */">A</p>
16048 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16050 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16051 <div style="top:EXPRESSION(alert())">B</div>
16053 <p style="/* insecure input */">A</p>
16054 <div style="/* insecure input */">B</div>
16059 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16061 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16062 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16064 <div style="/* insecure input */">A</div>
16065 <p style="/* insecure input */">B</p>
16070 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16072 <div style="background-image:url⁽javascript:alert())">A</div>
16073 <div style="background-image:url₍javascript:alert())">B</div>
16074 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16076 <div style="/* insecure input */">A</div>
16077 <div style="/* insecure input */">B</div>
16078 <p style="/* insecure input */">C</p>
16082 # FIXME: Parsoid fails to sanitize this! See T58846.
16087 title="data:text/html,<img src=1 onerror=alert(1)>"
16088 style="-o-link:attr(title);-o-link-source:current">X</div>
16090 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16095 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16097 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16098 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16099 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16100 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16101 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16102 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16103 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16105 <p style="/* insecure input */">A</p>
16106 <p style="/* insecure input */">B</p>
16107 <p style="/* insecure input */">C</p>
16108 <p style="/* insecure input */">D</p>
16109 <p style="/* insecure input */">E</p>
16110 <p style="/* insecure input */">F</p>
16111 <p style="/* insecure input */">G</p>
16116 Table attribute legitimate extension
16119 !+ style="<nowiki>color:blue</nowiki>"| status
16124 <th style="color:blue"> status
16130 Table attribute safety
16133 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16138 <th style="/* insecure input */"> status
16144 CSS line continuation 1
16146 <div style="background-image: u\ rl(test.jpg);"></div>
16148 <div style="/* insecure input */"></div>
16153 CSS line continuation 2
16155 <div style="background-image: u\ rl(test.jpg); "></div>
16157 <div style="/* invalid control char */"></div>
16168 Expansion of multi-line templates in attribute values (bug 6255)
16170 <div style="background: {{identity|#00FF00}}">-</div>
16172 <div style="background: #00FF00">-</div>
16178 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16180 <div style="background:
16183 <div style="background: #00FF00">-</div>
16186 <div style="background:
16191 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16193 <div style="background: #00FF00">-</div>
16195 <div style="background: #00FF00">-</div>
16200 evil <math>-wiki-tags without Extension:Math enabled
16202 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16204 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16208 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16211 Parser hook: empty input
16222 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16225 ## Don't expect parsoid to rt this form.
16227 Parser hook: empty input using terminated empty elements
16229 parsoid=wt2html,html2html
16240 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16244 Parser hook: empty input using terminated empty elements (space before)
16255 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16259 Parser hook: basic input
16270 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16273 ## Don't expect parsoid to rt this form.
16275 Parser hook: case insensitive
16277 parsoid=wt2html,html2html
16288 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16291 ## Don't expect parsoid to rt this form.
16293 Parser hook: case insensitive, redux
16295 parsoid=wt2html,html2html
16306 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16310 Parser hook: nested tags
16314 <tag><tag></tag></tag>
16323 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16327 Parser hook: basic arguments
16329 <tag width="200" height="100" depth="50" square=""></tag>
16342 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16345 ## Don't expect parsoid to rt this form.
16347 Parser hook: basic arguments, variations
16349 parsoid=wt2html,html2html
16351 <tag width=200 height = "100" depth = '50' square></tag>
16364 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16368 Parser hook: argument containing a forward slash (bug 5344)
16370 <tag filename="/tmp/bla"></tag>
16375 'filename' => '/tmp/bla',
16380 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16383 ## Don't expect parsoid to rt this form.
16385 Parser hook: empty input using terminated empty elements (bug 2374)
16387 parsoid=wt2html,html2html
16399 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16402 # </tag> should be output literally since there is no matching tag that begins it
16404 Parser hook: basic arguments using terminated empty elements (bug 2374)
16406 <tag width=200 height = "100" depth = '50' square/>
16425 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16429 Parser hook: static parser hook not inside a comment
16431 <statictag>hello, world</statictag>
16433 <statictag action="flush" />
16439 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16440 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
16444 Parser hook: static parser hook inside a comment
16446 <!-- <statictag>hello, world</statictag> -->
16447 <statictag action="flush" />
16452 <!-- <statictag>hello, world</statictag> -->
16453 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
16456 # Nested template calls; this case was broken by Parser.php rev 1.506,
16460 Template:One-parameter
16462 (My parameter is: {{{1}}})
16466 Template:Map-one-parameter
16468 {{{{{1}}}|{{{2}}}}}
16472 Nested template calls
16474 {{Map-one-parameter|One-parameter|param}}
16476 <p>(My parameter is: param)
16485 # HTML+Tidy effectively strips out the empty tags completely
16486 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16487 # which Tidy would have done for the PHP parser had there been content inside it.
16489 Sanitizer: Closing of open tags
16491 <s></s><table></table>
16493 <s></s><table></table>
16496 <p><s></s></p><table></table>
16500 Sanitizer: Closing of open but not closed tags
16509 Sanitizer: Closing of closed but not open tags
16519 Sanitizer: Closing of closed but not open table tags
16523 Table not started</td></tr></table>
16525 <p>Table not started</p>
16527 <p>Table not started</p>
16531 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16533 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16535 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16539 # In HTML5, the restrictions are that id must contain at least one character,
16540 # and must not contain any space characters.
16542 Sanitizer: Validating the contents of the id attribute (bug 4515)
16546 <br id="" /><br id="a space" />
16551 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16553 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16557 <br id="foo" /><br id="foo" />
16559 Something need to be done. foo-2 ?
16563 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16566 <meta itemprop="hello" content="world">
16567 <meta http-equiv="refresh" content="5">
16568 <meta itemprop="hello" http-equiv="refresh" content="5">
16569 <link itemprop="hello" href="{{SERVER}}">
16570 <link rel="stylesheet" href="{{SERVER}}">
16571 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16575 <p> <meta itemprop="hello" content="world" />
16576 <meta http-equiv="refresh" content="5">
16577 <meta itemprop="hello" content="5" />
16579 <link itemprop="hello" href="http://example.org" />
16580 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16581 <link itemprop="hello" href="http://example.org" />
16587 Language converter: output gets cut off unexpectedly (bug 5757)
16591 this bit is safe: }-
16593 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16595 then we get cut off here: }-
16597 all additional text is vanished
16599 <p>this bit is safe: }-
16600 </p><p>but if we add a conversion instance: xxx
16601 </p><p>then we get cut off here: }-
16602 </p><p>all additional text is vanished
16607 Self closed html pairs (bug 5487)
16610 <center><font id="bug" />Centered text</center>
16611 <div><font id="bug2" />In div text</div>
16613 <center><font id="bug" />Centered text</center>
16614 <div><font id="bug2" />In div text</div>
16623 Punctuation: nbsp before exclamation
16627 <p>C'est grave !
16632 Punctuation: CSS !important (bug 11874)
16634 <div style="width:50% !important">important</div>
16636 <div style="width:50% !important">important</div>
16641 Punctuation: CSS ! important (bug 11874; with space after)
16643 <div style="width:50% ! important">important</div>
16645 <div style="width:50% ! important">important</div>
16650 HTML bullet list, closed tags (bug 5497)
16663 <ul data-parsoid='{"stx":"html"}'>
16664 <li data-parsoid='{"stx":"html"}'>One</li>
16665 <li data-parsoid='{"stx":"html"}'>Two</li>
16671 HTML bullet list, unclosed tags (bug 5497)
16683 <ul data-parsoid='{"stx":"html"}'>
16684 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16685 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16691 HTML ordered list, closed tags (bug 5497)
16704 <ol data-parsoid='{"stx":"html"}'>
16705 <li data-parsoid='{"stx":"html"}'>One</li>
16706 <li data-parsoid='{"stx":"html"}'>Two</li>
16712 HTML ordered list, unclosed tags (bug 5497)
16725 <ol data-parsoid='{"stx":"html"}'>
16726 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16727 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16733 HTML nested bullet list, closed tags (bug 5497)
16758 HTML nested bullet list, open tags (bug 5497)
16795 HTML nested ordered list, closed tags (bug 5497)
16820 HTML nested ordered list, open tags (bug 5497)
16857 HTML ordered list item with parameters oddity
16859 <ol><li id="fragment">One</li>
16862 <ol><li id="fragment">One</li>
16867 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16869 bug 5918: autonumbering
16871 [http://first/] [http://second] [ftp://ftp]
16875 [mailto:enclosed@mail.tld With target]
16877 [mailto:enclosed@mail.tld]
16879 mailto:inline@mail.tld
16881 <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>
16882 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16883 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16884 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16885 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16888 <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>
16889 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16890 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16891 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16892 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16897 # Security and HTML correctness
16898 # From Nick Jenkins' fuzz testing
16902 Fuzz testing: Parser13
16917 Fuzz testing: Parser14
16922 <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>
16923 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16925 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16931 <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>
16933 <div id="toc" class="toc">
16934 <div id="toctitle">
16938 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16945 Fuzz testing: Parser14-table
16950 <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>
16951 <table style="__TOC__">
16956 <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>
16957 <table style="__TOC__">
16964 # Known to produce bogus xml (extra </td>)
16966 Fuzz testing: Parser16
16995 Fuzz testing: Parser21
16998 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17003 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17013 Fuzz testing: Parser22
17015 http://===r:::https://b
17019 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17027 # Known to produce bad XML for now
17029 Fuzz testing: Parser24
17036 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17037 <br style="onmouseover='alert(document.cookie);' " />
17039 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17044 <u class="|">}}}} >
17045 <br style="onmouseover='alert(document.cookie);'" />
17047 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17056 # Note: the current result listed for this is not what the original one was,
17057 # but the original bug was JavaScript injection, which is fixed in any case.
17058 # It's not clear that the original result listed was any more correct than the
17059 # current one. Original result:
17062 # <li class="||">
17063 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17065 Fuzz testing: Parser25 (bug 6055)
17071 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17073 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17078 Fuzz testing: URL adjacent extension (with space, clean)
17080 http://example.com <nowiki>junk</nowiki>
17082 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17085 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17089 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17091 http://example.com<nowiki>junk</nowiki>
17093 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17096 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17100 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17102 http://example.com<pre>junk</pre>
17104 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17107 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17112 <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>
17116 Fuzz testing: image with bogus manual thumbnail
17118 [[Image:foobar.jpg|thumbnail= ]]
17120 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17123 <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>
17127 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17129 <pre dir=" "></pre>
17131 <pre dir=" "></pre>
17136 Parsing optional HTML elements (Bug 6171)
17141 <td> Some tabular data</td>
17142 <td> More tabular data ...
17143 <td> And yet som tabular data</td>
17149 <td> Some tabular data</td>
17150 <td> More tabular data ...
17151 </td><td> And yet som tabular data</td>
17158 Correct handling of <td>, <tr> (Bug 6171)
17163 <td> Some tabular data</td>
17164 <td> More tabular data ...</td>
17165 <td> And yet som tabular data</td>
17171 <td> Some tabular data</td>
17172 <td> More tabular data ...</td>
17173 <td> And yet som tabular data</td>
17181 Parsing crashing regression (fr:JavaScript)
17185 <p></body></x>
17190 Inline wiki vs wiki block nesting
17196 <p><b>Bold paragraph</b>
17197 </p><p>New wiki paragraph
17201 # FIXME: The current php output is documented
17202 # and desired output is the parsoid target.
17204 Inline HTML vs wiki block nesting
17210 <p><b>Bold paragraph
17211 </p><p>New wiki paragraph</b>
17214 <p><b>Bold paragraph</b>
17215 </p><p>New wiki paragraph
17219 # Original result was this:
17220 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17222 # While that might be marginally more intuitive, maybe, the six-apostrophe
17223 # construct is clearly pathological and the result stated here (which is what
17224 # the parser actually does) is about as reasonable as anything.
17226 Mixing markup for italics and bold
17229 '''bold''''''bold''bolditalics'''''
17231 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17239 Article for special page transclusion test
17243 Special page transclusion
17246 {{Special:Prefixindex/Xyzzyx}}
17248 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17254 Special page transclusion twice (bug 5021)
17257 {{Special:Prefixindex/Xyzzyx}}
17258 {{Special:Prefixindex/Xyzzyx}}
17260 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17262 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17268 Transclusion of default MediaWiki message
17270 {{MediaWiki:Mainpage}}
17277 Transclusion of nonexistent MediaWiki message
17279 {{MediaWiki:Mainpagexxx}}
17281 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17286 Transclusion of MediaWiki message with underscore
17288 {{MediaWiki:history_short}}
17295 Transclusion of MediaWiki message with space
17297 {{MediaWiki:history short}}
17304 Invalid header with following text
17314 Section extraction test (section 0)
17334 Section extraction test (section 1)
17356 Section extraction test (section 2)
17377 Section extraction test (section 3)
17397 Section extraction test (section 4)
17421 Section extraction test (section 5)
17441 Section extraction test (section 6)
17462 Section extraction test (section 7)
17482 Section extraction test (section 8)
17502 Section extraction test (section 9)
17523 Section extraction test (section 10)
17543 Section extraction test (nonexistent section 11)
17562 Section extraction test with bogus heading (section 1)
17567 ==bogus== not a legal section
17571 ==bogus== not a legal section
17575 Section extraction test with bogus heading (section 2)
17580 ==bogus== not a legal section
17587 Section extraction test with comment after heading (section 1)
17599 Section extraction test with comment after heading (section 2)
17611 Section extraction test with bogus <nowiki> heading (section 1)
17616 ==bogus== <nowiki>not a legal section</nowiki>
17620 ==bogus== <nowiki>not a legal section</nowiki>
17624 Section extraction test with bogus <nowiki> heading (section 2)
17629 ==bogus== <nowiki>not a legal section</nowiki>
17635 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17636 # instead of respecting commented sections
17638 Section extraction prefixed by comment (section 1)
17649 Section extraction prefixed by comment (section 2)
17659 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17660 # instead of respecting HTML-style headings
17662 Section extraction, mixed wiki and html (section 1)
17678 Section extraction, mixed wiki and html (section 2)
17694 # Formerly testing for bug 3342
17696 Section extraction, heading surrounded by <noinclude>
17700 <noinclude>==unmarked==</noinclude>
17706 # Test behavior of bug 19910
17708 Sectiion with all-equals
17713 The line above must have a trailing space
17716 But just in case it doesn't...
17720 But just in case it doesn't...
17724 Section replacement test (section 0)
17755 Section replacement test (section 1)
17784 Section replacement test (section 2)
17814 Section replacement test (section 3)
17845 Section replacement test (section 4)
17872 Section replacement test (section 5)
17903 Section replacement test (section 6)
17933 Section replacement test (section 7)
17964 Section replacement test (section 8)
17995 Section replacement test (section 9)
18024 Section replacement test (section 10)
18054 Section replacement test with initial whitespace (bug 13728)
18058 Preformatted initial line
18062 Preformatted initial line
18069 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18081 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18094 Section extraction, <pre> around bogus header (bug 10309)
18111 Section replacement, <pre> around bogus header (bug 10309)
18113 noxml replace=2,"xxx"
18133 Handling of 
 in URLs
18137 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18140 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18142 a</a></li></ul></li></ul>
18146 Handling of %0A in URLs
18150 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18153 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18157 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18159 5 quotes, code coverage +1 line
18166 <p><b><i></i></b></p>
18169 # same html as previous, but wikitext adjusted to match parsoid html2wt
18170 # note that wt2html and html2html will put the <i> before the <b>
18172 5 quotes, code coverage +1 line w/ nowiki (1)
18174 parsoid=wt2wt,html2wt
18176 '''''<nowiki/>'''''
18181 <p><b><i></i></b></p>
18184 # same as previous, just swapping the <i> and <b>
18186 5 quotes, code coverage +1 line w/ nowiki (2)
18188 '''''<nowiki/>'''''
18193 <p><i><b></b></i></p>
18197 Special:Search page linking.
18201 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18206 {{!}} is a magic word
18208 {{!}} is a magic word there and {{!}} is still a magic word here
18209 | is not a magic word here but {{!}} is still a magic word here
18211 <p>| is a magic word there and | is still a magic word here
18212 | is not a magic word here but | is still a magic word here
18215 <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
18216 | 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>
18223 title=[[Parser test]]
18228 * {{FULLPAGENAMEE}}
18230 * {{BASEPAGENAMEE}}
18234 * {{ROOTPAGENAMEE}}
18236 * {{TALKPAGENAMEE}}
18237 * {{SUBJECTPAGENAME}}
18238 * {{SUBJECTPAGENAMEE}}
18241 * {{NAMESPACENUMBER}}
18245 * {{SUBJECTSPACEE}}
18246 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18248 <ul><li> Parser test</li>
18249 <li> Parser_test</li>
18250 <li> Parser test</li>
18251 <li> Parser_test</li>
18252 <li> Parser test</li>
18253 <li> Parser_test</li>
18254 <li> Parser test</li>
18255 <li> Parser_test</li>
18256 <li> Parser test</li>
18257 <li> Parser_test</li>
18258 <li> Talk:Parser test</li>
18259 <li> Talk:Parser_test</li>
18260 <li> Parser test</li>
18261 <li> Parser_test</li>
18269 <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>
18272 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18282 image4 |300px| centre
18283 image5.svg| http://///////
18288 <ul class="gallery mw-gallery-traditional">
18289 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18290 <div class="thumb" style="height: 150px;">Image1.png</div>
18291 <div class="gallerytext">
18294 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18295 <div class="thumb" style="height: 150px;">Image2.gif</div>
18296 <div class="gallerytext">
18301 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18302 <div class="thumb" style="height: 150px;">Image3</div>
18303 <div class="gallerytext">
18306 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18307 <div class="thumb" style="height: 150px;">Image4</div>
18308 <div class="gallerytext">
18313 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18314 <div class="thumb" style="height: 150px;">Image5.svg</div>
18315 <div class="gallerytext">
18316 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18320 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18321 <div class="thumb" style="height: 150px;">* image6</div>
18322 <div class="gallerytext">
18330 Gallery (with options)
18332 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18333 File:Nonexistent.jpg|caption
18334 File:Nonexistent.jpg
18335 image:foobar.jpg|some '''caption''' [[Main Page]]
18337 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18340 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18341 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18342 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18343 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18344 <div class="gallerytext">
18349 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18350 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18351 <div class="gallerytext">
18354 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18355 <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>
18356 <div class="gallerytext">
18357 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18361 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18362 <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>
18363 <div class="gallerytext">
18366 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18367 <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>
18368 <div class="gallerytext">
18378 Gallery with link that has fragment
18381 image:foobar.jpg|link=Main_Page
18382 image:foobar.jpg|link=Main_Page#section
18383 image:foobar.jpg|link=Main Page#section|caption
18386 <ul class="gallery mw-gallery-traditional">
18387 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18388 <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>
18389 <div class="gallerytext">
18392 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18393 <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>
18394 <div class="gallerytext">
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/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>
18399 <div class="gallerytext">
18409 Gallery with wikitext inside caption
18412 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18413 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18416 <ul class="gallery mw-gallery-traditional">
18417 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18418 <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>
18419 <div class="gallerytext">
18420 <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>
18424 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18425 <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>
18426 <div class="gallerytext">
18427 <p>This is a test template
18436 gallery (with showfilename option)
18438 <gallery showfilename>
18439 File:Nonexistent.jpg|caption
18440 File:Nonexistent.jpg
18441 image:foobar.jpg|some '''caption''' [[Main Page]]
18445 <ul class="gallery mw-gallery-traditional">
18446 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18447 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18448 <div class="gallerytext">
18449 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18454 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18455 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18456 <div class="gallerytext">
18457 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18461 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18462 <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>
18463 <div class="gallerytext">
18464 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18465 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18469 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18470 <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>
18471 <div class="gallerytext">
18472 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18481 Gallery (with namespace-less filenames)
18484 File:Nonexistent.jpg
18490 <ul class="gallery mw-gallery-traditional">
18491 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18492 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18493 <div class="gallerytext">
18496 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18497 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18498 <div class="gallerytext">
18501 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18502 <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>
18503 <div class="gallerytext">
18506 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18507 <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>
18508 <div class="gallerytext">
18516 HTML Hex character encoding (spells the word "JavaScript")
18518 parsoid=wt2html,wt2wt,html2html
18520 JavaScript
18522 <p>JavaScript
18527 <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>
18531 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18535 <p>&#xsee;&#XSEE;
18538 <p>&#xsee;&#XSEE;</p>
18542 HTML Hex character encoding mixed case
18544 parsoid=wt2html,wt2wt,html2html
18553 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18556 # See: http://www.w3.org/TR/html5/syntax.html#character-references
18557 # Note that U+000C (form feed) is not a valid XML character, so
18558 # it is banned even though allowed in HTML5.
18560 Illegal character references (T106578)
18565 ; Control (low): 
18566 ; Control (high):  Ÿ
18567 ; Surrogate: ��
18568 ; This is an okay astral character: 💩
18577 <dt>Control (low)</dt>
18579 <dt>Control (high)</dt>
18580 <dd>&#x7F; &#x9F;</dd>
18582 <dd>&#xD83D;&#xDCA9;</dd>
18583 <dt>This is an okay astral character</dt>
18589 __FORCETOC__ override
18601 ISBN 978-0-1234-56 789
18603 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18606 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18608 <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>
18612 ISBN followed by 5 spaces
18623 ISBN ISBN 1234567890
18625 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18628 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18631 # Uppercase X and lowercase x as well
18642 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18643 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
18644 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18645 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
18646 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18647 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
18650 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18651 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
18652 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18653 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
18654 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
18655 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
18659 ISBN with empty prefix (parsoid test)
18663 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18666 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
18670 Bug 22905: <abbr> followed by ISBN followed by </a>
18672 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18674 <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>
18677 <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>
18685 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18690 Double RFC with a wiki link
18694 <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>
18703 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18706 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18710 Centre-aligned image
18712 [[Image:foobar.jpg|centre]]
18714 <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>
18721 [[Image:foobar.jpg|none]]
18723 <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>
18728 Width + Height sized image (using px) (height is ignored)
18730 [[Image:foobar.jpg|640x480px]]
18732 <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>
18737 Width-sized image (using px, no following whitespace)
18739 [[Image:foobar.jpg|640px]]
18741 <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>
18746 Width-sized image (using px, with following whitespace - test regression from r39467)
18748 [[Image:foobar.jpg|640px ]]
18750 <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>
18755 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18757 [[Image:foobar.jpg| 640px]]
18759 <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>
18764 Image with page parameter
18768 [[File:LoremIpsum.djvu|page=2]]
18770 <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>
18773 <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>
18777 Another italics / bold test
18785 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18791 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18794 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18799 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18801 Images with the "|" character in the comment
18803 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18805 <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>
18808 <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>
18812 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18814 <html><script>alert(1);</script></html>
18816 <p><html><script>alert(1);</script></html>
18821 HTML with raw HTML ($wgRawHtml==true)
18825 <html><script>alert(1);</script></html>
18827 <p><script>alert(1);</script>
18832 Parents of subpages, one level up
18834 subpage title=[[Subpage test/L1/L2/L3]]
18838 <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>
18844 Parents of subpages, one level up, not named
18846 subpage title=[[Subpage test/L1/L2/L3]]
18850 <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>
18857 Parents of subpages, two levels up
18859 subpage title=[[Subpage test/L1/L2/L3]]
18865 <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
18866 </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>
18871 Parents of subpages, two levels up, without trailing slash or name.
18873 subpage title=[[Subpage test/L1/L2/L3]]
18882 Parents of subpages, two levels up, with lots of extra trailing slashes.
18884 subpage title=[[Subpage test/L1/L2/L3]]
18888 <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>
18893 Subpage test/L1/L2/L3Sibling
18899 Transclusion of a sibling page (one level up)
18901 subpage title=[[Subpage test/L1/L2/L3]]
18910 Transclusion of a child page
18912 subpage title=[[Subpage test/L1/L2]]
18921 Non-transclusion because of too many up levels
18923 subpage title=[[Subpage test/L1/L2/L3]]
18925 {{../../../../More than parent}}
18927 <p>{{../../../../More than parent}}
18932 Definition list code coverage
18938 <dl><dt> title  </dt>
18940 <dt> title </dt>
18946 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18947 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18948 <dt>title</dt><dd> def</dd></dl>
18952 Don't fall for the self-closing div
18954 <div>hello world</div/>
18956 <div>hello world</div>
18965 <p>[[:Template:Msg]]
18974 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18978 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18980 Always escape literal '>' in output, not just after '<'
18994 <p>This is a test template
18995 This is a test template
19007 Inclusion of !userCanEdit() content
19011 <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>
19017 Out-of-order TOC heading levels
19026 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19028 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19030 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19031 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19034 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19036 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19037 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19043 <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>
19044 <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>
19045 <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>
19046 <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>
19047 <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>
19048 <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>
19054 ISBN with a dummy number
19064 ISBN with space-delimited number
19068 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19074 ISBN with multiple spaces, no number
19093 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19094 </p><p>ISBN 12345678901
19100 ISBN with trailing year (bug 8110)
19102 ISBN 1-234-56789-0 - 2006
19104 ISBN 1 234 56789 0 - 2006
19106 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19107 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19115 {{anchorencode:foo bar©#%n}}
19117 <p>foo_bar.C2.A9.23.25n
19122 anchorencode trims spaces
19124 {{anchorencode: __pretty__please__}}
19131 anchorencode deals with links
19133 {{anchorencode: [[hello|world]] [[hi]]}}
19140 anchorencode deals with templates
19142 {{anchorencode: {{Foo}} }}
19149 anchorencode encodes like the TOC generator: (bug 18431)
19151 === _ +:.3A%3A&&]] ===
19152 {{anchorencode: _ +:.3A%3A&&]] }}
19155 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19156 <p>.2B:.3A.253A.26.26.5D.5D
19161 Bug 6200: blockquotes and paragraph formatting
19182 Bug 8293: Use of center tag ruins paragraph formatting
19203 Parsing of overlapping (improperly nested) inline html tags
19205 <span><s>x</span></s>
19207 <p><span><s>x</span></s></span>
19210 <p><span><s>x</s></span>
19215 ### Language variants related tests
19218 Self-link in language variants
19220 title=[[Dunav]] language=sr
19222 Both [[Dunav]] and [[Дунав]] are names for this river.
19224 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19235 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19237 title=[[Duna]] language=sr
19239 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19241 <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.
19246 Link to a section of a variant of this title shouldn't be parsed as self-link
19248 title=[[Duna]] language=sr
19250 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19252 <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.
19257 Link to pages in language variants
19261 Main Page can be written as [[Маин Паге]]
19263 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19269 Multiple links to pages in language variants
19273 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19275 <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>.
19281 Simple template in language variants
19287 <p>This is a test template
19293 Template with explicit namespace in language variants
19299 <p>This is a test template
19305 Basic test for template parameter in language variants
19309 {{парамтест|param=foo}}
19311 <p>This is a test template with parameter foo
19317 Simple category in language variants
19321 [[Category:МедиаWики Усер'с Гуиде]]
19323 <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>
19339 ## We used to, but no longer wt2wt this test since the default serializer
19340 ## will normalize all categories to serialize on their own line.
19341 ## This wikitext usage is going to be fairly uncommon in production and
19342 ## selser will take care of preserving formatting in those scenarios.
19344 Don't convert blue categorylinks to another variant (bug 33210)
19350 [[A]][[Category:分类]]
19352 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
19354 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19355 <link rel="mw:PageProp/Category" href="Category:分类"/>
19359 Stripping -{}- tags (language variants)
19363 Latin proverb: -{Ne nuntium necare}-
19365 <p>Latin proverb: Ne nuntium necare
19371 Prevent conversion with -{}- tags (language variants)
19373 language=sr variant=sr-ec
19375 Latinski: -{Ne nuntium necare}-
19377 <p>Латински: Ne nuntium necare
19383 Prevent conversion of text with -{}- tags (language variants)
19385 language=sr variant=sr-ec
19387 Latinski: -{Ne nuntium necare}-
19389 <p>Латински: Ne nuntium necare
19395 Prevent conversion of links with -{}- tags (language variants)
19397 language=sr variant=sr-ec
19401 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19407 -{}- tags within headlines (within html for parserConvert())
19409 language=sr variant=sr-ec
19413 <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>
19419 Explicit definition of language variant alternatives
19421 language=zh variant=zh-tw
19423 -{zh:China;zh-tw:Taiwan}-, not China
19425 <p>Taiwan, not China
19431 Conversion around HTML tags
19433 language=sr variant=sr-ec
19435 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19436 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19439 <span title="ЛаCтин">ски</span>
19445 Explicit session-wise language variant mapping (A flag and - flag)
19447 language=zh variant=zh-tw
19449 Taiwan is not China.
19450 But -{A|zh:China;zh-tw:Taiwan}- is China,
19451 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19452 and -{China}- is China.
19454 <p>Taiwan is not China.
19455 But Taiwan is Taiwan,
19456 (This should be stripped!)
19457 and China is China.
19462 Explicit session-wise language variant mapping (H flag for hide)
19464 language=zh variant=zh-tw
19466 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19469 <p>(This should be stripped!)
19475 Adding explicit conversion rule for title (T flag)
19477 language=zh variant=zh-tw showtitle
19479 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19482 <p>Should be stripped!
19487 Testing that changing the language variant here in the tests actually works
19489 language=zh variant=zh showtitle
19491 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19494 <p>Should be stripped!
19499 Recursive conversion of alt and title attrs shouldn't clear converter state
19501 language=zh variant=zh-cn showtitle
19503 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19504 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19508 Should be stripped<span title="Exclamation">!</span>
19513 Bug 24072: more test on conversion rule for title
19515 language=zh variant=zh-tw showtitle
19517 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19518 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19521 <p>This should be stripped!
19522 This won't take interferes with the title rule.
19527 Partly disable title conversion if variant == main language code
19529 language=zh variant=zh title=[[ZH]] showtitle
19531 -{T|zh-cn:CN;zh-tw:TW}-
19539 Partly disable title conversion if variant == main language code, more
19541 language=zh variant=zh title=[[ZH]] showtitle
19551 Raw output of variant escape tags (R flag)
19553 language=zh variant=zh-tw
19555 Raw: -{R|zh:China;zh-tw:Taiwan}-
19557 <p>Raw: zh:China;zh-tw:Taiwan
19562 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19564 language=zh variant=zh-cn
19566 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19573 Conversion rules from [numeric-only string] to [something else] (T48634)
19575 language=zh variant=zh-cn
19577 -{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
19584 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19586 language=zh variant=zh-cn
19588 -{H|zh-cn:foo;zh-tw:;}-foobar
19595 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19597 language=zh variant=zh-cn
19599 -{H|=>zh-cn:foo;}-foobar
19606 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19608 language=zh variant=zh-cn
19617 Nested using of manual convert syntax
19619 language=zh variant=zh-hk
19621 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19623 <p>Nested: Hello Hong Kong!
19628 Proper conversion of text in external links
19630 language=sr variant=sr-ec
19632 http://www.google.com
19633 gopher://www.google.com
19634 [http://www.google.com http://www.google.com]
19635 [gopher://www.google.com gopher://www.google.com]
19636 [https://www.google.com irc://www.google.com]
19637 [ftp://www.google.com www.google.com/ftp://dir]
19638 [//www.google.com www.google.com]
19640 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19641 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19642 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19643 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19644 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19645 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19646 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19651 Do not convert roman numbers to language variants
19653 language=sr variant=sr-ec
19657 <p>Фридрих IV је цар.
19662 Unclosed language converter markup "-{"
19673 Don't convert raw rule "-{R|=>}-" to "=>"
19684 Don't break link parsing if language converter markup is in the caption.
19686 language=sr variant=sr-ec
19688 [[Main Page|-{R|main page}-]]
19690 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19694 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19696 Don't break image parsing if language converter markup is in the caption.
19700 [[File:Foobar.jpg|-{R|caption}-]]
19702 <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>
19706 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19708 Don't break list handling if language converter markup is in the item.
19710 language=zh variant=zh-cn
19712 ;-{zh-cn:AAA;zh-tw:BBB}-
19714 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19721 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19723 Don't break table handling if language converter markup is in the cell.
19725 language=sr variant=sr-ec
19748 Bug 529: Uncovered bullet
19757 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19758 # Templates in Wikipedia rely on this behavior, as tidy has always been
19759 # enabled there. These tests are normally run *without* tidy, so specify the
19760 # full output here.
19761 # To test realistic parsing behavior, apply a tidy-like transformation to both
19762 # the expected output and your parser's output.
19764 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19766 ******* Foo {{bullet}}
19768 <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>
19774 Bug 529: Uncovered table already at line-start
19797 Bug 529: Uncovered bullet in parser function result
19799 * Foo {{lc:{{bullet}} }}
19807 Bug 5678: Double-parsed template argument
19809 {{lc:{{{1}}}|hello}}
19816 Bug 5678: Double-parsed template invocation
19818 {{lc:{{paramtest {{!}} param = hello }} }}
19820 <p>{{paramtest | param = hello }}
19825 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19828 title=[[Main Page]]
19830 {{PRVNÍVELKÉ:ěščř}}
19831 {{prvnívelké:ěščř}}
19851 Morwen/13: Unclosed link followed by heading
19858 <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>
19863 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19870 <h1><span class="mw-headline" id="heading">heading</span></h1>
19875 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19882 <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>
19897 Paragraphs inside divs (no extra line breaks)
19909 Paragraphs inside divs (extra line break on open)
19924 Paragraphs inside divs (extra line break on close)
19939 Paragraphs inside divs (extra line break on open and close)
19956 Nesting tags, paragraphs on lines which begin with <div>
19958 <div></div><strong>A
19961 <p><strong>A</strong></p>
19962 <p><strong>B</strong></p>
19970 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19972 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19974 <blockquote>Line one
19976 Line two</blockquote>
19978 <blockquote>Line one
19979 Line two</blockquote>
19983 <p>Line one Line two</p>
19988 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19993 Line two</blockquote>
19998 Line two</blockquote>
20003 Line two</blockquote>
20007 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20009 <blockquote>Line one
20014 <blockquote>Line one
20027 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20049 Paragraphs inside blockquotes/divs (no extra line breaks)
20051 <blockquote><div>Line one
20053 Line two</div></blockquote>
20055 <blockquote><div>Line one
20056 Line two</div></blockquote>
20061 Paragraphs inside blockquotes/divs (extra line break on open)
20066 Line two</div></blockquote>
20071 Line two</div></blockquote>
20076 Paragraphs inside blockquotes/divs (extra line break on close)
20078 <blockquote><div>Line one
20081 </div></blockquote>
20083 <blockquote><div>Line one
20086 </div></blockquote>
20091 Paragraphs inside blockquotes/divs (extra line break on open and close)
20097 </div></blockquote>
20103 </div></blockquote>
20108 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20110 wgLinkHolderBatchSize=0
20116 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20117 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20118 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20123 Free external link invading image caption
20125 [[Image:Foobar.jpg|thumb|http://x|hello]]
20127 <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>
20132 Bug 15196: localised external link numbers
20136 [http://en.wikipedia.org/]
20138 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20141 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20145 Multibyte character in padleft
20147 {{padleft:-Hello|7|Æ}}
20154 Multibyte character in padright
20156 {{padright:Hello-|7|Æ}}
20163 formatdate parser function
20165 {{#formatdate:2009-03-24}}
20167 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20172 formatdate parser function, with default format
20174 {{#formatdate:2009-03-24|mdy}}
20176 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20181 Spacing of numbers in formatted dates
20183 {{#formatdate:January 15}}
20185 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20190 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
20192 language=nl title=[[MediaWiki:Common.css]]
20194 {{#formatdate:2009-03-24|dmy}}
20196 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20209 Edit comment with link
20213 I like the [[Main Page]] a lot
20215 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20219 Edit comment with link and link text
20223 I like the [[Main Page|best pages]] a lot
20225 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20229 Edit comment with link and link text with suffix
20233 I like the [[Main Page|best page]]s a lot
20235 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20239 Edit comment with section link (non-local, eg in history list)
20241 comment title=[[Main Page]]
20243 /* External links */ removed bogus entries
20245 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20249 Edit comment with section link and text before it (non-local, eg in history list)
20251 comment title=[[Main Page]]
20253 pre-comment text /* External links */ removed bogus entries
20255 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>
20259 Edit comment with section link (local, eg in diff view)
20261 comment local title=[[Main Page]]
20263 /* External links */ removed bogus entries
20265 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20269 Edit comment with subpage link (bug 14080)
20273 title=[[Subpage test]]
20275 Poked at a [[/subpage]] here...
20277 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20281 Edit comment with subpage link and link text (bug 14080)
20285 title=[[Subpage test]]
20287 Poked at a [[/subpage|neat little page]] here...
20289 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20293 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20296 title=[[Subpage test]]
20298 Poked at a [[/subpage]] here...
20300 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20304 Edit comment with bare anchor link (local, as on diff)
20308 title=[[Main Page]]
20312 <a href="#section">#section</a>
20316 Edit comment with bare anchor link (non-local, as on history)
20319 title=[[Main Page]]
20323 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20327 Anchor starting with underscore
20333 <p><a href="#_ref">One</a>
20336 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20340 Id starting with underscore
20342 <div id="_ref"></div>
20344 <div id="_ref"></div>
20349 Space normalisation on autocomment (bug 22784)
20352 title=[[Main Page]]
20354 /* __hello__world__ */
20356 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20360 percent-encoding and + signs in comments (Bug 26410)
20364 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20366 <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>
20369 # Parsoid doesn't support this yet: see bug 73581
20370 # but it *should* omit the 'src' attribute if the image is bad.
20371 # PHP side of tests was disabled in
20372 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20373 # because of issues in the PHP parserTests infrastructure
20374 # (but the output below is indeed what the PHP side emits)
20376 Bad images - basic functionality
20379 !! DISABLED/html/php
20381 <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>
20385 Bad images - bug 16039: text after bad image disappears
20390 !! DISABLED/html/php
20396 <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>
20401 Verify that displaytitle works (bug #22501) no displaytitle
20405 wgAllowDisplayTitle=true
20406 wgRestrictDisplayTitle=false
20408 this is not the the title
20411 <p>this is not the the title
20416 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20421 wgAllowDisplayTitle=true
20422 wgRestrictDisplayTitle=false
20424 this is not the the title
20425 {{DISPLAYTITLE:whatever}}
20428 <p>this is not the the title
20433 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20438 wgAllowDisplayTitle=true
20439 wgRestrictDisplayTitle=true
20441 this is not the the title
20442 {{DISPLAYTITLE:whatever}}
20445 <p>this is not the the title
20450 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20455 wgAllowDisplayTitle=true
20456 wgRestrictDisplayTitle=true
20458 this is not the the title
20459 {{DISPLAYTITLE:screen}}
20462 <p>this is not the the title
20467 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20472 wgAllowDisplayTitle=false
20474 this is not the the title
20475 {{DISPLAYTITLE:screen}}
20478 <p>this is not the the title
20479 <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>
20484 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20489 wgAllowDisplayTitle=false
20491 this is not the the title
20494 <p>this is not the the title
20499 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20504 wgAllowDisplayTitle=true
20505 wgRestrictDisplayTitle=true
20507 this is not the the title
20508 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20510 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20511 <p>this is not the the title
20516 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20521 wgAllowDisplayTitle=true
20522 wgRestrictDisplayTitle=true
20524 this is not the the title
20525 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20527 <span style="color: red;">s</span>creen
20528 <p>this is not the the title
20533 Page status indicators: Empty name is invalid
20537 <indicator name=" "></indicator>
20538 <indicator></indicator>
20540 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20541 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20546 Page status indicators: Weird syntaxes that are okay
20550 <indicator name="empty" />
20551 <indicator name="name"></indicator>
20560 Page status indicators: Torture test
20564 <indicator name="01">hello world</indicator>
20565 <indicator name="02">[[Main Page]]</indicator>
20566 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20567 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20568 <indicator name="05">* foo
20570 <indicator name="06"><nowiki>foo</nowiki></indicator>
20571 <indicator name="07"> Preformatted</indicator>
20572 <indicator name="08"><div>Broken tag</indicator>
20573 <indicator name="09">{| class=wikitable
20576 <indicator name="10">Two
20578 paragraphs</indicator>
20581 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20582 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" />
20583 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>
20584 05=<ul><li> foo</li>
20588 07=<pre>Preformatted
20590 08=<div>Broken tag</div>
20592 09=<table class="wikitable">
20609 preload: check <noinclude> and <includeonly>
20613 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20619 preload: check <onlyinclude>
20623 Goodbye <onlyinclude>Hello world</onlyinclude>
20629 preload: can pass tags through if we want to
20633 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20635 <includeonly>Hello world</includeonly>
20639 preload: check that it doesn't try to do tricks
20643 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20645 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20649 Play a bit with r67090 and bug 3158
20651 <div style="width:50% !important"> </div>
20652 <div style="width:50% !important"> </div>
20653 <div style="width:50% !important"> </div>
20654 <div style="border : solid;"> </div>
20656 <div style="width:50% !important"> </div>
20657 <div style="width:50% !important"> </div>
20658 <div style="width:50% !important"> </div>
20659 <div style="border : solid;"> </div>
20662 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20663 <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>
20664 <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>
20665 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20670 HTML5 data attributes
20672 <span data-foo="bar">Baz</span>
20673 <p data-abc-def_hij="">Quuz</p>
20675 <p><span data-foo="bar">Baz</span>
20677 <p data-abc-def_hij="">Quuz</p>
20680 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
20681 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
20685 Strip reserved data attributes
20687 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
20689 <div data-ok="fred">d</div>
20694 percent-encoding and + signs in internal links (Bug 26410)
20696 [[User:+%]] [[Page+title%]]
20697 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20698 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20699 [[%33%45]] [[%33%45+]]
20701 <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>
20702 <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>
20703 <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>
20704 <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>
20707 <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>
20708 <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>
20709 <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>
20710 <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>
20714 Special characters in embedded file links (bug 27679)
20716 [[File:Contains & ampersand.jpg]]
20717 [[File:Does not exist.jpg|Title with & ampersand]]
20719 <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>
20720 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20723 <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>
20724 <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>
20728 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20730 Text's been normalized?
20732 <p>Text's been normalized?
20737 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20739 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20741 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20746 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20748 [http://www.example.org/ ideograms]
20750 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20755 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20757 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20759 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20783 Bug 31098 Template which includes system messages which includes the template
20787 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20788 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20793 Bug31490 Turkish: ucfirst 'blah'
20804 Bug31490 Turkish: ucfirst 'ix'
20815 Bug31490 Turkish: lcfirst 'BLAH'
20826 Bug31490 Turkish: ucfırst (with a dotless i)
20832 <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>
20837 Bug31490 ucfırst (with a dotless i) with English language
20843 <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>
20848 Bug 26375: TOC with italics
20850 title=[[Main Page]]
20853 == ''Lost'' episodes ==
20855 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20857 <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>
20861 <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>
20866 Bug 26375: TOC with bold
20868 title=[[Main Page]]
20871 == '''should be bold''' then normal text ==
20873 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20875 <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>
20879 <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>
20884 Bug 33845: Headings become cursive in TOC when they contain an image
20886 title=[[Main Page]]
20889 == Image [[Image:foobar.jpg]] ==
20891 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20893 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20897 <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>
20902 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20904 title=[[Main Page]]
20907 == <blockquote>Quote</blockquote> ==
20909 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20911 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20915 <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>
20919 <div id="toc" class="toc">
20920 <div id="toctitle">
20924 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20928 <h2><span class="mw-headline" id="Quote"></span></h2>
20930 <p><span class="mw-headline" id="Quote">Quote</span></p>
20932 <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>
20936 Unclosed tags in TOC
20938 title=[[Main Page]]
20942 <small>Hanc marginis exiguitas non caperet.</small>
20945 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20947 <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>
20951 <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>
20952 <p><small>Hanc marginis exiguitas non caperet.</small>
20958 Multiple tags in TOC
20961 == <i>Foo</i> <b>Bar</b> ==
20963 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20965 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20967 <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>
20968 <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>
20972 <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>
20973 <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>
20977 <div id="toc" class="toc">
20978 <div id="toctitle">
20982 <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>
20983 <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>
20987 <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>
20988 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20990 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20992 <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>
20995 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
20996 # html5 tag parsing.
20998 Tags with parameters in TOC
21003 == <sup class="in-h2">Hello</sup> ==
21005 == <sup class="a > b">Evilbye</sup> ==
21007 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21009 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21010 <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>
21014 <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>
21015 <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>
21018 <meta property="mw:PageProp/toc" />
21019 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21021 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21025 span tags with directionality in TOC
21028 == <span dir="ltr">C++</span> ==
21030 == <span dir="rtl">זבנג!</span> ==
21032 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21034 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21036 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21038 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21040 <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>
21041 <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>
21042 <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>
21043 <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>
21044 <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>
21048 <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>
21049 <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>
21050 <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>
21051 <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>
21052 <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>
21057 Bug 72884: bdi element in ToC
21060 == <bdi>test</bdi> ==
21062 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21064 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21068 <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>
21072 # Note that the html output does not have the <p></p>, but the
21073 # html+tidy output *does*. This is because the empty <p></p> is
21074 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21076 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21081 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21083 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21087 <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>
21091 <div id="toc" class="toc">
21092 <div id="toctitle">
21096 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21100 <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>
21106 == {{int:headline_sample}} ==
21110 Bug 32057: Title needed when expanding <h> nodes.
21112 title=[[Main Page]]
21116 <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>
21121 Strip marker in urlencode
21123 {{urlencode:x<nowiki/>y}}
21124 {{urlencode:x<nowiki/>y|wiki}}
21125 {{urlencode:x<nowiki/>y|path}}
21126 {{urlencode:x<pre id="one">two</pre>y}}
21154 Strip marker in formatNum
21156 {{formatnum:1<nowiki/>2}}
21157 {{formatnum:1<nowiki/>2|R}}
21165 Check noCommafy in formatNum
21169 {{formatnum:123456.78}}
21170 {{formatnum:123456.78|NOSEP}}
21178 Wrong option for formatNum (bug 56199)
21180 {{formatnum:1,234.56|Random}}
21181 {{formatnum:1,234.56|EVERYTHING}}
21182 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21191 Strip marker in grammar
21195 {{grammar:elative|foo<nowiki/>bar}}
21202 Strip marker in padleft
21204 {{padleft:|2|x<nowiki/>y}}
21211 Strip marker in padright
21213 {{padright:|2|x<nowiki/>y}}
21220 Strip marker in anchorencode
21222 {{anchorencode:x<nowiki/>y}}
21229 nowiki inside link inside heading (bug 18295)
21231 ==[[foo|x<nowiki>y</nowiki>z]]==
21233 <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>
21238 new support for bdi element (bug 31817)
21240 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21242 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21247 Ignore pipe between table row attributes
21251 |- id=foo | style='color: red'
21259 <tr id="foo" style="color: red">
21266 Gallery override link with WikiLink (bug 34852)
21269 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21272 <ul class="gallery mw-gallery-traditional">
21273 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21274 <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>
21275 <div class="gallerytext">
21285 Gallery override link with absolute external link (bug 34852)
21288 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21291 <ul class="gallery mw-gallery-traditional">
21292 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21293 <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>
21294 <div class="gallerytext">
21304 Gallery override link with malicious javascript (bug 34852)
21307 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21310 <ul class="gallery mw-gallery-traditional">
21311 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21312 <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>
21313 <div class="gallerytext">
21323 Gallery with invalid title as link (bug 43964)
21326 File:foobar.jpg|link=<
21329 <ul class="gallery mw-gallery-traditional">
21330 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21331 <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>
21332 <div class="gallerytext">
21340 Language parser function
21349 Padleft and padright as substr
21351 {{padleft:|3|abcde}}
21352 {{padright:|3|abcde}}
21360 Special parser function
21362 {{#special:RandomPage}}
21363 {{#special:BaDtItLe}}
21364 {{#special:Foobar}}
21373 Bug 34939 - Case insensitive link parsing ([HttP://])
21375 [HttP://MediaWiki.Org/]
21377 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21380 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21384 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21386 [HttP://MediaWiki.Org/ MediaWiki]
21388 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21393 Bug 34939 - Case insensitive link parsing (HttP://)
21395 HttP://MediaWiki.Org/
21397 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21400 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21418 <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>
21419 <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>
21420 <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>
21421 <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>
21422 <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>
21428 ### Parsoid-specific tests
21429 ### Parsoid-PHP parser incompatibilities
21432 1. SOL-sensitive wikitext tokens as template-args
21434 parsoid=wt2html,wt2wt
21440 <span about="#mwt1" typeof="mw:Transclusion">
21441 </span><ul about="#mwt1"><li>a</li>
21443 <span about="#mwt2" typeof="mw:Transclusion">
21444 </span><ol about="#mwt2"><li>a</li>
21446 <span about="#mwt3" typeof="mw:Transclusion">
21447 </span><dl about="#mwt3"><dd>a</dd>
21451 #### -----------------------------------------------------------------
21452 #### Parsoid-specific functionality tests
21453 #### -----------------------------------------------------------------
21455 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21456 # We know wt2wt will fail, but we expect selser to pass.
21457 # Due to the nature of our testing, wt2wt and selser tests will enter the
21458 # blacklist and we'll catch selser regressions based on changes to the
21459 # blacklist entries for selser tests.
21461 1. Bad treebuilder fixup of formatting elt is cleaned up
21463 parsoid=wt2html,wt2wt
21468 [[Image:Foobar.jpg|right|Test]]
21475 <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>
21482 2. Bad treebuilder fixup of formatting elt is cleaned up
21484 parsoid=wt2html,wt2wt
21486 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21488 <small>[[Image:Foobar.jpg|right|300px]]</small>
21492 <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>
21494 <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>
21498 3. Bad treebuilder fixup of formatting elt is cleaned up
21500 parsoid=wt2html,wt2wt
21502 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21504 <p><small><b>foo</b></small></p>
21505 <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>
21506 <p><small><b>bar</b></small></p>
21510 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21512 parsoid=wt2html,wt2wt
21514 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21516 <p><b><small></small></b></p>
21517 <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>
21521 #### ----------------------------------------------------------------
21522 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
21523 #### tags. Parsoid's output for these tags differs from that of the
21525 #### ----------------------------------------------------------------
21528 Ref: 1. ref-location should be replaced with an index span
21531 B <ref name="x">foo</ref>
21535 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
21536 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>
21537 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>
21538 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21539 <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>
21540 <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>
21541 <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>
21546 Ref: 2. ref-tags with identical names should all get the same index
21548 A <ref name="x">foo</ref>
21552 <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>
21553 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>
21554 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21555 <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>
21560 Ref: 3. spaces in ref-names should be ignored
21562 A <ref name="x">foo</ref>
21563 B <ref name=" x " />
21567 <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>
21568 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>
21569 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>
21570 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21571 <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>
21575 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21577 Ref: 4. 'constructor' should be accepted as a valid ref-name
21579 A <ref name="constructor">foo</ref>
21582 <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>
21583 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21584 <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>
21589 Ref: 5. body should accept generic wikitext
21592 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
21597 <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>
21599 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21600 <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>
21606 Ref: 6. indent-pres should not be output in ref-body
21616 <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>
21618 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21619 <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
21627 Ref: 7. No p-wrapping in ref-body
21644 <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>
21646 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21647 <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
21662 Ref: 8. transclusion wikitext has lower precedence
21664 A <ref> foo {{echo|</ref> B C}}
21668 <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>
21669 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21670 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo {{echo|</span></li>
21675 Ref: 9. unclosed comments should not leak out of ref-body
21677 A <ref> foo <!--</ref> B C
21680 <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>
21681 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21682 <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 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21689 A <ref> <b> foo </ref> B C
21693 <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>
21696 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21697 <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>
21702 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21708 <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
21709 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>
21710 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21711 <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>
21712 <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>
21717 Ref: 12. ref-tags act as trailing newline migration barrier
21719 <!--the newline at the end of this line moves out of the p tag-->a
21721 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21727 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21730 <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>
21731 <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>
21734 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21735 <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>
21736 <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>
21740 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21747 <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
21748 <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>
21749 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21750 <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>
21751 <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
21757 Ref: 14. A nested ref-tag should be emitted as plain text
21759 <ref>foo <ref>bar</ref> baz</ref>
21763 <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>
21765 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21766 <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>
21771 Ref: 15. ref-tags with identical names should get identical indexes
21773 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21774 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21778 <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>
21779 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>
21781 <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>
21785 ## We don't bother wt2wt-ing non-standard whitespace
21787 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21795 <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>
21796 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21797 <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>
21801 Ref: 17. Generate valid HTML5 id/about attributes
21803 <ref name="a b">foo</ref>
21807 <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>
21810 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21811 <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>
21816 Ref: 18. T58916: Extension attributes should be parsed as plain text
21818 <ref name="{{echo|a}}">foo</ref>
21822 <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>
21825 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21826 <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>
21831 Ref: 19. ref-tags with identical name encodings should get identical indexes
21833 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21837 <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>
21839 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21840 <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>
21845 Ref: 20. ref-tags with identical names but different content should keep it
21847 A <ref name="foo">Foo one</ref>
21848 B <ref name="foo">Foo two</ref>
21849 C <ref name="foo" />
21853 <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>
21854 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>
21855 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>
21857 <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>
21862 References: 1. references tag without any refs should be handled properly
21866 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21870 References: 2. references tag with group only outputs references from that group
21872 A <ref group="a">foo</ref>
21873 B <ref group="b">bar</ref>
21876 <references group="a" />
21878 <references group="b" />
21880 <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>
21881 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>
21882 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>
21884 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21885 <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>
21887 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21888 <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>
21890 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21891 <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>
21896 References: 3. ref list should be cleared after processing references
21906 <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>
21908 <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>
21911 <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>
21913 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21914 <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>
21919 References: 4. only referenced group should be cleared after processing references
21921 A <ref group="a">afoo</ref>
21924 <references group="a" />
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":{"group":"a"}}'><a href="#cite_note-1" data-mw-group="a"><span class="mw-reflink-text">[a 1]</span></a></span>
21931 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>
21933 <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>
21936 <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>
21938 <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>
21943 References: 5. ref tags in references should be processed while ignoring all other content
21946 B <ref name="b">bar</ref>
21949 <ref name="a">foo</ref>
21950 This should just get lost.
21953 <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>
21954 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>
21957 <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>
21962 References: 6. <references /> from a transclusion
21964 <ref>Foo</ref> {{echo|<references />}}
21966 <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>
21971 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21973 A <ref>foo bar for a</ref>
21974 B <ref group="X" name="b" />
21978 <references group="X">
21979 <ref name="b">foo</ref>
21982 <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>
21983 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>
21986 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21987 <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>
21990 <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"}}'>
21991 <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>
21996 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
21998 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22001 <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>
22002 <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>
22006 # This test only works in wt2html now as the <references /> are always generated
22007 # unless selser is active. Once T72722 is fixed, we should add a changes test
22008 # here to ensure that unrelated changes don't add the new <references /> in
22011 References: 9. Generate missing references list at the end
22014 B <ref group="inexistent">bar</ref>
22016 <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>
22017 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22018 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
22020 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
22021 <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>
22026 References: 10. New <references/> shouldn't be added for unrelated edits.
22029 "modes": ["selser"],
22030 "changes": [["#x", "remove"]],
22034 Unrelated text<span id="x"> that's going to disappear</span>.
22042 Entities in ref name
22044 <ref name="test & me">hi</ref>
22047 <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>
22048 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22049 <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>
22053 # This test is wt2html only because we're permitting the serializer to produce
22054 # dirty diffs, normalizing the unclosed references to the self-closed version.
22056 Generate references for unclosed references tag
22064 <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>
22065 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22066 <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>
22070 New reference serializes on its own line
22072 parsoid=wt2wt,html2wt
22077 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22080 #### ----------------------------------------------------------------
22081 #### Parsoid-only testing of Parsoid's impl of LST
22082 #### Not implemented yet, see
22083 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22084 #### ----------------------------------------------------------------
22087 LST Sections: 1. Simple section start and end
22089 parsoid={ "suppressErrors": true }
22091 <section begin="2011-05-16" />
22092 <section end="2014-04-10 (MW 1.23wmf22)" />
22094 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22095 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22098 #--------- Test stripping of empty nodes in template content ----------
22100 Empty LI and TR nodes should be stripped from template content
22105 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22109 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22122 Empty LI and TR nodes should not be stripped from top-level content
22149 Empty TR nodes should not be stripped if they have any attributes set
22151 {{EmptyTRWithHTMLAttrTest}}
22153 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22154 <tr align="center"></tr>
22155 <tr><td>foo</td></tr>
22156 <tr align="center"></tr>
22157 <tr><td>bar</td></tr>
22161 #### ----------------------------------------------------------------
22162 #### The following section of tests are primarily to test
22163 #### wikitext escaping capabilities of Parsoid. Given that
22164 #### escaping can be done any number of ways, the wikitext (input)
22165 #### is always adjusted to reflect how Parsoid adds nowiki
22168 #### We are marking several tests as parsoid-only since the
22169 #### HTML in the result section is different from what the
22170 #### PHP parser generates for it.
22171 #### ----------------------------------------------------------------
22174 #### --------------- Headings ---------------
22176 #### 1. Nested inside html <h1>=foo=</h1>
22177 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22178 #### 3. Nested inside html with wikitext split by html tags
22179 #### 4. No escape needed
22180 #### 5. Empty headings <h1></h1>
22181 #### 6. Heading chars in SOL context
22182 #### ----------------------------------------
22184 Headings: 0. Unnested
22194 <p>=foo<i>a</i>=</p>
22196 <nowiki>=foo=</nowiki>
22198 <nowiki> </nowiki>=foo=
22200 <nowiki>=foo=</nowiki>
22202 =foo''a''<nowiki>=</nowiki>
22205 # New headings and existing headings are handled differently
22207 Headings: 1. Nested inside html
22215 <h1 data-parsoid=''>=foo=</h1>
22216 <h2 data-parsoid=''>=foo=</h2>
22217 <h3 data-parsoid=''>=foo=</h3>
22218 <h4 data-parsoid=''>=foo=</h4>
22219 <h5 data-parsoid=''>=foo=</h5>
22220 <h6 data-parsoid=''>=foo=</h6>
22228 =<nowiki>=foo=</nowiki>=
22229 ==<nowiki>=foo=</nowiki>==
22230 ===<nowiki>=foo=</nowiki>===
22231 ====<nowiki>=foo=</nowiki>====
22232 =====<nowiki>=foo=</nowiki>=====
22233 ======<nowiki>=foo=</nowiki>======
22238 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22247 <nowiki>*</nowiki>bar
22253 <nowiki>=bar=</nowiki>
22257 Headings: 3. Nested inside html with wikitext split by html tags
22261 <h1>=<b>bold</b>foo=</h1>
22263 = ='''bold'''<nowiki>foo=</nowiki> =
22267 Headings: 4a. No escaping needed (testing just h1 and h2)
22278 <h1><i>=</i>foo=</h1>
22298 Headings: 4b. No escaping needed (inside p-tags)
22313 Headings: 5. Empty headings
22317 <h1 data-parsoid='{}'></h1>
22319 <h2 data-parsoid='{}'></h2>
22321 <h3 data-parsoid='{}'></h3>
22323 <h4 data-parsoid='{}'></h4>
22325 <h5 data-parsoid='{}'></h5>
22327 <h6 data-parsoid='{}'></h6>
22337 =====<nowiki/>=====
22339 ======<nowiki/>======
22343 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22353 <nowiki>=a=</nowiki>
22355 <nowiki>=a=</nowiki>
22357 <nowiki>=a=</nowiki>
22361 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22374 <nowiki>=a=</nowiki>
22377 <nowiki>=a=</nowiki>
22380 <nowiki>=a=</nowiki>
22385 Headings: 6c. Heading chars in SOL context (leading newline break)
22393 <nowiki>=b=</nowiki>
22397 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22401 <!--c0--><p>=a=</p>
22403 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22405 <!--c0--><nowiki>=a=</nowiki>
22407 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22411 Headings: 6d. Heading chars in SOL context (No escaping needed)
22421 Headings: 7. Insert a newline between new content and headings
22427 <h2 data-parsoid='{}'>A</h2>
22428 <p data-parsoid='{}'>a</p>
22438 #### --------------- Lists ---------------
22439 #### 0. Outside nests (*foo, etc.)
22440 #### 1. Nested inside html <ul><li>*foo</li></ul>
22441 #### 2. Inside definition lists
22442 #### 3. Only bullets at start should be escaped
22443 #### 4. No escapes needed
22444 #### 5. No unnecessary escapes
22445 #### 6. Escape bullets in SOL position
22446 #### 7. Escape bullets in a multi-line context
22447 #### ----------------------------------------
22450 Lists: 0. Outside nests
22460 <nowiki>*</nowiki>foo
22462 <nowiki>#</nowiki>foo
22464 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
22468 Lists: 1. Nested inside html
22472 <ul><li>*foo</li></ul>
22473 <ul><li>#foo</li></ul>
22474 <ul><li>:foo</li></ul>
22475 <ul><li>;foo</li></ul>
22476 <ol><li>*foo</li></ol>
22477 <ol><li>#foo</li></ol>
22478 <ol><li>:foo</li></ol>
22479 <ol><li>;foo</li></ol>
22482 *<nowiki>*foo</nowiki>
22484 *<nowiki>#foo</nowiki>
22486 *<nowiki>:foo</nowiki>
22488 *<nowiki>;foo</nowiki>
22490 #<nowiki>*foo</nowiki>
22492 #<nowiki>#foo</nowiki>
22494 #<nowiki>:foo</nowiki>
22496 #<nowiki>;foo</nowiki>
22500 Lists: 2. Inside definition lists
22504 <dl><dt>;foo</dt></dl>
22505 <dl><dt>:foo</dt></dl>
22508 <dl><dd>:foo</dd></dl>
22511 ;<nowiki>;foo</nowiki>
22513 ;<nowiki>:foo</nowiki>
22515 ;<nowiki>:foo</nowiki>
22518 :<nowiki>:foo</nowiki>
22522 Lists: 3. Only bullets at start of text should be escaped
22526 <ul><li>*foo*bar</li></ul>
22527 <ul><li>*foo<i>it</i>*bar</li></ul>
22530 *<nowiki>*foo*bar</nowiki>
22532 *<nowiki>*foo</nowiki>''it''*bar
22536 Lists: 4. No escapes needed
22549 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22553 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22567 Lists: 5. No unnecessary escapes
22571 <ul><li> bar <span>[[foo]]</span></li></ul>
22572 <ul><li> =bar <span>[[foo]]</span></li></ul>
22573 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22574 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22575 <ul><li> =bar <span>foo]]</span>=</li></ul>
22576 <ul><li> <s></s>: a</li></ul>
22577 <ul><li> <i>* foo</i></li></ul>
22580 * bar <span><nowiki>[[foo]]</nowiki></span>
22582 * =bar <span><nowiki>[[foo]]</nowiki></span>
22584 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22586 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22588 * =bar <span>foo]]</span>=
22596 Lists: 6. Escape bullets in SOL position
22600 <p><!--cmt-->*foo</p>
22602 <!--cmt--><nowiki>*</nowiki>foo
22606 Lists: 7. Escape bullets in a multi-line context
22615 <nowiki>*</nowiki>b
22619 Lists: 8. Escape colons only if not present in tags
22623 <dl><dt>a:b<i>c:d</i></dt></dl>
22625 ; <nowiki>a:b</nowiki>''c:d''
22628 #### --------------- HRs ---------------
22629 #### 1. Single line
22630 #### -----------------------------------
22633 HRs: 1. Single line
22641 ----<nowiki>----</nowiki>
22646 #### --------------- Tables ---------------
22647 #### 1a. Simple example
22648 #### 1b. No escaping needed (!foo)
22649 #### 1c. No escaping needed (|foo)
22650 #### 1d. No escaping needed (|}foo)
22652 #### 2a. Nested in td (<td>foo|bar</td>)
22653 #### 2b. Nested in td (<td>foo||bar</td>)
22654 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22656 #### 3a. Nested in th (<th>foo!bar</th>)
22657 #### 3b. Nested in th (<th>foo!!bar</th>)
22658 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22662 #### 4c. No escaping needed
22663 #### --------------------------------------
22666 Tables: 1a. Simple example
22674 <nowiki>{|</nowiki>
22679 Tables: 1b. No escaping needed
22690 Tables: 1c. No escaping needed
22701 Tables: 1d. No escaping needed
22712 Tables: 2a. Nested in td
22717 <td>foo|bar</td></tr>
22718 <tr><td>x<div>a|b</div></td>
22722 |<nowiki>foo|bar</nowiki>
22724 |x<div><nowiki>a|b</nowiki></div>
22740 Tables: 2b. Nested in td
22746 <td>a<i>b||c</i></td>
22747 <td>a<i><div>b||c</div></i></td>
22748 </tr></tbody></table>
22751 |<nowiki>foo||bar</nowiki>
22752 |a''<nowiki>b||c</nowiki>''
22753 |a''<div><nowiki>b||c</nowiki></div>''
22762 <td>a<i><div>b||c</div></i>
22768 Tables: 2c. Nested in td -- no escaping needed
22786 Tables: 3a. Nested in th
22804 Tables: 3b. Nested in th
22809 <tr><th>foo!!bar</th>
22810 <th><i>foo|bar</i></th>
22811 <th><i>foo!!bar</i></th>
22812 <th><i><span>foo!!bar</span></i></th>
22813 </tr></tbody></table>
22816 !<nowiki>foo!!bar</nowiki>
22817 !''<nowiki>foo|bar</nowiki>''
22818 !''<nowiki>foo!!bar</nowiki>''
22819 !''<span><nowiki>foo!!bar</nowiki></span>''
22828 <th><i>foo!!bar</i>
22830 <th><i><span>foo!!bar</span></i>
22836 Tables: 3c. Nested in th
22841 <tr><th>foo||bar</th>
22842 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22843 </tr></tbody></table>
22846 !<nowiki>foo||bar</nowiki>
22847 !<nowiki>foo||bar</nowiki>
22860 Tables: 4a. Escape -
22879 |<nowiki>-bar</nowiki>
22884 Tables: 4b. Escape +
22903 |<nowiki>+bar</nowiki>
22908 Tables: 4c. No escaping needed
22913 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22914 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22920 <div>a|b</div></td>
22965 Tables: 4d. No escaping needed
22970 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22971 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22972 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22983 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22993 T97430: Don't emit empty nowiki pairs around marker meta tags
22997 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
22998 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23000 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23001 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23005 Unclosed xmlish element in table line shouldn't eat end delimiters
23010 <tbody><tr><td> <foo</td>
23011 <td> bar></td></tr>
23028 #### --------------- Links ----------------
23029 #### 1. Quote marks in link text
23030 #### 2. Wikilinks: Escapes needed
23031 #### 3. Wikilinks: No escapes needed
23032 #### 4. Extlinks: Escapes needed
23033 #### 5. Extlinks: No escapes needed
23034 #### --------------------------------------
23036 Links 1. WikiLinks: No escapes needed
23040 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23041 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23042 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23046 [[Foo|x [Foobar] x]]
23048 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23049 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23050 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23055 Links 2. WikiLinks: Escapes needed
23059 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23060 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23061 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23062 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23063 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23064 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23065 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23066 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23067 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23068 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23070 [[Foo|<nowiki>Foobar]</nowiki>]]
23071 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23072 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23073 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23074 [[Foo|<nowiki>|Bar</nowiki>]]
23075 [[Foo|<nowiki>]]bar</nowiki>]]
23076 [[Foo|<nowiki>[[bar</nowiki>]]
23077 [[Foo|<nowiki>x [[ y</nowiki>]]
23078 [[Foo|<nowiki>x ]] y</nowiki>]]
23079 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23081 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23082 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23083 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23084 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23085 <a href="/wiki/Foo" title="Foo">|Bar</a>
23086 <a href="/wiki/Foo" title="Foo">]]bar</a>
23087 <a href="/wiki/Foo" title="Foo">[[bar</a>
23088 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23089 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23090 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23095 Links 3. WikiLinks: No escapes needed
23099 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23100 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23105 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23106 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23111 Links 4. ExtLinks: Escapes needed
23115 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23116 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23117 <p>[http://google.com]</p>
23118 <p>[http://google.com google]</p>
23120 [http://google.com <nowiki>[google]</nowiki>]
23121 [http://google.com <nowiki>google]</nowiki>]
23123 <nowiki>[http://google.com]</nowiki>
23125 <nowiki>[http://google.com google]</nowiki>
23128 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23129 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23130 </p><p>[http://google.com]
23131 </p><p>[http://google.com google]
23136 Links 5. ExtLinks: No escapes needed
23140 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23142 [http://google.com [google]
23144 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23149 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23153 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23154 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23155 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23156 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23157 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23158 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23159 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23160 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23161 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23162 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23163 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23164 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23165 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23168 x<nowiki/>http://example.com<nowiki/>y
23169 http://example.com<nowiki/>?x
23170 http://example.com<nowiki/>&x
23171 http://example.com<nowiki/>'x
23172 http://example.com<nowiki/>,x
23173 http://example.com<nowiki/>.x
23174 http://example.com<nowiki/>;x
23175 http://example.com<nowiki/>:x
23176 http://example.com<nowiki/>;x
23177 http://example.com<nowiki/>!x
23178 http://example.com<nowiki/>=x
23179 http://example.com<nowiki/>(x)
23180 http://example.com(x<nowiki/>)
23184 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23189 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23191 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23192 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23193 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23194 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23195 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23201 "http://example.com"
23202 (http://example.com)
23203 (http://example.com) foo
23204 http://example.com,
23205 http://example.com, foo
23208 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
23210 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
23211 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23212 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23213 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23214 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23219 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23223 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23224 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23226 http://example.com.,;:!?\
23227 -http://example.com:
23229 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23230 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23235 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23239 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23240 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23241 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23245 X<nowiki/>RFC 123<nowiki/>y
23249 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23253 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23254 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23255 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23262 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23263 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23264 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23269 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23273 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23274 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23275 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23279 X<nowiki/>PMID 123<nowiki/>y
23283 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23287 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23288 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23289 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23296 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23297 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23298 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23303 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23307 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23308 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23309 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23312 ISBN 1234567890<nowiki/>1
23313 ISBN 1234567890<nowiki/>x
23314 a<nowiki/>ISBN 1234567890<nowiki/>b
23318 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23322 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23326 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23331 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23335 <p>this is not a link: http://example.com
23338 this is not a link: <nowiki>http://example.com</nowiki>
23342 Links 15. Link trails can't become link prefixes.
23347 <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>
23349 [[Söfnuður]]-[[00]]
23351 <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>
23355 #### --------------- Quotes ---------------
23356 #### 1. Quotes inside <b> and <i>
23357 #### 2. Link fragments separated by <i> and <b> tags
23358 #### 3. Link fragments inside <i> and <b>
23359 #### 4. No escaping needed
23360 #### --------------------------------------
23362 1a. Quotes inside <b> and <i>
23373 <b>foo'<i>bar'</i>baz</b>
23382 <i>fools'<span> errand</span></i>
23383 <i><span>fool</span>'s errand</i>
23384 '<i>foo</i> bar '<i>baz</i>
23385 a|!*#-:;+-~[]{}b'<i>x</i>
23389 ''<nowiki>''foo''</nowiki>''
23390 ''<nowiki>'''foo'''</nowiki>''
23392 '''<nowiki/>'foo''''
23393 '''<nowiki>''foo''</nowiki>'''
23394 '''<nowiki>'''foo'''</nowiki>'''
23395 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23396 '''foo'''<nowiki/>'s
23402 '''foo'''<nowiki/>'
23403 ''''foo'''<nowiki/>'
23404 ''fools'<span> errand</span>''
23405 ''<span>fool</span>'s errand''
23406 '<nowiki/>''foo'' bar '''baz''
23407 a|!*#-:;+-~[]{}b'''x''
23411 1b. Quotes inside <b> and <i> with other tags on same line
23415 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23416 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23417 <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>
23418 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23419 '<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>
23420 '<i>foo</i> <div title="name">test</div>
23421 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23422 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23423 <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>
23426 '''a'' foo ''[[bar]]''
23427 ''a''' foo ''[[bar]]''
23428 ''a''' foo '''{{echo|[[bar]]}}'''
23429 [[foo]] x'''[[bar]]''
23430 '''foo'' <ref>test</ref>
23431 '''foo'' <div title="name">test</div>
23432 '''foo'' and <br> bar
23437 2. Link fragments separated by <i> and <b> tags
23441 <p>[[<i>foo</i>hello]]</p>
23442 <p>[[<b>foo</b>hello]]</p>
23444 [[''foo''<nowiki>hello]]</nowiki>
23446 [['''foo'''<nowiki>hello]]</nowiki>
23449 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23450 # this is one of the shortcomings of this format
23452 3. Link fragments inside <i> and <b>
23456 <p><i>[[foo</i>]]</p>
23457 <p><b>[[foo</b>]]</p>
23459 ''[[foo''<nowiki>]]</nowiki>
23461 '''[[foo'''<nowiki>]]</nowiki>
23465 4. No escaping needed
23469 <p>'<span><i>bar</i></span>'
23470 '<span><b>bar</b></span>'
23474 '<span>''bar''</span>'
23475 '<span>'''bar'''</span>'
23479 #### ----------- Paragraphs ---------------
23480 #### 1. No unnecessary escapes
23481 #### --------------------------------------
23484 1. No unnecessary escapes
23488 <p>bar <span>[[foo]]</span>
23489 </p><p>=bar <span>[[foo]]</span>
23490 </p><p>[[bar <span>[[foo]]</span>
23491 </p><p>]]bar <span>[[foo]]</span>
23492 </p><p>=bar <span>foo]]</span>=
23495 bar <span><nowiki>[[foo]]</nowiki></span>
23497 =bar <span><nowiki>[[foo]]</nowiki></span>
23499 [[bar <span><nowiki>[[foo]]</nowiki></span>
23501 ]]bar <span><nowiki>[[foo]]</nowiki></span>
23503 =bar <span>foo]]</span><nowiki>=</nowiki>
23506 #### ----------------------- PRE --------------------------
23507 #### 1. Leading whitespace in SOL context should be escaped
23508 #### ------------------------------------------------------
23510 1. Leading whitespace in SOL context should be escaped
23533 <nowiki> </nowiki>a
23535 <nowiki> </nowiki> a
23539 <nowiki> </nowiki> a
23541 <nowiki> </nowiki>a
23544 <nowiki> </nowiki>b
23567 2. Leading whitespace in non-indent-pre contexts should not be escaped
23571 <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>
23572 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23573 <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>
23583 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
23602 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
23606 <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>
23608 [[File:Foobar.jpg|thumb|caption]]
23612 5. Nowiki escaping should account for indent-pres
23622 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23635 #### --------------- Behavior Switches --------------------
23638 1. Valid behavior switches should be escaped
23645 <nowiki>__TOC__</nowiki>
23646 ''<nowiki>__TOC__</nowiki>''
23650 2. Invalid behavior switches should not be escaped
23661 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23663 Behavior switches should be SOL-transparent
23667 <meta property="mw:PageProp/toc" />
23669 <!-- this one's bogus -->
23672 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23674 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23678 <!-- this one's bogus -->
23687 #### --------------- HTML tags ---------------
23690 #### 3. multi-line html tag
23691 #### 4. extension tags
23692 #### -----------------------------------------
23698 <a href="http://google.com">google</a>
23700 <a href="http://google.com">google</a>
23708 <ul><li> <div>foo</div></li>
23709 <li> <div style="color:red">foo</div></li>
23710 <li> <td></li></ul>
23713 * <nowiki><div>foo</div></nowiki>
23714 * <nowiki><div style="color:red">foo</div></nowiki>
23715 * <nowiki><td></nowiki>
23719 3. multi-line html tag
23738 <p><ref>foo</ref>
23739 </p><p><ref>bar
23740 </p><p>baz</ref>
23743 <nowiki><ref>foo</ref></nowiki>
23745 <nowiki><ref>bar</nowiki>
23747 baz<nowiki></ref></nowiki>
23750 #### --------------- Others ---------------
23756 <p><nowiki>foo</nowiki>
23759 <nowiki>foo</nowiki>
23762 ## The quote-char in the input is necessary for triggering the bug
23764 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
23773 #----------- End of wikitext escaping tests --------------
23777 Tag-like HTML structures are passed through as text
23799 </p><p>1<d e>f
23804 HTML tag with necessary entities in attributes
23806 <span title="&amp;">foo</span>
23808 <p><span title="&amp;">foo</span>
23813 HTML tag with 'unnecessary' entity encoding in attributes
23815 <span title="&">foo</span>
23817 <p><span title="&">foo</span>
23822 HTML tag with broken attribute value quoting
23824 <span title="Hello world>Foo</span>
23826 <p><span title="Hello world">Foo</span>
23829 <p><span title="Hello world">Foo</span>
23834 Self-closed tag with broken attribute value quoting
23836 parsoid=wt2html,html2html
23838 <div title="Hello world />Foo
23840 <div title="Hello world"></div>
23843 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
23847 Table with broken attribute value quoting
23850 | title="Hello world|Foo
23855 <td title="Hello world">Foo
23861 <td title="Hello world">Foo
23867 Table with broken attribute value quoting on consecutive lines
23870 | title="Hello world|Foo
23871 | style="color:red|Bar
23876 <td title="Hello world">Foo
23878 <td style="color:red">Bar
23884 <td title="Hello world">Foo
23885 </td><td style="color: red">Bar
23886 </td></tr></tbody></table>
23891 2. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23901 1. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23911 Accept empty td cell attribute
23914 | align="center" | foo || |
23919 <td align="center"> foo </td>
23926 Non-empty attributes in th-cells
23929 ! Foo !! style="color: red" | Bar
23935 <th style="color: red"> Bar
23941 Accept empty attributes in th-cells
23956 Empty table rows go away
23977 ### Parsoid-centric tests for testing RTing of inter-element separators
23978 ### Edge cases not tested by existing parser tests and specific to
23979 ### Parsoid-specific serialization strategies.
23983 RT-ed inter-element separators should be valid separators
23995 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
23999 # Parsoid-only since PHP parser relies on Tidy for correct output
24001 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24015 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24016 <p>bar</p></small></td></tr>
24020 <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>
24024 # Note that the "style" attribute is really a template parameter here.
24025 # The = would have to be {{=}} if you wanted the literal.
24027 Empty TD followed by TD with tpl-generated attribute
24032 |{{echo|style='color:red'}}|foo
24046 Indented table with an empty td
24064 ## We have some newline diffs RT-ing this edge case
24065 ## and it is not important enough -- we seem to be emitting
24066 ## at most 2 newlines after a </tr> and this is unrelated to
24067 ## the issue from T85627 that this is testing.
24069 Indented table with blank lines in between (T85627)
24088 Indented block & table
24102 <div data-parsoid='{"stx":"html"}'>foo</div>
24104 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24109 Indent and comment before table row
24124 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24125 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24129 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24131 Empty TR followed by a template-generated TR
24137 {{echo|<tr><td>foo</td></tr>}}
24143 <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}}]}'>
24148 ## PHP and parsoid output differ for this, and since this is primarily
24149 ## for testing Parsoid's serializer, marking this Parsoid only
24151 Empty TR followed by mixed-ws-comment line should RT correctly
24167 <!--c--> </tr><!--d-->
24173 Multi-line image caption generated by templates with/without trailing newlines
24175 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24176 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24178 <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>
24179 <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>
24183 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24187 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24189 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24191 <includeonly>foo</includeonly>
24199 ## PHP emits broken html for this, and since this is primarily
24200 ## a Parsoid serializer test, marking this Parsoid only
24202 Improperly nested inline or quotes tags with whitespace in between
24204 <span> <s>x</span> </s>
24207 <p><span> <s>x</s></span><s> </s>
24208 <b> <i>x</i></b><i> </i>
24213 Encapsulate protected attributes from wt
24215 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24217 <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>
24221 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24222 ## Having nested or stray pre tags results in the attempt to add duplicates,
24223 ## causing an assertion fail. This test tries to prevent that situation.
24225 Ensure ParagraphWrapper can deal with stray closing pre tags
24235 1. Ensure fostered text content is wrapped in element nodes
24239 <table>hi</table><table>ho</table>
24248 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24250 parsoid=wt2html,wt2wt
24259 <tbody><tr><td> a</td></tr>
24264 Encapsulation properly handles null DSR information from foster box
24266 parsoid=wt2html,wt2wt
24268 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24270 <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>
24274 1. Encapsulate foster-parented transclusion content
24276 parsoid=wt2wt,wt2html
24278 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24280 <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>
24290 2. Encapsulate foster-parented transclusion content
24292 parsoid=wt2wt,wt2html
24294 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24296 <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>
24307 3. Encapsulate foster-parented transclusion content
24309 parsoid=wt2wt,wt2html
24311 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24313 <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>"]}">
24326 4. Encapsulate foster-parented transclusion content
24328 parsoid=wt2wt,wt2html
24330 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24332 <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>"]}">
24345 5. Encapsulate foster-parented transclusion content
24347 parsoid=wt2wt,wt2html
24349 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24351 <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>
24366 6. Encapsulate foster-parented transclusion content
24368 parsoid=wt2wt,wt2html
24370 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24372 <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>
24388 7. Encapsulate foster-parented transclusion content
24390 parsoid=wt2wt,wt2html
24392 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24394 <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>
24404 # Note that the wt is broken on purpose: the = should be {{=}} if you
24405 # don't want it to be a template parameter key.
24407 8. Encapsulate foster-parented transclusion content
24409 parsoid=wt2wt,wt2html
24412 }}{|{{echo|style='color:red'}}
24417 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24419 <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>
24430 9. Encapsulate foster-parented transclusion content
24432 parsoid=wt2wt,wt2html
24434 <table>{{echo|hi</table>hello}}
24436 <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>
24440 Table in fosterable position
24442 parsoid=wt2html,wt2wt
24451 <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">
24453 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24459 # Parsoid only for bug 64747
24461 Properly encapsulate empty-content transclusions in fosterable positions
24469 <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":["","","",""]}]]}'>
24475 Always encapsulate foster box when template range is expanded to table
24488 Support <object> element with .data attribute
24492 <object data="test.swf"></object>
24494 <object data="test.swf"></object>
24498 Don't block XML namespace declaration
24500 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24502 <p><span>MediaWiki</span>
24505 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
24508 # -----------------------------------------------------------------
24509 # The following section of tests are primarily to spec requirements
24510 # around serialization of new/edited content.
24512 # All these tests are marked Parsoid html2wt and html2html only
24513 # ----------------------------------------------------------------
24515 # 'mi' is a localinterwiki prefix as well as a language
24517 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
24521 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
24528 New wikilinks should be serialized properly
24532 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
24533 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
24540 New wiki links (href variations)
24544 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24545 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
24546 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
24547 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
24552 [[Toxine bactérienne]]
24556 New wiki links (content string variations)
24560 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24561 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
24562 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
24566 [[Foo_bar|./Foo_bar]]
24570 New category links (href variations)
24574 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
24575 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
24576 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
24578 [[Category:Toxine bactérienne]]
24579 [[Category:Toxine bactérienne]]
24580 [[Category:Toxine bactérienne]]
24584 New sol transparent links don't need indent-pre nowiki protection
24589 <link rel="mw:PageProp/redirect" href="./Main_Page">
24590 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
24591 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
24593 #WEITERLEITUNG [[Main Page]]
24594 <!-- this is good --> [[Category:Good]]
24595 <!-- this is great --> [[Kategorie:Great]]
24599 New interlanguage links (href variations)
24603 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
24604 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
24605 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
24607 [[es:Toxine bactérienne]]
24608 [[es:Toxine_bactérienne]]
24609 [[es:Toxine_bactérienne]]
24613 Image: Modifying size of an image (1)
24616 "modes": ["wt2wt"],
24618 ["img[height]", "attr", "height", "22"],
24619 ["img[width]", "attr", "width", "200"]
24623 [[Image:Foobar.jpg|230x230px]]
24625 [[Image:Foobar.jpg|200x200px]]
24629 Image: Modifying size of an image (2)
24632 "modes": ["wt2wt"],
24634 ["img[height]", "attr", "height", "100"],
24635 ["img[width]", "attr", "width", "500"]
24639 [[Image:Foobar.jpg|230x230px]]
24641 [[Image:Foobar.jpg|500x500px]]
24644 # Change in size is ignored so long as class='mw-default-size'
24646 Image: Modifying size of an image (3)
24649 "modes": ["wt2wt"],
24651 ["figure[class]", "removeClass", "mw-default-size"],
24652 ["figure img", "attr", "height", "19"],
24653 ["figure img", "attr", "width", "170"]
24657 [[Image:Foobar.jpg|thumb]]
24659 [[Image:Foobar.jpg|thumb|170x170px]]
24663 Image: Modifying alignment of an image (bug 48665)
24666 "modes": ["wt2wt"],
24668 ["figure[class]", "removeClass", "mw-halign-right"],
24669 ["figure[class]", "addClass", "mw-halign-left"]
24673 [[Image:Foobar.jpg|thumb|caption|right]]
24675 [[Image:Foobar.jpg|thumb|caption|left]]
24679 Image: Modifying mw-default-size of an frameless image (bug 62805)
24682 "modes": ["wt2wt"],
24684 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24688 [[Image:Foobar.jpg|frameless|right]]
24690 [[Image:Foobar.jpg|frameless|right|220x220px]]
24694 Image: Modifying valign of an image (bug 49221)
24697 "modes": ["wt2wt"],
24699 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24700 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24704 [[File:Foobar.jpg|20px|middle]]
24706 [[File:Foobar.jpg|20px|text-top]]
24710 Image: Modifying alt attribute of an image (bug 56400)
24713 "modes": ["wt2wt"],
24715 ["img[alt]", "attr", "alt", "some alternate edited text"]
24719 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24721 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24725 Image: Modifying caption of an image
24728 "modes": ["wt2wt"],
24730 ["figcaption", "text", "new caption"]
24734 [[Image:Foobar.jpg|thumb|original caption]]
24736 [[Image:Foobar.jpg|thumb|new caption]]
24740 Image: empty alt attribute (bug 48924)
24744 [[File:Foobar.jpg|thumb|alt=|bar]]
24746 <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>
24750 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
24756 <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>
24758 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
24762 Image: Block level image should have \n before and after
24765 [[File:Foobar.jpg|right|thumb|150x150px]]
24769 <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>
24774 Image: New block level image should have \n before and after (existing content)
24777 [[File:Foobar.jpg|right|thumb|150x150px]]
24781 <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>
24786 Image: upright option (parsoid)
24788 [[File:Foobar.jpg|thumb|upright|caption]]
24789 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
24790 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
24792 <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>
24793 <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>
24794 <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>
24798 Image: upright option is ignored on inline and frame images (parsoid)
24800 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
24802 <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>
24806 Image: from basic HTML (1)
24810 <span typeof="mw:Image">
24811 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24814 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24818 Image: from basic HTML (2)
24822 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24824 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24828 Image: from basic HTML (3)
24832 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24834 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24838 Image: from basic HTML (4)
24842 <img src="./File:Foobar.jpg">
24844 [[File:Foobar.jpg|link=]]
24848 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24853 <li><p>foo</p></li>
24860 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24864 <ul> <li>foo</li></ul>
24870 Don't strip leading whitespace when handling indent-pre suppressing tags
24875 <tr><td> indented row</td></tr>
24878 <b>This is very bold of you!</b>
24881 indented cell (no pre-wrapping!)
24891 '''This is very bold of you!'''
24895 indented cell (no pre-wrapping!)
24903 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24925 <nowiki> </nowiki></span>bar2
24928 <nowiki> </nowiki><span>bar</span>
24931 <nowiki> </nowiki><span>foo</span>
24936 Lists: Dont insert newlines in a serialized list item.
24940 <ul><li>a<br>b</li><li>c</li></ul>
24947 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
24950 "modes": ["html2wt"],
24951 "scrubWikitext": false
24954 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24955 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24957 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24958 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24960 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
24962 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24964 == hello there [[Category:A1]] ==
24966 == [[Category:A2]] hi pal ==
24968 == <!--foo--> [[Category:A3]] how goes it ==
24970 == it goes well [[Category:A4]] <!--bar--> ==
24972 ==howdy [[Category:A5]]==
24978 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
24981 "modes": ["html2wt"],
24982 "scrubWikitext": true
24985 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24986 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24988 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24989 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24991 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24999 <!--foo--> [[Category:A3]]
25004 [[Category:A4]] <!--bar-->
25012 Headings: Don't hoist metas that come from templates
25015 "modes": ["html2wt"],
25016 "scrubWikitext": true
25019 <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>
25021 == {{echo|foo [[Category:Foo]]}} ==
25025 Headings: Category in ref isn't hoisted
25028 "modes": ["html2wt"],
25029 "scrubWikitext": true
25032 <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>
25034 <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>
25037 [[Category:Baz]] </ref> ==
25043 Parsoid: Serialize positional parameters with = in them as named parameter
25047 <p about="#mwt1" typeof="mw:Transclusion"
25048 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25050 <p about="#mwt1" typeof="mw:Transclusion"
25051 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25053 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25054 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25055 <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>
25059 {{echo|1 = f=oo|2 = bar}}
25061 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25062 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25063 {{echo|<nowiki>f=oo</nowiki>|bar}}
25067 Parsoid: Serialize positional parameters with = in extlink as named parameter
25071 <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>
25073 {{echo|1 = http://stuff?is=ok}}
25077 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25081 <div>a<p>b</p></div>
25102 Substrings resembling wikitext in hrefs should not get nowiki escapes
25106 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25112 Enforce single-line context in the serializer
25119 <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">
25120 </span><span about="#mwt1">you</span> </h2>
25122 <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>
25124 <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
25125 there</span></li></ol>
25137 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25144 </tbody></table></dd></dl>
25148 == hi {{bogus|there
25159 * foo '''bar''' baz
25171 Serialize new placeholder space without spans
25175 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25177 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25179 <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>
25185 <ref>foo : bar</ref>ok
25189 #-----------------------
25190 # Tag minimization tests
25191 #-----------------------
25194 1. I/B quote minimization: wikitext-only tags should be combined
25198 <p><i>A</i><i>B</i></p>
25199 <p><b>A</b><b>B</b></p>
25200 <p><i>A</i><b><i>B</i></b></p>
25201 <p><b>A</b><i><b>B</b></i></p>
25202 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25203 <p><i><b>A</b></i><i><b>B</b></i></p>
25204 <p><i><b>A</b></i><b><i>B</i></b></p>
25205 <p><b><i>A</i></b><i><b>B</b></i></p>
25225 2. I/B quote minimization: wikitext and html tags should not be combined
25229 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25230 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25234 ''A''<nowiki/>'''<i>B</i>'''
25238 3. I/B quote minimization: templated content stops minimization
25242 <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>
25243 <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>
25245 ''A''{{echo|''B''}}
25247 ''A''{{echo|'''''B'''''}}
25251 4. I/B quote minimization: new content should be mimimized with adjacent old content
25255 <p><i>A</i><i>B</i></p>
25256 <p><b>A</b><b>B</b></p>
25257 <p><i>A</i><b><i>B</i></b></p>
25267 5a. Merge adjacent quote nodes if they've been edited
25270 "modes": ["wt2wt", "selser"],
25272 ["p", "contents", "remove", ":contains('b')"]
25282 5b. Merge adjacent quote nodes if they've been edited
25285 "modes": ["wt2wt", "selser"],
25291 ''a''<span id="x">b</span>''c''
25297 1. Merge adjacent link nodes as long as at least one element is new
25300 "modes": ["html2wt"],
25301 "scrubWikitext": true
25304 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25305 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25306 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25310 [[Football|Foot]][[Football|ball]]
25314 2. Merge adjacent link nodes and enable additional normalizations
25317 "modes": ["html2wt"],
25318 "scrubWikitext": true
25321 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25323 [[Football|''Football'']]
25327 3. Don't merge adjacent link nodes if scrubWikitext is false
25330 "modes": ["html2wt"],
25331 "scrubWikitext": false
25334 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25336 [[Football|Foot]][[Football|ball]]
25339 #------------------------------
25340 # End of tag minimization tests
25341 #------------------------------
25344 Bug 54262: New entities
25348 <span typeof="mw:Entity"> </span>
25353 ## Note that there is no wikitext output for 'unknownproperty' ##
25354 ## Unknown magic words are silently dropped ##
25361 <meta property='mw:PageProp/toc' />
25362 <meta property='mw:PageProp/notoc' />
25363 <meta property='mw:PageProp/forcetoc' />
25364 <meta property='mw:PageProp/index' />
25365 <meta property='mw:PageProp/noindex' />
25366 <meta property='mw:PageProp/nogallery' />
25367 <meta property='mw:PageProp/noeditsection' />
25368 <meta property='mw:PageProp/notitleconvert' />
25369 <meta property='mw:PageProp/nocontentconvert' />
25370 <meta property='mw:PageProp/unknownproperty' />
25380 __NOCONTENTCONVERT__
25384 Consecutive <pre>s should not get merged
25386 parsoid=html2wt,html2html
25388 <pre>a</pre><pre>b</pre>
25416 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
25420 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
25422 [[Special:BookSources/1234567890|ISBN 1234567895]]
25426 Edited RFC links not serializable as RFC links should serialize as extlinks
25430 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
25432 [//tools.ietf.org/html/rfc123 New RFC]
25436 Edited PMID links not serializable as PMID links should serialize as extlinks
25440 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
25442 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
25446 WTS of autolinks with trailing/surrounding context
25450 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25451 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25452 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25453 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25454 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25455 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
25457 http://cscott.net'''foo'''
25459 http://cscott.net<b>foo</b>
25461 '''http://cscott.net'''
25463 '''http://cscott.net '''
25465 '''http://cscott.net<nowiki/>x'''
25467 http://cscott.net<nowiki/>x
25471 WTS of autolinks with nowikis (round-trip)
25473 x<nowiki/>http://cscott.net<nowiki/>x
25475 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
25478 # this is the "easy" test because it leaves in place all the
25479 # data-parsoid information indicating this is an autolink
25481 WTS of autolinks with escapes (editing)
25484 "modes": ["wt2wt"],
25486 [ "meta", "remove" ]
25490 x<nowiki/>http://cscott.net<nowiki/>x
25492 x<nowiki/>http://cscott.net<nowiki/>x
25496 WTS of edited autolink-like text (T103364)
25499 "modes": ["wt2wt"],
25501 [ "span[typeof]", "removeAttr", "typeof" ]
25505 Not a link: <nowiki>http://example.com</nowiki>.
25507 Not a link: <span><nowiki>http://example.com</nowiki></span>.
25511 WTS of newly-authored autolink-like text (T103364)
25515 <p>http://example.com is not a link.</p>
25517 <nowiki>http://example.com</nowiki> is not a link.
25521 WTS of autolink-like text after an autolink (T108563)
25525 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
25527 http://example.com <nowiki>http://example.com</nowiki> is not a link.
25531 Magic links inside links (not autolinked)
25533 [[Foo|http://example.com]]
25536 [[Foo|ISBN 123456789x]]
25538 [http://foo.com http://example.com]
25539 [http://foo.com RFC 1234]
25540 [http://foo.com PMID 1234]
25541 [http://foo.com ISBN 123456789x]
25543 <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>
25544 <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>
25546 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
25547 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
25548 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
25549 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
25551 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
25552 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
25553 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
25554 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
25558 Magic links inside image captions (autolinked)
25560 [[File:Foobar.jpg|thumb|http://example.com]]
25561 [[File:Foobar.jpg|thumb|RFC 1234]]
25562 [[File:Foobar.jpg|thumb|PMID 1234]]
25563 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
25565 <div class="thumb tright">
25566 <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>
25567 <div class="thumbcaption">
25568 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25569 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
25572 <div class="thumb tright">
25573 <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>
25574 <div class="thumbcaption">
25575 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25576 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
25579 <div class="thumb tright">
25580 <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>
25581 <div class="thumbcaption">
25582 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25583 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
25586 <div class="thumb tright">
25587 <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>
25588 <div class="thumbcaption">
25589 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25590 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
25594 <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>
25595 <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>
25596 <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>
25597 <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>
25601 WTS of magic word text (T109371)
25606 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
25607 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
25609 <nowiki>RFC 1234</nowiki>
25611 [http://foo.com RFC 1234]
25617 Edited Redirect link should emit a non-piped wikitext link
25621 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
25627 T75121: Infer extension name from typeOf if data-mw is not present
25629 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25631 <div typeOf="mw:Extension/foo"></div>
25636 # Note that the <p> wrapping isn't present in PHP parser output
25637 # The important thing for this test is that P-wrapping doesn't
25638 # interfere with the <nowiki> protection for leading - in <td>
25639 # (which isn't necessary for <th>).
25641 T88318: p-wrapped dash in table.
25643 parsoid=html2wt,wt2wt
25646 <tr><th><p>-</p></th><th><p>- </p></th></tr>
25647 <tr><td><p>-</p></td><td><p>- </p></td></tr>
25648 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
25655 |<nowiki>-</nowiki>
25656 |<nowiki>- </nowiki>
25675 <td><small>-</small></td>
25687 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
25692 <td id='mwAc'>foo</td>
25693 <td id='serialize-this'>bar</td>
25698 | id="serialize-this" |bar
25703 Parsoid-like element ids should not be serialized to wikitext unless shadowed
25707 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
25709 <div id="hello">ok</div>
25716 "modes": ["wt2wt"],
25718 [ "#xyz", "before", "<b>before</b> stuff " ],
25719 [ "#xyz", "after", " stuff <i>after</i>" ],
25720 [ "#xyz", "html", "x <b>y</b> z" ]
25724 <span id="xyz">hello</span>
25726 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
25730 Never serialize a-tag as html, regardless of what data-parsoid has to say
25732 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25734 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
25739 ## SSS FIXME: This is broken output nevertheless.
25740 ## What might be a reasonable non-broken output for this?
25741 ## This is an edge case unlikely to be seen in production
25742 ## that I am not wasting more time on this right now.
25744 Never serialize a-tag as html, no matter what attributes it has
25746 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25748 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
25750 [http://boo.org http://boohoo.org]
25753 # Misnested is an indication that selser can reuse the source but these have
25754 # shown to sneak through on occasion. See T101768.
25755 # The original wikitext here is: [http://test.com [[one]] two three]
25757 Strip span tags added to mark misnested links
25761 <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>
25763 [http://test.com][[one]] two three
25767 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
25771 <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"}},"i":0}}]}'>a</span><table about="#mwt2" typeof="mw:Transclusion mw:ExpandedAttrs" data-parsoid='{"a":{"{{echo|c\n{{!}}d\n}}":null},"sa":{"{{echo|c\n{{!}}d\n}}":""},"firstWikitextNode":"table","pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c\n{{!}}d\n"}},"i":0}},"\n|}"]}'>
25783 ## This test verifies the presence and computation of this attribute indirectly
25784 ## by making an edit and ensuring that the serialization is correct (which it would be
25785 ## only if firstWikitextNode is properly set).
25787 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
25790 "modes": ["wt2wt"],
25792 [ "div#x", "remove" ],
25793 [ "div", "before", "<div>new</div>" ]
25797 <div id="x">foo</div>
25799 {{echo|<div>boo</div>
25807 {{echo|<div>boo</div>
25813 # --------------------------------------------
25814 # Tests spec'ing wikitext serialization norms |
25815 # --------------------------------------------
25818 1. Categories should always be serialized on their own line
25822 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
25830 2. Categories that are part of templates should not introduce a line break
25832 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
25834 <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>
25837 # Careful while editing these next 2 tests. There are \u200f characters
25838 # before and after the <link> tags in the HTML and following some
25839 # of the categories in wikitext
25840 # Do not remove these characters in edits.
25842 # As part of the serialization, these bidi characters will get stripped.
25844 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
25847 "modes": ["html2wt"],
25848 "scrubWikitext": true
25851 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
25852 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
25855 [[קטגוריה: שיטות משפט]]
25859 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
25862 "modes": ["html2wt"],
25863 "scrubWikitext": true
25866 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
25873 Lists: Add space after bullets
25880 <li><span> baz</span></li>
25885 * <span> baz</span>
25889 1. Headings: Add space before/after == (T53744)
25896 <h2><span> baz</span></h2>
25904 == <span> baz</span> ==
25908 2. Headings: Add space before/after == even after hoisted content
25911 "modes": ["html2wt"],
25912 "scrubWikitext": true
25915 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
25923 1. Headings: suppress newly created empty headings
25926 "modes": ["html2wt"],
25927 "scrubWikitext": true
25935 2. Headings: don't suppress empty headings if scrubWikitext is false
25945 3. Headings: suppress empty headings on edits
25948 "modes": ["selser"],
25949 "scrubWikitext": true,
25955 ==<span id="x">foo</span>==
25960 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
25963 "modes": ["html2wt"],
25964 "scrubWikitext": true
25967 <h2>foo<br/>bar</h2>
25968 <h2>foo <span><br/>bar</span> baz</h2>
25972 == foo <span> bar</span> baz ==
25976 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
25979 "modes": ["html2wt"],
25980 "scrubWikitext": false
25983 <h2>foo<br/>bar</h2>
25989 1. WT Quote Tags: suppress newly created empty style tags
25992 "modes": ["html2wt"],
25993 "scrubWikitext": true
26001 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26007 ''<nowiki/>'''''<nowiki/>'''
26011 3. WT Quote Tags: suppress empty style tags on edits
26014 "modes": ["selser"],
26015 "scrubWikitext": true,
26021 '''<span id="x">foo</span>'''
26026 1. Anchors: suppress newly created empty anchors
26029 "modes": ["html2wt"],
26030 "scrubWikitext": true
26033 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26038 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26041 "modes": ["html2wt"],
26042 "scrubWikitext": false
26045 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26051 3. Anchors: suppress empty anchors on edits
26054 "modes": ["selser"],
26055 "scrubWikitext": true,
26061 [[Test|<span id="x">foo</span>]]
26066 3a. Anchors: do not suppress numbered extlinks
26069 "modes": ["wt2wt"],
26070 "scrubWikitext": true
26075 <a rel="mw:ExtLink" href="http://foo.com"></a>
26079 3b. Anchors: do not suppress numbered extlinks
26082 "modes": ["wt2wt"],
26083 "scrubWikitext": true,
26089 [http://foo.com <span id="x">foo</span>]
26095 Normalizations should be restricted to edited content
26098 "modes": ["selser"],
26099 "scrubWikitext": true,
26101 [ "h1", "before", "<i></i>"]
26115 1. Multiple normalizations (html2wt)
26118 "modes": ["html2wt"],
26119 "scrubWikitext": true
26123 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26124 </a><b><i></i></b>x</p>
26133 2. Multiple normalizations (selser)
26136 "modes": ["selser"],
26137 "scrubWikitext": true,
26139 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26143 <span id="x">foo</span>
26145 <span id="x">foo</span>
26151 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26154 "modes": ["html2wt"],
26155 "scrubWikitext": true
26167 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26174 <nowiki> </nowiki>hi
26176 <nowiki> </nowiki> hello
26180 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26183 "modes": ["html2wt"],
26184 "scrubWikitext": true
26193 baz bang</td></tr></table>
26199 bar<span>boo</span></p>
26215 bar<span>boo</span>
26219 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26222 "modes": ["selser"],
26223 "scrubWikitext": true,
26225 [ "p", "html", " a\n b" ]
26236 1. New links that end in spaces
26239 "modes": ["html2wt"],
26240 "scrubWikitext": false
26243 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26244 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26245 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26247 [[Berlin ]]<nowiki/>is the capital of Germany.
26251 [[Boston ]] is a city.
26255 2. New links that end in spaces
26258 "modes": ["html2wt"],
26259 "scrubWikitext": true
26262 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26263 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26264 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26266 [[Berlin]] is the capital of Germany.
26270 [[Boston]] is a city.
26274 1. Table cells with escapable prefixes
26277 "modes": ["html2wt"],
26278 "scrubWikitext": false
26282 <tr><td>a</td></tr>
26283 <tr><td>-</td></tr>
26284 <tr><td>+</td></tr>
26290 |<nowiki>-</nowiki>
26292 |<nowiki>+</nowiki>
26297 2. Table cells with escapable prefixes
26300 "modes": ["html2wt"],
26301 "scrubWikitext": true
26305 <tr><td>a</td></tr>
26306 <tr><td>-</td></tr>
26307 <tr><td>+</td></tr>
26320 3a. Table cells with escapable prefixes after edits
26323 "modes": ["selser"],
26324 "scrubWikitext": true,
26326 [ "table tbody tr:first-child td:first-child", "remove"]
26340 3b. Table cells with escapable prefixes after edits
26343 "modes": ["selser"],
26344 "scrubWikitext": true,
26346 [ "table tbody tr:first-child td:first-child", "html", "-" ],
26353 |<span id="x">foo</span>+
26362 # FIXME: This test will fail because
26363 # normalization doesn't realize that the id attribute
26364 # will eliminate the escapable scenario
26366 4a. Table cells without escapable prefixes after edits
26369 "modes": ["selser"],
26370 "scrubWikitext": true,
26372 [ "#x", "html", "-" ]
26385 ## This tests normalizer's ability to discriminate between
26386 ## cells having identical content.
26388 4b. Table cells without escapable prefixes after edits
26391 "modes": ["selser"],
26392 "scrubWikitext": true,
26394 [ "td", "html", "-" ]
26407 ## This tests normalizer's ability to not be tripped by
26408 ## comments (and whitespace)
26410 4c. Table cells without escapable prefixes after edits
26413 "modes": ["selser"],
26414 "scrubWikitext": true,
26416 [ "table tbody tr td:first-child", "remove" ]
26431 ## This tests normalizer's ability to handle HTML cells
26433 4d. Table cells without escapable prefixes after edits
26436 "modes": ["selser"],
26437 "scrubWikitext": true,
26439 [ "td", "html", "-" ]
26444 <tr><td>a</td></tr>
26448 <tr><td>-</td></tr>
26452 ## T111151 Remove font elements without attributes
26454 5a. font tags without attributes should be dropped in scrubWikitext mode
26457 "modes": ["html2wt"],
26458 "scrubWikitext": true
26462 <font><font>bar</font></font>
26463 <font class="x">boo</font>
26467 <font class="x">boo</font>
26471 5b. font tags should not be dropped without scrubWikitext being enabled
26474 "modes": ["html2wt"],
26475 "scrubWikitext": false
26484 Escape nowiki DOM elements
26488 <nowiki><i>foo</i></nowiki>
26490 <nowiki>''foo''</nowiki>
26493 # This is meant to be an interim fix while we go about figuring out
26494 # how to not introduce these trailing <nowiki/>s in the first place.
26496 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
26500 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
26502 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,23,null,null],"pi":[[{"k":"1","named":true,"spc":["\n"," "," ",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
26503 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,24,null,null],"pi":[[{"k":"1","named":true,"spc":["\n"," "," ","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
26516 # ---------------------------------------------------
26517 # End of tests spec'ing wikitext serialization norms |
26518 # ---------------------------------------------------
26522 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
26530 <td><b>c</b><p>d</p></td>
26548 # -----------------------------------------------------------------
26549 # End of section for Parsoid-only html2wt tests for serialization
26551 # -----------------------------------------------------------------
26553 # -----------------------------------------------------------------
26554 # The following section of tests are primarily to spec behavior of
26555 # the selective serializer. All these tests have manual selser
26556 # changes. The automated selser changes for all tests handle the
26557 # wide variation of changes, but these tests here capture specs
26558 # deterministically.
26559 # ----------------------------------------------------------------
26563 Selser: New comments should not be lost
26566 "modes": ["selser"],
26568 [ "#a", "after", "<!--c1-->" ],
26569 [ "#b", "before", "<!--c2-->" ]
26573 <span id="a">a</span>
26575 <span id="b">b</span>
26577 <span id="a">a</span><!--c1-->
26579 <!--c2--><span id="b">b</span>
26584 Selser: Check for validity of DSR before using it
26587 "modes": ["selser"],
26589 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
26593 <span id="a">a</span>
26595 {{DISPLAYTITLE:foo}}
26596 <span id="a">a</span>
26600 1. DOMDiff: Changes to <ref> content should be looked up using id
26603 "modes": ["selser"],
26605 ["#X", "after", "bar"],
26606 ["#Y", "after", "baz"]
26610 X <ref><span id="X">foo</span></ref>
26613 <ref name="a"><span id="Y">foo</span></ref>
26616 X <ref><span id="X">foo</span>bar</ref>
26619 <ref name="a"><span id="Y">foo</span>baz</ref>
26624 2. DOMDiff: Changes to <ref> content should be looked up using id
26627 "modes": ["selser"],
26629 ["#Z", "after", "bar"]
26633 A <ref>foo bar for a</ref>
26634 B <ref group="X" name="b" />
26638 <references group="X">
26639 <ref name="b"><span id="Z">foo</span></ref>
26642 A <ref>foo bar for a</ref>
26643 B <ref group="X" name="b" />
26647 <references group="X">
26648 <ref name="b"><span id="Z">foo</span>bar</ref>
26662 <li class="mw-empty-li"></li>
26663 <li class="mw-empty-li"></li>