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>
2524 Handle broken pre-like tags (bug 64025)
2528 {{echo|<pre <pre>x</pre>}}
2530 <table><pre </table>
2533 <table><pre </table>
2541 <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>
2550 Parsoid: handle pre with space after attribute
2554 <pre style="width:50%;" >{{echo|foo}}</pre>
2556 <pre style="width:50%;">{{echo|foo}}</pre>
2559 <pre style="width:50%;">{{echo|foo}}</pre>
2562 # TODO / maybe: fix wt2wt for this
2564 Parsoid: Don't paragraph-wrap fosterable content
2590 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2618 #--------------------------------------------------------------------
2619 # Transclusion parameter whitespace stripping tests
2620 # Behavior is different for positional and named parameters
2621 #--------------------------------------------------------------------
2623 Templates: Strip leading and trailing whitespace from named-param values
2627 {{echo|1= {{echo|b}} }}
2640 <ul><li> d</li></ul>
2645 Templates: Don't strip whitespace from positional-param values
2649 {{echo|{{echo|b}} }}
2681 <ul><li> f</li></ul>
2689 Templates: Handle empty comment-and-ws-only lines correctly
2692 <!--should be ignored-->
2693 <!--should be ignored as well-->
2702 Templates: Handle comments in the target
2705 <!-- should be ignored -->
2708 {{echo<!-- should be ignored -->
2711 {{echo<!-- should be ignored -->|foo}}
2713 {{<!-- should be ignored -->echo|foo}}
2715 <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>
2717 <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>
2719 <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>
2721 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2725 Templates: Handle comments in parameter names (bug 67657)
2728 <!-- should be ignored -->
2732 <!-- should be ignored -->
2735 {{echo|1<!-- should be ignored --> = foo}}
2737 {{echo|<!-- should be ignored -->1 = foo}}
2739 <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>
2741 <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>
2743 <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>
2745 <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>
2749 Templates: Other wikitext in parameter names (bug 67657)
2753 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2759 #--------------------------------------------------------------------
2760 # Transclusion parameter escaping tests
2761 #--------------------------------------------------------------------
2763 Templates: Parsoid parameter escaping test 1
2765 {{echo|[foo]|{{echo|[bar]}}}}
2769 <p about="#mwt1" typeof="mw:Transclusion"
2770 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2774 Parsoid: Pipes in external links in template parameter
2776 {{echo|[{{echo|http://example.com}} link]}}
2778 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2780 <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>
2784 Parsoid: pipe in transclusion parameter
2786 {{echo|http://foo.com/a|b}}
2788 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2790 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2791 typeof="mw:Transclusion"
2792 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>
2796 Parsoid: Pipe in external link target and content in template parameter
2798 parsoid=html2wt,wt2wt
2800 {{echo|[http://foo.com/a|b a|b]}}
2802 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2804 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2805 typeof="mw:Transclusion"
2806 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2807 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2811 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2815 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2817 <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>
2821 Templates: Don't escape already nowiki-escaped text in template parameters
2823 parsoid=html2wt,wt2wt
2825 {{echo|foo<nowiki>|</nowiki>bar}}
2826 {{echo|<nowiki><div></nowiki>}}
2827 {{echo|<nowiki></nowiki>}}
2829 <p>foo|bar <div></p>
2831 <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>
2832 <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>
2833 <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>
2839 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2841 parsoid=html2wt,wt2wt
2843 {{echo|{{echo|1=bar}}}}
2847 <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>
2852 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2858 <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>
2863 Templates: Preserve blank parameter names
2869 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2873 Templates: Preserve blank parameter names in other positions
2875 {{blank_param|bar|=foo}}
2879 <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
2884 ### Parsoid-centric tests for testing RT edge cases for pre
2888 1a. Indent-Pre and Comments
2901 1b. Indent-Pre and Comments
2914 1c. Indent-Pre and Comments
2927 1d. Indent-Pre and Comments
2928 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2941 2a. Indent-Pre and tables
2962 2b. Indent-Pre and tables
2978 2c. Indent-Pre and tables (bug 42252)
2995 2d. Indent-Pre and tables
3012 <tbody><tr><td> b</td></tr>
3017 2e. Indent-Pre and table-line syntax
3030 2f. Indent-pre started by table-line syntax
3049 3a. Indent-Pre and block tags (single-line html)
3053 c <blockquote> foo </blockquote>
3058 c <blockquote> foo </blockquote>
3059 <pre><span> foo </span>
3062 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3063 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3064 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3065 <pre><span> foo </span>
3082 3b. Indent-Pre and block tags (multi-line html)
3087 <pre>a <span>foo</span>
3092 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3093 b <div data-parsoid='{"stx":"html"}'> foo </div>
3103 3c. Indent-Pre and block tags (pre-content on separate line)
3167 4. Indent-Pre and extension tags
3173 a <ul class="gallery mw-gallery-traditional">
3174 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
3175 <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>
3176 <div class="gallerytext">
3183 <ul class="gallery mw-gallery-traditional">
3184 <li class="gallerybox" style="width: 155px">
3185 <div style="width: 155px">
3186 <div class="thumb" style="width: 150px;">
3187 <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>
3189 <div class="gallerytext"></div>
3196 Table wikitext syntax outside wiki-tables
3199 ! not a table heading
3202 | class="foo bar" | baz
3209 ! not a table heading
3212 | class="foo bar" | baz
3221 Render paragraphs when indent-pre is suppressed in blocklevels
3238 4. Multiple spaces at start-of-line
3256 ## NOTE: the leading white-space chars on empty line are significant
3258 5a. White-space in indent-pre
3270 ## NOTE: the leading white-space chars on empty line are significant
3272 5b. White-space in indent-pre
3291 5c. White-space in indent-pre
3304 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3327 7a. Indent-pre and category links
3329 parsoid=wt2html,wt2wt
3331 [[Category:foo]] <!-- No pre-wrapping -->
3332 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3335 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3336 <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 -->
3339 ## We used to, but no longer wt2wt this test since the default serializer
3340 ## will normalize all categories to serialize on their own line.
3341 ## This wikitext usage is going to be fairly uncommon in production and
3342 ## selser will take care of preserving formatting in those scenarios.
3344 7b. Indent-pre and category links
3349 [[Category:foo]] {{echo|b}}
3351 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3352 <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>
3356 Indent-Pre: Newlines in comments shouldn't affect sol state
3370 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3374 HTML-pre: 1. embedded newlines
3409 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3411 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3415 <pre data-parsoid='{"stx":"html"}'>
3420 <pre data-parsoid='{"stx":"html"}'>
3428 HTML-pre: big spaces
3464 <pre data-parsoid='{"stx":"html"}'>
3483 HTML-pre: 2: indented text
3496 HTML-pre: 3: other wikitext
3515 <pre data-parsoid='{"stx":"html","strippedNL":true}'>* foo
3524 ### Definition lists
3531 <dl><dt> name </dt>
3532 <dd> Definition</dd></dl>
3537 Definition list for indentation only
3541 <dl><dd> Indented text</dd></dl>
3546 Definition list with no space
3551 <dd>Definition</dd></dl>
3556 Definition list with URL link
3558 ; http://example.com/ : definition
3560 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3561 <dd> definition</dd></dl>
3566 Definition list with bracketed URL link
3568 ;[http://www.example.com/ Example]:Something about it
3570 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3571 <dd>Something about it</dd></dl>
3576 Definition list with wikilink containing colon
3578 ; [[Help:FAQ]]: The least-read page on Wikipedia
3580 <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>
3581 <dd> The least-read page on Wikipedia</dd></dl>
3585 # At Brion's and JeLuF's insistence... :)
3587 Definition list with news link containing colon
3589 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3591 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3592 <dd> This isn't even a real newsgroup!</dd></dl>
3595 <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>
3599 Malformed definition list with colon
3601 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3603 <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>
3608 Definition lists: colon in external link text
3610 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3612 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3613 <dd> OK, I made that up</dd></dl>
3618 Definition lists: colon in HTML attribute
3620 ;<b style="display: inline">bold</b>
3622 <dl><dt><b style="display: inline">bold</b></dt></dl>
3627 Definition lists: self-closed tag
3629 ;one<br/>two : two-line fun
3631 <dl><dt>one<br />two </dt>
3632 <dd> two-line fun</dd></dl>
3637 Bug 11748: Literal closing tags
3641 <dd>test test test test test</dd>
3643 <dd>test test test test test</dd>
3648 <dd>test test test test test</dd>
3650 <dd>test test test test test</dd>
3656 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3659 ; term : description
3664 <dl><dt> term </dt>
3665 <dd> description</dd></dl>
3666 <ul><li> unordered</li></ul>
3673 Definition list with empty definition and following paragraph
3685 Nested definition lists using html syntax
3694 Definition Lists: No nesting: Multiple dd's
3707 Definition Lists: Indentation: Regular
3715 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3720 Definition Lists: Indentation: Missing 1st level
3726 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3731 Definition Lists: Indentation: Multi-level indent
3735 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3740 Definition Lists: Hacky use to indent tables
3747 should be left alone
3749 <dl><dd><dl><dd><table>
3754 </td></tr></table></dd></dl></dd></dl>
3756 should be left alone
3761 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3769 should be left alone
3772 <dl><dd><dl><dd><table><tr>
3775 </tr></table><!-- bar --></dd></dl></dd></dl>
3777 should be left alone</p>
3781 Definition Lists: Hacky use to indent tables, with comment before table
3787 <dl><dd><dl><dd><!-- foo --><table><tr>
3789 </tr></table></dd></dl></dd></dl>
3792 # The trailing whitespace in this test is to catch a regression in
3793 # Parsoid after T54473.
3795 Definition Lists: Hacky use to indent tables (WS-insensitive)
3804 </td></tr></table></dd></dl>
3808 <tbody><tr><td>a</td></tr>
3809 </tbody></table> </dd></dl>
3812 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3813 ## as an empty dt item. It also ignores all but the last ";" when followed
3814 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3815 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3818 ## Ex: ";;t2 ::d2" is transformed into:
3830 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3831 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3842 ## All Parsoid only definition list tests have this difference.
3844 ## See also: https://phabricator.wikimedia.org/T8569
3845 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3848 Table / list interaction: indented table with lists in table contents
3863 <ul><li> b</li></ul>
3867 <ul><li> d</li></ul>
3868 </td></tr></table></dd></dl>
3873 Table / list interaction: lists nested in tables nested in indented lists
3896 </td></tr></table></dd></dl>
3903 Definition Lists: Nesting: Multi-level (Parsoid only)
3933 Definition Lists: Nesting: Test 2 (Parsoid only)
3960 Definition Lists: Nesting: Test 3 (Parsoid only)
4003 Definition Lists: Nesting: Test 4
4008 <dl><dd><dl><dd><dl><dt>t3</dt>
4009 <dd>d3</dd></dl></dd></dl></dd></dl>
4014 ## The Parsoid team believes the following three test exposes a
4015 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4016 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4017 ## It also exposes a "misfeature" in tidy, which doesn't like
4018 ## <dl> tags with a single <dt> child; it converts the <dt> into
4019 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4021 Definition Lists: Mixed Lists: Test 1
4027 <dl><dd><dl><dt><ul><li> foo</li>
4028 <li> bar</li></ul></dt></dl>
4029 <dl><dt> baz</dt></dl></dd></dl>
4064 Definition Lists: Mixed Lists: Test 2
4069 <ul><li><dl><dd> d1</dd>
4070 <dd> d2</dd></dl></li></ul>
4076 Definition Lists: Mixed Lists: Test 3
4081 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4082 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4088 Definition Lists: Mixed Lists: Test 4
4093 <ul><li><dl><dt>d1 </dt>
4096 <dd>d4</dd></dl></li></ul>
4102 Definition Lists: Mixed Lists: Test 5
4108 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4114 Definition Lists: Mixed Lists: Test 6
4119 <ol><li><ul><li><dl><dd>d1
4120 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4126 Definition Lists: Mixed Lists: Test 7
4131 <dl><dd><ul><li> d1</li>
4132 <li> d2</li></ul></dd></dl>
4138 Definition Lists: Mixed Lists: Test 8
4143 <dl><dd><ul><li> d1</li></ul>
4144 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4150 Definition Lists: Mixed Lists: Test 9
4154 <ul><li><dl><dt>foo </dt>
4155 <dd>bar</dd></dl></li></ul>
4161 Definition Lists: Mixed Lists: Test 10
4165 <ul><li><ol><li><dl><dt>foo </dt>
4166 <dd>bar</dd></dl></li></ol></li></ul>
4170 # The Parsoid team disagrees with the PHP parser's seemingly-random
4171 # rules regarding dd/dt on the next two tests. Parsoid is more
4172 # consistent, and recognizes the shared nesting and keeps the
4173 # still-open tags around until the nesting is complete.
4174 # (And tidy again converts <dt> to <dd> before 'bar'.)
4177 Definition Lists: Mixed Lists: Test 11
4182 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4183 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4184 <dl><dt>boo </dt>
4185 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4240 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4241 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4245 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4246 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4255 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4257 # * The test is wrong, there are two colons where there should be :;
4258 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4260 Definition Lists: Weird Ones: Test 1
4262 *#;*::;; foo : bar (who uses this?)
4264 <ul><li><ol><li><dl><dt> foo </dt>
4265 <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>
4284 <dt>bar (who uses this?)</dt>
4316 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4317 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4329 Definition Lists: colons occurring in tags
4347 <dt><span>a:b</span></dt>
4374 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4376 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4377 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4378 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4379 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4381 <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>
4382 <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>
4383 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4387 Definition Lists: colons and tables 1
4399 </td></tr></table></dd></dl>
4403 </td></tr></table></dd></dl>
4407 # Parsoid's output (as documented below) differs from php's in this case.
4408 # This is probably a bug. If we fixup parsoid to match php's output, the
4409 # above test should pass and the below test case can be removed. It is
4410 # unclear which output is more desirable.
4413 Definition Lists: colons and tables 2
4425 </td></tr></table></dd>
4429 </td></tr></table></dd></dl>
4433 Definition Lists: template interaction
4435 ::{{definition_list}}
4438 ::{{definition_list}}
4443 <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">
4444 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4446 <dl><dd data-parsoid='{}'>one
4447 <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">
4448 </span><dd about="#mwt2">two
4450 <dd>three</dd></dl></dd>
4451 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4459 External links: non-bracketed
4461 Non-bracketed: http://example.com
4463 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4467 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4469 External links: numbered
4471 Numbered: [http://example.com]
4472 Numbered: [http://example.net]
4473 Numbered: [http://example.com]
4475 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4476 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4477 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4480 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4481 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4482 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4486 External links: specified text
4488 Specified text: [http://example.com link]
4490 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4495 External links: trail
4497 Linktrails should not work for external links: [http://example.com link]s
4499 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4504 External links: dollar sign in URL
4506 http://example.com/1$2345
4508 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4512 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4514 External links: dollar sign in URL (autonumber)
4516 [http://example.com/1$2345]
4518 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4521 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4525 External links: open square bracket forbidden in URL (bug 4377)
4527 parsoid=wt2html,wt2wt,html2html
4529 http://example.com/1[2345
4531 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4534 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4538 External links: open square bracket forbidden in URL (named) (bug 4377)
4540 parsoid=wt2html,html2html
4542 [http://example.com/1[2345]
4544 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4547 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4550 # parsoid adds a space before the link name
4552 External links: open square bracket forbidden in URL (named) (bug 4377)
4555 [http://example.com/1 [2345]
4557 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4562 External links: nowiki in URL link text (bug 6230)
4564 [http://example.com/ <nowiki>''example site''</nowiki>]
4566 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4571 External links: newline forbidden in text (bug 6230 regression check)
4573 [http://example.com/ first
4576 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4582 External links: Pipe char between url and text
4584 [http://example.com | link]
4586 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4591 External links: protocol-relative URL in brackets
4593 [//example.com/ Test]
4595 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4599 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4601 External links: protocol-relative URL in brackets without text
4605 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4608 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4612 External links: protocol-relative URL in free text is left alone
4616 <p>//example.com/Foo
4621 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4623 foo//example.com/Foo
4625 <p>foo//example.com/Foo
4630 External links: with no contents
4632 [http://en.wikipedia.org/wiki/Foo]
4634 [[wikipedia:Foo|Bar]]
4636 [[wikipedia:Foo|<span>Bar</span>]]
4638 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4639 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4640 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4643 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4644 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4645 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4649 External links: Free with trailing punctuation
4659 http://example.com/url_with_(brackets)
4660 (http://example.com/url_without_brackets)
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 
4666 http://example.com/url_with_entity 
4667 http://example.com/url_with_entity<
4668 http://example.com/url_with_entity<
4669 http://example.com/url_with_entity<
4671 <p><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">http://example.com</a>:
4676 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4677 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4678 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4679 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4680 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</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> 
4686 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4687 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4688 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4689 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4692 <p><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">http://example.com</a>:
4697 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4698 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4699 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4700 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4701 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4702 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4703 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4704 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
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":"&nbsp;","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":"&#xA0;","srcContent":" "}'> </span>
4707 <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>
4708 <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>
4709 <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>
4710 <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>
4714 External links: tricky Parsoid html2html case
4716 parsoid=wt2html,wt2wt,html2html
4718 http://example.com/url_with_entity&amp;
4720 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4723 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4727 External links: Free with trailing quotes (T113666)
4729 '''News:''' Stuff here
4733 <p><b>News:</b> Stuff here
4734 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4737 <p><b>News:</b> Stuff here</p>
4738 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4742 External links: Lone protocols are never linked (T105697)
4761 External links: No preceding word characters allowed (bug 65278)
4763 NOPEhttp://example.com
4764 N0http://example.com
4765 ok:http://example.com
4766 ok-http://example.com
4768 <p>NOPEhttp://example.com
4769 N0http://example.com
4770 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4771 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4778 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4780 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4785 External image from https
4787 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4789 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4794 External image (when not allowed)
4796 wgAllowExternalImages=0
4798 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4800 <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>
4805 Link to non-http image, no img tag
4807 Link to non-http image, no img tag: ftp://example.com/test.jpg
4809 <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>
4814 External links: terminating separator
4816 Terminating separator: http://example.com/thing,
4818 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4823 External links: intervening separator
4825 Intervening separator: http://example.com/1,2,3
4827 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4832 External links: old bug with URL in query
4834 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4836 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4841 External links: old URL-in-URL bug, mixed protocols
4843 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4845 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4850 External links: URL in text
4852 URL in text: [http://example.com http://example.com]
4854 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4859 External links: Clickable images
4861 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4863 <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>
4866 <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>
4870 External links: raw ampersand
4872 Old & use: http://x&y
4874 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4879 External links: encoded ampersand
4881 Old & use: http://x&y
4883 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4886 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4890 External links: encoded equals (bug 6102)
4892 http://example.com/?foo=bar
4894 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4897 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4901 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4902 ## does it number them. As discussed in bug 53505, we can identify
4903 ## autonumbered links via CSS.
4907 External links: [raw ampersand]
4909 Old & use: [http://x&y]
4911 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4914 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4917 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4918 # mode will return the [raw ampersand] wikitext
4920 External links: [encoded ampersand]
4922 parsoid=wt2html,wt2wt,html2html
4924 Old & use: [http://x&y]
4926 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4929 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4933 External links: [raw equals]
4935 [http://example.com/?foo=bar]
4937 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4940 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4943 # note that parsoid html is identical to [raw equals] case; so html2wt
4944 # mode will return the [raw equals] wikitext
4946 External links: [encoded equals] (bug 6102)
4948 parsoid=wt2html,wt2wt,html2html
4950 [http://example.com/?foo=bar]
4952 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4955 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4958 # xxx parsoid strips the IDN character, so the round-trip tests will
4959 # obviously fail and are disabled. --cscott
4961 External links: [IDN ignored character reference in hostname; strip it right off]
4963 parsoid=wt2html,wt2wt,html2html
4965 [http://e‌xample.com/]
4967 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4970 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4973 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4974 # Where an external link could easily circumvent the sanitization of the text of
4975 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4976 # test demands a higher standard. That's a bit strange.
4980 # http://example.com -> [http://example.com|http://example.com]
4981 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4983 # The first example is sanitized, but the second is not. Any security benefits
4984 # from this production are trivial to circumvent. Either remove this test and
4985 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4986 # the test accordingly.
4990 # xxx parsoid strips the IDN character, so the round-trip tests will
4991 # obviously fail and are disabled. --cscott
4993 External links: IDN ignored character reference in hostname; strip it right off
4995 parsoid=wt2html,html2html
4997 http://e‌xample.com/
4999 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5002 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5006 External links: www.jpeg.org (bug 554)
5010 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5014 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
5016 External links: URL within URL (original bug 2)
5018 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5020 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5023 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5027 BUG 361: URL inside bracketed URL
5029 [http://www.example.com/foo http://www.example.com/bar]
5031 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5036 BUG 361: URL within URL, not bracketed
5038 http://www.example.com/foo?=http://www.example.com/bar
5040 <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>
5045 BUG 289: ">"-token in URL-tail
5047 http://www.example.com/<hello>
5049 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5054 BUG 289: literal ">"-token in URL-tail
5056 http://www.example.com/<b>html</b>
5058 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5061 <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>
5065 BUG 289: ">"-token in bracketed URL
5067 [http://www.example.com/<hello> stuff]
5069 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5074 BUG 289: literal ">"-token in bracketed URL
5076 [http://www.example.com/<b>html</b> stuff]
5078 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5083 BUG 289: literal double quote at end of URL
5085 http://www.example.com/"hello"
5087 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5092 BUG 289: literal double quote in bracketed URL
5094 [http://www.example.com/"hello" stuff]
5096 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5101 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
5103 [http://www.example.com test]
5105 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5110 External links: link text with spaces
5112 [http://www.example.com a b c]
5113 [http://www.example.com ''a'' ''b'']
5115 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5116 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5121 External links: wiki links within external link (Bug 3695)
5123 parsoid=wt2html,html2html
5125 [http://example.com [[wikilink]] embedded in ext link]
5127 <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>
5130 <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>
5134 BUG 787: Links with one slash after the url protocol are invalid
5138 [http:/example.com title]
5140 <p>http:/example.com
5141 </p><p>[http:/example.com title]
5146 Bracketed external links with template-generated invalid target
5148 [{{echo|http:/example.com}} title]
5150 <p>[http:/example.com title]
5155 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
5157 ''[http://example.com text'']
5158 [http://example.com '''text]'''
5159 ''Something [http://example.com in italic'']
5160 ''Something [http://example.com mixed''''', even bold]'''
5161 '''''Now [http://example.com both''''']
5163 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5164 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5165 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5166 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5167 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5173 Bug 4781: %26 in URL
5175 http://www.example.com/?title=AT%26T
5177 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5180 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5183 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5184 # % is actually legal in HTML5. Any change in output would need testing though.
5186 Bug 4781, 5267: %25 in URL
5188 http://www.example.com/?title=100%25_Bran
5190 <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>
5193 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5197 Bug 4781, 5267: %28, %29 in URL
5199 http://www.example.com/?title=Ben-Hur_%281959_film%29
5201 <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>
5204 <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>
5209 Bug 4781: %26 in autonumber URL
5211 [http://www.example.com/?title=AT%26T]
5213 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5216 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5220 Bug 4781, 5267: %26 in autonumber URL
5222 [http://www.example.com/?title=100%25_Bran]
5224 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5227 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5231 Bug 4781, 5267: %28, %29 in autonumber URL
5233 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5235 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5238 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5243 Bug 4781: %26 in bracketed URL
5245 [http://www.example.com/?title=AT%26T link]
5247 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5250 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5254 Bug 4781, 5267: %25 in bracketed URL
5256 [http://www.example.com/?title=100%25_Bran link]
5258 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5263 Bug 4781, 5267: %28, %29 in bracketed URL
5265 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5267 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5270 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5274 External link containing a period in the anchor. (bug 63947)
5276 [//foo.org/bar#baz. bang]
5278 [//foo.org/bar. bang]
5280 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5281 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5284 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5285 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5289 External link containing a single quote. (bug 63947)
5293 [//foo.org/bar'baz bang]
5295 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5296 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5299 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5300 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5304 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5306 Some [http://example.com/ pretty ''italics'' and stuff]!
5308 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5313 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5315 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5317 <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>
5322 External link containing double-single-quotes with no space separating the url from text in italics
5324 [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]].]
5326 <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>
5329 <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>
5331 <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>
5335 External link with comments in link text
5337 [http://www.google.com Google <!-- comment -->]
5339 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5342 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5346 External link to bare IPv4 address
5348 [http://192.168.0.1 Link]
5350 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5353 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5357 URL-encoding in URL functions (single parameter)
5359 {{localurl:Some page|amp=&}}
5361 <p>/index.php?title=Some_page&amp=&
5366 URL-encoding in URL functions (multiple parameters)
5368 {{localurl:Some page|q=?&=&}}
5370 <p>/index.php?title=Some_page&q=?&amp=&
5377 http://example.com/index.php?foozoid%5B%5D=bar
5379 http://example.com/index.php?foozoid[]=bar
5381 <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>
5382 </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>
5385 <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>
5387 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5391 IPv6 urls, autolink format (T23261)
5393 http://[2404:130:0:1000::187:2]/index.php
5395 Examples from RFC 2373, section 2.2:
5396 * http://[1080::8:800:200C:417A]/unicast
5397 * http://[FF01::101]/multicast
5398 * http://[::1]/loopback
5399 * http://[::]/unspecified
5400 * http://[::13.1.68.3]/ipv4compat
5401 * http://[::FFFF:129.144.52.38]/ipv4compat
5403 Examples from RFC 2732, section 2:
5404 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5405 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5406 * http://[3ffe:2a00:100:7031::1]
5407 * http://[1080::8:800:200C:417A]/foo
5408 * http://[::192.9.5.5]/ipng
5409 * http://[::FFFF:129.144.52.38]:80/index.html
5410 * http://[2010:836B:4179::836B:4179]
5413 <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>
5414 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5416 <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>
5417 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5418 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5419 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5420 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5421 <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>
5422 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5424 <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>
5425 <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>
5426 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5427 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5428 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5429 <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>
5430 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5433 <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>
5435 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5436 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5437 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5438 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5439 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5440 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5441 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5443 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5444 <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>
5445 <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>
5446 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5447 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5448 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5449 <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>
5450 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5454 IPv6 urls, bracketed format (T23261)
5456 [http://[2404:130:0:1000::187:2]/index.php test]
5458 Examples from RFC 2373, section 2.2:
5459 * [http://[1080::8:800:200C:417A] unicast]
5460 * [http://[FF01::101] multicast]
5461 * [http://[::1]/ loopback]
5462 * [http://[::] unspecified]
5463 * [http://[::13.1.68.3] ipv4compat]
5464 * [http://[::FFFF:129.144.52.38] ipv4compat]
5466 Examples from RFC 2732, section 2:
5467 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5468 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5469 * [http://[3ffe:2a00:100:7031::1] 3]
5470 * [http://[1080::8:800:200C:417A]/foo 4]
5471 * [http://[::192.9.5.5]/ipng 5]
5472 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5473 * [http://[2010:836B:4179::836B:4179] 7]
5476 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5477 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5479 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5480 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5481 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5482 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5483 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5484 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5485 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5487 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5488 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5489 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5490 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5491 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5492 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5493 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5496 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5498 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5499 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5500 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5501 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5502 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5503 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5504 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5506 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5507 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5508 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5509 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5510 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5511 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5512 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5513 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5517 Non-extlinks in brackets
5526 [{{echo|foo}} ''bar'']
5527 [{{echo|foo}}l's] errand
5528 [{{echo|foo}}l's errand]
5530 [url=http://example.com]
5531 [http:// bare protocols don't count]
5544 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5545 [http:// bare protocols don't count]
5553 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5554 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5555 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5556 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5557 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5558 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5559 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5560 [http:// bare protocols don't count]</p>
5564 Percent encoding in external links
5566 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5568 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5571 <p><a rel="mw:ExtLink"
5572 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5576 Use url link syntax for links where the content is equal the link target
5580 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5583 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5587 Parenthesis in external links, especially URL links
5591 http://example.com/test)
5593 http://example.com/(test)
5595 http://example.com/((test)
5597 (http://example.com/(test))
5599 (http://example.com/(test)))))
5601 http://example.com/a)b
5603 [http://example.com) foo]
5605 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</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/(test)">http://example.com/(test)</a>
5608 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5609 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5610 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5611 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5612 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5615 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</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/(test)">http://example.com/(test)</a></p>
5618 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5619 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5620 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5621 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5622 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5626 Parenthesis in external links, w/ transclusion or comment
5628 (http://example.com/{{echo|hi}})
5630 (http://example.com<!-- hi -->)
5632 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5633 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5636 <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>
5638 <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>
5642 Serialize <a> tags with invalid link targets as plain text
5644 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5646 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5647 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5648 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5649 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5652 <nowiki>*</nowiki>text
5653 <nowiki>[[foo]]</nowiki>
5654 <nowiki>*a [[foo]]</nowiki>
5658 mw:ExtLink -vs- mw:WikiLink (T94723)
5662 <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>
5663 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5664 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5665 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5667 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5668 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5673 [[wikipedia:Foo|Bar]]
5674 [[wikipedia:Foo|Bar]]
5676 [[wikipedia:European_Robin|European Robin]]
5677 [[wikipedia:European_Robin|European Robin]]
5681 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5685 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5687 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5698 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5700 Normal text. '''''Bold italic text.''''' Normal text.
5702 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5703 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5708 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5709 # parser strips. The wikitext contains just the first half of the bold
5712 Unclosed and unmatched quotes
5714 '''''Bold italic text '''with bold deactivated''' in between.'''''
5716 '''''Bold italic text ''with italic deactivated'' in between.'''''
5720 ..spanning two paragraphs (should not work).'''
5722 '''Bold tag left open
5724 ''Italic tag left open
5728 <!-- Unmatching number of opening, closing tags: -->
5729 '''This year''''s election ''should'' beat '''last year''''s.
5731 ''Tom'''s car is bigger than ''Susan'''s.
5733 Plain ''italic'''s plain
5735 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5736 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5737 </p><p><b>Bold text..</b>
5738 </p><p>..spanning two paragraphs (should not work).
5739 </p><p><b>Bold tag left open</b>
5740 </p><p><i>Italic tag left open</i>
5742 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5743 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5744 </p><p>Plain <i>italic'</i>s plain
5747 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5748 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5749 </p><p><b>Bold text..</b>
5750 </p><p>..spanning two paragraphs (should not work).<b></b>
5751 </p><p><b>Bold tag left open</b>
5752 </p><p><i>Italic tag left open</i>
5755 <!-- Unmatching number of opening, closing tags: -->
5756 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5757 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5758 </p><p>Plain <i>italic'</i>s plain
5765 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5768 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5769 # is the bare minimum required by the spec, see:
5770 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5771 # Parsoid team replies: empty table tags are legal in HTML5
5773 A table with no data.
5786 A table with stray table end tags on start tag line (wt2html)
5790 {|style="color: red;"|}
5792 {|style="color: red;" |}
5796 {|style="color: red;"|} id="foo"
5800 {|style="color: red;" |} id="foo"
5804 <table style="color: red;"></table>
5806 <table style="color: red;">
5812 <table style="color: red;" id="foo">
5818 <table style="color: red;" id="foo">
5827 A table with no data (take 2)
5835 # A table with nothing but a caption is invalid XHTML, we might want to render
5836 # this as <p>caption</p>
5837 # Parsoid team replies: table with only a caption is legal in HTML5
5839 A table with nothing but a caption
5847 </caption><tr><td></td></tr></table>
5850 <table><caption> caption</caption></table>
5854 A table with caption with default-spaced attributes and a table row
5857 |+ style="color: red;" | caption1
5863 <caption style="color: red;"> caption1
5872 A table with captions with non-default spaced attributes and a table row
5875 |+style="color: red;"|caption2
5876 |+ style="color: red;"| caption3
5882 <caption style="color: red;">caption2
5884 <caption style="color: red;"> caption3
5893 Table td-cell syntax variations
5897 | foo bar foo || baz
5898 | style='color:red;' | baz
5899 | style='color:red;' || baz
5906 <td> foo bar foo </td>
5909 <td style="color:red;"> baz
5911 <td> style='color:red;' </td>
5939 Simple table but with multiple dashes for row wikitext
5958 Multiplication table
5960 {| border="1" cellpadding="2"
5961 |+Multiplication table
5963 ! × !! 1 !! 2 !! 3
5981 <table border="1" cellpadding="2">
5982 <caption>Multiplication table
6029 Accept "||" in table headings
6044 Accept "!!" in table data
6058 <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>
6063 Accept "||" in indented table headings
6073 </th></tr></table></dd></dl>
6078 Accept "!!" in templates
6092 <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>
6096 Accept "!!" in table headings after newline
6113 <p>b!!c</p></th></tr>
6118 Accept "!!" in table data of mixed wikitext / html syntax
6122 <tr><td>b!!c</td></tr>
6135 <tbody><tr><th>a</th></tr>
6136 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6141 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6158 Accept "| !" at start of line in tables (ignore !-attribute)
6162 | !style="color:red" | bar
6174 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 +/-
6178 |style='color:red;'|+1
6179 |style='color:blue;'|-1
6191 <td style="color:red;">+1
6193 <td style="color:blue;">-1
6217 |rowspan=2| Cell 2, row 1 (and 2)
6228 <td rowspan="2"> Cell 2, row 1 (and 2)
6246 {| bgcolor=#ABCDEF border=2
6251 |the original table again
6259 <table bgcolor="#ABCDEF" border="2">
6267 <td>the original table again
6273 Invalid attributes in table cell (bug 1830)
6287 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6291 | title="foo<nowiki>|</nowiki>" |bar
6292 | title="foo<nowiki>|</nowiki>" bar
6299 <td title="foo|">bar
6301 <td> title="foo|" bar
6306 <tbody><tr><td title="foo">bar</td>
6307 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6308 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6312 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6313 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6314 # *2wt modes will fail.
6316 Table security: embedded pipes
6318 parsoid=wt2html,html2html
6321 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6325 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6326 <td>]" onmouseover="alert(document.cookie)">test
6334 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6337 # FIXME: The output seems broken. Filed as T110268.
6339 ! and || in td attributes should not be parsed as <th>/<td>
6344 | style="color: red !important;" data-contrived="put this here ||" | foo
6349 <td> style="color: red !important;" data-contrived="put this here </td>
6355 <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>
6360 Indented table markup mixed with indented pre content (proposed in bug 6200)
6365 Text that should be rendered preformatted
6373 <pre>Text that should be rendered preformatted
6382 1. Template-generated table cell attributes and cell content
6387 || {{table_attribs_5}}
6388 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6389 |align=center {{table_attribs}}
6390 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6395 <td style="color:red;">Foo
6397 <td style="color:red;">Foo
6399 <td> style="color:red;"</td>
6402 <td style="color:red;">Foo
6404 <td align="center" style="color:red;">Foo
6406 <td align="center" style="color:red;">Foo
6412 2. Template-generated table cell attributes and cell content
6415 |{{table_attribs_2}}
6420 <td style="color:red;">Foo
6428 <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>
6429 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6434 3. Template-generated table cell attributes and cell content
6437 !align=center {{table_header_cells}}
6439 |align=center {{table_cells}}
6444 <th align="center" style="color:red;">Foo</th>
6445 <th style="color:red;"><i>Bar</i></th>
6446 <th style="color:brown;"><i>Foo</i> and Baz
6449 <td align="center" style="color:red;">Foo</td>
6450 <td style="color:red;"><i>Bar</i></td>
6451 <td style="color:brown;"><i>Foo</i> and Baz
6456 <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>
6457 <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>
6462 4. Template-generated table cell attributes and cell content inside a templated table
6465 !align=center {{table_header_cells}}
6467 |align=center {{table_cells}}
6472 <th align="center" style="color:red;">Foo</th>
6473 <th style="color:red;"><i>Bar</i></th>
6474 <th style="color:brown;"><i>Foo</i> and Baz
6477 <td align="center" style="color:red;">Foo</td>
6478 <td style="color:red;"><i>Bar</i></td>
6479 <td style="color:brown;"><i>Foo</i> and Baz
6483 <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}}]}'>
6484 <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>
6486 <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>
6490 ## Edge case fix to prevent future regressions
6492 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6495 |{{table_attribs_7}}
6500 <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>
6502 <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>
6506 Table with row followed by newlines and table heading
6524 Table with empty line following the start tag
6541 # FIXME: Preserve the attribute properly (with an empty string as value) in
6542 # the PHP parser. Parsoid implements the behavior below.
6544 Table attributes with empty value
6554 </td></tr></tbody></table>
6559 Wikitext table with a lot of comments
6582 Wikitext table comments represented in parsoid dom
6584 {|<!--c1--><!--c2-->
6595 <table><!--c1--><!--c2-->
6596 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6597 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6602 Wikitext table with double-line table cell
6619 Table cell with a single comment
6636 Table-cell after a comment-only-empty-line
6653 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6655 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6661 Build table with {{!}}
6663 {{{!}} class="wikitable"
6666 {{!}}- style="color:red;"
6667 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6670 <table class="wikitable">
6676 <tr style="color:red;">
6678 <td style="color:red;"> second data
6684 Build table with pipe as data
6686 {| class="wikitable"
6689 |- style="color:red;"
6690 | data || style="color:red;" | second data
6692 | style="color:red;" | data with | || style="color:red;" | second data with |
6694 || data with | ||| second data with |
6697 <table class="wikitable">
6703 <tr style="color:red;">
6705 <td style="color:red;"> second data
6708 <td style="color:red;"> data with | </td>
6709 <td style="color:red;"> second data with |
6712 <td> data with | </td>
6713 <td> second data with |
6719 Build table with wikilink
6721 {| class="wikitable"
6722 ! header || second header
6723 |- style="color:red;"
6724 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6726 | data || second data [[Main Page|link|text with pipe]]
6729 <table class="wikitable">
6734 <tr style="color:red;">
6735 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6736 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6740 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6745 # The expected HTML structure in this test is debatable. The PHP parser does
6746 # not parse this kind of table at all. The main focus for Parsoid is on
6747 # round-tripping, so this output is ok for now. TODO: revisit!
6749 Wikitext table with html-syntax row
6759 <td>foo</td></tr></tbody></table>
6762 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6763 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6764 ## PHP parser, which tidy then compounds by fostering the content
6765 ## entirely out of the table. Parsoid recognizes the table context
6766 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6767 ## depends on PHP's treatment of broken table markup!
6769 Implicit <td> after a |-
6771 parsoid=wt2html,html2html
6791 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6793 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6795 parsoid=wt2html,html2html
6828 <tr><td><pre>a</pre></td></tr>
6829 <tr><td> b</td></tr>
6834 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6835 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6837 Lists should be recognized in an implicit <td> context
6839 parsoid=wt2html,html2html
6866 Table cells not properly parsed in an implicit-td context
6870 {{table_attribs_4}} || a || b
6875 <td style="background-color:#DC241f;" width="10px"></td>
6882 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6883 <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>
6888 Parsoid: Round-trip tables directly followed by content (bug 51219)
6890 parsoid=wt2html,wt2wt
6915 Parsoid: Default to a newline after tables in new content (bug 51219)
6920 <tr><td>foo</td></tr></tbody></table> bar
6922 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6927 <nowiki> </nowiki>bar
6935 Parsoid: newline inducing block nodes don't suppress <nowiki>
6947 Parsoid: Row-syntax table headings followed by comment & table cells
6949 parsoid=wt2html,wt2wt
6953 <!-- foo --> || baz || quux
6967 <tbody><tr><th> foo </th><th> bar
6968 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6973 Parsoid: Recover better from broken table attributes
6993 <p>foo</p></td></tr>
6998 Tables: Digest broken attributes on table and tr tag
7015 Strip unsupported table tags
7063 Testing serialization after deletion of table cells
7066 "modes": ["wt2wt", "selser"],
7074 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7087 Plain link, capitalized
7091 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7096 Plain link, uncapitalized
7100 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7107 [[Main Page|The Main Page]]
7109 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7114 Piped link with comment in link text
7116 [[Main Page|The Main<!--front--> Page]]
7118 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7123 Piped link with multiple pipe characters in link text
7125 [[Main Page||The|Main|Page|]]
7127 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7130 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
7134 Piped link with no link text
7136 [[Thomas Bek (bishop of St David's)|]]
7138 <p>[[Thomas Bek (bishop of St David's)|]]
7141 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7149 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7154 Broken link with fragment
7156 [[Zigzagzogzagzig#zug]]
7158 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7163 Special page link with fragment
7165 [[Special:Version#anchor]]
7167 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7172 Nonexistent special page link with fragment
7174 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7176 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7183 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7185 <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>
7192 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7194 <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>!!!
7205 Bug 43661: Piped links with identical prefixes
7207 [[prefixed article|prefixed articles with spaces]]
7209 [[prefixed article|prefixed articlesaoeu]]
7211 [[Main Page|Main Page test]]
7213 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7214 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7215 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7221 Link with HTML entity in suffix / tail
7223 [[Main Page]]", [[Main Page]]a
7225 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7228 <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>
7232 Link with 3 brackets
7243 Link with 4 brackets
7247 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7252 Piped link with 3 brackets
7254 [[[main page|the main page]]]
7256 <p>[[[main page|the main page]]]
7261 Piped link with extlink-like text
7264 [[Main Page|This is a [bar]]]
7266 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7267 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7270 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7271 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7275 Link with multiple pipes
7277 [[Main Page|The|Main|Page]]
7279 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7283 # Note that parsoid does not munge anchor text; all non-space
7284 # characters are valid in HTML5 ids.
7286 Anchor containing a #. (bug 63430)
7288 [[Main Page#And#Link]]
7290 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7293 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
7299 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7301 <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>
7306 Link with space in namespace
7308 [[User talk:Foo bar]]
7310 <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>
7315 MemoryAlpha:AlphaTest
7317 This is an article in the MemoryAlpha namespace
7318 (which shadows the memoryalpha interwiki link).
7322 Namespace takes precedence over interwiki link (bug 51680)
7324 [[MemoryAlpha:AlphaTest]]
7326 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7330 # The previous test doesn't work correctly in html2*, due to not recognizing the
7331 # link as an internal one. This one checks for the correct behavior.
7333 Link to namespace preferred over interwiki with correct rel attribute
7335 parsoid=html2wt,html2html
7337 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7339 [[MemoryAlpha:AlphaTest]]
7343 Piped link to namespace
7345 [[Meta:Disclaimers|The disclaimers]]
7347 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7354 [[Usually caused by a typo (oops}]]
7356 <p>[[Usually caused by a typo (oops}]]
7363 Just a test of an article title containing a percent.
7367 Link containing % (not as a hex sequence)
7371 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7374 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7377 # note that the parsoid HTML is identical to the previous test output,
7378 # so the previous test ensures that the html2wt mode will generate the
7379 # "not as a hex sequence" wikitext.
7381 Link containing % as a single hex sequence interpreted to char
7383 parsoid=wt2wt,wt2html,html2html
7387 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7390 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
7394 Link containing % as a double hex sequence interpreted to hex sequence
7398 <p>[[7%2525 Solution]]
7402 # note that parsoid does not munge anchor text; all non-space
7403 # characters are valid in HTML5 anchors.
7405 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7406 Example for such a section: == < ==
7408 [[%23%3c]][[%23%3e]]
7410 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7413 <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>
7417 Link containing "<#" and ">#" as a hex sequences
7419 [[%3c%23]][[%3e%23]]
7421 <p>[[%3c%23]][[%3e%23]]
7426 Link containing an equals sign
7428 [[Special:BookSources/isbn=4-00-026157-6]]
7430 <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>
7433 <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>
7439 Just a test of an article title containing a tilde.
7442 # note that links containing signatures, like [[Foo~~~~]], are
7443 # massaged by the pre-save transform (PST) and so the tildes are never
7444 # seen by the parser.
7446 Link containing a tilde
7450 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7453 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7457 Link containing double-single-quotes '' (bug 4598)
7459 [[Lista d''e paise d''o munno]]
7461 <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>
7464 <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>
7468 Link containing double-single-quotes '' in text (bug 4598 sanity check)
7470 Some [[Link|pretty ''italics'' and stuff]]!
7472 <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>!
7475 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7479 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
7481 ''Some [[Link|pretty ''italics'' and stuff]]!''
7483 <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>
7488 Link with double quotes in title part (literal) and alternate part (interpreted)
7490 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7494 [[''Pentecoste''|Pentecoste]]
7496 [[''Pentecoste''|''Pentecoste'']]
7498 <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>
7499 </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>
7500 </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>
7501 </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>
7504 <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>
7505 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7506 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7507 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7511 Broken image links with HTML captions (bug 39700)
7513 [[File:Nonexistent|<script></script>]]
7514 [[File:Nonexistent|100x100px|<script></script>]]
7515 [[File:Nonexistent|<]]
7516 [[File:Nonexistent|a<i>b</i>c]]
7518 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7519 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7520 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7521 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7524 <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>
7525 <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>
7526 <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>
7527 <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>
7533 [[http://www.example.com]]
7535 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7538 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7542 Plain link to URL with link text
7544 [[http://www.example.com Link text]]
7546 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7551 Plain link to protocol-relative URL
7553 [[//www.example.com]]
7555 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7558 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7562 Plain link to protocol-relative URL with link text
7564 [[//www.example.com Link text]]
7566 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7571 Plain link to page with question mark in title
7577 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7578 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7583 # I'm fairly sure the expected result here is wrong.
7584 # We want these to be URL links, not pseudo-pages with URLs for titles....
7585 # However the current output is also pretty screwy.
7588 # I'm changing it to match the current output--it arguably makes more
7589 # sense in the light of the test above. Old expected result was:
7590 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7592 # But I think this test is bordering on "garbage in, garbage out" anyway.
7597 Piped link to URL: [[http://www.example.com|an example URL]]
7599 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7602 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
7606 BUG 2: [[page|http://url/]] should link to page, not http://url/
7608 [[Main Page|http://url/]]
7610 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
7613 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
7616 # Parsoid does not mark self-links, by design.
7618 BUG 337: Escaped self-links should be bold
7622 [[Bug462]] [[Bug462]]
7624 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
7627 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
7629 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
7633 Self-link to section should not be bold
7637 [[Main Page#section]]
7639 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7650 Self-link to numeric title
7656 <p><strong class="selflink">0</strong>
7661 Link to numeric-equivalent title
7667 <p><a href="/wiki/00" title="00">00</a>
7672 <nowiki> inside a link
7674 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7676 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7681 Non-breaking spaces in title
7683 [[ Main Page ]]
7685 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7690 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7696 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7701 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7707 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7712 Internal link with en linktrail: no apostrophes (bug 27473)
7718 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7723 Internal link with ca linktrail with apostrophes (bug 27473)
7729 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7734 Internal link with kaa linktrail with apostrophes (bug 27473)
7740 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7745 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7747 [[User:Foo/Test/63636:Bar|Test]]
7749 <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>
7752 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7756 Purely hash wikilink
7758 title=[[User:test/123]]
7762 <p><a href="#a">b</a>
7765 <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>
7769 1. Interaction of linktrail and template encapsulation
7775 <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>
7779 2. Interaction of linktrail and template encapsulation
7783 {{echo|Some [[Fool]]}}s
7785 <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>
7789 3. Interaction of linktrail and template encapsulation
7793 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7795 <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>
7805 Internal link with is link prefix
7809 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7811 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7822 Internal link with is link trail and link prefix
7826 [[mótmælendatrú|xxx]]ar
7828 mótmælenda[[söfnuður]]
7829 mótmælenda[[söfnuður|söfnuðir]]
7830 mótmælenda[[söfnuður|söfnuðir]]xxx
7832 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7833 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7834 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7835 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7836 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7841 Parsoid link trail escaping
7843 parsoid=html2wt,html2html
7845 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7851 Parsoid link prefix escaping
7854 parsoid=html2wt,html2html
7856 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7858 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7862 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7870 [http://wp.org ''foo'']
7872 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7873 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7874 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7875 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7880 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7884 [[Foo|{{echo|a}} b {{echo|c}}]]
7886 <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>
7890 Link with angle bracket after anchor
7894 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7897 <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>
7901 ### Interwiki links (see maintenance/interwiki.sql)
7905 Inline interwiki link
7907 parsoid=wt2html,wt2wt,html2html
7909 [[MeatBall:SoftSecurity]]
7911 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7914 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7918 Inline interwiki link with empty title (bug 2372)
7920 parsoid=wt2html,wt2wt,html2html
7924 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7927 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7931 Interwiki link encoding conversion (bug 1636)
7933 *[[Wikipedia:ro:Olteniţa]]
7934 *[[Wikipedia:ro:Olteniţa]]
7936 <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>
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></ul>
7941 <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>
7942 <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>
7947 Interwiki link with fragment (bug 2130)
7949 [[MeatBall:SoftSecurity#foo]]
7951 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7955 # Ideally the wikipedia: prefix here should be proto-relative too
7956 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7957 # define the 'en' prefix, and originally the test used 'wikipedia',
7958 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7961 Different interwiki prefixes mapping to the same URL
7969 [[:wikipedia:Foo|Foo]]
7971 [[wikipedia:en:Foo]]
7973 [[:wikipedia:en:Foo]]
7977 <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>
7979 <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>
7981 <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>
7983 <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>
7985 <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>
7987 <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>
7989 <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>
7993 Interwiki links that cannot be represented in wiki syntax
7996 [[meatball:ok#foo|ok with fragment]]
7997 [[meatball:ok_as_well?|ok ending with ? mark]]
7998 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7999 [http://de.wikipedia.org/wiki/#foo is just fragment]
8002 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8003 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8004 <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>
8005 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8006 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8009 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8010 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8011 <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>
8012 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8013 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8017 Interwiki links: trail
8019 [[wikipedia:Foo|Ba]]r
8021 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8024 <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>
8028 Local interwiki link
8030 parsoid=wt2html,wt2wt,html2html
8032 [[local:Template:Foo]]
8034 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8037 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8040 # Parsoid does not mark self-links, by design.
8042 Local interwiki link: self-link to current page
8045 parsoid=wt2html,wt2wt,html2html
8049 <p><strong class="selflink">local:Main Page</strong>
8052 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8056 Local interwiki link: prefix only (bug 64167)
8058 parsoid=wt2html,wt2wt,html2html
8062 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8065 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8069 Local interwiki link: with additional interwiki prefix (bug 61357)
8071 parsoid=wt2html,wt2wt,html2html
8073 [[local:meatball:Hello]]
8075 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8078 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8082 Multiple local interwiki link prefixes
8084 [[local:local:local:local:mi:local:Foo]]
8086 parsoid=wt2html,wt2wt,html2html
8088 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8091 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8095 ### Interlanguage links
8096 ### Language links (so that searching for '### language' matches..)
8102 parsoid=wt2html,wt2wt,html2html
8110 <p>Blah blah blah</p>
8111 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8115 Interlanguage link with spacing
8117 parsoid=wt2html,wt2wt,html2html
8125 <p>Blah blah blah</p>
8126 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8130 Double interlanguage link
8132 parsoid=wt2html,wt2wt,html2html
8141 <p>Blah blah blah</p>
8142 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8143 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8147 Interlanguage link variations
8149 parsoid=wt2html,wt2wt,html2html
8159 <p>Blah blah blah</p>
8160 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8161 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8162 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8166 Space and question mark encoding in interlanguage links (T95473)
8168 parsoid=wt2html,wt2wt,html2html
8176 <p>Blah blah blah</p>
8177 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8181 Interlanguage link, with prefix links
8191 <p>Blah blah blah</p>
8192 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8196 Double interlanguage link, with prefix links (bug 8897)
8207 <p>Blah blah blah</p>
8208 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8209 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8213 "Extra" interlanguage links (bug 32189 / gerrit 111390)
8221 <p>Blah blah blah</p>
8222 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8226 Parsoid-specific test: Wikilinks with should RT properly
8232 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8237 Parsoid bug 53221: Wikilinks should be properly entity-escaped
8241 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8242 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8244 He&nbsp;llo [[Foo|He&nbsp;llo]]
8246 He&nbsp;llo [[He&nbsp;llo]]
8250 Parsoid: handle constructor well
8256 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8257 </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>
8260 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
8262 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
8271 # Note that `ko` isn't a known interlanguage prefix
8273 Parsoid: recognize interlanguage links without a target page
8283 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8285 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8288 # Note that `ko` isn't a known interwiki prefix
8290 Parsoid: recognize interwiki links without a target page
8292 parsoid=wt2html,wt2wt,html2html
8298 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8299 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8302 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8303 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8307 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
8311 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8314 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8318 Interlanguage link with preceding local interwiki link (bug 68085)
8320 parsoid=wt2html,wt2wt,html2html
8323 [[local:es:Spanish]]
8326 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8330 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8334 Looks like an interlanguage link, but is actually a local interwiki
8336 parsoid=wt2html,wt2wt,html2html
8342 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8346 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8350 ### Redirects, Parsoid-only
8354 1. Simple redirect to page
8356 #REDIRECT [[Main Page]]
8358 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8362 2. Other redirect variants
8364 #REDIRECT [[Main_Page]]
8366 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8369 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8370 # This tests the Parsoid bail-out code.
8372 3. Other redirect variants
8374 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8376 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8380 4. Redirect to a templated destination
8382 #REDIRECT [[{{echo|Foo}}bar]]
8384 <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"}]]}'/>
8390 parsoid=wt2html,wt2wt
8395 <li>REDIRECT [[]]</li></ol>
8399 Optional colon in #REDIRECT
8401 # the colon is archaic syntax. we support it for wt2html, but we
8402 # don't care that it roundtrips back to the modern syntax.
8403 parsoid=wt2html,html2html
8405 #REDIRECT:[[Main Page]]
8407 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8411 Whitespace in #REDIRECT with optional colon
8413 # the colon and gratuitous whitespace is archaic syntax. we support
8414 # it for wt2html, but we don't care that it roundtrips back to the
8415 # modern syntax (without extra whitespace)
8416 parsoid=wt2html,html2html
8423 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8427 Piped link in #REDIRECT
8429 # content after piped link is ignored. we support this syntax,
8430 # but don't care that the piped link is lost when we roundtrip this.
8433 #REDIRECT [[Main Page|bar]]
8435 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8439 Redirect to category (T104502)
8441 parsoid=wt2html,wt2wt
8443 #REDIRECT [[Category:Foo]]
8445 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8449 Redirect to category with URL encoding (T104502)
8453 #REDIRECT [[Category%3AFoo]]
8455 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8459 Redirect to category page
8461 #REDIRECT [[:Category:Foo]]
8463 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8467 Redirect to image page (1)
8469 #REDIRECT [[File:Wiki.png]]
8471 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8475 Redirect to image page (2)
8477 #REDIRECT [[Image:Wiki.png]]
8479 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8482 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8483 # Next test confirms this.
8485 Redirect to language (1) (T104918)
8487 parsoid=wt2html,wt2wt,html2html
8489 #REDIRECT [[en:File:Wiki.png]]
8491 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8495 Redirect to language (2) (T104918)
8497 #REDIRECT [[:en:File:Wiki.png]]
8499 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
8503 Redirect to interwiki (T104918)
8505 #REDIRECT [[meatball:File:Wiki.png]]
8507 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
8511 Non-English #REDIRECT
8515 #TILVÍSUN [[Main Page]]
8517 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
8521 Redirect syntax under text isn't considered a redirect
8524 #redirect [[Main Page]]
8527 <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>
8530 # FIXME: Should hoist the redirect to the top of the page and ensure there
8537 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
8557 Broken br tag sanitization
8565 # TODO: Fix html2html mode (bug 51055)!
8567 Parsoid: Broken br tag recognition
8580 Incorrecly removing closing slashes from correctly formed XHTML
8582 <br style="clear:both;" />
8584 <p><br style="clear:both;" />
8589 Failing to transform badly formed HTML into correct XHTML
8591 <br style="clear: left;">
8592 <br style="clear: right;">
8593 <br style="clear: both;">
8595 <p><br style="clear: left;" />
8596 <br style="clear: right;" />
8597 <br style="clear: both;" />
8601 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
8602 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
8604 Handling html with a div self-closing tag
8613 <p><div title />
8617 <p><div title=bar />
8618 <div title=bar/>
8620 <div title="bar/"></div>
8624 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8625 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
8626 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
8627 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8628 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
8629 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
8633 Handling html with a br self-closing tag
8660 Horizontal ruler (should it add that extra space?)
8675 Horizontal ruler -- 4+ dashes render hr
8684 Horizontal ruler -- eats additional dashes on the same line
8693 Horizontal ruler -- does not collapse dashes on consecutive lines
8704 Horizontal ruler -- <4 dashes render as plain text
8713 Horizontal ruler -- Supports content following dashes on same line
8725 ### Block-level elements
8734 <ul><li>Common list</li>
8736 <li>item 3</li></ul>
8747 <ol><li>Numbered list</li>
8749 <li> item 3</li></ol>
8763 ***#Number on level 4
8765 **#Number on level 3
8766 **#Number on level 3
8770 #** Level 3, but ordered
8773 <ol><li> with numbers</li></ol>
8774 <ul><li> and bullets</li></ul>
8775 <ol><li> and numbers</li></ol></li>
8777 <ul><li>bullet level 2
8778 <ul><li>bullet level 3
8779 <ol><li>Number on level 4</li></ol></li></ul></li>
8781 <ol><li>Number on level 3</li>
8782 <li>Number on level 3</li></ol></li></ul>
8783 <ol><li>number level 2</li></ol></li>
8785 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8786 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8797 <ul><li>bar</li></ul></li></ul>
8807 <ul><li><ul><li>foo</li></ul></li>
8813 Nested lists 3 (first element empty)
8819 <ul><li>bar</li></ul></li></ul>
8824 Nested lists 4 (first element empty)
8829 <ul><li><ul><li></li></ul></li>
8835 Nested lists 5 (both elements empty)
8840 <ul><li><ul><li></li></ul></li>
8846 Nested lists 6 (both elements empty)
8852 <ul><li></li></ul></li></ul>
8857 Nested lists 7 (skip initial nesting levels)
8861 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8866 Nested lists 8 (multiple nesting transitions)
8874 <ul><li><ul><li> bar</li></ul></li>
8875 <li> baz</li></ul></li>
8881 Nested lists 9 (extension interaction)
8887 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8891 1. Lists with start-of-line-transparent tokens before bullets: Comments
8904 2. Lists with start-of-line-transparent tokens before bullets: Template close
8909 <ul><li>foo bar</li>
8915 List items are not parsed correctly following a <pre> block (bug 785)
8921 <ul><li> <pre>foo</pre></li>
8922 <li> <pre>bar</pre></li>
8926 <ul><li> <pre data-parsoid='{"stx":"html"}'>foo</pre></li>
8927 <li> <pre data-parsoid='{"stx":"html"}'>bar</pre></li>
8932 List items from template
8943 * notSOL{{inner list}}
8946 <ul><li> item 1</li>
8947 <li> item 2</li></ul>
8948 <ul><li> item 0</li>
8950 <li> item 2</li></ul>
8951 <ul><li> item 0</li>
8954 <li> item 2</li></ul>
8959 List interrupted by empty line or heading
8967 <ul><li> foo</li></ul>
8968 <ul><li><ul><li> bar</li></ul></li></ul>
8969 <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>
8970 <ul><li> Another list item</li></ul>
8975 Multiple list tags generated by templates
8996 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8999 <!--This line will NOT split the list-->
9001 <!--This line will NOT split the list either-->
9003 <!--foo--> <!----> <!--This line NOT split the list either-->
9014 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9017 <!--This line will NOT split the list-->
9019 <!--This line will NOT split the list either-->
9021 <!--foo--> <!----> <!--This line NOT split the list
9034 (The PHP parser relies on Tidy for the hack)
9036 parsoid=wt2html,wt2wt
9040 * {{echo|<li>templated li-hack}}
9041 * <!--foo--> <li> unsupported li-hack with preceding comments
9044 <li><li>not a li-hack
9051 <li>templated li-hack</li>
9052 <li>unsupported li-hack with preceding comments</li>
9055 <li>not a li-hack</li>
9060 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9087 Parsoid: Test of whitespace serialization with Templated bullets
9094 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9098 # ------------------------------------------------------------------------
9099 # The next set of tests are about Parsoid's ability to handle badly nested
9100 # tags (parse, minimize scope of fixup, and roundtrip back)
9101 # ------------------------------------------------------------------------
9104 Unbalanced closing block tags break a list
9105 (php parser relies on Tidy to fix up)
9123 # Parsoid fails this test, but it might be tricky to support properly.
9126 Unbalanced closing non-block tags don't break a list
9127 (php parser relies on Tidy to fix up)
9134 <li><span>a</span></li>
9135 <li><span>b</span></li>
9149 Unclosed formatting tags that straddle lists are closed and reopened
9150 (php parser relies on Tidy to fix up)
9152 parsoid=wt2html,wt2wt,html2html
9162 <ol><li> <s> a</s></li>
9163 <li><s> b </s></li></ol>
9168 1. List embedded in a formatting tag
9175 <li><small>foo</small></li>
9185 ## Ugly Parsoid output here
9186 ## Not sure what the right output is.
9188 2. List embedded in a formatting tag
9195 <li><small>a</small></li>
9196 <li><small>b</small></li>
9203 <li><small>b</small></li>
9207 # Ugly Parsoid and PHP parser output here
9208 # Not sure if we want to make this a test!
9211 ## 3. Unclosed formatting tags in list elements
9217 ## <li><small>a</small></li>
9218 ## <li><small><small>b</small></small></li>
9222 ## <li><small>a</small></li>
9224 ## <li><small>b</small></li>
9228 # This is a bug in the PHP parser + tidy combination.
9229 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9230 # and then fostered out of the table by tidy.)
9231 # We believe the Parsoid output to be correct.
9233 Table with missing opening <tr> tag
9235 parsoid=wt2html,wt2wt
9253 # Note that the current date is hard-coded as
9254 # 1970-01-01T00:02:03Z (a Thursday)
9255 # when running parser tests. The timezone is also fixed to GMT, so
9256 # local date will be identical to current date.
9259 Magic Word: {{CURRENTDAY}}
9268 Magic Word: {{CURRENTDAY2}}
9277 Magic Word: {{CURRENTDAYNAME}}
9286 Magic Word: {{CURRENTDOW}}
9295 Magic Word: {{CURRENTMONTH}}
9304 Magic Word: {{CURRENTMONTH1}}
9313 Magic Word: {{CURRENTMONTHABBREV}}
9315 {{CURRENTMONTHABBREV}}
9322 Magic Word: {{CURRENTMONTHNAME}}
9324 {{CURRENTMONTHNAME}}
9331 Magic Word: {{CURRENTMONTHNAMEGEN}}
9333 {{CURRENTMONTHNAMEGEN}}
9340 Magic Word: {{CURRENTTIME}}
9349 Magic Word: {{CURRENTHOUR}}
9358 Magic Word: {{CURRENTWEEK}} (@bug 4594)
9367 Magic Word: {{CURRENTYEAR}}
9376 Magic Word: {{CURRENTTIMESTAMP}}
9378 {{CURRENTTIMESTAMP}}
9385 Magic Words LOCAL (UTC)
9389 * {{LOCALMONTHNAME}}
9390 * {{LOCALMONTHNAMEGEN}}
9391 * {{LOCALMONTHABBREV}}
9400 * {{LOCALTIMESTAMP}}
9415 <li> 19700101000203</li></ul>
9420 Magic Word: {{FULLPAGENAME}}
9422 title=[[User:Ævar Arnfjörð Bjarmason]]
9426 <p>User:Ævar Arnfjörð Bjarmason
9431 Magic Word: {{FULLPAGENAMEE}}
9433 title=[[User:Ævar Arnfjörð Bjarmason]]
9437 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9442 Magic Word: {{TALKSPACE}}
9444 title=[[User:Ævar Arnfjörð Bjarmason]]
9453 Magic Word: {{TALKSPACE}}, same namespace
9455 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9464 Magic Word: {{TALKSPACE}}, main namespace
9466 title=[[Parser Test]]
9475 Magic Word: {{TALKSPACEE}}
9477 title=[[User:Ævar Arnfjörð Bjarmason]]
9486 Magic Word: {{SUBJECTSPACE}}
9488 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9497 Magic Word: {{SUBJECTSPACE}}, same namespace
9499 title=[[User:Ævar Arnfjörð Bjarmason]]
9508 Magic Word: {{SUBJECTSPACE}}, main namespace
9510 title=[[Parser Test]]
9518 Magic Word: {{SUBJECTSPACEE}}
9520 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9529 Magic Word: {{NAMESPACE}}
9531 title=[[User:Ævar Arnfjörð Bjarmason]]
9540 Magic Word: {{NAMESPACEE}}
9542 title=[[User:Ævar Arnfjörð Bjarmason]]
9551 Magic Word: {{NAMESPACENUMBER}}
9553 title=[[User:Ævar Arnfjörð Bjarmason]]
9562 Magic Word: {{SUBPAGENAME}}
9564 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9573 Magic Word: {{SUBPAGENAMEE}}
9575 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
9584 Magic Word: {{ROOTPAGENAME}}
9586 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9590 <p>Ævar Arnfjörð Bjarmason
9595 Magic Word: {{ROOTPAGENAMEE}}
9597 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
9601 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9606 Magic Word: {{BASEPAGENAME}}
9608 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9612 <p>Ævar Arnfjörð Bjarmason
9617 Magic Word: {{BASEPAGENAMEE}}
9619 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
9623 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9628 Magic Word: {{TALKPAGENAME}}
9630 title=[[User:Ævar Arnfjörð Bjarmason]]
9634 <p>User talk:Ævar Arnfjörð Bjarmason
9639 Magic Word: {{TALKPAGENAMEE}}
9641 title=[[User:Ævar Arnfjörð Bjarmason]]
9645 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9650 Magic Word: {{SUBJECTPAGENAME}}
9652 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9656 <p>User:Ævar Arnfjörð Bjarmason
9661 Magic Word: {{SUBJECTPAGENAMEE}}
9663 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9665 {{SUBJECTPAGENAMEE}}
9667 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9672 Magic Word: {{NUMBEROFFILES}}
9681 Magic Word: {{PAGENAME}}
9683 title=[[User:Ævar Arnfjörð Bjarmason]]
9687 <p>Ævar Arnfjörð Bjarmason
9692 Magic Word: {{PAGENAME}} with metacharacters
9694 title=[['foo & bar = baz']]
9698 <p><i>'foo & bar = baz'</i>
9701 <p><i>'foo & bar = baz'</i></p>
9705 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9707 title=[[*RFC 1234 http://example.com/]]
9711 <p>*RFC 1234 http://example.com/
9714 <p>*RFC 1234 http://example.com/</p>
9718 Magic Word: {{PAGENAMEE}}
9720 title=[[User:Ævar Arnfjörð Bjarmason]]
9724 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9729 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9731 title=[[*RFC 1234 http://example.com/]]
9735 <p>*RFC_1234_http://example.com/
9738 <p>*RFC_1234_http://example.com/</p>
9742 Magic Word: {{REVISIONID}}
9751 Magic Word: {{SCRIPTPATH}}
9760 Magic Word: {{STYLEPATH}}
9769 Magic Word: {{SERVER}}
9773 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9778 Magic Word: {{SERVERNAME}}
9787 Magic Word: {{SITENAME}}
9796 Case-sensitive magic words, when cased differently, should just be template transclusions
9803 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9804 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9805 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9806 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9811 Case-insensitive magic words should still work with weird casing.
9821 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9825 # From plwiki:PLOS_ONE
9827 Parsoid: Page property magic word with magic word contents
9829 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9831 <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>"}]]}'/>
9835 Parsoid: Template-generated DISPLAYTITLE
9837 {{{{echo|DISPLAYTITLE}}:Foo}}
9839 <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}}]}'/>
9843 Namespace 1 {{ns:1}}
9852 Namespace 1 {{ns:01}}
9861 Namespace 0 {{ns:0}} (bug 4783)
9869 Namespace 0 {{ns:00}} (bug 4783)
9877 Namespace -1 {{ns:-1}}
9886 Namespace User {{ns:User}}
9895 Namespace User talk {{ns:User_talk}}
9904 Namespace User talk {{ns:uSeR tAlK}}
9913 Namespace File {{ns:File}}
9922 Namespace File {{ns:Image}}
9931 Namespace (lang=de) Benutzer {{ns:User}}
9942 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9948 <p>Benutzer Diskussion
9956 {{urlencode:hi world?!}}
9957 {{urlencode:hi world?!|WIKI}}
9958 {{urlencode:hi world?!|PATH}}
9959 {{urlencode:hi world?!|QUERY}}
9969 Magic Word: prioritize type info over data-parsoid
9973 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9979 Magic Word: serialize on separate line (parsoid)
9981 parsoid=wt2wt,html2wt
9987 foo<meta property="mw:PageProp/notoc"/>bar
9991 Magic Word: rt non-english wikis
9998 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10002 __proto__ is treated as normal wikitext (T105997)
10014 Magic links: internal link to RFC (bug 479)
10018 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10021 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10025 Magic links: RFC (bug 479)
10029 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10032 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10036 Magic links: RFC (bug 65278)
10038 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10040 <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.
10043 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10047 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
10049 RFC      822
10053 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10058 <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>
10064 Magic links: ISBN (bug 1937)
10068 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10071 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10075 Magic links: ISBN (bug 65278)
10077 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10079 <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.
10082 <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>
10086 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
10088 ISBN      978 0 316 09811 3
10094 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10101 <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>
10109 Magic links: PMID incorrectly converts space to underscore
10113 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10116 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10120 Magic links: PMID (bug 65278)
10122 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10124 <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.
10127 <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>
10131 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
10133 PMID      1234
10137 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10142 <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>
10147 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10148 # since these are ExtLinkText, not MagicLinkText
10150 Magic links: use appropriate serialization for "almost" magic links.
10152 X[[Special:BookSources/0978739256|foo]]
10154 X[//tools.ietf.org/html/rfc1234 foo]
10156 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10157 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10160 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10161 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10169 Nonexistent template
10171 {{thistemplatedoesnotexist}}
10173 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10178 Template with invalid target containing tags
10180 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10182 <p>{{a<b>b</b>|foo|a=b|a = b}}
10187 Template with invalid target containing unclosed tag
10189 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10191 <p>{{a<b>|foo|a=b|a = b}}</b>
10196 Template with invalid target containing wikilink
10200 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10203 <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>
10207 Template with just whitespace in it, bug #68421
10211 <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>
10217 This is a test template
10225 <p>This is a test template
10230 Template with explicit namespace
10234 <p>This is a test template
10242 This is a test template with parameter {{{param}}}
10248 {{paramtest|param=foo}}
10250 <p>This is a test template with parameter foo
10255 Template:paramtestnum
10257 [[{{{1}}}|{{{2}}}]]
10261 Template unnamed parameter
10263 {{paramtestnum|Main Page|the main page}}
10265 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10270 Template:templatesimple
10276 Template:templateredirect
10278 #redirect [[Template:templatesimple]]
10282 Template:templateasargtestnum
10288 Template:templateasargtest
10290 {{template{{{templ}}}}}
10294 Template:templateasargtest2
10300 Template with template name as unnamed argument
10302 {{templateasargtestnum|templatesimple}}
10309 Template with template name as argument
10311 {{templateasargtest|templ=simple}}
10318 Template with template name as argument (2)
10320 {{templateasargtest2|templ=templatesimple}}
10327 Template:templateasargtestdefault
10329 {{{{{templ|templatesimple}}}}}
10339 Template with default value
10341 {{templateasargtestdefault}}
10348 Template with default value (value set)
10350 {{templateasargtestdefault|templ=templa}}
10359 {{templateredirect}}
10364 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10368 Template with argument in separate line
10370 {{ templateasargtest |
10378 Template with complex template as argument
10381 param ={{ templateasargtest |
10382 templ = simple }}}}
10384 <p>This is a test template with parameter (test)
10389 Template with thumb image (with link in description)
10391 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
10393 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>
10396 <p>This is a test template with parameter</p>
10397 <div class="thumb tright">
10398 <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>
10399 <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>
10403 <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>
10407 Template:complextemplate
10409 {{{1}}} {{paramtest|
10410 param ={{{param}}}}}
10414 Template with complex arguments
10417 param ={{ templateasargtest |
10418 templ = simple }}|[[Template:complextemplate|link]]}}
10420 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
10425 BUG 553: link with two variables in a piped link
10428 |[[{{{1}}}|{{{2}}}]]
10433 <td>[[{{{1}}}|{{{2}}}]]
10438 <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>
10443 Abort table cell attribute parsing on wikilink
10446 | testing [[one|two]] | three || four
10447 | testing one two | three || four
10452 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
10461 <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>
10462 <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>
10467 Don't abort table cell attribute parsing if wikilink is found in template arg
10470 | Test {{#tag:ref|One two "[[three]]" four}}
10474 <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>
10479 Magic variable as template parameter
10481 {{paramtest|param={{SITENAME}}}}
10483 <p>This is a test template with parameter MediaWiki
10490 [[{{{param}}}|link]]
10494 Template parameter as link source
10496 {{linktest|param=Main Page}}
10498 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
10503 Template:paramtest2
10505 including another template, {{paramtest|param={{{arg}}}}}
10509 Template passing argument to another template
10511 {{paramtest2|arg='hmm'}}
10513 <p>including another template, This is a test template with parameter 'hmm'
10524 Template as link source
10528 [[{{linktest2}}|Main Page]]
10530 [[{{linktest2}}]]Page
10532 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10533 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10534 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
10552 Template infinite loop
10556 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
10561 Template from main namespace
10580 BUG 529: Template with table, not included at beginning of line
10599 BUG 523: Template shouldn't eat newline (or add an extra one before table)
10619 BUG 41: Template parameters shown as broken links
10628 Template with targets containing wikilinks
10632 {{[[{{echo|foo}}]]}}
10634 {{{{echo|[[foo}}]]}}
10636 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10637 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
10649 Templates: Double quotes as template target
10656 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''"},"params":{},"i":0}}]}'>bar</span> baz
10661 Template:MSGNW test
10663 ''None'' of '''this''' should be
10665 but rather passed unmodified
10673 # hmm, fix this or just deprecate msgnw and document its behavior?
10677 {{msgnw:MSGNW test}}
10679 <p>''None'' of '''this''' should be
10681  but rather passed unmodified
10682 {{test}}
10686 <!-- comment -->
10693 {{int:youhavenewmessages|lots of money|not!}}
10695 <p>You have lots of money (not!).
10700 int keyword - non-existing message
10711 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10715 <includeonly> and <noinclude> being included
10726 <onlyinclude>Foo</onlyinclude>bar
10730 <onlyinclude> being included
10742 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
10746 <onlyinclude> and <includeonly> being included
10755 <includeonly> and <noinclude> on a page
10757 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
10764 Un-closed <noinclude>
10771 <onlyinclude> on a page
10773 <onlyinclude>Foo</onlyinclude>bar
10780 Un-closed <onlyinclude>
10787 Self-closed noinclude, includeonly, onlyinclude tags
10798 Unbalanced includeonly and noinclude tags
10802 |b</noinclude></noinclude>
10803 |c</noinclude></includeonly>
10804 |d</includeonly></includeonly>
10813 <td>c</includeonly>
10815 <td>d</includeonly></includeonly>
10821 Template:Includeonly section
10824 ==Includeonly section==
10830 Bug 6563: Edit link generation for section shown by <includeonly>
10832 {{includeonly section}}
10834 <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>
10835 <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>
10839 # Uses same input as the contents of [[Template:Includeonly section]]
10841 Bug 6563: Section extraction for section shown by <includeonly>
10846 ==Includeonly section==
10854 Bug 6563: Edit link generation for section suppressed by <includeonly>
10857 ==Includeonly section==
10861 <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>
10866 Bug 6563: Section extraction for section suppressed by <includeonly>
10871 ==Includeonly section==
10879 Un-closed <includeonly>
10883 <p><includeonly>
10887 ## We used to, but no longer wt2wt this test since the default serializer
10888 ## will normalize the include directives to serialize on their own line.
10889 ## Selser will take care of preserving formatting in scenarios where they
10890 ## intermingled with other wikitext.
10892 Includes and comments at SOL
10894 parsoid=wt2html,html2html
10896 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10900 </noinclude>* stuff
10903 <includeonly>can have stuff</includeonly>=== here ===
10906 <h2><span class="mw-headline" id="hu">hu</span></h2>
10909 <ul><li> stuff</li>
10910 <li> here</li></ul>
10911 <h3><span class="mw-headline" id="here">here</span></h3>
10914 <!-- 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>
10916 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10918 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10919 <li> here</li></ul>
10921 <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>
10925 # TODO: test with DOM fragment reuse!
10927 Parsoid: DOM fragment reuse
10929 parsoid=wt2wt,wt2html
10931 a{{echo|b<table></table>c}}d
10943 <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>
10945 <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">
10946 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10947 </span><p about="#mwt2">cd</p>
10949 <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">
10951 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10953 </span><p about="#mwt3">b</p>
10957 Parsoid: Merge double tds (T52603)
10962 |{{echo|{{!}} foo}}
10966 <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>
10971 Parsoid: Merge double tds in nested transclusion content (T52603)
10977 |{{echo|{{!}} foo}}
10981 <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}}]}'>
10983 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10989 ### <includeonly> and <noinclude> in attributes
10992 0. includeonly around the entire attribute
10994 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10996 <p><span id="v2">bar</span>
11001 1. includeonly in html attr key
11003 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11005 <p><span id="foo">bar</span>
11010 2. includeonly in html attr value
11012 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11013 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11015 <p><span id="v1">bar</span>
11016 <span id="v1">bar</span>
11021 3. includeonly in part of an attr value
11023 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11025 <p><span style="color:red;">bar</span>
11030 4. includeonly in table attributes
11054 ### Token Stream Patcher tests
11056 ### These tests won't always pass wt2wt and other modes because
11057 ### on serialization, the table will be output on a new line.
11058 ### For now, we are blacklisting them, and using this to test selser.
11062 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11064 parsoid=wt2html,wt2wt
11066 {{echo|}}{| width = '100%'
11070 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11071 <tbody><tr><td>foo</td></tr>
11075 ## We used to, but no longer wt2wt this test since the default serializer
11076 ## will normalize the include directives to serialize on their own line.
11077 ## Selser will take care of preserving formatting in scenarios where they
11078 ## intermingled with other wikitext.
11080 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11084 <includeonly>a</includeonly>{| {{{b}}}
11088 <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}}}":""}}'>
11089 <tbody><tr><td>c</td></tr>
11095 ### Testing parsing of templates where a template arg
11096 ### has the same name as the template itself.
11102 {{{quote|{{{1}}}}}}
11106 Templates: Template Name/Arg clash: 1. Use of positional param
11115 Templates: Template Name/Arg clash: 2. Use of named param
11117 {{quote|quote=foo}}
11124 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11133 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11137 Templates: 1. Simple use
11146 Templates: 2. Inside a block tag
11148 <div>{{echo|Foo}}</div>
11149 <blockquote>{{echo|Foo}}</blockquote>
11152 <blockquote>Foo</blockquote>
11162 Templates: P-wrapping: 1a. Templates on consecutive lines
11173 Templates: P-wrapping: 1b. Templates on consecutive lines
11187 Templates: P-wrapping: 1c. Templates on consecutive lines
11190 {{echo|bar}} <div>baz</div>
11203 Templates: P-wrapping: 1d. Template preceded by comment-only line
11212 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11216 Templates: Inline Text: 1. Multiple template uses
11218 {{echo|Foo}}bar{{echo|baz}}
11225 Templates: Inline Text: 2. Back-to-back template uses
11227 {{echo|Foo}}{{echo|bar}}
11234 Templates: Block Tags: 1. Multiple template uses
11236 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11238 <div>Foo</div><div>bar</div><div>baz</div>
11243 Templates: Block Tags: 2. Back-to-back template uses
11245 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11247 <div>Foo</div><div>bar</div>
11251 # This is an edge case relating to paragraph wrapping.
11253 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11258 <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
11263 Templates: Links: 1. Simple example
11265 {{echo|[[Foo|bar]]}}
11267 <p><a href="/wiki/Foo" title="Foo">bar</a>
11272 Templates: Links: 2. Generation of link href
11274 [[{{echo|Foo}}|bar]]
11276 <p><a href="/wiki/Foo" title="Foo">bar</a>
11281 Templates: Links: 3. Generation of part of a link href
11283 [[Fo{{echo|o}}|bar]]
11285 [[Foo{{echo|bar}}]]
11287 [[Foo{{echo|bar}}baz]]
11289 [[Foo{{echo|bar}}|bar]]
11291 [[:Foo{{echo|bar}}]]
11293 [[:Foo{{echo|bar}}|bar]]
11295 <p><a href="/wiki/Foo" title="Foo">bar</a>
11296 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11297 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11298 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11299 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11300 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11305 Templates: Links: 4. Multiple templates generating link href
11307 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11309 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11314 Templates: Links: 5. Generation of link text
11316 [[Foo|{{echo|bar}}]]
11318 <p><a href="/wiki/Foo" title="Foo">bar</a>
11323 Templates: Links: 5. Nested templates (only outermost template should be marked)
11325 {{echo|[[{{echo|Foo}}|bar]]}}
11327 <p><a href="/wiki/Foo" title="Foo">bar</a>
11332 Templates: HTML Tag: 1. Generation of HTML attr. key
11334 <div {{echo|style}}="color:red;">foo</div>
11336 <div style="color:red;">foo</div>
11341 Templates: HTML Tag: 2. Generation of HTML attr. value
11343 <div style={{echo|'color:red;'}}>foo</div>
11345 <div style="color:red;">foo</div>
11350 Templates: HTML Tag: 3. Generation of HTML attr key and value
11352 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
11354 <div style="color:red;">foo</div>
11359 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
11361 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
11363 <div title="This is a long title with just one piece templated">foo</div>
11368 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
11370 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
11372 <div title="This is a long title with just one piece templated">foo</div>
11377 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
11379 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
11381 <div title="This is a long title with just one piece templated">foo</div>
11385 # SSS FIXME: While it is great we added support for all this,
11386 # do we want to make this part of the spec? Maybe we want to
11387 # deprecate this kind of usage in the future?
11389 Templates: HTML Tag: 7. Generation of partial attribute key string
11391 <div st{{echo|yle}}="color:red;">foo</div>
11393 <div style="color:red;">foo</div>
11398 Templates: HTML Tag: 8. Template-generated attribute (k=v)
11400 <div {{echo|1=id="v1"}}>bar</div>
11402 <div id="v1">bar</div>
11407 Templates: HTML Tag: 9. Multiple template-generated attributes
11409 <div {{echo|1=id="v1" title="foo"}}>bar</div>
11411 <div id="v1" title="foo">bar</div>
11416 Templates: Support for templates generating attributes and content
11418 {| {{mixed_attr_content_template}}
11423 <table style="color:red;" title="T48811">
11433 <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|}"]}'>
11442 1. Entities and nowikis inside templated attributes should be handled correctly
11444 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
11446 <div style="background:#f9f9f9;">foo</div>
11449 <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>
11453 2. Entities and nowikis inside templated attributes should be handled correctly
11456 |{{table_attribs_3}}
11461 <td style="background:#f9f9f9;">Foo
11466 <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>
11471 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11474 |{{table_attribs_3}}
11479 <td style="background:#f9f9f9;">Foo
11483 <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}}]}'>
11484 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
11490 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
11493 | {{table_attribs_6}} hi
11498 <td style="background: red;"> hi
11503 <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>
11508 Templates: HTML Tables: 1. Generating start of a HTML table
11510 {{echo|<table><tr><td>foo</td>}}</tr></table>
11512 <table><tr><td>foo</td></tr></table>
11517 Templates: HTML Tables: 2a. Generating middle of a HTML table
11519 <table><tr>{{echo|<td>foo</td>}}</tr></table>
11521 <table><tr><td>foo</td></tr></table>
11526 Templates: HTML Tables: 2b. Generating middle of a HTML table
11528 <table>{{echo|<tr><td>foo</td></tr>}}</table>
11530 <table><tr><td>foo</td></tr></table>
11535 Templates: HTML Tables: 3. Generating end of a HTML table
11537 <table><tr>{{echo|<td>foo</td></tr></table>}}
11539 <table><tr><td>foo</td></tr></table>
11544 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
11546 {{echo|<table>}}<tr><td>foo</td></tr></table>
11548 <table><tr><td>foo</td></tr></table>
11553 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
11555 <table>{{echo|<tr>}}<td>foo</td></tr></table>
11557 <table><tr><td>foo</td></tr></table>
11562 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
11564 <table><tr>{{echo|<td>}}foo</td></tr></table>
11566 <table><tr><td>foo</td></tr></table>
11571 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
11573 <table><tr><td>foo{{echo|</td>}}</tr></table>
11575 <table><tr><td>foo</td></tr></table>
11580 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
11582 <table><tr><td>foo</td>{{echo|</tr>}}</table>
11584 <table><tr><td>foo</td></tr></table>
11589 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
11591 <table><tr><td>foo</td></tr>{{echo|</table>}}
11593 <table><tr><td>foo</td></tr></table>
11598 Templates: HTML Tables: 5. Proper fostering of categories from inside
11600 parsoid=wt2html,wt2wt
11602 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
11603 <!--Two categories (Bug 50330)-->
11604 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
11606 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
11607 <!--Two categories (Bug 50330)-->
11608 <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>
11612 Templates: Wiki Tables: 1a. Fostering of entire template content
11620 <tr><td></td></tr></table>
11632 Templates: Wiki Tables: 1b. Fostering of entire template content
11645 <tr><td></td></tr></table>
11659 Templates: Wiki Tables: 2. Fostering of partial template content
11669 <tr><td></td></tr></table>
11682 Templates: Wiki Tables: 3. td-content via multiple templates
11685 {{echo|{{pipe}}a}}{{echo|b}}
11696 Templates: Wiki Tables: 4. Templated tags, no content
11702 <tr><td></td></tr></table>
11707 Templates: Wiki Tables: 5. Templated tags, regular td-tags
11721 Templates: Wiki Tables: 6. Templated tags, templated td-tags
11734 ## This test case is very specific to Parsoid's internals
11735 ## and is hence only tested for Parsoid's code. Parsoid uses
11736 ## a <meta> marker tag for <ref> tags and they are expanded
11737 ## much later. We are verifying that this <meta> tag usage
11738 ## doesn't prevent foster parenting.
11740 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
11742 {{PartialTable}}<ref>foo</ref>
11747 <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">
11751 <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>
11755 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
11765 <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{{!}}}"]}'>
11766 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
11770 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
11775 Templates: Lists: Multi-line list-items via templates
11777 *{{echo|a {{nonexistent|
11779 *{{echo|b {{nonexistent|
11782 <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>
11783 <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>
11788 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
11790 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
11792 <p><i>ab</i>c<i>d</i>e
11797 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
11798 (PHP parser generates misnested html)
11800 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
11802 <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>
11806 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
11807 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
11809 parsoid=wt2html,wt2wt
11811 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
11813 <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>
11814 <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>
11815 <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>
11819 Templates: Ugly nesting: 4. Divs opened/closed across templates
11821 a<div>b{{echo|c</div>d}}e
11832 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
11838 |{{echo|foo</table>}}
11842 <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|}"]}'>
11846 <td>foo</td></tr></tbody></table><span about="#mwt1">
11847 </span><span about="#mwt1">|bar</span><span about="#mwt1">
11852 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
11862 <td>1. {{echo|foo </table>}}</td>
11864 <td>2. {{echo|baz </table>}}</td>
11877 <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>"]}'>
11882 <td>1. foo </td></tr></tbody></table></td>
11884 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11885 </span><span about="#mwt2">
11886 </span><span about="#mwt2">
11887 </span><span about="#mwt2">abc</span><span about="#mwt2">
11888 </span><span about="#mwt2">
11889 </span><span about="#mwt2">
11890 </span><span about="#mwt2">
11891 </span><span about="#mwt2">
11892 </span><span about="#mwt2">
11893 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11894 </span><span about="#mwt2">
11899 Templates: Ugly templates: 3. newline-only template parameter
11908 # This looks like a bug: a single newline triggers p/br for some reason.
11910 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11919 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11920 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11922 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11928 <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
11929 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11933 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11934 # that are "identical" and generate nesting cycles in the algorithm
11936 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11938 {{echo|<table><tr><td><table>}}
11942 <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"}'>
11943 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11944 </table></td></tr></tbody></table>
11948 Templates: Parameters substituted at the top-level
11950 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
11952 <p><i>who</i> me? <b>never!</b>
11955 <p about="#mwt2" typeof="mw:Param" data-parsoid="{"src":"{{{foo|''who'' {{echo|me}}? '''never!'''}}}"}"><i>who</i> me? <b>never!</b></p>
11959 Parser Functions: 1. Simple example
11968 Parser Functions: 2. Nested use (only outermost should be marked up)
11977 ### Pre-save transform tests
11980 pre-save transform: subst:
11986 This is a test template
11990 pre-save transform: normal template
12000 pre-save transform: nonexistent template
12004 {{thistemplatedoesnotexist}}
12006 {{thistemplatedoesnotexist}}
12010 pre-save transform: subst magic variables
12019 # This is bug 89, which I fixed. -- wtm
12021 pre-save transform: subst: templates with parameters
12025 {{subst:paramtest|param="something else"}}
12027 This is a test template with parameter "something else"
12031 Template:nowikitest
12033 <nowiki>'''not wiki'''</nowiki>
12037 pre-save transform: nowiki in subst (bug 1188)
12041 {{subst:nowikitest}}
12043 <nowiki>'''not wiki'''</nowiki>
12047 Template:commenttest
12049 This template has <!-- a comment --> in it.
12053 pre-save transform: comment in subst (bug 1936)
12057 {{subst:commenttest}}
12059 This template has <!-- a comment --> in it.
12063 pre-save transform: unclosed tag
12067 <nowiki>'''not wiki'''
12069 <nowiki>'''not wiki'''
12073 pre-save transform: mixed tag case
12077 <NOwiki>'''not wiki'''</noWIKI>
12079 <NOwiki>'''not wiki'''</noWIKI>
12083 pre-save transform: unclosed comment in <nowiki>
12087 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12089 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12092 # Leading @ in this template definition works around a limitation
12093 # in parsoid's parserTests which otherwise strips the <span> from the
12094 # result (confusing it for a template wrapper)
12098 @<span onmouseover="alert('crap')">Oh no</span>
12102 (confirming safety of fix for subst bug 1936)
12104 {{Template:dangerous}}
12106 <p>@<span>Oh no</span>
12111 pre-save transform: comment containing gallery (bug 5024)
12115 <!-- <gallery>data</gallery> -->
12117 <!-- <gallery>data</gallery> -->
12121 pre-save transform: comment containing extension
12125 <!-- <tag>data</tag> -->
12127 <!-- <tag>data</tag> -->
12131 pre-save transform: comment containing nowiki
12135 <!-- <nowiki>data</nowiki> -->
12137 <!-- <nowiki>data</nowiki> -->
12141 pre-save transform: <noinclude> in subst (bug 3298)
12151 pre-save transform: <onlyinclude> in subst (bug 3298)
12155 {{subst:Includes2}}
12163 {{<includeonly>subst:</includeonly>Includes}}
12167 Template:SafeSubstTest
12169 {{<includeonly>safesubst:</includeonly>Includes}}
12173 bug 22297: safesubst: works during PST
12177 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12183 bug 22297: safesubst: works during normal parse
12192 subst: does not work during normal parse
12196 <p>{{subst:Includes}}
12201 pre-save transform: context links ("pipe trick")
12205 [[Article (context)|]]
12208 [[Bar:Article (context)|]]
12209 [[:Bar:Article (context)|]]
12211 [[|Article (context)]]
12215 [[Article (context)|Article]]
12216 [[Bar:Article|Article]]
12217 [[:Bar:Article|Article]]
12218 [[Bar:Article (context)|Article]]
12219 [[:Bar:Article (context)|Article]]
12221 [[Article (context)]]
12222 [[Bar:X (Y) Z|X (Y) Z]]
12223 [[:Bar:X (Y) Z|X (Y) Z]]
12227 pre-save transform: context links ("pipe trick") with interwiki prefix
12231 [[interwiki:Article|]]
12232 [[:interwiki:Article|]]
12233 [[interwiki:Bar:Article|]]
12234 [[:interwiki:Bar:Article|]]
12236 [[interwiki:Article|Article]]
12237 [[:interwiki:Article|Article]]
12238 [[interwiki:Bar:Article|Bar:Article]]
12239 [[:interwiki:Bar:Article|Bar:Article]]
12243 pre-save transform: context links ("pipe trick") with parens in title
12245 pst title=[[Somearticle (context)]]
12249 [[Article (context)|Article]]
12253 pre-save transform: context links ("pipe trick") with comma in title
12255 pst title=[[Someplace, Somewhere]]
12258 [[Otherplace, Elsewhere|]]
12259 [[Otherplace, Elsewhere, Anywhere|]]
12261 [[Otherplace, Somewhere|Otherplace]]
12262 [[Otherplace, Elsewhere|Otherplace]]
12263 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12267 pre-save transform: context links ("pipe trick") with parens and comma
12269 pst title=[[Someplace (IGNORED), Somewhere]]
12272 [[Otherplace (place), Elsewhere|]]
12274 [[Otherplace, Somewhere|Otherplace]]
12275 [[Otherplace (place), Elsewhere|Otherplace]]
12279 pre-save transform: context links ("pipe trick") with comma and parens
12281 pst title=[[Who, me? (context)]]
12284 [[Me, Myself, and I (1937 song)|]]
12286 [[Yes, you. (context)|Yes, you.]]
12287 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12291 pre-save transform: context links ("pipe trick") with namespace
12293 pst title=[[Ns:Somearticle]]
12297 [[Ns:Article|Article]]
12301 pre-save transform: context links ("pipe trick") with namespace and parens
12303 pst title=[[Ns:Somearticle (context)]]
12307 [[Ns:Article (context)|Article]]
12311 pre-save transform: context links ("pipe trick") with namespace and comma
12313 pst title=[[Ns:Somearticle, Context, Whatever]]
12317 [[Ns:Article, Context, Whatever|Article]]
12321 pre-save transform: context links ("pipe trick") with namespace, comma and parens
12323 pst title=[[Ns:Somearticle, Context (context)]]
12327 [[Ns:Article (context)|Article]]
12331 pre-save transform: context links ("pipe trick") with namespace, parens and comma
12333 pst title=[[Ns:Somearticle (IGNORED), Context]]
12337 [[Ns:Article, Context|Article]]
12341 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
12345 [[Article(context)|]]
12346 [[Bar:Article(context)|]]
12347 [[:Bar:Article(context)|]]
12348 [[|Article(context)]]
12352 [[Article(context)|Article]]
12353 [[Bar:Article(context)|Article]]
12354 [[:Bar:Article(context)|Article]]
12355 [[Article(context)]]
12356 [[Bar:X(Y)Z|X(Y)Z]]
12357 [[:Bar:X(Y)Z|X(Y)Z]]
12361 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
12365 [[Article (context)|]]
12366 [[Bar:Article (context)|]]
12367 [[:Bar:Article (context)|]]
12368 [[|Article (context)]]
12372 [[Article (context)|Article]]
12373 [[Bar:Article (context)|Article]]
12374 [[:Bar:Article (context)|Article]]
12375 [[Article (context)]]
12376 [[Bar:X (Y) Z|X (Y) Z]]
12377 [[:Bar:X (Y) Z|X (Y) Z]]
12381 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
12385 [[Article(context)|]]
12386 [[Bar:Article(context)|]]
12387 [[:Bar:Article(context)|]]
12388 [[|Article(context)]]
12392 [[Article(context)|Article]]
12393 [[Bar:Article(context)|Article]]
12394 [[:Bar:Article(context)|Article]]
12395 [[Article(context)]]
12396 [[Bar:X(Y)Z|X(Y)Z]]
12397 [[:Bar:X(Y)Z|X(Y)Z]]
12401 pre-save transform: context links ("pipe trick") with commas (bug 21660)
12405 [[Article (context), context|]]
12406 [[Article (context),context|]]
12407 [[Bar:Article (context), context|]]
12408 [[Bar:Article (context),context|]]
12409 [[:Bar:Article (context), context|]]
12410 [[:Bar:Article (context),context|]]
12412 [[Article (context), context|Article]]
12413 [[Article (context),context|Article]]
12414 [[Bar:Article (context), context|Article]]
12415 [[Bar:Article (context),context|Article]]
12416 [[:Bar:Article (context), context|Article]]
12417 [[:Bar:Article (context),context|Article]]
12421 pre-save transform: trim trailing empty lines
12425 Empty lines are trimmed
12431 Empty lines are trimmed
12435 pre-save transform: Signature expansion
12440 * <noinclude>~~~</noinclude>
12441 * <includeonly>~~~</includeonly>
12442 * <onlyinclude>~~~</onlyinclude>
12444 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
12445 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
12446 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
12447 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
12452 pre-save transform: Signature expansion in nowiki tags (bug 93)
12458 <nowiki>~~~~</nowiki>
12460 <includeonly><nowiki>~~~~</nowiki></includeonly>
12462 <noinclude><nowiki>~~~~</nowiki></noinclude>
12464 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12466 {{subst:Foo}} shall be converted to FOO
12468 As well as inside noinclude/onlyinclude
12469 <noinclude>{{subst:Foo}}</noinclude>
12470 <onlyinclude>{{subst:Foo}}</onlyinclude>
12472 But not inside includeonly
12473 <includeonly>{{subst:Foo}}</includeonly>
12477 <nowiki>~~~~</nowiki>
12479 <includeonly><nowiki>~~~~</nowiki></includeonly>
12481 <noinclude><nowiki>~~~~</nowiki></noinclude>
12483 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
12485 FOO shall be converted to FOO
12487 As well as inside noinclude/onlyinclude
12488 <noinclude>FOO</noinclude>
12489 <onlyinclude>FOO</onlyinclude>
12491 But not inside includeonly
12492 <includeonly>{{subst:Foo}}</includeonly>
12496 Parsoid: Recognize nowiki with trailing space in tags
12500 <nowiki ><div>[[foo]]</nowiki >
12508 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12515 Parsoid: Recognize nowiki with odd capitalization
12519 <noWikI ><div>[[foo]]</Nowiki >
12521 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
12526 Parsoid: Escape nowiki with trailing space in tags
12530 <p><nowiki > foo </nowiki ></p>
12531 <p>a<nowiki />b</p>
12532 <p>c<nowiki/ >d</p>
12534 <nowiki > foo </nowiki >
12542 Parsoid: Escape weird noWikI capitalizations
12546 <p><noWikI > foo </NoWikI ></p>
12548 <noWikI > foo </NoWikI >
12552 ### Message transform tests
12555 message transform: magic variables
12565 message transform: should not transform wiki markup
12575 message transform: <noinclude> in transcluded template (bug 4926)
12585 message transform: <onlyinclude> in transcluded template (bug 4926)
12595 {{#special:}} page name, known
12599 {{#special:Recentchanges}}
12601 Special:RecentChanges
12605 {{#special:}} page name with subpage, known
12609 {{#special:Recentchanges/param}}
12611 Special:RecentChanges/param
12615 {{#special:}} page name, unknown
12619 {{#special:foobar nonexistent}}
12621 Special:Foobar nonexistent
12625 {{#speciale:}} page name, known
12629 {{#speciale:Recentchanges}}
12631 Special:RecentChanges
12635 {{#speciale:}} page name with subpage, known
12639 {{#speciale:Recentchanges/param}}
12641 Special:RecentChanges/param
12645 {{#speciale:}} page name, unknown
12649 {{#speciale:foobar nonexistent}}
12651 Special:Foobar_nonexistent
12657 ### For Parsoid-specific tests, see
12658 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12663 parsoid=wt2html,wt2wt,html2html
12665 [[Image:foobar.jpg]]
12667 <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>
12670 <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>
12674 Simple image (using File: namespace, now canonical)
12676 [[File:Foobar.jpg]]
12678 <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>
12681 <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>
12685 Right-aligned image
12687 [[File:Foobar.jpg|right]]
12689 <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>
12692 <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>
12698 [[File:Foobar.jpg|right|Caption text]]
12700 <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>
12703 <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>
12707 Image with caption, bug 53312 #1
12709 [[File:Foobar.jpg|right|Caption page stuff]]
12711 <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>
12714 <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>
12718 Image with caption, bug 53312 #2
12720 [[File:Foobar.jpg|right|Caption page=]]
12722 <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>
12725 <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>
12729 Image with caption, bug 53312 #3
12731 [[File:Foobar.jpg|right|Caption page=stuff]]
12733 <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>
12736 <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>
12740 Allow empty links in image captions (Bug 60753)
12744 [[File:Foobar.jpg|thumb|Caption [[Link1]]
12749 <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>
12752 <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>
12754 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
12755 </figcaption></figure>
12759 Titles in unlinked images (T23454)
12761 [[File:Foobar.jpg|link=|stuff]]
12763 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
12768 Link with empty target
12777 Image with link trail
12779 Linktrails should not work for images: [[File:Foobar.jpg]]s
12781 <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
12784 <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>
12788 Image with empty attribute
12790 parsoid=wt2html,wt2wt,html2html
12792 [[File:Foobar.jpg|right||Caption text]]
12794 <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>
12797 <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>
12801 1. Block image with individual attributes from templates
12803 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
12805 <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>
12808 <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>
12812 2. Block Image with individual attributes from templates
12814 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
12816 <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>
12819 <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>
12823 3. Inline image with individual attributes from templates
12825 [[File:Foobar.jpg|{{echo|50px}}]]
12827 <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>
12830 <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>
12833 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
12834 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
12836 Image with multiple attributes from the same template
12838 [[File:Foobar.jpg|{{image_attribs}}]]
12840 <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>
12843 <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>
12847 Image with link tails
12851 123[[File:Foobar.jpg]]456
12852 123[[File:Foobar.jpg|right]]456
12853 123[[File:Foobar.jpg|thumb]]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
12857 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
12858 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
12861 <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>
12863 <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>
12865 <div class="thumb tright">
12866 <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>
12867 <div class="thumbcaption">
12868 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
12874 <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>
12875 <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>
12876 <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>
12880 Image with multiple captions -- only last one is accepted
12882 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12884 <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>
12887 <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>
12891 Image with multiple widths -- use last
12893 [[File:Foobar.jpg|200px|300px|caption]]
12895 <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>
12898 <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>
12902 Image with multiple alignments -- use first (bug 48664)
12906 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12908 [[File:Foobar.jpg|middle|text-top|caption]]
12910 <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>
12911 <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>
12914 <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>
12915 <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>
12919 Image with width attribute at different positions
12921 [[File:Foobar.jpg|200px|right|Caption]]
12922 [[File:Foobar.jpg|right|200px|Caption]]
12923 [[File:Foobar.jpg|right|Caption|200px]]
12925 <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>
12926 <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>
12927 <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>
12930 <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>
12931 <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>
12932 <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>
12935 # a sad bit of backward-compatibility
12937 Image with size specified with pxpx (bug 13500, 51628)
12939 parsoid=wt2html,wt2wt,html2html
12941 [[File:Foobar.jpg|20pxpx]]
12942 [[File:Foobar.jpg|200x20pxpx]]
12944 <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>
12945 <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>
12948 <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>
12952 Image with link parameter, wiki target
12954 [[File:Foobar.jpg|link=Main Page]]
12956 <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>
12959 <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>
12962 # parsoid bug 49293 (part 1)
12964 Image with link parameter, URL target
12966 [[File:Foobar.jpg|link=http://example.com/]]
12968 <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>
12971 <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>
12974 # parsoid bug 49293 (part 2)
12976 Image with link parameter, protocol-less URL target
12978 [[File:Foobar.jpg|link=//example.com/]]
12980 <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>
12983 <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>
12987 Escaping non-block captions (T107435)
12990 "modes": ["wt2wt"],
12992 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
12996 [[Image:Foobar.jpg|caption]]
12998 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13001 # wgExternalLinkTarget not supported by Parsoid
13003 Image with link parameter, wgExternalLinkTarget
13005 [[Image:foobar.jpg|link=http://example.com/]]
13007 wgExternalLinkTarget='foobar'
13009 <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>
13014 Image with link parameter, wgNoFollowLinks set to false
13016 [[Image:foobar.jpg|link=http://example.com/]]
13018 wgNoFollowLinks=false
13020 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13025 Image with link parameter, wgNoFollowDomainExceptions
13027 [[Image:foobar.jpg|link=http://example.com/]]
13029 wgNoFollowDomainExceptions='example.com'
13031 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13035 # wgExternalLinkTarget not supported by Parsoid
13037 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13039 [[Image:foobar.jpg|link=http://example.com/|Title]]
13041 wgExternalLinkTarget='foobar'
13043 <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>
13048 Image with empty link parameter
13050 [[File:Foobar.jpg|link=]]
13052 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13055 <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>
13059 Image with link parameter (wiki target) and unnamed parameter
13061 [[File:Foobar.jpg|link=Main_Page|Title]]
13063 <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>
13066 <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>
13070 Image with link parameter (URL target) and unnamed parameter
13072 [[File:Foobar.jpg|link=http://example.com/|Title]]
13074 <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>
13077 <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>
13081 Thumbnail image with link parameter
13084 parsoid=wt2html,wt2wt,html2html
13086 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13088 <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>
13091 <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>
13095 Manually-specified thumbnail image
13099 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
13101 <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>
13104 <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>
13108 Manually-specified thumbnail image with explicit link to wiki page
13111 parsoid=wt2html,wt2wt,html2html
13113 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13115 <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>
13118 <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>
13122 Manually-specified thumbnail image with explicit link to url
13125 parsoid=wt2html,wt2wt,html2html
13127 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13129 <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>
13132 <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>
13136 Manually-specified thumbnail image with explicit no link
13139 parsoid=wt2html,wt2wt,html2html
13141 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13143 <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>
13146 <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>
13150 Manually-specified thumbnail image with explicit link and alt text
13153 parsoid=wt2html,wt2wt,html2html
13155 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13157 <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>
13160 <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>
13164 Image with frame and link
13166 parsoid=wt2html,wt2wt,html2html
13168 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13170 <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>
13173 <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>
13177 Image with frame and link and explicit alt
13179 parsoid=wt2html,wt2wt,html2html
13181 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13183 <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>
13186 <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>
13190 Image with wiki markup in implicit alt
13192 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13194 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13196 <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>
13197 </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>
13200 <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>
13201 <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>
13205 Alt image option should handle most kinds of wikitext without barfing
13207 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13209 <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>
13212 <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>
13215 ###################
13216 # Conflicting image format options.
13217 # First option specified should 'win'.
13218 # All three cases in each test should be identical.
13221 Image with 'frameless' first.
13223 parsoid=wt2html,wt2wt,html2html
13225 [[File:Foobar.jpg|frameless|caption]]
13227 [[File:Foobar.jpg|frameless|frame|caption]]
13229 [[File:Foobar.jpg|frameless|thumb|caption]]
13231 <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>
13232 </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>
13233 </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>
13236 <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>
13237 <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>
13238 <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>
13242 Image with 'frame' first.
13244 parsoid=wt2html,wt2wt,html2html
13246 [[File:Foobar.jpg|frame|caption]]
13247 [[File:Foobar.jpg|frame|frameless|caption]]
13248 [[File:Foobar.jpg|frame|thumb|caption]]
13250 <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>
13251 <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>
13252 <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>
13255 <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>
13256 <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>
13257 <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>
13261 Image with 'thumb' first.
13263 parsoid=wt2html,wt2wt,html2html
13265 [[File:Foobar.jpg|thumb|caption]]
13266 [[File:Foobar.jpg|thumb|frameless|caption]]
13267 [[File:Foobar.jpg|thumb|frame|caption]]
13269 <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>
13270 <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>
13271 <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>
13274 <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>
13275 <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>
13276 <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>
13279 ###################
13281 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13282 # and https://phabricator.wikimedia.org/T64258
13283 # Foobar has actual size of 1941x220
13284 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13285 # a scalable format.
13286 # 2. Framed images always ignore size options; always render at default size.
13287 # 3. "Unspecified format" and border are the only types which can be
13291 Image: "unspecified format" and border enlarge
13293 parsoid=wt2html,wt2wt,html2html
13295 [[File:Foobar.jpg|2000px]]
13297 [[File:Foobar.jpg|border|2000px]]
13299 <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>
13300 </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>
13303 <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>
13304 <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>
13308 Image: "unspecified format" and border reduce
13310 parsoid=wt2html,wt2wt,html2html
13312 [[File:Foobar.jpg|1000px]]
13314 [[File:Foobar.jpg|border|1000px]]
13316 <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>
13317 </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>
13320 <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>
13321 <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>
13325 Image: thumbs reduce
13327 parsoid=wt2html,wt2wt,html2html
13329 [[File:Foobar.jpg|thumb|50px]]
13331 <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>
13334 <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>
13338 Image: bitmap thumbs can't be enlarged past original size, but vector can.
13340 parsoid=wt2html,wt2wt,html2html
13342 [[File:Foobar.jpg|thumb|2000px]]
13344 [[File:Foobar.svg|thumb|2000px]]
13346 <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>
13347 <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>
13350 <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>
13351 <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>
13355 Image: frameless can reduce in size
13357 parsoid=wt2html,wt2wt,html2html
13359 [[File:Foobar.jpg|frameless|50px]]
13361 <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>
13364 <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>
13368 Image: bitmap frameless can't be enlarged past original size, but vector can
13370 parsoid=wt2html,wt2wt,html2html
13372 [[File:Foobar.jpg|frameless|2000px]]
13374 [[File:Foobar.svg|frameless|2000px]]
13376 <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>
13377 </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>
13380 <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>
13381 <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>
13385 Image: framed images are always unscaled.
13387 parsoid=wt2html,wt2wt,html2html
13389 [[File:Foobar.jpg|frame]]
13391 [[File:Foobar.jpg|frame|50px]]
13393 [[File:Foobar.jpg|frame|50x50px]]
13395 [[File:Foobar.jpg|frame|2000px]]
13397 <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>
13398 <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>
13399 <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>
13400 <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>
13403 <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>
13404 <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>
13405 <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>
13406 <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>
13409 ###################
13412 Link to image page- image page normally doesn't exists, hence edit link
13413 Add test with existing image page
13414 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
13418 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
13423 bug 18784 Link to non-existent image page with caption should use caption as link text
13425 [[:Image:test|caption]]
13427 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
13432 Frameless image caption with a free URL
13434 [[File:Foobar.jpg|http://example.com]]
13436 <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>
13439 <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>
13443 Thumbnail image caption with a free URL
13447 [[File:Foobar.jpg|thumb|http://example.com]]
13449 <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>
13452 <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>
13456 Thumbnail image caption with a free URL and explicit alt
13459 parsoid=wt2html,wt2wt,html2html
13461 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
13463 <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>
13466 <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>
13470 SVG thumbnails with no language set
13473 [[File:Foobar.svg|thumb|caption]]
13475 <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>
13478 <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>
13482 SVG thumbnails with language de
13484 parsoid=wt2html,wt2wt,html2html
13486 [[File:Foobar.svg|thumb|caption|lang=de]]
13488 <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>
13491 <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>
13495 SVG thumbnails with invalid language code
13497 parsoid=wt2html,wt2wt,html2html
13499 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
13501 <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>
13504 <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>
13508 BUG 1887: A ISBN with a thumbnail
13510 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
13512 <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>
13515 <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>
13519 BUG 1887: A RFC with a thumbnail
13521 [[File:Foobar.jpg|thumb|This is RFC 12354]]
13523 <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>
13526 <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>
13530 BUG 1887: A mailto link with a thumbnail
13532 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
13534 <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>
13537 <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>
13540 # Pending resolution to bug 368
13542 BUG 648: Frameless image caption with a link
13544 [[File:Foobar.jpg|text with a [[link]] in it]]
13546 <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>
13549 <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>
13553 BUG 648: Frameless image caption with a link (suffix)
13555 [[File:Foobar.jpg|text with a [[link]]foo in it]]
13557 <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>
13560 <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>
13564 BUG 648: Frameless image caption with an interwiki link
13566 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
13568 <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>
13571 <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>
13575 BUG 648: Frameless image caption with a piped interwiki link
13577 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
13579 <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>
13582 <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>
13586 T107474: Frameless image caption with <nowiki>
13588 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
13590 <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>
13594 Escape HTML special chars in image alt text
13596 [[File:Foobar.jpg|& < > "]]
13598 <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>
13601 <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>
13605 BUG 499: Alt text should have Ӓ, not &1234;
13607 [[File:Foobar.jpg|♀]]
13609 <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>
13612 <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>
13616 Broken image caption with link
13618 parsoid=wt2html,wt2wt,html2html
13620 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
13622 <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.
13625 <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>
13629 Image caption containing another image
13631 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
13633 <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>
13636 <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>
13640 Image: caption containing a newline
13642 [[File:Foobar.jpg|This
13645 <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>
13648 <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>
13652 Image: caption containing leading space
13653 (The leading space should not trigger nowiki escaping in wt2wt mode)
13655 [[File:Foobar.jpg|thumb| bar]]
13657 <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>
13660 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> bar</figcaption></figure>
13664 Image: caption containing a table
13666 parsoid=wt2html,wt2wt,html2html
13668 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
13674 and some more text.]]
13676 <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>
13679 <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
13682 <tr><th>Foo </th><th>Bar</th></tr>
13685 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
13689 Bug 3090: External links other than http: in image captions
13691 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
13693 <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>
13696 <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>
13702 parsoid=wt2html,wt2wt,html2html
13704 [[Image:foobar.jpg|a|class=b]]
13706 <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>
13709 <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>
13713 Localized image handling (1).
13715 parsoid=wt2html,wt2wt,html2html
13718 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
13720 <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>
13723 <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>
13727 Localized image handling (2).
13730 parsoid=wt2html,wt2wt,html2html
13733 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
13735 <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>
13738 <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>
13742 "border", "frameless" and "class" attributes on an image.
13745 parsoid=wt2html,wt2wt,html2html
13747 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
13749 <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>
13752 <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>
13755 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
13757 Invalid image attributes (bug 62500)
13760 parsoid=wt2html,wt2wt,html2html
13762 [[File:Foobar.jpg|thumb|float|left|caption]]
13764 [[File:Foobar.jpg|thumb|righ|caption]]
13766 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
13768 <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>
13769 <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>
13770 <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>
13773 <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>
13774 <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>
13775 <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>
13781 #REDIRECT [[File:Barfoo.jpg]]
13784 # FIXME: Parsoid should run this test -- but we'd need to teach the
13785 # mockAPI about the redirected Barfoo.jpg image.
13789 [[Image:Barfoo.jpg]]
13791 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
13796 Missing image with uploads disabled
13800 [[File:Foobaz.jpg]]
13802 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
13805 <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>
13808 # Parsoid-specific testing for images
13809 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13810 # Currently imperfect due to a flaw in the Parsoid testrunner
13812 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
13816 Parsoid-specific image handling - simple image with size and middle alignment
13818 [[File:Foobar.jpg|middle|50px]]
13820 <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>
13824 Parsoid-specific image handling - simple image with size, middle alignment,
13825 non-standard namespace alias
13827 parsoid=wt2wt,wt2html,html2html
13829 [[Image:Foobar.jpg|middle|50px]]
13831 <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>
13835 Parsoid-specific image handling - simple image with size and middle alignment
13838 [[File:Foobar.jpg|50px|middle]]
13840 <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>
13844 Parsoid-specific image handling - simple image with size and middle alignment
13845 and non-standard namespace name
13847 parsoid=wt2html,wt2wt,html2html
13849 [[Image:Foobar.jpg|50px|middle]]
13851 <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>
13855 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
13857 [[File:Foobar.jpg|500x10px|baseline|caption]]
13859 <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>
13863 Parsoid-specific image handling - simple image with border and size spec
13865 [[File:Foobar.jpg|50px|border|caption]]
13867 <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>
13871 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13873 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
13875 <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>
13879 Parsoid-specific image handling - thumbnail with halign, valign, and caption
13882 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
13884 <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>
13888 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
13890 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
13892 <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>
13896 Parsoid-specific image handling - thumbnail with specific size, halign,
13897 valign, and caption (existing content)
13899 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
13901 <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>
13905 Parsoid-specific image handling - framed image with specific size and caption
13908 parsoid=wt2html,wt2wt,html2html
13910 [[File:Foobar.jpg|frame|500x50px|caption]]
13912 <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>
13916 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13919 parsoid=wt2html,wt2wt,html2html
13921 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13923 <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>
13927 Parsoid-specific image handling - frameless image with specific size, border, and caption
13929 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13931 <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>
13935 Parsoid-specific image handling - simple image with a formatted caption
13937 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13939 <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>
13943 Parsoid-specific image handling - caption with a template in it
13945 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13947 <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>
13951 Parsoid-specific image handling - caption with unbalanced tags in it
13953 parsoid=wt2html,wt2wt,html2html
13956 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13960 <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>
13965 Parsoid-specific image handling - empty caption (1)
13967 parsoid=wt2html,wt2wt
13969 [[File:Foobar.jpg|thumb|]]
13971 <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>
13974 # empty captions don't get serialized unless we're in the "round trip" case
13976 Parsoid-specific image handling - empty caption (2)
13980 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13981 <a href="./File:Foobar.jpg">
13982 <img resource="./File:Foobar.jpg"
13983 src="//example.com/images/3/3a/Foobar.jpg"
13984 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13985 height="25" width="220"/>
13987 <figcaption></figcaption>
13990 [[File:Foobar.jpg|thumb]]
13994 Parsoid-specific image handling - whitespace caption
13996 [[File:Foobar.jpg|thumb| ]]
13998 <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>
14002 Parsoid-specific image handling - lang option
14005 [[File:Foobar.svg|lang=de|caption]]
14009 <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>
14013 ## Edge case bugs in Parsoid from T93580
14015 T93580: 1. Templated <ref> inside block images
14017 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14021 <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>
14023 <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>
14027 T93580: 2. <ref> inside inline images
14029 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14033 <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>
14035 <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>
14039 T93580: 3. Templated <ref> inside inline images
14041 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14045 <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>
14047 <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>
14054 Subpage test/subpage
14062 subpage title=[[Subpage test]]
14066 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14071 Subpage noslash link
14073 subpage title=[[Subpage test]]
14077 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14082 Subpage test/1/2/subpage
14088 Relative subpage noslash link
14090 parsoid=wt2wt,wt2html,html2html
14091 subpage title=[[Subpage test/1/2/3/4]]
14097 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14098 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14101 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14102 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14106 Parsoid: dot-slash prefixed wikilinks
14116 </p><p>[[././baz/]]
14121 </p><p>[[././baz/]]
14126 Render invalid page names as plain text (bug 51090)
14139 [[{{echo|./../foo}}|bar]]
14140 [[{{echo|foo/.}}|bar]]
14141 [[{{echo|foo/..}}|bar]]
14142 [[{{echo|foo~~~~bar}}]]
14143 [[{{echo|foo>bar}}]]
14144 [[{{echo|foo././bar}}]]
14145 [[{{echo|foo{bar}}]]
14146 [[{{echo|foo}bar}}]]
14147 [[{{echo|foo[bar}}]]
14148 [[{{echo|foo]bar}}]]
14149 [[{{echo|foo<bar}}]]
14151 <p>[[./../foo|bar]]
14161 </p><p>[[./../foo|bar]]
14174 <p>[[./../foo|bar]]
14185 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14186 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14187 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
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>]]
14190 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14191 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14192 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14193 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14194 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14195 [[<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>
14203 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14208 BUG 561: {{/Subpage}}
14210 subpage title=[[Page]]
14214 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14222 Category:MediaWiki User's Guide
14230 [[:Category:MediaWiki User's Guide]]
14232 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14241 [[Category:MediaWiki User's Guide]]
14243 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14247 PAGESINCATEGORY invalid title fatal (r33546 fix)
14249 {{PAGESINCATEGORY:<bogus>}}
14256 Category with different sort key
14260 [[Category:MediaWiki User's Guide|Foo]]
14262 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14266 Category with identical sort key
14270 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14272 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
14276 Category with empty sort key
14281 [[Category:MediaWiki User's Guide|]]
14283 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
14287 Category with empty sort key and parentheses
14292 [[Category:Foo (bar)|]]
14294 [[Category:Foo (bar)|Foo]]
14297 ## We used to, but no longer wt2wt this test since the default serializer
14298 ## will normalize all categories to serialize on their own line.
14299 ## This wikitext usage is going to be fairly uncommon in production and
14300 ## selser will take care of preserving formatting in those scenarios.
14302 Category with link tail
14308 123[[Category:Foo]]456
14310 123[[Category:Foo]]456
14312 <p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
14316 Category with template
14321 [[Category:{{echo|Foo}}]]
14323 [[Category:{{echo|Foo}}]]
14327 Category with template in sort key
14332 [[Category:Foo|{{echo|Bar}}]]
14334 [[Category:Foo|{{echo|Bar}}]]
14338 Category with template in sort key and title
14343 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14345 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
14348 ## We used to, but no longer wt2wt this test since the default serializer
14349 ## will normalize all categories to serialize on their own line.
14350 ## This wikitext usage is going to be fairly uncommon in production and
14351 ## selser will take care of preserving formatting in those scenarios.
14353 Category / paragraph interactions
14357 Foo [[Category:Baz]] Bar
14359 Foo [[Category:Baz]]
14367 [[Category:Baz]] Bar
14380 {{echo|[[Category:Baz]]}}
14393 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14394 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14395 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14396 <p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
14397 <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>
14398 <link rel="mw:PageProp/Category" href="Category:Baz"/>
14401 ## We used to, but no longer wt2wt this test since the default serializer
14402 ## will normalize all categories to serialize on their own line.
14403 ## This wikitext usage is going to be fairly uncommon in production and
14404 ## selser will take care of preserving formatting in those scenarios.
14406 ## The whitespace on the empty line is part of the test. Please do not delete
14408 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14414 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
14416 {{echo|[[Category:Foo]] and so should this!}}
14418 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
14423 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
14425 <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>
14428 ## Parsoid will not try to wt2wt this while preserving newlines because
14429 ## it suppresses excess newlines within list items -- and we don't want to
14430 ## introduce a special case just for categories, which is, in reality somewhat
14431 ## odd behavior -- categories are unlikely to be used in list items like this
14432 ## in top-level pages and are only likely to show up in template-generated
14433 ## list items where this RT-ing is a non-issue.
14435 ## The whitespace on the empty line is part of the test. Please do not delete
14437 2. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
14443 [[Category:Foo]] and this should be part of the same list item
14446 {{echo|[[Category:Foo]] and this should be part of the same list item}}
14448 <ul><li>This and this should be part of the same list item</li>
14449 <li>So should this and this should be part of the same list item</li></ul>
14452 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
14453 <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>
14457 ## Newlines and categories that follow the last item of a list
14458 ## are treated differently because this (list followed by categories)
14459 ## is an extremely common pattern on wikis.
14461 3. Categories and newlines: newline suppression for last list item should RT properly
14474 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14476 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14477 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14481 4. Categories and newlines: newline suppression for last list item should RT properly
14489 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
14491 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14494 ## only wt2html for this to make sure the algo only applies to the rightmost path
14496 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
14509 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
14511 <ul><li> d</li></ul></li></ul>
14512 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
14515 ## We used to, but no longer wt2wt this test since the default serializer
14516 ## will normalize all categories to serialize on their own line.
14517 ## This wikitext usage is going to be fairly uncommon in production and
14518 ## selser will take care of preserving formatting in those scenarios.
14520 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
14524 * a [[Category:Foo]]
14526 <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>
14529 # This test also demonstrates because of newline+category tunneling
14530 # through the list hander, template wrapping doesn't expand to the
14531 # containing list when the list item swallows the category.
14533 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
14538 <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
14539 </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>
14543 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
14547 {{echo|[[Category:Foo]]
14551 <ul><li> a</li></ul>
14553 <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">
14554 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
14555 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
14559 Parsoid: Serialize link to category page with colon escape
14565 [[:Category:Foo|Bar]]
14568 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
14569 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
14573 # We used to, but no longer wt2wt this test since the default serializer
14574 # will normalize all categories to serialize on their own line.
14575 # This wikitext usage is going to be fairly uncommon in production and
14576 # selser will take care of preventing whitespace insertion if this
14577 # occurs in an article.
14579 # html2html disabled for the same reason (whitespace insertion between
14582 # html2wt disabled because it localizes the "Category" namespace.
14584 Link prefix/suffixes aren't applied to category links
14594 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
14598 Parsoid: Serialize link to file page with colon escape
14604 [[:File:Foo.png|Bar]]
14607 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
14608 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
14613 Parsoid: Serialize a genuine category link without colon escape
14618 [[Category:Foo|Bar]]
14620 <link rel="mw:PageProp/Category" href="./Category:Foo">
14621 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
14625 Normalize hrefs properly before testing for invalid link targets (bug 70894)
14629 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
14631 [[Category:Toxine bactérienne]]
14635 Parsoid: Defaultsort
14637 {{DEFAULTSORT:Foo}}
14639 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
14643 Parsoid: Defaultsort (template-generated)
14645 {{{{echo|DEFAULTSORT}}:Foo}}
14647 <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}}]}'/>
14651 ### Inter-language links
14654 Interlanguage links
14662 es:Alimento fr:Nourriture zh:食品
14664 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
14665 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
14666 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
14670 Duplicate interlanguage links (bug 24502)
14681 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
14682 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
14683 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
14684 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
14691 Basic section headings
14698 ===Smaller headline===
14701 <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>
14704 <h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
14707 <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>
14713 Section headings with TOC
14716 === Subheadline 1 ===
14717 ===== Skipping a level =====
14718 ====== Skipping a level ======
14722 ===Another headline===
14724 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14726 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
14728 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
14730 <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>
14732 <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>
14739 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
14741 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
14747 <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>
14748 <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>
14749 <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>
14750 <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>
14751 <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>
14754 <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>
14759 TOC anchors don't collide
14767 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14769 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
14770 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
14771 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
14772 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
14776 <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>
14777 <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>
14778 <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>
14779 <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>
14783 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
14785 Handling of sections up to level 6 and beyond
14788 == Level 2 Heading==
14789 === Level 3 Heading===
14790 ==== Level 4 Heading====
14791 ===== Level 5 Heading=====
14792 ====== Level 6 Heading======
14793 ======= Level 7 Heading=======
14794 ======== Level 8 Heading========
14795 ========= Level 9 Heading=========
14796 ========== Level 10 Heading==========
14798 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14800 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
14802 <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>
14804 <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>
14806 <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>
14808 <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>
14810 <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>
14811 <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>
14812 <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>
14813 <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>
14814 <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>
14828 <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>
14829 <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>
14830 <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>
14831 <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>
14832 <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>
14833 <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>
14834 <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>
14835 <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>
14836 <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>
14837 <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>
14842 TOC regression (T11764)
14846 ==== title 1.1.1 ====
14851 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14853 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14855 <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>
14857 <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>
14860 <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>
14863 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14865 <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>
14871 <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>
14872 <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>
14873 <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>
14874 <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>
14875 <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>
14876 <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>
14881 TOC for heading containing <span id="..."></span> (T96153)
14884 ==<span id="old-anchor"></span>New title==
14886 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14888 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
14892 <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>
14897 TOC with wgMaxTocLevel=3 (bug 6204)
14903 ==== title 1.1.1 ====
14908 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14910 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
14912 <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>
14913 <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>
14916 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
14918 <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>
14924 <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>
14925 <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>
14926 <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>
14927 <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>
14928 <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>
14929 <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>
14934 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
14940 ====Section 1.1.1====
14941 ====Section 1.1.1.1====
14944 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14946 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
14948 <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>
14951 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
14955 <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>
14956 <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>
14957 <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>
14958 <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>
14959 <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>
14965 Resolving duplicate section names
14970 <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>
14971 <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>
14976 Resolving duplicate section names with differing case (bug 10721)
14981 <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>
14982 <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>
14994 Template with sections, __NOTOC__
15001 <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>
15002 <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>
15003 <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>
15004 <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>
15009 __NOEDITSECTION__ keyword
15015 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15016 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15021 Link inside a section heading
15023 ==Section with a [[Main Page|link]] in it==
15025 <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>
15030 TOC regression (T14077)
15037 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15039 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15041 <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>
15044 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15048 <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>
15049 <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>
15050 <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>
15055 BUG 1219 URL next to image (good)
15057 http://example.com [[File:Foobar.jpg]]
15059 <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>
15062 <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>
15066 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
15069 The line above must have a trailing space!
15072 But just in case it doesn't...
15074 <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>
15075 <p>The line above must have a trailing space!
15077 <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>
15078 <p>But just in case it doesn't...
15083 Header with special characters (bug 25462)
15085 The tooltips shall not show entities to the user (ie. be double escaped)
15102 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15104 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15106 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15107 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15108 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15109 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15110 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15114 <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>
15117 <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>
15120 <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>
15123 <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>
15126 <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>
15132 Header with space, plus and underscore as entity
15134 Id should not contain + for spaces
15136 == Space between Text ==
15139 == Space-Entity between Text ==
15142 == Plus+between+Text ==
15145 == Plus-Entity+between+Text ==
15148 == Underscore_between_Text ==
15151 == Underscore-Entity_between_Text ==
15154 [[#Space between Text]]
15155 [[#Space-Entity between Text]]
15156 [[#Plus+between+Text]]
15157 [[#Plus-Entity+between+Text]]
15158 [[#Underscore_between_Text]]
15159 [[#Underscore-Entity_between_Text]]
15161 <p>Id should not contain + for spaces
15163 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15165 <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>
15166 <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>
15167 <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>
15168 <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>
15169 <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>
15170 <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>
15174 <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>
15177 <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>
15180 <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>
15183 <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>
15186 <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>
15189 <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>
15191 </p><p><a href="#Space_between_Text">#Space between Text</a>
15192 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15193 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15194 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15195 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15196 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15201 Headers with excess '=' characters
15202 (Are similar tests necessary beyond the 1st level?)
15206 =''italic'' heading==
15207 ==''italic'' heading=
15209 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15211 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15212 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15213 <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>
15214 <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>
15218 <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>
15219 <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>
15220 <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>
15221 <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>
15226 HTML headers vs TOC (bug 23393)
15227 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15239 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15241 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15243 <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>
15244 <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>
15247 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15249 <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>
15250 <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>
15256 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15257 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15258 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15259 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15260 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15261 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
15266 Single-line or multiline-comments can follow headings
15268 parsoid=wt2html,wt2wt
15276 <h2><span class="mw-headline" id="foo">foo</span></h2>
15277 <h2><span class="mw-headline" id="bar">bar</span></h2>
15278 <h2><span class="mw-headline" id="baz">baz</span></h2>
15283 BUG 1219 URL next to image (broken)
15285 http://example.com[[File:Foobar.jpg]]
15287 <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>
15290 <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>
15294 Bug 1186 news: in the middle of text
15296 http://en.wikinews.org/wiki/Wikinews:Workplace
15298 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
15304 Namespaced link must have a title
15313 Namespaced link must have a title (bad fragment version)
15315 [[Project:#fragment]]
15317 <p>[[Project:#fragment]]
15323 ### HTML tags and HTML attributes
15327 div with no attributes
15329 <div>HTML rocks</div>
15331 <div>HTML rocks</div>
15336 div with double-quoted attribute
15338 <div id="rock">HTML rocks</div>
15340 <div id="rock">HTML rocks</div>
15345 div with single-quoted attribute
15347 <div id='rock'>HTML rocks</div>
15349 <div id="rock">HTML rocks</div>
15354 div with unquoted attribute
15356 <div id=rock>HTML rocks</div>
15358 <div id="rock">HTML rocks</div>
15363 div with illegal double attributes
15365 <div id="a" id="b">HTML rocks</div>
15367 <div id="b">HTML rocks</div>
15371 # FIXME: produce empty string instead of "class" in the PHP parser, following
15374 div with empty attribute value, space before equals
15378 <div class =>HTML rocks</div>
15380 <div class="">HTML rocks</div>
15385 div with multiple empty attribute values
15389 <div id= title=>HTML rocks</div>
15391 <div id="" title="">HTML rocks</div>
15396 table with multiple empty attribute values
15404 <table title="" id="">
15405 <tbody><tr><td> hi</td></tr>
15410 div with braces in attribute value
15412 <div title="{}">Foo</div>
15414 <div title="{}">Foo</div>
15417 <div title="{}">Foo</div>
15420 # This it very inconsistent in the PHP parser: it returns
15421 # class="class" if there is a space between the name and the equal sign (see
15422 # 'div with empty attribute value, space before equals'), but strips the
15423 # attribute completely if the space is missing. We hope that not much content
15424 # depends on this, so are implementing the behavior below in Parsoid for
15425 # consistencies' sake.
15426 # FIXME: fix this behavior in the PHP parser?
15428 div with empty attribute value, no space before equals
15430 parsoid=wt2html,html2html
15432 <div class=>HTML rocks</div>
15434 <div>HTML rocks</div>
15437 <div class="">HTML rocks</div>
15441 HTML multiple attributes correction
15443 <p class="error" class="awesome">Awesome!</p>
15445 <p class="awesome">Awesome!</p>
15450 Table multiple attributes correction
15453 !+ class="error" class="awesome"| status
15458 <th class="awesome"> status
15466 <DIV ID="x">HTML ROCKS</DIV>
15468 <div id="x">HTML ROCKS</div>
15473 Non-ASCII pseudo-tags are rendered as text
15482 Pseudo-tag with URL 'name' renders as url link
15484 <http://example.com/>
15486 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
15491 text with amp in the middle of nowhere
15495 <p>Remember AT&T?
15500 text with character entity: eacute
15502 I always thought é was a cute letter.
15504 <p>I always thought é was a cute letter.
15507 <p>I always thought é was a cute letter.</p>
15511 text with entity-escaped character entity-like string: eacute
15513 I always thought &eacute; was a cute letter.
15515 <p>I always thought &eacute; was a cute letter.
15520 text with undefined character entity: xacute
15522 I always thought &xacute; was a cute letter.
15524 <p>I always thought &xacute; was a cute letter.
15531 <data value="5">five</data>
15532 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15533 <mark>This highlighted text</mark>
15535 <p><data value="5">five</data>
15536 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
15537 <mark>This highlighted text</mark>
15542 HTML tag with leading space is parsed as text
15546 <p>< div>foo< /div>
15551 ### Nesting tests (see bug 41545, 50604, 51081)
15554 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
15555 # Note that html2wt is considerably more difficult if we use <b> in
15556 # the test case, instead of <big>
15558 Ensure that HTML adoption agency algorithm is properly implemented.
15560 <big>X<big>Y</big>Z</big>
15562 <p><big>X<big>Y</big>Z</big>
15566 # This was bug 41545 in the PHP parser.
15567 # Note that tidy doesn't handle this correctly.
15571 <kbd>X<kbd>Y</kbd>Z</kbd>
15573 <p><kbd>X<kbd>Y</kbd>Z</kbd>
15577 # The following cases were bug 51081 in the PHP parser.
15578 # Note that there are some other nestable tags (b, i, etc) which are
15579 # not covered; see bug 51081 for discussion.
15581 # Note that tidy doesn't handle this correctly.
15585 <em>X<em>Y</em>Z</em>
15587 <p><em>X<em>Y</em>Z</em>
15591 # Note that tidy doesn't handle this correctly.
15593 Nesting of <strong>
15595 <strong>X<strong>Y</strong>Z</strong>
15597 <p><strong>X<strong>Y</strong>Z</strong>
15606 <p><q>X<q>Y</q>Z</q></p>
15609 # Note that tidy doesn't handle this correctly.
15613 <ruby>X<ruby>Y</ruby>Z</ruby>
15615 <p><ruby>X<ruby>Y</ruby>Z</ruby>
15619 # Note that tidy doesn't handle this correctly.
15623 <bdo>X<bdo>Y</bdo>Z</bdo>
15625 <p><bdo>X<bdo>Y</bdo>Z</bdo>
15637 [[Media:Foobar.jpg]]
15639 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
15644 Media link with text
15646 [[Media:Foobar.jpg|A neat file to look at]]
15648 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
15652 # FIXME: this is still bad HTML tag nesting
15653 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
15655 Media link with nasty text
15657 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
15659 <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>
15662 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
15663 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
15667 Media link to nonexistent file (bug 1702)
15669 [[Media:No such.jpg]]
15671 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
15676 Image link to nonexistent file (bug 1850 - good)
15678 [[File:No_such.jpg]]
15680 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
15683 <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>
15687 :Image link to nonexistent file (bug 1850 - bad)
15689 [[:Image:No such.jpg]]
15691 <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>
15694 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
15700 Character reference normalization in link text (bug 1938)
15702 [[Main Page|this&that]]
15704 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
15711 Test for unicode normalization
15713 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
15717 (bug 19451) Links should refer to the normalized form.
15725 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15726 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15727 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15728 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15729 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
15734 Empty attribute crash test (bug 2067)
15736 <font color="">foo</font>
15738 <p><font color="">foo</font>
15743 Empty attribute crash test single-quotes (bug 2067)
15745 <font color=''>foo</font>
15747 <p><font color="">foo</font>
15752 Attribute test: equals, then nothing
15754 <font color=>foo</font>
15756 <p><font>foo</font>
15761 Attribute test: unquoted value
15763 <font color=x>foo</font>
15765 <p><font color="x">foo</font>
15770 Attribute test: unquoted but illegal value (hash)
15772 <font color=#x>foo</font>
15774 <p><font color="#x">foo</font>
15778 # Parsoid does not serialize to empty attribute syntax,
15779 # so wt2wt and html2wt cases are skipped
15781 Attribute test: no value (T54330)
15783 parsoid=wt2html,html2html
15785 <font color>foo</font>
15787 <p><font color="">foo</font>
15790 <p><font color="">foo</font></p>
15794 Bug 2095: link with three closing brackets
15798 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
15801 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
15805 Bug 2095: link with pipe and three closing brackets
15807 [[Main Page|link]]]
15809 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
15812 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
15816 Bug 2095: link with pipe and three closing brackets, version 2
15818 [[Main Page|[http://example.com/]]]
15820 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
15823 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
15832 Template:Dangerous attribute
15834 " onmouseover="alert(document.cookie)
15838 Template:Dangerous style attribute
15840 border-size: expression(alert(document.cookie))
15846 <div style="float: right; {{{1}}}">Magic div</div>
15850 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
15852 <div title="{{test}}"></div>
15854 <div title="This is a test template"></div>
15858 # Parsoid has enough context to handle this case
15860 Bug 2304: HTML attribute safety (dangerous template; 2309)
15862 <div title="{{dangerous attribute}}"></div>
15864 <div title=""></div>
15867 <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>
15871 Bug 2304: HTML attribute safety (dangerous style template; 2309)
15873 <div style="{{dangerous style attribute}}"></div>
15875 <div style="/* insecure input */"></div>
15880 Bug 2304: HTML attribute safety (safe parameter; 2309)
15882 {{div style|width: 200px}}
15884 <div style="float: right; width: 200px">Magic div</div>
15889 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
15891 {{div style|width: expression(alert(document.cookie))}}
15893 <div style="/* insecure input */">Magic div</div>
15898 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
15900 {{div style|"><script>alert(document.cookie)</script>}}
15902 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15907 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
15909 {{div style|" ><script>alert(document.cookie)</script>}}
15911 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
15916 Bug 2304: HTML attribute safety (link)
15918 <div title="[[Main Page]]"></div>
15920 <div title="[[Main Page]]"></div>
15925 Bug 2304: HTML attribute safety (italics)
15927 <div title="''foobar''"></div>
15929 <div title="''foobar''"></div>
15934 Bug 2304: HTML attribute safety (bold)
15936 <div title="'''foobar'''"></div>
15938 <div title="'''foobar'''"></div>
15944 Bug 2304: HTML attribute safety (ISBN)
15946 <div title="ISBN 1234567890"></div>
15948 <div title="ISBN 1234567890"></div>
15953 Bug 2304: HTML attribute safety (RFC)
15955 <div title="RFC 1234"></div>
15957 <div title="RFC 1234"></div>
15962 Bug 2304: HTML attribute safety (PMID)
15964 <div title="PMID 1234567890"></div>
15966 <div title="PMID 1234567890"></div>
15971 Bug 2304: HTML attribute safety (web link)
15973 <div title="http://example.com/"></div>
15975 <div title="http://example.com/"></div>
15980 Bug 2304: HTML attribute safety (named web link)
15982 <div title="[http://example.com/ link]"></div>
15984 <div title="[http://example.com/ link]"></div>
15989 Bug 3244: HTML attribute safety (extension; safe)
15991 <div style="<nowiki>background:blue</nowiki>"></div>
15993 <div style="background:blue"></div>
15998 Bug 3244: HTML attribute safety (extension; unsafe)
16000 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16002 <div style="/* insecure input */"></div>
16006 # More MSIE fun discovered by Tom Gilder
16009 MSIE CSS safety test: spurious slash
16011 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16013 <div style="/* insecure input */">evil</div>
16018 MSIE CSS safety test: hex code
16020 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16022 <div style="/* insecure input */">evil</div>
16027 MSIE CSS safety test: comment in url
16029 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16031 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16036 MSIE CSS safety test: comment in expression
16038 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16040 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16045 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
16047 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16049 <p style="/* invalid control char */">A</p>
16054 MSIE 6 CSS safety test: Fullwidth (bug 55332)
16056 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16057 <div style="top:EXPRESSION(alert())">B</div>
16059 <p style="/* insecure input */">A</p>
16060 <div style="/* insecure input */">B</div>
16065 MSIE 6 CSS safety test: IPA extensions (bug 55332)
16067 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16068 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16070 <div style="/* insecure input */">A</div>
16071 <p style="/* insecure input */">B</p>
16076 MSIE 6 CSS safety test: sup/sub script (bug 55332)
16078 <div style="background-image:url⁽javascript:alert())">A</div>
16079 <div style="background-image:url₍javascript:alert())">B</div>
16080 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16082 <div style="/* insecure input */">A</div>
16083 <div style="/* insecure input */">B</div>
16084 <p style="/* insecure input */">C</p>
16088 # FIXME: Parsoid fails to sanitize this! See T58846.
16093 title="data:text/html,<img src=1 onerror=alert(1)>"
16094 style="-o-link:attr(title);-o-link-source:current">X</div>
16096 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16101 MSIE 6 CSS safety test: Repetition markers (bug 55332)
16103 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16104 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16105 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16106 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16107 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16108 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16109 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16111 <p style="/* insecure input */">A</p>
16112 <p style="/* insecure input */">B</p>
16113 <p style="/* insecure input */">C</p>
16114 <p style="/* insecure input */">D</p>
16115 <p style="/* insecure input */">E</p>
16116 <p style="/* insecure input */">F</p>
16117 <p style="/* insecure input */">G</p>
16122 Table attribute legitimate extension
16125 !+ style="<nowiki>color:blue</nowiki>"| status
16130 <th style="color:blue"> status
16136 Table attribute safety
16139 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16144 <th style="/* insecure input */"> status
16150 CSS line continuation 1
16152 <div style="background-image: u\ rl(test.jpg);"></div>
16154 <div style="/* insecure input */"></div>
16159 CSS line continuation 2
16161 <div style="background-image: u\ rl(test.jpg); "></div>
16163 <div style="/* invalid control char */"></div>
16174 Expansion of multi-line templates in attribute values (bug 6255)
16176 <div style="background: {{identity|#00FF00}}">-</div>
16178 <div style="background: #00FF00">-</div>
16184 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
16186 <div style="background:
16189 <div style="background: #00FF00">-</div>
16192 <div style="background:
16197 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
16199 <div style="background: #00FF00">-</div>
16201 <div style="background: #00FF00">-</div>
16206 evil <math>-wiki-tags without Extension:Math enabled
16208 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
16210 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
16214 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
16217 Parser hook: empty input
16228 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16231 ## Don't expect parsoid to rt this form.
16233 Parser hook: empty input using terminated empty elements
16235 parsoid=wt2html,html2html
16246 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16250 Parser hook: empty input using terminated empty elements (space before)
16261 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
16265 Parser hook: basic input
16276 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16279 ## Don't expect parsoid to rt this form.
16281 Parser hook: case insensitive
16283 parsoid=wt2html,html2html
16294 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16297 ## Don't expect parsoid to rt this form.
16299 Parser hook: case insensitive, redux
16301 parsoid=wt2html,html2html
16312 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
16316 Parser hook: nested tags
16320 <tag><tag></tag></tag>
16329 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
16333 Parser hook: basic arguments
16335 <tag width="200" height="100" depth="50" square=""></tag>
16348 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16351 ## Don't expect parsoid to rt this form.
16353 Parser hook: basic arguments, variations
16355 parsoid=wt2html,html2html
16357 <tag width=200 height = "100" depth = '50' square></tag>
16370 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16374 Parser hook: argument containing a forward slash (bug 5344)
16376 <tag filename="/tmp/bla"></tag>
16381 'filename' => '/tmp/bla',
16386 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
16389 ## Don't expect parsoid to rt this form.
16391 Parser hook: empty input using terminated empty elements (bug 2374)
16393 parsoid=wt2html,html2html
16405 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
16408 # </tag> should be output literally since there is no matching tag that begins it
16410 Parser hook: basic arguments using terminated empty elements (bug 2374)
16412 <tag width=200 height = "100" depth = '50' square/>
16431 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
16435 Parser hook: static parser hook not inside a comment
16437 <statictag>hello, world</statictag>
16439 <statictag action="flush" />
16445 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
16446 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
16450 Parser hook: static parser hook inside a comment
16452 <!-- <statictag>hello, world</statictag> -->
16453 <statictag action="flush" />
16458 <!-- <statictag>hello, world</statictag> -->
16459 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
16462 # Nested template calls; this case was broken by Parser.php rev 1.506,
16466 Template:One-parameter
16468 (My parameter is: {{{1}}})
16472 Template:Map-one-parameter
16474 {{{{{1}}}|{{{2}}}}}
16478 Nested template calls
16480 {{Map-one-parameter|One-parameter|param}}
16482 <p>(My parameter is: param)
16491 # HTML+Tidy effectively strips out the empty tags completely
16492 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
16493 # which Tidy would have done for the PHP parser had there been content inside it.
16495 Sanitizer: Closing of open tags
16497 <s></s><table></table>
16499 <s></s><table></table>
16502 <p><s></s></p><table></table>
16506 Sanitizer: Closing of open but not closed tags
16515 Sanitizer: Closing of closed but not open tags
16525 Sanitizer: Closing of closed but not open table tags
16529 Table not started</td></tr></table>
16531 <p>Table not started</p>
16533 <p>Table not started</p>
16537 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
16539 <span id="æ: v">byte</span>[[#æ: v|backlink]]
16541 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
16545 # In HTML5, the restrictions are that id must contain at least one character,
16546 # and must not contain any space characters.
16548 Sanitizer: Validating the contents of the id attribute (bug 4515)
16552 <br id="" /><br id="a space" />
16557 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
16559 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
16563 <br id="foo" /><br id="foo" />
16565 Something need to be done. foo-2 ?
16569 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
16572 <meta itemprop="hello" content="world">
16573 <meta http-equiv="refresh" content="5">
16574 <meta itemprop="hello" http-equiv="refresh" content="5">
16575 <link itemprop="hello" href="{{SERVER}}">
16576 <link rel="stylesheet" href="{{SERVER}}">
16577 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
16581 <p> <meta itemprop="hello" content="world" />
16582 <meta http-equiv="refresh" content="5">
16583 <meta itemprop="hello" content="5" />
16585 <link itemprop="hello" href="http://example.org" />
16586 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
16587 <link itemprop="hello" href="http://example.org" />
16593 Language converter: output gets cut off unexpectedly (bug 5757)
16597 this bit is safe: }-
16599 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
16601 then we get cut off here: }-
16603 all additional text is vanished
16605 <p>this bit is safe: }-
16606 </p><p>but if we add a conversion instance: xxx
16607 </p><p>then we get cut off here: }-
16608 </p><p>all additional text is vanished
16613 Self closed html pairs (bug 5487)
16616 <center><font id="bug" />Centered text</center>
16617 <div><font id="bug2" />In div text</div>
16619 <center><font id="bug" />Centered text</center>
16620 <div><font id="bug2" />In div text</div>
16629 Punctuation: nbsp before exclamation
16633 <p>C'est grave !
16638 Punctuation: CSS !important (bug 11874)
16640 <div style="width:50% !important">important</div>
16642 <div style="width:50% !important">important</div>
16647 Punctuation: CSS ! important (bug 11874; with space after)
16649 <div style="width:50% ! important">important</div>
16651 <div style="width:50% ! important">important</div>
16656 HTML bullet list, closed tags (bug 5497)
16669 <ul data-parsoid='{"stx":"html"}'>
16670 <li data-parsoid='{"stx":"html"}'>One</li>
16671 <li data-parsoid='{"stx":"html"}'>Two</li>
16677 HTML bullet list, unclosed tags (bug 5497)
16689 <ul data-parsoid='{"stx":"html"}'>
16690 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16691 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16697 HTML ordered list, closed tags (bug 5497)
16710 <ol data-parsoid='{"stx":"html"}'>
16711 <li data-parsoid='{"stx":"html"}'>One</li>
16712 <li data-parsoid='{"stx":"html"}'>Two</li>
16718 HTML ordered list, unclosed tags (bug 5497)
16731 <ol data-parsoid='{"stx":"html"}'>
16732 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
16733 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
16739 HTML nested bullet list, closed tags (bug 5497)
16764 HTML nested bullet list, open tags (bug 5497)
16801 HTML nested ordered list, closed tags (bug 5497)
16826 HTML nested ordered list, open tags (bug 5497)
16863 HTML ordered list item with parameters oddity
16865 <ol><li id="fragment">One</li>
16868 <ol><li id="fragment">One</li>
16873 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
16875 bug 5918: autonumbering
16877 [http://first/] [http://second] [ftp://ftp]
16881 [mailto:enclosed@mail.tld With target]
16883 [mailto:enclosed@mail.tld]
16885 mailto:inline@mail.tld
16887 <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>
16888 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
16889 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
16890 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
16891 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
16894 <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>
16895 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
16896 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
16897 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
16898 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
16903 # Security and HTML correctness
16904 # From Nick Jenkins' fuzz testing
16908 Fuzz testing: Parser13
16923 Fuzz testing: Parser14
16928 <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>
16929 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
16931 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16937 <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>
16939 <div id="toc" class="toc">
16940 <div id="toctitle">
16944 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
16951 Fuzz testing: Parser14-table
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__">
16962 <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>
16963 <table style="__TOC__">
16970 # Known to produce bogus xml (extra </td>)
16972 Fuzz testing: Parser16
17001 Fuzz testing: Parser21
17004 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17009 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17019 Fuzz testing: Parser22
17021 http://===r:::https://b
17025 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17033 # Known to produce bad XML for now
17035 Fuzz testing: Parser24
17042 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17043 <br style="onmouseover='alert(document.cookie);' " />
17045 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17050 <u class="|">}}}} >
17051 <br style="onmouseover='alert(document.cookie);'" />
17053 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17062 # Note: the current result listed for this is not what the original one was,
17063 # but the original bug was JavaScript injection, which is fixed in any case.
17064 # It's not clear that the original result listed was any more correct than the
17065 # current one. Original result:
17068 # <li class="||">
17069 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17071 Fuzz testing: Parser25 (bug 6055)
17077 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17079 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17084 Fuzz testing: URL adjacent extension (with space, clean)
17086 http://example.com <nowiki>junk</nowiki>
17088 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17091 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17095 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17097 http://example.com<nowiki>junk</nowiki>
17099 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17102 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17106 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17108 http://example.com<pre>junk</pre>
17110 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17113 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17118 <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>
17122 Fuzz testing: image with bogus manual thumbnail
17124 [[Image:foobar.jpg|thumbnail= ]]
17126 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17129 <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>
17133 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
17135 <pre dir=" "></pre>
17137 <pre dir=" "></pre>
17142 Parsing optional HTML elements (Bug 6171)
17147 <td> Some tabular data</td>
17148 <td> More tabular data ...
17149 <td> And yet som tabular data</td>
17155 <td> Some tabular data</td>
17156 <td> More tabular data ...
17157 </td><td> And yet som tabular data</td>
17164 Correct handling of <td>, <tr> (Bug 6171)
17169 <td> Some tabular data</td>
17170 <td> More tabular data ...</td>
17171 <td> And yet som tabular data</td>
17177 <td> Some tabular data</td>
17178 <td> More tabular data ...</td>
17179 <td> And yet som tabular data</td>
17187 Parsing crashing regression (fr:JavaScript)
17191 <p></body></x>
17196 Inline wiki vs wiki block nesting
17202 <p><b>Bold paragraph</b>
17203 </p><p>New wiki paragraph
17207 # FIXME: The current php output is documented
17208 # and desired output is the parsoid target.
17210 Inline HTML vs wiki block nesting
17216 <p><b>Bold paragraph
17217 </p><p>New wiki paragraph</b>
17220 <p><b>Bold paragraph</b>
17221 </p><p>New wiki paragraph
17225 # Original result was this:
17226 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
17228 # While that might be marginally more intuitive, maybe, the six-apostrophe
17229 # construct is clearly pathological and the result stated here (which is what
17230 # the parser actually does) is about as reasonable as anything.
17232 Mixing markup for italics and bold
17235 '''bold''''''bold''bolditalics'''''
17237 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
17245 Article for special page transclusion test
17249 Special page transclusion
17252 {{Special:Prefixindex/Xyzzyx}}
17254 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17260 Special page transclusion twice (bug 5021)
17263 {{Special:Prefixindex/Xyzzyx}}
17264 {{Special:Prefixindex/Xyzzyx}}
17266 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17268 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
17274 Transclusion of default MediaWiki message
17276 {{MediaWiki:Mainpage}}
17283 Transclusion of nonexistent MediaWiki message
17285 {{MediaWiki:Mainpagexxx}}
17287 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
17292 Transclusion of MediaWiki message with underscore
17294 {{MediaWiki:history_short}}
17301 Transclusion of MediaWiki message with space
17303 {{MediaWiki:history short}}
17310 Invalid header with following text
17320 Section extraction test (section 0)
17340 Section extraction test (section 1)
17362 Section extraction test (section 2)
17383 Section extraction test (section 3)
17403 Section extraction test (section 4)
17427 Section extraction test (section 5)
17447 Section extraction test (section 6)
17468 Section extraction test (section 7)
17488 Section extraction test (section 8)
17508 Section extraction test (section 9)
17529 Section extraction test (section 10)
17549 Section extraction test (nonexistent section 11)
17568 Section extraction test with bogus heading (section 1)
17573 ==bogus== not a legal section
17577 ==bogus== not a legal section
17581 Section extraction test with bogus heading (section 2)
17586 ==bogus== not a legal section
17593 Section extraction test with comment after heading (section 1)
17605 Section extraction test with comment after heading (section 2)
17617 Section extraction test with bogus <nowiki> heading (section 1)
17622 ==bogus== <nowiki>not a legal section</nowiki>
17626 ==bogus== <nowiki>not a legal section</nowiki>
17630 Section extraction test with bogus <nowiki> heading (section 2)
17635 ==bogus== <nowiki>not a legal section</nowiki>
17641 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
17642 # instead of respecting commented sections
17644 Section extraction prefixed by comment (section 1)
17655 Section extraction prefixed by comment (section 2)
17665 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
17666 # instead of respecting HTML-style headings
17668 Section extraction, mixed wiki and html (section 1)
17684 Section extraction, mixed wiki and html (section 2)
17700 # Formerly testing for bug 3342
17702 Section extraction, heading surrounded by <noinclude>
17706 <noinclude>==unmarked==</noinclude>
17712 # Test behavior of bug 19910
17714 Sectiion with all-equals
17719 The line above must have a trailing space
17722 But just in case it doesn't...
17726 But just in case it doesn't...
17730 Section replacement test (section 0)
17761 Section replacement test (section 1)
17790 Section replacement test (section 2)
17820 Section replacement test (section 3)
17851 Section replacement test (section 4)
17878 Section replacement test (section 5)
17909 Section replacement test (section 6)
17939 Section replacement test (section 7)
17970 Section replacement test (section 8)
18001 Section replacement test (section 9)
18030 Section replacement test (section 10)
18060 Section replacement test with initial whitespace (bug 13728)
18064 Preformatted initial line
18068 Preformatted initial line
18075 Section extraction, heading followed by pre with 20 spaces (bug 6398)
18087 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
18100 Section extraction, <pre> around bogus header (bug 10309)
18117 Section replacement, <pre> around bogus header (bug 10309)
18119 noxml replace=2,"xxx"
18139 Handling of 
 in URLs
18143 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18146 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
18148 a</a></li></ul></li></ul>
18152 Handling of %0A in URLs
18156 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18159 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18163 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
18165 5 quotes, code coverage +1 line
18172 <p><b><i></i></b></p>
18175 # same html as previous, but wikitext adjusted to match parsoid html2wt
18176 # note that wt2html and html2html will put the <i> before the <b>
18178 5 quotes, code coverage +1 line w/ nowiki (1)
18180 parsoid=wt2wt,html2wt
18182 '''''<nowiki/>'''''
18187 <p><b><i></i></b></p>
18190 # same as previous, just swapping the <i> and <b>
18192 5 quotes, code coverage +1 line w/ nowiki (2)
18194 '''''<nowiki/>'''''
18199 <p><i><b></b></i></p>
18203 Special:Search page linking.
18207 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
18212 {{!}} is a magic word
18214 {{!}} is a magic word there and {{!}} is still a magic word here
18215 | is not a magic word here but {{!}} is still a magic word here
18217 <p>| is a magic word there and | is still a magic word here
18218 | is not a magic word here but | is still a magic word here
18221 <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
18222 | 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>
18229 title=[[Parser test]]
18234 * {{FULLPAGENAMEE}}
18236 * {{BASEPAGENAMEE}}
18240 * {{ROOTPAGENAMEE}}
18242 * {{TALKPAGENAMEE}}
18243 * {{SUBJECTPAGENAME}}
18244 * {{SUBJECTPAGENAMEE}}
18247 * {{NAMESPACENUMBER}}
18251 * {{SUBJECTSPACEE}}
18252 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
18254 <ul><li> Parser test</li>
18255 <li> Parser_test</li>
18256 <li> Parser test</li>
18257 <li> Parser_test</li>
18258 <li> Parser test</li>
18259 <li> Parser_test</li>
18260 <li> Parser test</li>
18261 <li> Parser_test</li>
18262 <li> Parser test</li>
18263 <li> Parser_test</li>
18264 <li> Talk:Parser test</li>
18265 <li> Talk:Parser_test</li>
18266 <li> Parser test</li>
18267 <li> Parser_test</li>
18275 <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>
18278 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
18288 image4 |300px| centre
18289 image5.svg| http://///////
18294 <ul class="gallery mw-gallery-traditional">
18295 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18296 <div class="thumb" style="height: 150px;">Image1.png</div>
18297 <div class="gallerytext">
18300 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18301 <div class="thumb" style="height: 150px;">Image2.gif</div>
18302 <div class="gallerytext">
18305 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18306 <div class="thumb" style="height: 150px;">Image3</div>
18307 <div class="gallerytext">
18310 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18311 <div class="thumb" style="height: 150px;">Image4</div>
18312 <div class="gallerytext">
18317 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18318 <div class="thumb" style="height: 150px;">Image5.svg</div>
18319 <div class="gallerytext">
18320 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
18324 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18325 <div class="thumb" style="height: 150px;">* image6</div>
18326 <div class="gallerytext">
18334 Gallery (with options)
18336 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
18337 File:Nonexistent.jpg|caption
18338 File:Nonexistent.jpg
18339 image:foobar.jpg|some '''caption''' [[Main Page]]
18341 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
18344 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
18345 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
18346 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18347 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18348 <div class="gallerytext">
18353 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18354 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
18355 <div class="gallerytext">
18358 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18359 <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>
18360 <div class="gallerytext">
18361 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18365 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18366 <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>
18367 <div class="gallerytext">
18370 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
18371 <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>
18372 <div class="gallerytext">
18382 Gallery with link that has fragment
18385 image:foobar.jpg|link=Main_Page
18386 image:foobar.jpg|link=Main_Page#section
18387 image:foobar.jpg|link=Main Page#section|caption
18390 <ul class="gallery mw-gallery-traditional">
18391 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18392 <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>
18393 <div class="gallerytext">
18396 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18397 <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>
18398 <div class="gallerytext">
18401 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18402 <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>
18403 <div class="gallerytext">
18413 Gallery with wikitext inside caption
18416 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
18417 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
18420 <ul class="gallery mw-gallery-traditional">
18421 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18422 <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>
18423 <div class="gallerytext">
18424 <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>
18428 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18429 <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>
18430 <div class="gallerytext">
18431 <p>This is a test template
18440 gallery (with showfilename option)
18442 <gallery showfilename>
18443 File:Nonexistent.jpg|caption
18444 File:Nonexistent.jpg
18445 image:foobar.jpg|some '''caption''' [[Main Page]]
18449 <ul class="gallery mw-gallery-traditional">
18450 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18451 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18452 <div class="gallerytext">
18453 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18458 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18459 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18460 <div class="gallerytext">
18461 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
18465 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18466 <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>
18467 <div class="gallerytext">
18468 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18469 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18473 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18474 <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>
18475 <div class="gallerytext">
18476 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
18485 Gallery (with namespace-less filenames)
18488 File:Nonexistent.jpg
18494 <ul class="gallery mw-gallery-traditional">
18495 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18496 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18497 <div class="gallerytext">
18500 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18501 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
18502 <div class="gallerytext">
18505 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18506 <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>
18507 <div class="gallerytext">
18510 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
18511 <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>
18512 <div class="gallerytext">
18520 HTML Hex character encoding (spells the word "JavaScript")
18522 parsoid=wt2html,wt2wt,html2html
18524 JavaScript
18526 <p>JavaScript
18531 <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>
18535 HTML Hex character encoding bogus encoding (bug 26437 regression check)
18539 <p>&#xsee;&#XSEE;
18542 <p>&#xsee;&#XSEE;</p>
18546 HTML Hex character encoding mixed case
18548 parsoid=wt2html,wt2wt,html2html
18557 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
18560 # See: http://www.w3.org/TR/html5/syntax.html#character-references
18561 # Note that U+000C (form feed) is not a valid XML character, so
18562 # it is banned even though allowed in HTML5.
18564 Illegal character references (T106578)
18569 ; Control (low): 
18570 ; Control (high):  Ÿ
18571 ; Surrogate: ��
18572 ; This is an okay astral character: 💩
18581 <dt>Control (low)</dt>
18583 <dt>Control (high)</dt>
18584 <dd>&#x7F; &#x9F;</dd>
18586 <dd>&#xD83D;&#xDCA9;</dd>
18587 <dt>This is an okay astral character</dt>
18593 __FORCETOC__ override
18605 ISBN 978-0-1234-56 789
18607 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
18610 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
18612 <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>
18616 ISBN followed by 5 spaces
18627 ISBN ISBN 1234567890
18629 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18632 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
18635 # Uppercase X and lowercase x as well
18646 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
18647 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
18648 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
18649 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
18650 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
18651 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
18654 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
18655 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
18656 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
18657 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
18658 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
18659 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
18663 ISBN with empty prefix (parsoid test)
18667 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
18670 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
18674 Bug 22905: <abbr> followed by ISBN followed by </a>
18676 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
18678 <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>
18681 <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>
18689 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
18694 Double RFC with a wiki link
18698 <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>
18707 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
18710 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
18714 Centre-aligned image
18716 [[Image:foobar.jpg|centre]]
18718 <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>
18725 [[Image:foobar.jpg|none]]
18727 <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>
18732 Width + Height sized image (using px) (height is ignored)
18734 [[Image:foobar.jpg|640x480px]]
18736 <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>
18741 Width-sized image (using px, no following whitespace)
18743 [[Image:foobar.jpg|640px]]
18745 <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>
18750 Width-sized image (using px, with following whitespace - test regression from r39467)
18752 [[Image:foobar.jpg|640px ]]
18754 <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>
18759 Width-sized image (using px, with preceding whitespace - test regression from r39467)
18761 [[Image:foobar.jpg| 640px]]
18763 <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>
18768 Image with page parameter
18772 [[File:LoremIpsum.djvu|page=2]]
18774 <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>
18777 <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>
18781 Another italics / bold test
18789 # FIXME: The php output seems broken. It's interleaving some open/close tags.
18795 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
18798 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
18803 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
18805 Images with the "|" character in the comment
18807 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
18809 <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>
18812 <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>
18816 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
18818 <html><script>alert(1);</script></html>
18820 <p><html><script>alert(1);</script></html>
18825 HTML with raw HTML ($wgRawHtml==true)
18829 <html><script>alert(1);</script></html>
18831 <p><script>alert(1);</script>
18836 Parents of subpages, one level up
18838 subpage title=[[Subpage test/L1/L2/L3]]
18842 <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>
18848 Parents of subpages, one level up, not named
18850 subpage title=[[Subpage test/L1/L2/L3]]
18854 <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>
18861 Parents of subpages, two levels up
18863 subpage title=[[Subpage test/L1/L2/L3]]
18869 <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
18870 </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>
18875 Parents of subpages, two levels up, without trailing slash or name.
18877 subpage title=[[Subpage test/L1/L2/L3]]
18886 Parents of subpages, two levels up, with lots of extra trailing slashes.
18888 subpage title=[[Subpage test/L1/L2/L3]]
18892 <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>
18897 Subpage test/L1/L2/L3Sibling
18903 Transclusion of a sibling page (one level up)
18905 subpage title=[[Subpage test/L1/L2/L3]]
18914 Transclusion of a child page
18916 subpage title=[[Subpage test/L1/L2]]
18925 Non-transclusion because of too many up levels
18927 subpage title=[[Subpage test/L1/L2/L3]]
18929 {{../../../../More than parent}}
18931 <p>{{../../../../More than parent}}
18936 Definition list code coverage
18942 <dl><dt> title  </dt>
18944 <dt> title </dt>
18950 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18951 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
18952 <dt>title</dt><dd> def</dd></dl>
18956 Don't fall for the self-closing div
18958 <div>hello world</div/>
18960 <div>hello world</div>
18969 <p>[[:Template:Msg]]
18978 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
18982 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
18984 Always escape literal '>' in output, not just after '<'
18998 <p>This is a test template
18999 This is a test template
19011 Inclusion of !userCanEdit() content
19015 <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>
19021 Out-of-order TOC heading levels
19030 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19032 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
19034 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
19035 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
19038 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
19040 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
19041 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
19047 <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>
19048 <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>
19049 <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>
19050 <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>
19051 <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>
19052 <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>
19058 ISBN with a dummy number
19068 ISBN with space-delimited number
19072 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
19078 ISBN with multiple spaces, no number
19097 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19098 </p><p>ISBN 12345678901
19104 ISBN with trailing year (bug 8110)
19106 ISBN 1-234-56789-0 - 2006
19108 ISBN 1 234 56789 0 - 2006
19110 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
19111 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
19119 {{anchorencode:foo bar©#%n}}
19121 <p>foo_bar.C2.A9.23.25n
19126 anchorencode trims spaces
19128 {{anchorencode: __pretty__please__}}
19135 anchorencode deals with links
19137 {{anchorencode: [[hello|world]] [[hi]]}}
19144 anchorencode deals with templates
19146 {{anchorencode: {{Foo}} }}
19153 anchorencode encodes like the TOC generator: (bug 18431)
19155 === _ +:.3A%3A&&]] ===
19156 {{anchorencode: _ +:.3A%3A&&]] }}
19159 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
19160 <p>.2B:.3A.253A.26.26.5D.5D
19165 Bug 6200: blockquotes and paragraph formatting
19186 Bug 8293: Use of center tag ruins paragraph formatting
19207 Parsing of overlapping (improperly nested) inline html tags
19209 <span><s>x</span></s>
19211 <p><span><s>x</span></s></span>
19214 <p><span><s>x</s></span>
19219 ### Language variants related tests
19222 Self-link in language variants
19224 title=[[Dunav]] language=sr
19226 Both [[Dunav]] and [[Дунав]] are names for this river.
19228 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
19239 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
19241 title=[[Duna]] language=sr
19243 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
19245 <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.
19250 Link to a section of a variant of this title shouldn't be parsed as self-link
19252 title=[[Duna]] language=sr
19254 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
19256 <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.
19261 Link to pages in language variants
19265 Main Page can be written as [[Маин Паге]]
19267 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
19273 Multiple links to pages in language variants
19277 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
19279 <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>.
19285 Simple template in language variants
19291 <p>This is a test template
19297 Template with explicit namespace in language variants
19303 <p>This is a test template
19309 Basic test for template parameter in language variants
19313 {{парамтест|param=foo}}
19315 <p>This is a test template with parameter foo
19321 Simple category in language variants
19325 [[Category:МедиаWики Усер'с Гуиде]]
19327 <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>
19343 ## We used to, but no longer wt2wt this test since the default serializer
19344 ## will normalize all categories to serialize on their own line.
19345 ## This wikitext usage is going to be fairly uncommon in production and
19346 ## selser will take care of preserving formatting in those scenarios.
19348 Don't convert blue categorylinks to another variant (bug 33210)
19354 [[A]][[Category:分类]]
19356 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
19358 <p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
19359 <link rel="mw:PageProp/Category" href="Category:分类"/>
19363 Stripping -{}- tags (language variants)
19367 Latin proverb: -{Ne nuntium necare}-
19369 <p>Latin proverb: Ne nuntium necare
19375 Prevent conversion with -{}- tags (language variants)
19377 language=sr variant=sr-ec
19379 Latinski: -{Ne nuntium necare}-
19381 <p>Латински: Ne nuntium necare
19387 Prevent conversion of text with -{}- tags (language variants)
19389 language=sr variant=sr-ec
19391 Latinski: -{Ne nuntium necare}-
19393 <p>Латински: Ne nuntium necare
19399 Prevent conversion of links with -{}- tags (language variants)
19401 language=sr variant=sr-ec
19405 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19411 -{}- tags within headlines (within html for parserConvert())
19413 language=sr variant=sr-ec
19417 <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>
19423 Explicit definition of language variant alternatives
19425 language=zh variant=zh-tw
19427 -{zh:China;zh-tw:Taiwan}-, not China
19429 <p>Taiwan, not China
19435 Conversion around HTML tags
19437 language=sr variant=sr-ec
19439 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
19440 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
19443 <span title="ЛаCтин">ски</span>
19449 Explicit session-wise language variant mapping (A flag and - flag)
19451 language=zh variant=zh-tw
19453 Taiwan is not China.
19454 But -{A|zh:China;zh-tw:Taiwan}- is China,
19455 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
19456 and -{China}- is China.
19458 <p>Taiwan is not China.
19459 But Taiwan is Taiwan,
19460 (This should be stripped!)
19461 and China is China.
19466 Explicit session-wise language variant mapping (H flag for hide)
19468 language=zh variant=zh-tw
19470 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
19473 <p>(This should be stripped!)
19479 Adding explicit conversion rule for title (T flag)
19481 language=zh variant=zh-tw showtitle
19483 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19486 <p>Should be stripped!
19491 Testing that changing the language variant here in the tests actually works
19493 language=zh variant=zh showtitle
19495 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19498 <p>Should be stripped!
19503 Recursive conversion of alt and title attrs shouldn't clear converter state
19505 language=zh variant=zh-cn showtitle
19507 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
19508 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
19512 Should be stripped<span title="Exclamation">!</span>
19517 Bug 24072: more test on conversion rule for title
19519 language=zh variant=zh-tw showtitle
19521 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
19522 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
19525 <p>This should be stripped!
19526 This won't take interferes with the title rule.
19531 Partly disable title conversion if variant == main language code
19533 language=zh variant=zh title=[[ZH]] showtitle
19535 -{T|zh-cn:CN;zh-tw:TW}-
19543 Partly disable title conversion if variant == main language code, more
19545 language=zh variant=zh title=[[ZH]] showtitle
19555 Raw output of variant escape tags (R flag)
19557 language=zh variant=zh-tw
19559 Raw: -{R|zh:China;zh-tw:Taiwan}-
19561 <p>Raw: zh:China;zh-tw:Taiwan
19566 Strings evaluating false shouldn't be ignored by Language converter (T51072)
19568 language=zh variant=zh-cn
19570 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
19577 Conversion rules from [numeric-only string] to [something else] (T48634)
19579 language=zh variant=zh-cn
19581 -{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
19588 Bidirectional converter rule entries with an empty value should be ignored (T53551)
19590 language=zh variant=zh-cn
19592 -{H|zh-cn:foo;zh-tw:;}-foobar
19599 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
19601 language=zh variant=zh-cn
19603 -{H|=>zh-cn:foo;}-foobar
19610 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
19612 language=zh variant=zh-cn
19621 Nested using of manual convert syntax
19623 language=zh variant=zh-hk
19625 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
19627 <p>Nested: Hello Hong Kong!
19632 Proper conversion of text in external links
19634 language=sr variant=sr-ec
19636 http://www.google.com
19637 gopher://www.google.com
19638 [http://www.google.com http://www.google.com]
19639 [gopher://www.google.com gopher://www.google.com]
19640 [https://www.google.com irc://www.google.com]
19641 [ftp://www.google.com www.google.com/ftp://dir]
19642 [//www.google.com www.google.com]
19644 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19645 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19646 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
19647 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
19648 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
19649 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
19650 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
19655 Do not convert roman numbers to language variants
19657 language=sr variant=sr-ec
19661 <p>Фридрих IV је цар.
19666 Unclosed language converter markup "-{"
19677 Don't convert raw rule "-{R|=>}-" to "=>"
19688 Don't break link parsing if language converter markup is in the caption.
19690 language=sr variant=sr-ec
19692 [[Main Page|-{R|main page}-]]
19694 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
19698 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19700 Don't break image parsing if language converter markup is in the caption.
19704 [[File:Foobar.jpg|-{R|caption}-]]
19706 <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>
19710 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19712 Don't break list handling if language converter markup is in the item.
19714 language=zh variant=zh-cn
19716 ;-{zh-cn:AAA;zh-tw:BBB}-
19718 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
19725 # FIXME: This test is currently broken in the PHP parser (bug 52661)
19727 Don't break table handling if language converter markup is in the cell.
19729 language=sr variant=sr-ec
19752 Bug 529: Uncovered bullet
19761 # Plain MediaWiki does not remove empty lists, but tidy actually does.
19762 # Templates in Wikipedia rely on this behavior, as tidy has always been
19763 # enabled there. These tests are normally run *without* tidy, so specify the
19764 # full output here.
19765 # To test realistic parsing behavior, apply a tidy-like transformation to both
19766 # the expected output and your parser's output.
19768 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
19770 ******* Foo {{bullet}}
19772 <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>
19778 Bug 529: Uncovered table already at line-start
19801 Bug 529: Uncovered bullet in parser function result
19803 * Foo {{lc:{{bullet}} }}
19811 Bug 5678: Double-parsed template argument
19813 {{lc:{{{1}}}|hello}}
19820 Bug 5678: Double-parsed template invocation
19822 {{lc:{{paramtest {{!}} param = hello }} }}
19824 <p>{{paramtest | param = hello }}
19829 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
19832 title=[[Main Page]]
19834 {{PRVNÍVELKÉ:ěščř}}
19835 {{prvnívelké:ěščř}}
19855 Morwen/13: Unclosed link followed by heading
19862 <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>
19867 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
19874 <h1><span class="mw-headline" id="heading">heading</span></h1>
19879 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
19886 <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>
19901 Paragraphs inside divs (no extra line breaks)
19913 Paragraphs inside divs (extra line break on open)
19928 Paragraphs inside divs (extra line break on close)
19943 Paragraphs inside divs (extra line break on open and close)
19960 Nesting tags, paragraphs on lines which begin with <div>
19962 <div></div><strong>A
19965 <p><strong>A</strong></p>
19966 <p><strong>B</strong></p>
19974 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
19976 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
19978 <blockquote>Line one
19980 Line two</blockquote>
19982 <blockquote>Line one
19983 Line two</blockquote>
19987 <p>Line one Line two</p>
19992 Bug 6200: paragraphs inside blockquotes (extra line break on open)
19997 Line two</blockquote>
20002 Line two</blockquote>
20007 Line two</blockquote>
20011 Bug 6200: paragraphs inside blockquotes (extra line break on close)
20013 <blockquote>Line one
20018 <blockquote>Line one
20031 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
20053 Paragraphs inside blockquotes/divs (no extra line breaks)
20055 <blockquote><div>Line one
20057 Line two</div></blockquote>
20059 <blockquote><div>Line one
20060 Line two</div></blockquote>
20065 Paragraphs inside blockquotes/divs (extra line break on open)
20070 Line two</div></blockquote>
20075 Line two</div></blockquote>
20080 Paragraphs inside blockquotes/divs (extra line break on close)
20082 <blockquote><div>Line one
20085 </div></blockquote>
20087 <blockquote><div>Line one
20090 </div></blockquote>
20095 Paragraphs inside blockquotes/divs (extra line break on open and close)
20101 </div></blockquote>
20107 </div></blockquote>
20112 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
20114 wgLinkHolderBatchSize=0
20120 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
20121 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
20122 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
20127 Free external link invading image caption
20129 [[Image:Foobar.jpg|thumb|http://x|hello]]
20131 <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>
20136 Bug 15196: localised external link numbers
20140 [http://en.wikipedia.org/]
20142 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
20145 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
20149 Multibyte character in padleft
20151 {{padleft:-Hello|7|Æ}}
20158 Multibyte character in padright
20160 {{padright:Hello-|7|Æ}}
20167 formatdate parser function
20169 {{#formatdate:2009-03-24}}
20171 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
20176 formatdate parser function, with default format
20178 {{#formatdate:2009-03-24|mdy}}
20180 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
20185 Spacing of numbers in formatted dates
20187 {{#formatdate:January 15}}
20189 <p><span class="mw-formatted-date" title="01-15">January 15</span>
20194 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
20196 language=nl title=[[MediaWiki:Common.css]]
20198 {{#formatdate:2009-03-24|dmy}}
20200 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
20213 Edit comment with link
20217 I like the [[Main Page]] a lot
20219 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
20223 Edit comment with link and link text
20227 I like the [[Main Page|best pages]] a lot
20229 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20233 Edit comment with link and link text with suffix
20237 I like the [[Main Page|best page]]s a lot
20239 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
20243 Edit comment with section link (non-local, eg in history list)
20245 comment title=[[Main Page]]
20247 /* External links */ removed bogus entries
20249 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20253 Edit comment with section link and text before it (non-local, eg in history list)
20255 comment title=[[Main Page]]
20257 pre-comment text /* External links */ removed bogus entries
20259 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>
20263 Edit comment with section link (local, eg in diff view)
20265 comment local title=[[Main Page]]
20267 /* External links */ removed bogus entries
20269 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
20273 Edit comment with subpage link (bug 14080)
20277 title=[[Subpage test]]
20279 Poked at a [[/subpage]] here...
20281 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
20285 Edit comment with subpage link and link text (bug 14080)
20289 title=[[Subpage test]]
20291 Poked at a [[/subpage|neat little page]] here...
20293 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
20297 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
20300 title=[[Subpage test]]
20302 Poked at a [[/subpage]] here...
20304 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
20308 Edit comment with bare anchor link (local, as on diff)
20312 title=[[Main Page]]
20316 <a href="#section">#section</a>
20320 Edit comment with bare anchor link (non-local, as on history)
20323 title=[[Main Page]]
20327 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
20331 Anchor starting with underscore
20337 <p><a href="#_ref">One</a>
20340 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
20344 Id starting with underscore
20346 <div id="_ref"></div>
20348 <div id="_ref"></div>
20353 Space normalisation on autocomment (bug 22784)
20356 title=[[Main Page]]
20358 /* __hello__world__ */
20360 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
20364 percent-encoding and + signs in comments (Bug 26410)
20368 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
20370 <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>
20373 # Parsoid doesn't support this yet: see bug 73581
20374 # but it *should* omit the 'src' attribute if the image is bad.
20375 # PHP side of tests was disabled in
20376 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
20377 # because of issues in the PHP parserTests infrastructure
20378 # (but the output below is indeed what the PHP side emits)
20380 Bad images - basic functionality
20383 !! DISABLED/html/php
20385 <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>
20389 Bad images - bug 16039: text after bad image disappears
20394 !! DISABLED/html/php
20400 <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>
20405 Verify that displaytitle works (bug #22501) no displaytitle
20409 wgAllowDisplayTitle=true
20410 wgRestrictDisplayTitle=false
20412 this is not the the title
20415 <p>this is not the the title
20420 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
20425 wgAllowDisplayTitle=true
20426 wgRestrictDisplayTitle=false
20428 this is not the the title
20429 {{DISPLAYTITLE:whatever}}
20432 <p>this is not the the title
20437 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
20442 wgAllowDisplayTitle=true
20443 wgRestrictDisplayTitle=true
20445 this is not the the title
20446 {{DISPLAYTITLE:whatever}}
20449 <p>this is not the the title
20454 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
20459 wgAllowDisplayTitle=true
20460 wgRestrictDisplayTitle=true
20462 this is not the the title
20463 {{DISPLAYTITLE:screen}}
20466 <p>this is not the the title
20471 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
20476 wgAllowDisplayTitle=false
20478 this is not the the title
20479 {{DISPLAYTITLE:screen}}
20482 <p>this is not the the title
20483 <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>
20488 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
20493 wgAllowDisplayTitle=false
20495 this is not the the title
20498 <p>this is not the the title
20503 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
20508 wgAllowDisplayTitle=true
20509 wgRestrictDisplayTitle=true
20511 this is not the the title
20512 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
20514 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
20515 <p>this is not the the title
20520 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
20525 wgAllowDisplayTitle=true
20526 wgRestrictDisplayTitle=true
20528 this is not the the title
20529 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
20531 <span style="color: red;">s</span>creen
20532 <p>this is not the the title
20537 Page status indicators: Empty name is invalid
20541 <indicator name=" "></indicator>
20542 <indicator></indicator>
20544 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20545 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
20550 Page status indicators: Weird syntaxes that are okay
20554 <indicator name="empty" />
20555 <indicator name="name"></indicator>
20564 Page status indicators: Torture test
20568 <indicator name="01">hello world</indicator>
20569 <indicator name="02">[[Main Page]]</indicator>
20570 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
20571 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
20572 <indicator name="05">* foo
20574 <indicator name="06"><nowiki>foo</nowiki></indicator>
20575 <indicator name="07"> Preformatted</indicator>
20576 <indicator name="08"><div>Broken tag</indicator>
20577 <indicator name="09">{| class=wikitable
20580 <indicator name="10">Two
20582 paragraphs</indicator>
20585 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20586 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" />
20587 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>
20588 05=<ul><li> foo</li>
20592 07=<pre>Preformatted
20594 08=<div>Broken tag</div>
20596 09=<table class="wikitable">
20613 preload: check <noinclude> and <includeonly>
20617 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
20623 preload: check <onlyinclude>
20627 Goodbye <onlyinclude>Hello world</onlyinclude>
20633 preload: can pass tags through if we want to
20637 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
20639 <includeonly>Hello world</includeonly>
20643 preload: check that it doesn't try to do tricks
20647 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20649 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
20653 Play a bit with r67090 and bug 3158
20655 <div style="width:50% !important"> </div>
20656 <div style="width:50% !important"> </div>
20657 <div style="width:50% !important"> </div>
20658 <div style="border : solid;"> </div>
20660 <div style="width:50% !important"> </div>
20661 <div style="width:50% !important"> </div>
20662 <div style="width:50% !important"> </div>
20663 <div style="border : solid;"> </div>
20666 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20667 <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>
20668 <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>
20669 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
20674 HTML5 data attributes
20676 <span data-foo="bar">Baz</span>
20677 <p data-abc-def_hij="">Quuz</p>
20679 <p><span data-foo="bar">Baz</span>
20681 <p data-abc-def_hij="">Quuz</p>
20684 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
20685 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
20689 Strip reserved data attributes
20691 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
20693 <div data-ok="fred">d</div>
20698 percent-encoding and + signs in internal links (Bug 26410)
20700 [[User:+%]] [[Page+title%]]
20701 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
20702 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
20703 [[%33%45]] [[%33%45+]]
20705 <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>
20706 <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>
20707 <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>
20708 <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>
20711 <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>
20712 <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>
20713 <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>
20714 <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>
20718 Special characters in embedded file links (bug 27679)
20720 [[File:Contains & ampersand.jpg]]
20721 [[File:Does not exist.jpg|Title with & ampersand]]
20723 <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>
20724 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
20727 <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>
20728 <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>
20732 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
20734 Text's been normalized?
20736 <p>Text's been normalized?
20741 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
20743 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
20745 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
20750 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
20752 [http://www.example.org/ ideograms]
20754 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
20759 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
20761 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
20763 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
20787 Bug 31098 Template which includes system messages which includes the template
20791 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20792 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
20797 Bug31490 Turkish: ucfirst 'blah'
20808 Bug31490 Turkish: ucfirst 'ix'
20819 Bug31490 Turkish: lcfirst 'BLAH'
20830 Bug31490 Turkish: ucfırst (with a dotless i)
20836 <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>
20841 Bug31490 ucfırst (with a dotless i) with English language
20847 <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>
20852 Bug 26375: TOC with italics
20854 title=[[Main Page]]
20857 == ''Lost'' episodes ==
20859 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20861 <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>
20865 <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>
20870 Bug 26375: TOC with bold
20872 title=[[Main Page]]
20875 == '''should be bold''' then normal text ==
20877 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20879 <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>
20883 <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>
20888 Bug 33845: Headings become cursive in TOC when they contain an image
20890 title=[[Main Page]]
20893 == Image [[Image:foobar.jpg]] ==
20895 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20897 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
20901 <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>
20906 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
20908 title=[[Main Page]]
20911 == <blockquote>Quote</blockquote> ==
20913 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20915 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20919 <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>
20923 <div id="toc" class="toc">
20924 <div id="toctitle">
20928 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
20932 <h2><span class="mw-headline" id="Quote"></span></h2>
20934 <p><span class="mw-headline" id="Quote">Quote</span></p>
20936 <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>
20940 Unclosed tags in TOC
20942 title=[[Main Page]]
20946 <small>Hanc marginis exiguitas non caperet.</small>
20949 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20951 <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>
20955 <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>
20956 <p><small>Hanc marginis exiguitas non caperet.</small>
20962 Multiple tags in TOC
20965 == <i>Foo</i> <b>Bar</b> ==
20967 == <i>Foo</i> <blockquote>Bar</blockquote> ==
20969 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
20971 <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>
20972 <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>
20976 <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>
20977 <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>
20981 <div id="toc" class="toc">
20982 <div id="toctitle">
20986 <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>
20987 <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>
20991 <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>
20992 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
20994 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
20996 <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>
20999 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
21000 # html5 tag parsing.
21002 Tags with parameters in TOC
21007 == <sup class="in-h2">Hello</sup> ==
21009 == <sup class="a > b">Evilbye</sup> ==
21011 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21013 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
21014 <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>
21018 <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>
21019 <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>
21022 <meta property="mw:PageProp/toc" />
21023 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
21025 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
21029 span tags with directionality in TOC
21032 == <span dir="ltr">C++</span> ==
21034 == <span dir="rtl">זבנג!</span> ==
21036 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
21038 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
21040 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
21042 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21044 <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>
21045 <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>
21046 <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>
21047 <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>
21048 <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>
21052 <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>
21053 <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>
21054 <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>
21055 <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>
21056 <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>
21061 Bug 72884: bdi element in ToC
21064 == <bdi>test</bdi> ==
21066 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21068 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
21072 <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>
21076 # Note that the html output does not have the <p></p>, but the
21077 # html+tidy output *does*. This is because the empty <p></p> is
21078 # removed by the sanitizer, but only when tidy is *not* enabled (!).
21080 Empty <p> tag in TOC, removed by Sanitizer (T92892)
21085 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
21087 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21091 <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>
21095 <div id="toc" class="toc">
21096 <div id="toctitle">
21100 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
21104 <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>
21110 == {{int:headline_sample}} ==
21114 Bug 32057: Title needed when expanding <h> nodes.
21116 title=[[Main Page]]
21120 <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>
21125 Strip marker in urlencode
21127 {{urlencode:x<nowiki/>y}}
21128 {{urlencode:x<nowiki/>y|wiki}}
21129 {{urlencode:x<nowiki/>y|path}}
21130 {{urlencode:x<pre id="one">two</pre>y}}
21158 Strip marker in formatNum
21160 {{formatnum:1<nowiki/>2}}
21161 {{formatnum:1<nowiki/>2|R}}
21169 Check noCommafy in formatNum
21173 {{formatnum:123456.78}}
21174 {{formatnum:123456.78|NOSEP}}
21182 Wrong option for formatNum (bug 56199)
21184 {{formatnum:1,234.56|Random}}
21185 {{formatnum:1,234.56|EVERYTHING}}
21186 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
21195 Strip marker in grammar
21199 {{grammar:elative|foo<nowiki/>bar}}
21206 Strip marker in padleft
21208 {{padleft:|2|x<nowiki/>y}}
21215 Strip marker in padright
21217 {{padright:|2|x<nowiki/>y}}
21224 Strip marker in anchorencode
21226 {{anchorencode:x<nowiki/>y}}
21233 nowiki inside link inside heading (bug 18295)
21235 ==[[foo|x<nowiki>y</nowiki>z]]==
21237 <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>
21242 new support for bdi element (bug 31817)
21244 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21246 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
21251 Ignore pipe between table row attributes
21255 |- id=foo | style='color: red'
21263 <tr id="foo" style="color: red">
21270 Gallery override link with WikiLink (bug 34852)
21273 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
21276 <ul class="gallery mw-gallery-traditional">
21277 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21278 <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>
21279 <div class="gallerytext">
21289 Gallery override link with absolute external link (bug 34852)
21292 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
21295 <ul class="gallery mw-gallery-traditional">
21296 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21297 <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>
21298 <div class="gallerytext">
21308 Gallery override link with malicious javascript (bug 34852)
21311 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
21314 <ul class="gallery mw-gallery-traditional">
21315 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21316 <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>
21317 <div class="gallerytext">
21327 Gallery with invalid title as link (bug 43964)
21330 File:foobar.jpg|link=<
21333 <ul class="gallery mw-gallery-traditional">
21334 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21335 <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>
21336 <div class="gallerytext">
21344 Language parser function
21353 Padleft and padright as substr
21355 {{padleft:|3|abcde}}
21356 {{padright:|3|abcde}}
21364 Special parser function
21366 {{#special:RandomPage}}
21367 {{#special:BaDtItLe}}
21368 {{#special:Foobar}}
21377 Bug 34939 - Case insensitive link parsing ([HttP://])
21379 [HttP://MediaWiki.Org/]
21381 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
21384 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
21388 Bug 34939 - Case insensitive link parsing ([HttP:// title])
21390 [HttP://MediaWiki.Org/ MediaWiki]
21392 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
21397 Bug 34939 - Case insensitive link parsing (HttP://)
21399 HttP://MediaWiki.Org/
21401 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
21404 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
21422 <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>
21423 <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>
21424 <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>
21425 <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>
21426 <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>
21432 ### Parsoid-specific tests
21433 ### Parsoid-PHP parser incompatibilities
21436 1. SOL-sensitive wikitext tokens as template-args
21438 parsoid=wt2html,wt2wt
21444 <span about="#mwt1" typeof="mw:Transclusion">
21445 </span><ul about="#mwt1"><li>a</li>
21447 <span about="#mwt2" typeof="mw:Transclusion">
21448 </span><ol about="#mwt2"><li>a</li>
21450 <span about="#mwt3" typeof="mw:Transclusion">
21451 </span><dl about="#mwt3"><dd>a</dd>
21455 #### -----------------------------------------------------------------
21456 #### Parsoid-specific functionality tests
21457 #### -----------------------------------------------------------------
21459 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
21460 # We know wt2wt will fail, but we expect selser to pass.
21461 # Due to the nature of our testing, wt2wt and selser tests will enter the
21462 # blacklist and we'll catch selser regressions based on changes to the
21463 # blacklist entries for selser tests.
21465 1. Bad treebuilder fixup of formatting elt is cleaned up
21467 parsoid=wt2html,wt2wt
21472 [[Image:Foobar.jpg|right|Test]]
21479 <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>
21486 2. Bad treebuilder fixup of formatting elt is cleaned up
21488 parsoid=wt2html,wt2wt
21490 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
21492 <small>[[Image:Foobar.jpg|right|300px]]</small>
21496 <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>
21498 <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>
21502 3. Bad treebuilder fixup of formatting elt is cleaned up
21504 parsoid=wt2html,wt2wt
21506 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
21508 <p><small><b>foo</b></small></p>
21509 <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>
21510 <p><small><b>bar</b></small></p>
21514 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
21516 parsoid=wt2html,wt2wt
21518 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
21520 <p><b><small></small></b></p>
21521 <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>
21525 #### ----------------------------------------------------------------
21526 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
21527 #### tags. Parsoid's output for these tags differs from that of the
21529 #### ----------------------------------------------------------------
21532 Ref: 1. ref-location should be replaced with an index span
21535 B <ref name="x">foo</ref>
21539 <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>
21540 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>
21541 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>
21542 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21543 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li>
21544 <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>
21545 <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>
21550 Ref: 2. ref-tags with identical names should all get the same index
21552 A <ref name="x">foo</ref>
21556 <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>
21557 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>
21558 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21559 <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>
21564 Ref: 3. spaces in ref-names should be ignored
21566 A <ref name="x">foo</ref>
21567 B <ref name=" x " />
21571 <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>
21572 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>
21573 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>
21574 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21575 <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>
21579 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
21581 Ref: 4. 'constructor' should be accepted as a valid ref-name
21583 A <ref name="constructor">foo</ref>
21586 <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>
21587 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21588 <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>
21593 Ref: 5. body should accept generic wikitext
21596 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
21601 <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>
21603 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21604 <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>
21610 Ref: 6. indent-pres should not be output in ref-body
21620 <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>
21622 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21623 <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
21631 Ref: 7. No p-wrapping in ref-body
21648 <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>
21650 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21651 <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
21666 Ref: 8. transclusion wikitext has lower precedence
21668 A <ref> foo {{echo|</ref> B C}}
21672 <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>
21673 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21674 <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>
21679 Ref: 9. unclosed comments should not leak out of ref-body
21681 A <ref> foo <!--</ref> B C
21684 <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>
21685 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21686 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <!----></span></li>
21691 Ref: 10. Unclosed HTML tags should not leak out of ref-body
21693 A <ref> <b> foo </ref> B C
21697 <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>
21700 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21701 <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>
21706 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
21712 <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
21713 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>
21714 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21715 <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>
21716 <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>
21721 Ref: 12. ref-tags act as trailing newline migration barrier
21723 <!--the newline at the end of this line moves out of the p tag-->a
21725 b<!--the newline at the end of this line stays inside the p tag--> <ref />
21731 <!--the newline at the end of this line moves out of the p tag--><p>a</p>
21734 <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>
21735 <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>
21738 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21739 <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>
21740 <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>
21744 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
21751 <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
21752 <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>
21753 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21754 <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>
21755 <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
21761 Ref: 14. A nested ref-tag should be emitted as plain text
21763 <ref>foo <ref>bar</ref> baz</ref>
21767 <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>
21769 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
21770 <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>
21775 Ref: 15. ref-tags with identical names should get identical indexes
21777 A1 <ref name="a">foo</ref> A2 <ref name="a" />
21778 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
21782 <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>
21783 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>
21785 <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>
21789 ## We don't bother wt2wt-ing non-standard whitespace
21791 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
21799 <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>
21800 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21801 <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>
21805 Ref: 17. Generate valid HTML5 id/about attributes
21807 <ref name="a b">foo</ref>
21811 <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>
21814 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21815 <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>
21820 Ref: 18. T58916: Extension attributes should be parsed as plain text
21822 <ref name="{{echo|a}}">foo</ref>
21826 <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>
21829 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
21830 <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>
21835 Ref: 19. ref-tags with identical name encodings should get identical indexes
21837 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
21841 <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>
21843 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21844 <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>
21849 Ref: 20. ref-tags with identical names but different content should keep it
21851 A <ref name="foo">Foo one</ref>
21852 B <ref name="foo">Foo two</ref>
21853 C <ref name="foo" />
21857 <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>
21858 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>
21859 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>
21861 <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>
21866 References: 1. references tag without any refs should be handled properly
21870 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
21874 References: 2. references tag with group only outputs references from that group
21876 A <ref group="a">foo</ref>
21877 B <ref group="b">bar</ref>
21880 <references group="a" />
21882 <references group="b" />
21884 <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>
21885 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>
21886 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>
21888 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw-group="a" data-mw='{"name":"references","attrs":{"group":"a"}}'>
21889 <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>
21891 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
21892 <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>
21894 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt12" data-mw-group="b" data-mw='{"name":"references","attrs":{"group":"b"}}'>
21895 <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>
21900 References: 3. ref list should be cleared after processing references
21910 <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>
21912 <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>
21915 <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>
21917 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
21918 <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>
21923 References: 4. only referenced group should be cleared after processing references
21925 A <ref group="a">afoo</ref>
21928 <references group="a" />
21934 <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>
21935 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>
21937 <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>
21940 <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>
21942 <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>
21947 References: 5. ref tags in references should be processed while ignoring all other content
21950 B <ref name="b">bar</ref>
21953 <ref name="a">foo</ref>
21954 This should just get lost.
21957 <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>
21958 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>
21961 <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>
21966 References: 6. <references /> from a transclusion
21968 <ref>Foo</ref> {{echo|<references />}}
21970 <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>
21975 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
21977 A <ref>foo bar for a</ref>
21978 B <ref group="X" name="b" />
21982 <references group="X">
21983 <ref name="b">foo</ref>
21986 <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>
21987 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>
21990 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
21991 <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>
21994 <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"}}'>
21995 <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>
22000 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
22002 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
22005 <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>
22006 <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>
22010 # This test only works in wt2html now as the <references /> are always generated
22011 # unless selser is active. Once T72722 is fixed, we should add a changes test
22012 # here to ensure that unrelated changes don't add the new <references /> in
22015 References: 9. Generate missing references list at the end
22018 B <ref group="inexistent">bar</ref>
22020 <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>
22021 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22022 <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>
22024 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw-group="inexistent" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
22025 <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>
22030 References: 10. New <references/> shouldn't be added for unrelated edits.
22033 "modes": ["selser"],
22034 "changes": [["#x", "remove"]],
22038 Unrelated text<span id="x"> that's going to disappear</span>.
22046 Entities in ref name
22048 <ref name="test & me">hi</ref>
22051 <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>
22052 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22053 <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>
22057 # This test is wt2html only because we're permitting the serializer to produce
22058 # dirty diffs, normalizing the unclosed references to the self-closed version.
22060 Generate references for unclosed references tag
22068 <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>
22069 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22070 <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>
22074 New reference serializes on its own line
22076 parsoid=wt2wt,html2wt
22081 foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
22084 #### ----------------------------------------------------------------
22085 #### Parsoid-only testing of Parsoid's impl of LST
22086 #### Not implemented yet, see
22087 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22088 #### ----------------------------------------------------------------
22091 LST Sections: 1. Simple section start and end
22093 parsoid={ "suppressErrors": true }
22095 <section begin="2011-05-16" />
22096 <section end="2014-04-10 (MW 1.23wmf22)" />
22098 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22099 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22102 #--------- Test stripping of empty nodes in template content ----------
22104 Empty LI and TR nodes should be stripped from template content
22109 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22113 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22126 Empty LI and TR nodes should not be stripped from top-level content
22153 Empty TR nodes should not be stripped if they have any attributes set
22155 {{EmptyTRWithHTMLAttrTest}}
22157 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22158 <tr align="center"></tr>
22159 <tr><td>foo</td></tr>
22160 <tr align="center"></tr>
22161 <tr><td>bar</td></tr>
22165 #### ----------------------------------------------------------------
22166 #### The following section of tests are primarily to test
22167 #### wikitext escaping capabilities of Parsoid. Given that
22168 #### escaping can be done any number of ways, the wikitext (input)
22169 #### is always adjusted to reflect how Parsoid adds nowiki
22172 #### We are marking several tests as parsoid-only since the
22173 #### HTML in the result section is different from what the
22174 #### PHP parser generates for it.
22175 #### ----------------------------------------------------------------
22178 #### --------------- Headings ---------------
22180 #### 1. Nested inside html <h1>=foo=</h1>
22181 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22182 #### 3. Nested inside html with wikitext split by html tags
22183 #### 4. No escape needed
22184 #### 5. Empty headings <h1></h1>
22185 #### 6. Heading chars in SOL context
22186 #### ----------------------------------------
22188 Headings: 0. Unnested
22198 <p>=foo<i>a</i>=</p>
22200 <nowiki>=foo=</nowiki>
22202 <nowiki> </nowiki>=foo=
22204 <nowiki>=foo=</nowiki>
22206 =foo''a''<nowiki>=</nowiki>
22209 # New headings and existing headings are handled differently
22211 Headings: 1. Nested inside html
22219 <h1 data-parsoid=''>=foo=</h1>
22220 <h2 data-parsoid=''>=foo=</h2>
22221 <h3 data-parsoid=''>=foo=</h3>
22222 <h4 data-parsoid=''>=foo=</h4>
22223 <h5 data-parsoid=''>=foo=</h5>
22224 <h6 data-parsoid=''>=foo=</h6>
22232 =<nowiki>=foo=</nowiki>=
22233 ==<nowiki>=foo=</nowiki>==
22234 ===<nowiki>=foo=</nowiki>===
22235 ====<nowiki>=foo=</nowiki>====
22236 =====<nowiki>=foo=</nowiki>=====
22237 ======<nowiki>=foo=</nowiki>======
22242 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
22251 <nowiki>*</nowiki>bar
22257 <nowiki>=bar=</nowiki>
22261 Headings: 3. Nested inside html with wikitext split by html tags
22265 <h1>=<b>bold</b>foo=</h1>
22267 = ='''bold'''<nowiki>foo=</nowiki> =
22271 Headings: 4a. No escaping needed (testing just h1 and h2)
22282 <h1><i>=</i>foo=</h1>
22302 Headings: 4b. No escaping needed (inside p-tags)
22317 Headings: 5. Empty headings
22321 <h1 data-parsoid='{}'></h1>
22323 <h2 data-parsoid='{}'></h2>
22325 <h3 data-parsoid='{}'></h3>
22327 <h4 data-parsoid='{}'></h4>
22329 <h5 data-parsoid='{}'></h5>
22331 <h6 data-parsoid='{}'></h6>
22341 =====<nowiki/>=====
22343 ======<nowiki/>======
22347 Headings: 6a. Heading chars in SOL context (with trailing spaces)
22357 <nowiki>=a=</nowiki>
22359 <nowiki>=a=</nowiki>
22361 <nowiki>=a=</nowiki>
22365 Headings: 6b. Heading chars in SOL context (with trailing newlines)
22378 <nowiki>=a=</nowiki>
22381 <nowiki>=a=</nowiki>
22384 <nowiki>=a=</nowiki>
22389 Headings: 6c. Heading chars in SOL context (leading newline break)
22397 <nowiki>=b=</nowiki>
22401 Headings: 6d. Heading chars in SOL context (with interspersed comments)
22405 <!--c0--><p>=a=</p>
22407 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
22409 <!--c0--><nowiki>=a=</nowiki>
22411 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
22415 Headings: 6d. Heading chars in SOL context (No escaping needed)
22425 Headings: 7. Insert a newline between new content and headings
22431 <h2 data-parsoid='{}'>A</h2>
22432 <p data-parsoid='{}'>a</p>
22442 #### --------------- Lists ---------------
22443 #### 0. Outside nests (*foo, etc.)
22444 #### 1. Nested inside html <ul><li>*foo</li></ul>
22445 #### 2. Inside definition lists
22446 #### 3. Only bullets at start should be escaped
22447 #### 4. No escapes needed
22448 #### 5. No unnecessary escapes
22449 #### 6. Escape bullets in SOL position
22450 #### 7. Escape bullets in a multi-line context
22451 #### ----------------------------------------
22454 Lists: 0. Outside nests
22464 <nowiki>*</nowiki>foo
22466 <nowiki>#</nowiki>foo
22468 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
22472 Lists: 1. Nested inside html
22476 <ul><li>*foo</li></ul>
22477 <ul><li>#foo</li></ul>
22478 <ul><li>:foo</li></ul>
22479 <ul><li>;foo</li></ul>
22480 <ol><li>*foo</li></ol>
22481 <ol><li>#foo</li></ol>
22482 <ol><li>:foo</li></ol>
22483 <ol><li>;foo</li></ol>
22486 *<nowiki>*foo</nowiki>
22488 *<nowiki>#foo</nowiki>
22490 *<nowiki>:foo</nowiki>
22492 *<nowiki>;foo</nowiki>
22494 #<nowiki>*foo</nowiki>
22496 #<nowiki>#foo</nowiki>
22498 #<nowiki>:foo</nowiki>
22500 #<nowiki>;foo</nowiki>
22504 Lists: 2. Inside definition lists
22508 <dl><dt>;foo</dt></dl>
22509 <dl><dt>:foo</dt></dl>
22512 <dl><dd>:foo</dd></dl>
22515 ;<nowiki>;foo</nowiki>
22517 ;<nowiki>:foo</nowiki>
22519 ;<nowiki>:foo</nowiki>
22522 :<nowiki>:foo</nowiki>
22526 Lists: 3. Only bullets at start of text should be escaped
22530 <ul><li>*foo*bar</li></ul>
22531 <ul><li>*foo<i>it</i>*bar</li></ul>
22534 *<nowiki>*foo*bar</nowiki>
22536 *<nowiki>*foo</nowiki>''it''*bar
22540 Lists: 4. No escapes needed
22553 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
22557 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
22571 Lists: 5. No unnecessary escapes
22575 <ul><li> bar <span>[[foo]]</span></li></ul>
22576 <ul><li> =bar <span>[[foo]]</span></li></ul>
22577 <ul><li> [[bar <span>[[foo]]</span></li></ul>
22578 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
22579 <ul><li> =bar <span>foo]]</span>=</li></ul>
22580 <ul><li> <s></s>: a</li></ul>
22581 <ul><li> <i>* foo</i></li></ul>
22584 * bar <span><nowiki>[[foo]]</nowiki></span>
22586 * =bar <span><nowiki>[[foo]]</nowiki></span>
22588 * [[bar <span><nowiki>[[foo]]</nowiki></span>
22590 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
22592 * =bar <span>foo]]</span>=
22600 Lists: 6. Escape bullets in SOL position
22604 <p><!--cmt-->*foo</p>
22606 <!--cmt--><nowiki>*</nowiki>foo
22610 Lists: 7. Escape bullets in a multi-line context
22619 <nowiki>*</nowiki>b
22623 Lists: 8. Escape colons only if not present in tags
22627 <dl><dt>a:b<i>c:d</i></dt></dl>
22629 ; <nowiki>a:b</nowiki>''c:d''
22632 #### --------------- HRs ---------------
22633 #### 1. Single line
22634 #### -----------------------------------
22637 HRs: 1. Single line
22645 ----<nowiki>----</nowiki>
22650 #### --------------- Tables ---------------
22651 #### 1a. Simple example
22652 #### 1b. No escaping needed (!foo)
22653 #### 1c. No escaping needed (|foo)
22654 #### 1d. No escaping needed (|}foo)
22656 #### 2a. Nested in td (<td>foo|bar</td>)
22657 #### 2b. Nested in td (<td>foo||bar</td>)
22658 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
22660 #### 3a. Nested in th (<th>foo!bar</th>)
22661 #### 3b. Nested in th (<th>foo!!bar</th>)
22662 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
22666 #### 4c. No escaping needed
22667 #### --------------------------------------
22670 Tables: 1a. Simple example
22678 <nowiki>{|</nowiki>
22683 Tables: 1b. No escaping needed
22694 Tables: 1c. No escaping needed
22705 Tables: 1d. No escaping needed
22716 Tables: 2a. Nested in td
22721 <td>foo|bar</td></tr>
22722 <tr><td>x<div>a|b</div></td>
22726 |<nowiki>foo|bar</nowiki>
22728 |x<div><nowiki>a|b</nowiki></div>
22744 Tables: 2b. Nested in td
22750 <td>a<i>b||c</i></td>
22751 <td>a<i><div>b||c</div></i></td>
22752 </tr></tbody></table>
22755 |<nowiki>foo||bar</nowiki>
22756 |a''<nowiki>b||c</nowiki>''
22757 |a''<div><nowiki>b||c</nowiki></div>''
22766 <td>a<i><div>b||c</div></i>
22772 Tables: 2c. Nested in td -- no escaping needed
22790 Tables: 3a. Nested in th
22808 Tables: 3b. Nested in th
22813 <tr><th>foo!!bar</th>
22814 <th><i>foo|bar</i></th>
22815 <th><i>foo!!bar</i></th>
22816 <th><i><span>foo!!bar</span></i></th>
22817 </tr></tbody></table>
22820 !<nowiki>foo!!bar</nowiki>
22821 !''<nowiki>foo|bar</nowiki>''
22822 !''<nowiki>foo!!bar</nowiki>''
22823 !''<span><nowiki>foo!!bar</nowiki></span>''
22832 <th><i>foo!!bar</i>
22834 <th><i><span>foo!!bar</span></i>
22840 Tables: 3c. Nested in th
22845 <tr><th>foo||bar</th>
22846 <th><span typeof="mw:Nowiki">foo||bar</span></th>
22847 </tr></tbody></table>
22850 !<nowiki>foo||bar</nowiki>
22851 !<nowiki>foo||bar</nowiki>
22864 Tables: 4a. Escape -
22883 |<nowiki>-bar</nowiki>
22888 Tables: 4b. Escape +
22907 |<nowiki>+bar</nowiki>
22912 Tables: 4c. No escaping needed
22917 <tr><td>foo-bar</td><td>foo+bar</td></tr>
22918 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
22924 <div>a|b</div></td>
22969 Tables: 4d. No escaping needed
22974 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
22975 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
22976 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
22987 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
22997 T97430: Don't emit empty nowiki pairs around marker meta tags
23001 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23002 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23004 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23005 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23009 Unclosed xmlish element in table line shouldn't eat end delimiters
23014 <tbody><tr><td> <foo</td>
23015 <td> bar></td></tr>
23032 #### --------------- Links ----------------
23033 #### 1. Quote marks in link text
23034 #### 2. Wikilinks: Escapes needed
23035 #### 3. Wikilinks: No escapes needed
23036 #### 4. Extlinks: Escapes needed
23037 #### 5. Extlinks: No escapes needed
23038 #### --------------------------------------
23040 Links 1. WikiLinks: No escapes needed
23044 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23045 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23046 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23050 [[Foo|x [Foobar] x]]
23052 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23053 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23054 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23059 Links 2. WikiLinks: Escapes needed
23063 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23064 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23065 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23066 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23067 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23068 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23069 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23070 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23071 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23072 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23074 [[Foo|<nowiki>Foobar]</nowiki>]]
23075 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23076 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23077 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23078 [[Foo|<nowiki>|Bar</nowiki>]]
23079 [[Foo|<nowiki>]]bar</nowiki>]]
23080 [[Foo|<nowiki>[[bar</nowiki>]]
23081 [[Foo|<nowiki>x [[ y</nowiki>]]
23082 [[Foo|<nowiki>x ]] y</nowiki>]]
23083 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23085 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23086 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23087 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23088 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23089 <a href="/wiki/Foo" title="Foo">|Bar</a>
23090 <a href="/wiki/Foo" title="Foo">]]bar</a>
23091 <a href="/wiki/Foo" title="Foo">[[bar</a>
23092 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23093 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23094 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23099 Links 3. WikiLinks: No escapes needed
23103 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23104 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23109 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23110 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23115 Links 4. ExtLinks: Escapes needed
23119 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23120 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
23121 <p>[http://google.com]</p>
23122 <p>[http://google.com google]</p>
23124 [http://google.com <nowiki>[google]</nowiki>]
23125 [http://google.com <nowiki>google]</nowiki>]
23127 <nowiki>[http://google.com]</nowiki>
23129 <nowiki>[http://google.com google]</nowiki>
23132 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23133 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23134 </p><p>[http://google.com]
23135 </p><p>[http://google.com google]
23140 Links 5. ExtLinks: No escapes needed
23144 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23146 [http://google.com [google]
23148 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23153 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
23157 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
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" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23166 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23167 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23168 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23169 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23172 x<nowiki/>http://example.com<nowiki/>y
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<nowiki/>;x
23181 http://example.com<nowiki/>!x
23182 http://example.com<nowiki/>=x
23183 http://example.com<nowiki/>(x)
23184 http://example.com(x<nowiki/>)
23188 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23193 <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>"
23196 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23197 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23198 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23199 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23205 "http://example.com"
23206 (http://example.com)
23207 (http://example.com) foo
23208 http://example.com,
23209 http://example.com, foo
23212 <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>"
23215 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
23216 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
23217 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
23218 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
23223 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
23227 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
23228 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
23230 http://example.com.,;:!?\
23231 -http://example.com:
23233 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
23234 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
23239 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
23243 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
23244 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
23245 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
23249 X<nowiki/>RFC 123<nowiki/>y
23253 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
23257 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
23258 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
23259 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
23266 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
23267 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
23268 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
23273 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
23277 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
23278 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23279 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
23283 X<nowiki/>PMID 123<nowiki/>y
23287 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
23291 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
23292 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
23293 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
23300 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
23301 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
23302 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
23307 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
23311 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
23312 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
23313 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
23316 ISBN 1234567890<nowiki/>1
23317 ISBN 1234567890<nowiki/>x
23318 a<nowiki/>ISBN 1234567890<nowiki/>b
23322 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
23326 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
23330 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
23335 Links 14. Protect link-like plain text. (Parsoid bug T78425)
23339 <p>this is not a link: http://example.com
23342 this is not a link: <nowiki>http://example.com</nowiki>
23346 Links 15. Link trails can't become link prefixes.
23351 <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>
23353 [[Söfnuður]]-[[00]]
23355 <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>
23359 #### --------------- Quotes ---------------
23360 #### 1. Quotes inside <b> and <i>
23361 #### 2. Link fragments separated by <i> and <b> tags
23362 #### 3. Link fragments inside <i> and <b>
23363 #### 4. No escaping needed
23364 #### --------------------------------------
23366 1a. Quotes inside <b> and <i>
23377 <b>foo'<i>bar'</i>baz</b>
23386 <i>fools'<span> errand</span></i>
23387 <i><span>fool</span>'s errand</i>
23388 '<i>foo</i> bar '<i>baz</i>
23389 a|!*#-:;+-~[]{}b'<i>x</i>
23393 ''<nowiki>''foo''</nowiki>''
23394 ''<nowiki>'''foo'''</nowiki>''
23396 '''<nowiki/>'foo''''
23397 '''<nowiki>''foo''</nowiki>'''
23398 '''<nowiki>'''foo'''</nowiki>'''
23399 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
23400 '''foo'''<nowiki/>'s
23406 '''foo'''<nowiki/>'
23407 ''''foo'''<nowiki/>'
23408 ''fools'<span> errand</span>''
23409 ''<span>fool</span>'s errand''
23410 '<nowiki/>''foo'' bar '''baz''
23411 a|!*#-:;+-~[]{}b'''x''
23415 1b. Quotes inside <b> and <i> with other tags on same line
23419 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23420 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
23421 <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>
23422 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
23423 '<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>
23424 '<i>foo</i> <div title="name">test</div>
23425 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
23426 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
23427 <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>
23430 '''a'' foo ''[[bar]]''
23431 ''a''' foo ''[[bar]]''
23432 ''a''' foo '''{{echo|[[bar]]}}'''
23433 [[foo]] x'''[[bar]]''
23434 '''foo'' <ref>test</ref>
23435 '''foo'' <div title="name">test</div>
23436 '''foo'' and <br> bar
23441 2. Link fragments separated by <i> and <b> tags
23445 <p>[[<i>foo</i>hello]]</p>
23446 <p>[[<b>foo</b>hello]]</p>
23448 [[''foo''<nowiki>hello]]</nowiki>
23450 [['''foo'''<nowiki>hello]]</nowiki>
23453 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
23454 # this is one of the shortcomings of this format
23456 3. Link fragments inside <i> and <b>
23460 <p><i>[[foo</i>]]</p>
23461 <p><b>[[foo</b>]]</p>
23463 ''[[foo''<nowiki>]]</nowiki>
23465 '''[[foo'''<nowiki>]]</nowiki>
23469 4. No escaping needed
23473 <p>'<span><i>bar</i></span>'
23474 '<span><b>bar</b></span>'
23478 '<span>''bar''</span>'
23479 '<span>'''bar'''</span>'
23483 #### ----------- Paragraphs ---------------
23484 #### 1. No unnecessary escapes
23485 #### --------------------------------------
23488 1. No unnecessary escapes
23492 <p>bar <span>[[foo]]</span>
23493 </p><p>=bar <span>[[foo]]</span>
23494 </p><p>[[bar <span>[[foo]]</span>
23495 </p><p>]]bar <span>[[foo]]</span>
23496 </p><p>=bar <span>foo]]</span>=
23499 bar <span><nowiki>[[foo]]</nowiki></span>
23501 =bar <span><nowiki>[[foo]]</nowiki></span>
23503 [[bar <span><nowiki>[[foo]]</nowiki></span>
23505 ]]bar <span><nowiki>[[foo]]</nowiki></span>
23507 =bar <span>foo]]</span><nowiki>=</nowiki>
23510 #### ----------------------- PRE --------------------------
23511 #### 1. Leading whitespace in SOL context should be escaped
23512 #### ------------------------------------------------------
23514 1. Leading whitespace in SOL context should be escaped
23537 <nowiki> </nowiki>a
23539 <nowiki> </nowiki> a
23543 <nowiki> </nowiki> a
23545 <nowiki> </nowiki>a
23548 <nowiki> </nowiki>b
23571 2. Leading whitespace in non-indent-pre contexts should not be escaped
23575 <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>
23576 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
23577 <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>
23587 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
23606 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
23610 <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>
23612 [[File:Foobar.jpg|thumb|caption]]
23616 5. Nowiki escaping should account for indent-pres
23626 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
23639 #### --------------- Behavior Switches --------------------
23642 1. Valid behavior switches should be escaped
23649 <nowiki>__TOC__</nowiki>
23650 ''<nowiki>__TOC__</nowiki>''
23654 2. Invalid behavior switches should not be escaped
23665 # We use indent-pre as an indirect way to test for sol-transparent behavior.
23667 Behavior switches should be SOL-transparent
23671 <meta property="mw:PageProp/toc" />
23673 <!-- this one's bogus -->
23676 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
23678 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
23682 <!-- this one's bogus -->
23691 #### --------------- HTML tags ---------------
23694 #### 3. multi-line html tag
23695 #### 4. extension tags
23696 #### -----------------------------------------
23702 <a href="http://google.com">google</a>
23704 <a href="http://google.com">google</a>
23712 <ul><li> <div>foo</div></li>
23713 <li> <div style="color:red">foo</div></li>
23714 <li> <td></li></ul>
23717 * <nowiki><div>foo</div></nowiki>
23718 * <nowiki><div style="color:red">foo</div></nowiki>
23719 * <nowiki><td></nowiki>
23723 3. multi-line html tag
23742 <p><ref>foo</ref>
23743 </p><p><ref>bar
23744 </p><p>baz</ref>
23747 <nowiki><ref>foo</ref></nowiki>
23749 <nowiki><ref>bar</nowiki>
23751 baz<nowiki></ref></nowiki>
23754 #### --------------- Others ---------------
23760 <p><nowiki>foo</nowiki>
23763 <nowiki>foo</nowiki>
23766 ## The quote-char in the input is necessary for triggering the bug
23768 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
23777 #----------- End of wikitext escaping tests --------------
23781 Tag-like HTML structures are passed through as text
23803 </p><p>1<d e>f
23808 HTML tag with necessary entities in attributes
23810 <span title="&amp;">foo</span>
23812 <p><span title="&amp;">foo</span>
23817 HTML tag with 'unnecessary' entity encoding in attributes
23819 <span title="&">foo</span>
23821 <p><span title="&">foo</span>
23826 HTML tag with broken attribute value quoting
23828 <span title="Hello world>Foo</span>
23830 <p><span title="Hello world">Foo</span>
23833 <p><span title="Hello world">Foo</span>
23838 Self-closed tag with broken attribute value quoting
23840 parsoid=wt2html,html2html
23842 <div title="Hello world />Foo
23844 <div title="Hello world"></div>
23847 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
23851 Table with broken attribute value quoting
23854 | title="Hello world|Foo
23859 <td title="Hello world">Foo
23865 <td title="Hello world">Foo
23871 Table with broken attribute value quoting on consecutive lines
23874 | title="Hello world|Foo
23875 | style="color:red|Bar
23880 <td title="Hello world">Foo
23882 <td style="color:red">Bar
23888 <td title="Hello world">Foo
23889 </td><td style="color: red">Bar
23890 </td></tr></tbody></table>
23895 2. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23905 1. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
23915 Accept empty td cell attribute
23918 | align="center" | foo || |
23923 <td align="center"> foo </td>
23930 Non-empty attributes in th-cells
23933 ! Foo !! style="color: red" | Bar
23939 <th style="color: red"> Bar
23945 Accept empty attributes in th-cells
23960 Empty table rows go away
23981 ### Parsoid-centric tests for testing RTing of inter-element separators
23982 ### Edge cases not tested by existing parser tests and specific to
23983 ### Parsoid-specific serialization strategies.
23987 RT-ed inter-element separators should be valid separators
23999 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24003 # Parsoid-only since PHP parser relies on Tidy for correct output
24005 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24019 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24020 <p>bar</p></small></td></tr>
24024 <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>
24028 # Note that the "style" attribute is really a template parameter here.
24029 # The = would have to be {{=}} if you wanted the literal.
24031 Empty TD followed by TD with tpl-generated attribute
24036 |{{echo|style='color:red'}}|foo
24050 Indented table with an empty td
24068 ## We have some newline diffs RT-ing this edge case
24069 ## and it is not important enough -- we seem to be emitting
24070 ## at most 2 newlines after a </tr> and this is unrelated to
24071 ## the issue from T85627 that this is testing.
24073 Indented table with blank lines in between (T85627)
24092 Indented block & table
24106 <div data-parsoid='{"stx":"html"}'>foo</div>
24108 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24113 Indent and comment before table row
24128 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24129 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24133 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24135 Empty TR followed by a template-generated TR
24141 {{echo|<tr><td>foo</td></tr>}}
24147 <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}}]}'>
24152 ## PHP and parsoid output differ for this, and since this is primarily
24153 ## for testing Parsoid's serializer, marking this Parsoid only
24155 Empty TR followed by mixed-ws-comment line should RT correctly
24171 <!--c--> </tr><!--d-->
24177 Multi-line image caption generated by templates with/without trailing newlines
24179 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24180 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24182 <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>
24183 <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>
24187 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24191 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24193 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24195 <includeonly>foo</includeonly>
24203 ## PHP emits broken html for this, and since this is primarily
24204 ## a Parsoid serializer test, marking this Parsoid only
24206 Improperly nested inline or quotes tags with whitespace in between
24208 <span> <s>x</span> </s>
24211 <p><span> <s>x</s></span><s> </s>
24212 <b> <i>x</i></b><i> </i>
24217 Encapsulate protected attributes from wt
24219 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24221 <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>
24225 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
24226 ## Having nested or stray pre tags results in the attempt to add duplicates,
24227 ## causing an assertion fail. This test tries to prevent that situation.
24229 Ensure ParagraphWrapper can deal with stray closing pre tags
24239 1. Ensure fostered text content is wrapped in element nodes
24243 <table>hi</table><table>ho</table>
24252 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
24254 parsoid=wt2html,wt2wt
24263 <tbody><tr><td> a</td></tr>
24268 Encapsulation properly handles null DSR information from foster box
24270 parsoid=wt2html,wt2wt
24272 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
24274 <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>
24278 1. Encapsulate foster-parented transclusion content
24280 parsoid=wt2wt,wt2html
24282 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
24284 <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>
24294 2. Encapsulate foster-parented transclusion content
24296 parsoid=wt2wt,wt2html
24298 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
24300 <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>
24311 3. Encapsulate foster-parented transclusion content
24313 parsoid=wt2wt,wt2html
24315 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24317 <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>"]}">
24330 4. Encapsulate foster-parented transclusion content
24332 parsoid=wt2wt,wt2html
24334 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
24336 <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>"]}">
24349 5. Encapsulate foster-parented transclusion content
24351 parsoid=wt2wt,wt2html
24353 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
24355 <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>
24370 6. Encapsulate foster-parented transclusion content
24372 parsoid=wt2wt,wt2html
24374 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
24376 <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>
24392 7. Encapsulate foster-parented transclusion content
24394 parsoid=wt2wt,wt2html
24396 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
24398 <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>
24408 # Note that the wt is broken on purpose: the = should be {{=}} if you
24409 # don't want it to be a template parameter key.
24411 8. Encapsulate foster-parented transclusion content
24413 parsoid=wt2wt,wt2html
24416 }}{|{{echo|style='color:red'}}
24421 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
24423 <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>
24434 9. Encapsulate foster-parented transclusion content
24436 parsoid=wt2wt,wt2html
24438 <table>{{echo|hi</table>hello}}
24440 <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>
24444 Table in fosterable position
24446 parsoid=wt2html,wt2wt
24455 <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">
24457 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
24463 # Parsoid only for bug 64747
24465 Properly encapsulate empty-content transclusions in fosterable positions
24473 <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":["","","",""]}]]}'>
24479 Always encapsulate foster box when template range is expanded to table
24492 Support <object> element with .data attribute
24496 <object data="test.swf"></object>
24498 <object data="test.swf"></object>
24502 Don't block XML namespace declaration
24504 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
24506 <p><span>MediaWiki</span>
24509 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
24512 # -----------------------------------------------------------------
24513 # The following section of tests are primarily to spec requirements
24514 # around serialization of new/edited content.
24516 # All these tests are marked Parsoid html2wt and html2html only
24517 # ----------------------------------------------------------------
24519 # 'mi' is a localinterwiki prefix as well as a language
24521 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
24525 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
24532 New wikilinks should be serialized properly
24536 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
24537 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
24544 New wiki links (href variations)
24548 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24549 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
24550 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
24551 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
24556 [[Toxine bactérienne]]
24560 New wiki links (content string variations)
24564 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
24565 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
24566 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
24570 [[Foo_bar|./Foo_bar]]
24574 New category links (href variations)
24578 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
24579 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
24580 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
24582 [[Category:Toxine bactérienne]]
24583 [[Category:Toxine bactérienne]]
24584 [[Category:Toxine bactérienne]]
24588 New sol transparent links don't need indent-pre nowiki protection
24593 <link rel="mw:PageProp/redirect" href="./Main_Page">
24594 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
24595 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
24597 #WEITERLEITUNG [[Main Page]]
24598 <!-- this is good --> [[Category:Good]]
24599 <!-- this is great --> [[Kategorie:Great]]
24603 New interlanguage links (href variations)
24607 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
24608 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
24609 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
24611 [[es:Toxine bactérienne]]
24612 [[es:Toxine_bactérienne]]
24613 [[es:Toxine_bactérienne]]
24617 Image: Modifying size of an image (1)
24620 "modes": ["wt2wt"],
24622 ["img[height]", "attr", "height", "22"],
24623 ["img[width]", "attr", "width", "200"]
24627 [[Image:Foobar.jpg|230x230px]]
24629 [[Image:Foobar.jpg|200x200px]]
24633 Image: Modifying size of an image (2)
24636 "modes": ["wt2wt"],
24638 ["img[height]", "attr", "height", "100"],
24639 ["img[width]", "attr", "width", "500"]
24643 [[Image:Foobar.jpg|230x230px]]
24645 [[Image:Foobar.jpg|500x500px]]
24648 # Change in size is ignored so long as class='mw-default-size'
24650 Image: Modifying size of an image (3)
24653 "modes": ["wt2wt"],
24655 ["figure[class]", "removeClass", "mw-default-size"],
24656 ["figure img", "attr", "height", "19"],
24657 ["figure img", "attr", "width", "170"]
24661 [[Image:Foobar.jpg|thumb]]
24663 [[Image:Foobar.jpg|thumb|170x170px]]
24667 Image: Modifying alignment of an image (bug 48665)
24670 "modes": ["wt2wt"],
24672 ["figure[class]", "removeClass", "mw-halign-right"],
24673 ["figure[class]", "addClass", "mw-halign-left"]
24677 [[Image:Foobar.jpg|thumb|caption|right]]
24679 [[Image:Foobar.jpg|thumb|caption|left]]
24683 Image: Modifying mw-default-size of an frameless image (bug 62805)
24686 "modes": ["wt2wt"],
24688 ["figure.mw-default-size", "removeClass", "mw-default-size"]
24692 [[Image:Foobar.jpg|frameless|right]]
24694 [[Image:Foobar.jpg|frameless|right|220x220px]]
24698 Image: Modifying valign of an image (bug 49221)
24701 "modes": ["wt2wt"],
24703 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
24704 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
24708 [[File:Foobar.jpg|20px|middle]]
24710 [[File:Foobar.jpg|20px|text-top]]
24714 Image: Modifying alt attribute of an image (bug 56400)
24717 "modes": ["wt2wt"],
24719 ["img[alt]", "attr", "alt", "some alternate edited text"]
24723 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
24725 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
24729 Image: Modifying caption of an image
24732 "modes": ["wt2wt"],
24734 ["figcaption", "text", "new caption"]
24738 [[Image:Foobar.jpg|thumb|original caption]]
24740 [[Image:Foobar.jpg|thumb|new caption]]
24744 Image: empty alt attribute (bug 48924)
24748 [[File:Foobar.jpg|thumb|alt=|bar]]
24750 <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>
24754 Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
24760 <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>
24762 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
24766 Image: Block level image should have \n before and after
24769 [[File:Foobar.jpg|right|thumb|150x150px]]
24773 <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>
24778 Image: New block level image should have \n before and after (existing content)
24781 [[File:Foobar.jpg|right|thumb|150x150px]]
24785 <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>
24790 Image: upright option (parsoid)
24792 [[File:Foobar.jpg|thumb|upright|caption]]
24793 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
24794 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
24796 <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>
24797 <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>
24798 <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>
24802 Image: upright option is ignored on inline and frame images (parsoid)
24804 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
24806 <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>
24810 Image: from basic HTML (1)
24814 <span typeof="mw:Image">
24815 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24818 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24822 Image: from basic HTML (2)
24826 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
24828 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
24832 Image: from basic HTML (3)
24836 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
24838 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
24842 Image: from basic HTML (4)
24846 <img src="./File:Foobar.jpg">
24848 [[File:Foobar.jpg|link=]]
24852 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
24857 <li><p>foo</p></li>
24864 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
24868 <ul> <li>foo</li></ul>
24874 Don't strip leading whitespace when handling indent-pre suppressing tags
24879 <tr><td> indented row</td></tr>
24882 <b>This is very bold of you!</b>
24885 indented cell (no pre-wrapping!)
24895 '''This is very bold of you!'''
24899 indented cell (no pre-wrapping!)
24907 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
24929 <nowiki> </nowiki></span>bar2
24932 <nowiki> </nowiki><span>bar</span>
24935 <nowiki> </nowiki><span>foo</span>
24940 Lists: Dont insert newlines in a serialized list item.
24944 <ul><li>a<br>b</li><li>c</li></ul>
24951 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
24954 "modes": ["html2wt"],
24955 "scrubWikitext": false
24958 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24959 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24961 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24962 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24964 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
24966 <h2><meta property="mw:PageProp/toc" /> ok</h2>
24968 == hello there [[Category:A1]] ==
24970 == [[Category:A2]] hi pal ==
24972 == <!--foo--> [[Category:A3]] how goes it ==
24974 == it goes well [[Category:A4]] <!--bar--> ==
24976 ==howdy [[Category:A5]]==
24982 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
24985 "modes": ["html2wt"],
24986 "scrubWikitext": true
24989 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
24990 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
24992 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
24993 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
24995 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25003 <!--foo--> [[Category:A3]]
25008 [[Category:A4]] <!--bar-->
25016 Headings: Don't hoist metas that come from templates
25019 "modes": ["html2wt"],
25020 "scrubWikitext": true
25023 <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>
25025 == {{echo|foo [[Category:Foo]]}} ==
25029 Headings: Category in ref isn't hoisted
25032 "modes": ["html2wt"],
25033 "scrubWikitext": true
25036 <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>
25038 <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>
25041 [[Category:Baz]] </ref> ==
25047 Parsoid: Serialize positional parameters with = in them as named parameter
25051 <p about="#mwt1" typeof="mw:Transclusion"
25052 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25054 <p about="#mwt1" typeof="mw:Transclusion"
25055 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25057 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25058 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25059 <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>
25063 {{echo|1 = f=oo|2 = bar}}
25065 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25066 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25067 {{echo|<nowiki>f=oo</nowiki>|bar}}
25071 Parsoid: Serialize positional parameters with = in extlink as named parameter
25075 <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>
25077 {{echo|1 = http://stuff?is=ok}}
25081 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25085 <div>a<p>b</p></div>
25106 Substrings resembling wikitext in hrefs should not get nowiki escapes
25110 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25116 Enforce single-line context in the serializer
25123 <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">
25124 </span><span about="#mwt1">you</span> </h2>
25126 <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>
25128 <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
25129 there</span></li></ol>
25141 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25148 </tbody></table></dd></dl>
25152 == hi {{bogus|there
25163 * foo '''bar''' baz
25175 Serialize new placeholder space without spans
25179 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
25181 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
25183 <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>
25189 <ref>foo : bar</ref>ok
25193 #-----------------------
25194 # Tag minimization tests
25195 #-----------------------
25198 1. I/B quote minimization: wikitext-only tags should be combined
25202 <p><i>A</i><i>B</i></p>
25203 <p><b>A</b><b>B</b></p>
25204 <p><i>A</i><b><i>B</i></b></p>
25205 <p><b>A</b><i><b>B</b></i></p>
25206 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
25207 <p><i><b>A</b></i><i><b>B</b></i></p>
25208 <p><i><b>A</b></i><b><i>B</i></b></p>
25209 <p><b><i>A</i></b><i><b>B</b></i></p>
25229 2. I/B quote minimization: wikitext and html tags should not be combined
25233 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
25234 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
25238 ''A''<nowiki/>'''<i>B</i>'''
25242 3. I/B quote minimization: templated content stops minimization
25246 <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>
25247 <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>
25249 ''A''{{echo|''B''}}
25251 ''A''{{echo|'''''B'''''}}
25255 4. I/B quote minimization: new content should be mimimized with adjacent old content
25259 <p><i>A</i><i>B</i></p>
25260 <p><b>A</b><b>B</b></p>
25261 <p><i>A</i><b><i>B</i></b></p>
25271 5a. Merge adjacent quote nodes if they've been edited
25274 "modes": ["wt2wt", "selser"],
25276 ["p", "contents", "remove", ":contains('b')"]
25286 5b. Merge adjacent quote nodes if they've been edited
25289 "modes": ["wt2wt", "selser"],
25295 ''a''<span id="x">b</span>''c''
25301 1. Merge adjacent link nodes as long as at least one element is new
25304 "modes": ["html2wt"],
25305 "scrubWikitext": true
25308 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25309 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25310 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
25314 [[Football|Foot]][[Football|ball]]
25318 2. Merge adjacent link nodes and enable additional normalizations
25321 "modes": ["html2wt"],
25322 "scrubWikitext": true
25325 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
25327 [[Football|''Football'']]
25331 3. Don't merge adjacent link nodes if scrubWikitext is false
25334 "modes": ["html2wt"],
25335 "scrubWikitext": false
25338 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
25340 [[Football|Foot]][[Football|ball]]
25343 #------------------------------
25344 # End of tag minimization tests
25345 #------------------------------
25348 Bug 54262: New entities
25352 <span typeof="mw:Entity"> </span>
25357 ## Note that there is no wikitext output for 'unknownproperty' ##
25358 ## Unknown magic words are silently dropped ##
25365 <meta property='mw:PageProp/toc' />
25366 <meta property='mw:PageProp/notoc' />
25367 <meta property='mw:PageProp/forcetoc' />
25368 <meta property='mw:PageProp/index' />
25369 <meta property='mw:PageProp/noindex' />
25370 <meta property='mw:PageProp/nogallery' />
25371 <meta property='mw:PageProp/noeditsection' />
25372 <meta property='mw:PageProp/notitleconvert' />
25373 <meta property='mw:PageProp/nocontentconvert' />
25374 <meta property='mw:PageProp/unknownproperty' />
25384 __NOCONTENTCONVERT__
25388 Consecutive <pre>s should not get merged
25390 parsoid=html2wt,html2html
25392 <pre>a</pre><pre>b</pre>
25420 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
25424 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
25426 [[Special:BookSources/1234567890|ISBN 1234567895]]
25430 Edited RFC links not serializable as RFC links should serialize as extlinks
25434 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
25436 [//tools.ietf.org/html/rfc123 New RFC]
25440 Edited PMID links not serializable as PMID links should serialize as extlinks
25444 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
25446 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
25450 WTS of autolinks with trailing/surrounding context
25454 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
25455 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
25456 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
25457 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
25458 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
25459 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
25461 http://cscott.net'''foo'''
25463 http://cscott.net<b>foo</b>
25465 '''http://cscott.net'''
25467 '''http://cscott.net '''
25469 '''http://cscott.net<nowiki/>x'''
25471 http://cscott.net<nowiki/>x
25475 WTS of autolinks with nowikis (round-trip)
25477 x<nowiki/>http://cscott.net<nowiki/>x
25479 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
25482 # this is the "easy" test because it leaves in place all the
25483 # data-parsoid information indicating this is an autolink
25485 WTS of autolinks with escapes (editing)
25488 "modes": ["wt2wt"],
25490 [ "meta", "remove" ]
25494 x<nowiki/>http://cscott.net<nowiki/>x
25496 x<nowiki/>http://cscott.net<nowiki/>x
25500 WTS of edited autolink-like text (T103364)
25503 "modes": ["wt2wt"],
25505 [ "span[typeof]", "removeAttr", "typeof" ]
25509 Not a link: <nowiki>http://example.com</nowiki>.
25511 Not a link: <span><nowiki>http://example.com</nowiki></span>.
25515 WTS of newly-authored autolink-like text (T103364)
25519 <p>http://example.com is not a link.</p>
25521 <nowiki>http://example.com</nowiki> is not a link.
25525 WTS of autolink-like text after an autolink (T108563)
25529 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
25531 http://example.com <nowiki>http://example.com</nowiki> is not a link.
25535 Magic links inside links (not autolinked)
25537 [[Foo|http://example.com]]
25540 [[Foo|ISBN 123456789x]]
25542 [http://foo.com http://example.com]
25543 [http://foo.com RFC 1234]
25544 [http://foo.com PMID 1234]
25545 [http://foo.com ISBN 123456789x]
25547 <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>
25548 <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>
25550 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
25551 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
25552 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
25553 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
25555 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
25556 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
25557 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
25558 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
25562 Magic links inside image captions (autolinked)
25564 [[File:Foobar.jpg|thumb|http://example.com]]
25565 [[File:Foobar.jpg|thumb|RFC 1234]]
25566 [[File:Foobar.jpg|thumb|PMID 1234]]
25567 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
25569 <div class="thumb tright">
25570 <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>
25571 <div class="thumbcaption">
25572 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25573 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
25576 <div class="thumb tright">
25577 <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>
25578 <div class="thumbcaption">
25579 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25580 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
25583 <div class="thumb tright">
25584 <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>
25585 <div class="thumbcaption">
25586 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25587 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
25590 <div class="thumb tright">
25591 <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>
25592 <div class="thumbcaption">
25593 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
25594 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
25598 <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>
25599 <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>
25600 <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>
25601 <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>
25605 WTS of magic word text (T109371)
25610 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
25611 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
25613 <nowiki>RFC 1234</nowiki>
25615 [http://foo.com RFC 1234]
25621 Edited Redirect link should emit a non-piped wikitext link
25625 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
25631 T75121: Infer extension name from typeOf if data-mw is not present
25633 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25635 <div typeOf="mw:Extension/foo"></div>
25640 # Note that the <p> wrapping isn't present in PHP parser output
25641 # The important thing for this test is that P-wrapping doesn't
25642 # interfere with the <nowiki> protection for leading - in <td>
25643 # (which isn't necessary for <th>).
25645 T88318: p-wrapped dash in table.
25647 parsoid=html2wt,wt2wt
25650 <tr><th><p>-</p></th><th><p>- </p></th></tr>
25651 <tr><td><p>-</p></td><td><p>- </p></td></tr>
25652 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
25659 |<nowiki>-</nowiki>
25660 |<nowiki>- </nowiki>
25679 <td><small>-</small></td>
25691 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
25696 <td id='mwAc'>foo</td>
25697 <td id='serialize-this'>bar</td>
25702 | id="serialize-this" |bar
25707 Parsoid-like element ids should not be serialized to wikitext unless shadowed
25711 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
25713 <div id="hello">ok</div>
25720 "modes": ["wt2wt"],
25722 [ "#xyz", "before", "<b>before</b> stuff " ],
25723 [ "#xyz", "after", " stuff <i>after</i>" ],
25724 [ "#xyz", "html", "x <b>y</b> z" ]
25728 <span id="xyz">hello</span>
25730 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
25734 Never serialize a-tag as html, regardless of what data-parsoid has to say
25736 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25738 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
25743 ## SSS FIXME: This is broken output nevertheless.
25744 ## What might be a reasonable non-broken output for this?
25745 ## This is an edge case unlikely to be seen in production
25746 ## that I am not wasting more time on this right now.
25748 Never serialize a-tag as html, no matter what attributes it has
25750 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
25752 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
25754 [http://boo.org http://boohoo.org]
25757 # Misnested is an indication that selser can reuse the source but these have
25758 # shown to sneak through on occasion. See T101768.
25759 # The original wikitext here is: [http://test.com [[one]] two three]
25761 Strip span tags added to mark misnested links
25765 <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>
25767 [http://test.com][[one]] two three
25771 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
25775 <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|}"]}'>
25787 ## This test verifies the presence and computation of this attribute indirectly
25788 ## by making an edit and ensuring that the serialization is correct (which it would be
25789 ## only if firstWikitextNode is properly set).
25791 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
25794 "modes": ["wt2wt"],
25796 [ "div#x", "remove" ],
25797 [ "div", "before", "<div>new</div>" ]
25801 <div id="x">foo</div>
25803 {{echo|<div>boo</div>
25811 {{echo|<div>boo</div>
25817 # --------------------------------------------
25818 # Tests spec'ing wikitext serialization norms |
25819 # --------------------------------------------
25822 1. Categories should always be serialized on their own line
25826 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
25834 2. Categories that are part of templates should not introduce a line break
25836 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
25838 <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>
25841 # Careful while editing these next 2 tests. There are \u200f characters
25842 # before and after the <link> tags in the HTML and following some
25843 # of the categories in wikitext
25844 # Do not remove these characters in edits.
25846 # As part of the serialization, these bidi characters will get stripped.
25848 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
25851 "modes": ["html2wt"],
25852 "scrubWikitext": true
25855 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
25856 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
25859 [[קטגוריה: שיטות משפט]]
25863 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
25866 "modes": ["html2wt"],
25867 "scrubWikitext": true
25870 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
25877 Lists: Add space after bullets
25884 <li><span> baz</span></li>
25889 * <span> baz</span>
25893 1. Headings: Add space before/after == (T53744)
25900 <h2><span> baz</span></h2>
25908 == <span> baz</span> ==
25912 2. Headings: Add space before/after == even after hoisted content
25915 "modes": ["html2wt"],
25916 "scrubWikitext": true
25919 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
25927 1. Headings: suppress newly created empty headings
25930 "modes": ["html2wt"],
25931 "scrubWikitext": true
25939 2. Headings: don't suppress empty headings if scrubWikitext is false
25949 3. Headings: suppress empty headings on edits
25952 "modes": ["selser"],
25953 "scrubWikitext": true,
25959 ==<span id="x">foo</span>==
25964 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
25967 "modes": ["html2wt"],
25968 "scrubWikitext": true
25971 <h2>foo<br/>bar</h2>
25972 <h2>foo <span><br/>bar</span> baz</h2>
25976 == foo <span> bar</span> baz ==
25980 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
25983 "modes": ["html2wt"],
25984 "scrubWikitext": false
25987 <h2>foo<br/>bar</h2>
25993 1. WT Quote Tags: suppress newly created empty style tags
25996 "modes": ["html2wt"],
25997 "scrubWikitext": true
26005 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26011 ''<nowiki/>'''''<nowiki/>'''
26015 3. WT Quote Tags: suppress empty style tags on edits
26018 "modes": ["selser"],
26019 "scrubWikitext": true,
26025 '''<span id="x">foo</span>'''
26030 1. Anchors: suppress newly created empty anchors
26033 "modes": ["html2wt"],
26034 "scrubWikitext": true
26037 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26042 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26045 "modes": ["html2wt"],
26046 "scrubWikitext": false
26049 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26055 3. Anchors: suppress empty anchors on edits
26058 "modes": ["selser"],
26059 "scrubWikitext": true,
26065 [[Test|<span id="x">foo</span>]]
26070 3a. Anchors: do not suppress numbered extlinks
26073 "modes": ["wt2wt"],
26074 "scrubWikitext": true
26079 <a rel="mw:ExtLink" href="http://foo.com"></a>
26083 3b. Anchors: do not suppress numbered extlinks
26086 "modes": ["wt2wt"],
26087 "scrubWikitext": true,
26093 [http://foo.com <span id="x">foo</span>]
26099 Normalizations should be restricted to edited content
26102 "modes": ["selser"],
26103 "scrubWikitext": true,
26105 [ "h1", "before", "<i></i>"]
26119 1. Multiple normalizations (html2wt)
26122 "modes": ["html2wt"],
26123 "scrubWikitext": true
26127 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
26128 </a><b><i></i></b>x</p>
26137 2. Multiple normalizations (selser)
26140 "modes": ["selser"],
26141 "scrubWikitext": true,
26143 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
26147 <span id="x">foo</span>
26149 <span id="x">foo</span>
26155 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
26158 "modes": ["html2wt"],
26159 "scrubWikitext": true
26171 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
26178 <nowiki> </nowiki>hi
26180 <nowiki> </nowiki> hello
26184 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
26187 "modes": ["html2wt"],
26188 "scrubWikitext": true
26197 baz bang</td></tr></table>
26203 bar<span>boo</span></p>
26219 bar<span>boo</span>
26223 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
26226 "modes": ["selser"],
26227 "scrubWikitext": true,
26229 [ "p", "html", " a\n b" ]
26240 1. New links that end in spaces
26243 "modes": ["html2wt"],
26244 "scrubWikitext": false
26247 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26248 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26249 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26251 [[Berlin ]]<nowiki/>is the capital of Germany.
26255 [[Boston ]] is a city.
26259 2. New links that end in spaces
26262 "modes": ["html2wt"],
26263 "scrubWikitext": true
26266 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
26267 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
26268 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
26270 [[Berlin]] is the capital of Germany.
26274 [[Boston]] is a city.
26278 1. Table cells with escapable prefixes
26281 "modes": ["html2wt"],
26282 "scrubWikitext": false
26286 <tr><td>a</td></tr>
26287 <tr><td>-</td></tr>
26288 <tr><td>+</td></tr>
26294 |<nowiki>-</nowiki>
26296 |<nowiki>+</nowiki>
26301 2. Table cells with escapable prefixes
26304 "modes": ["html2wt"],
26305 "scrubWikitext": true
26309 <tr><td>a</td></tr>
26310 <tr><td>-</td></tr>
26311 <tr><td>+</td></tr>
26324 3a. Table cells with escapable prefixes after edits
26327 "modes": ["selser"],
26328 "scrubWikitext": true,
26330 [ "table tbody tr:first-child td:first-child", "remove"]
26344 3b. Table cells with escapable prefixes after edits
26347 "modes": ["selser"],
26348 "scrubWikitext": true,
26350 [ "table tbody tr:first-child td:first-child", "html", "-" ],
26357 |<span id="x">foo</span>+
26366 # FIXME: This test will fail because
26367 # normalization doesn't realize that the id attribute
26368 # will eliminate the escapable scenario
26370 4a. Table cells without escapable prefixes after edits
26373 "modes": ["selser"],
26374 "scrubWikitext": true,
26376 [ "#x", "html", "-" ]
26389 ## This tests normalizer's ability to discriminate between
26390 ## cells having identical content.
26392 4b. Table cells without escapable prefixes after edits
26395 "modes": ["selser"],
26396 "scrubWikitext": true,
26398 [ "td", "html", "-" ]
26411 ## This tests normalizer's ability to not be tripped by
26412 ## comments (and whitespace)
26414 4c. Table cells without escapable prefixes after edits
26417 "modes": ["selser"],
26418 "scrubWikitext": true,
26420 [ "table tbody tr td:first-child", "remove" ]
26435 ## This tests normalizer's ability to handle HTML cells
26437 4d. Table cells without escapable prefixes after edits
26440 "modes": ["selser"],
26441 "scrubWikitext": true,
26443 [ "td", "html", "-" ]
26448 <tr><td>a</td></tr>
26452 <tr><td>-</td></tr>
26456 ## T111151 Remove font elements without attributes
26458 5a. font tags without attributes should be dropped in scrubWikitext mode
26461 "modes": ["html2wt"],
26462 "scrubWikitext": true
26466 <font><font>bar</font></font>
26467 <font class="x">boo</font>
26471 <font class="x">boo</font>
26475 5b. font tags should not be dropped without scrubWikitext being enabled
26478 "modes": ["html2wt"],
26479 "scrubWikitext": false
26488 Escape nowiki DOM elements
26492 <nowiki><i>foo</i></nowiki>
26494 <nowiki>''foo''</nowiki>
26497 # This is meant to be an interim fix while we go about figuring out
26498 # how to not introduce these trailing <nowiki/>s in the first place.
26500 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
26504 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
26506 <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>
26507 <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>
26520 # ---------------------------------------------------
26521 # End of tests spec'ing wikitext serialization norms |
26522 # ---------------------------------------------------
26526 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
26534 <td><b>c</b><p>d</p></td>
26552 # -----------------------------------------------------------------
26553 # End of section for Parsoid-only html2wt tests for serialization
26555 # -----------------------------------------------------------------
26557 # -----------------------------------------------------------------
26558 # The following section of tests are primarily to spec behavior of
26559 # the selective serializer. All these tests have manual selser
26560 # changes. The automated selser changes for all tests handle the
26561 # wide variation of changes, but these tests here capture specs
26562 # deterministically.
26563 # ----------------------------------------------------------------
26567 Selser: New comments should not be lost
26570 "modes": ["selser"],
26572 [ "#a", "after", "<!--c1-->" ],
26573 [ "#b", "before", "<!--c2-->" ]
26577 <span id="a">a</span>
26579 <span id="b">b</span>
26581 <span id="a">a</span><!--c1-->
26583 <!--c2--><span id="b">b</span>
26588 Selser: Check for validity of DSR before using it
26591 "modes": ["selser"],
26593 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
26597 <span id="a">a</span>
26599 {{DISPLAYTITLE:foo}}
26600 <span id="a">a</span>
26604 1. DOMDiff: Changes to <ref> content should be looked up using id
26607 "modes": ["selser"],
26609 ["#X", "after", "bar"],
26610 ["#Y", "after", "baz"]
26614 X <ref><span id="X">foo</span></ref>
26617 <ref name="a"><span id="Y">foo</span></ref>
26620 X <ref><span id="X">foo</span>bar</ref>
26623 <ref name="a"><span id="Y">foo</span>baz</ref>
26628 2. DOMDiff: Changes to <ref> content should be looked up using id
26631 "modes": ["selser"],
26633 ["#Z", "after", "bar"]
26637 A <ref>foo bar for a</ref>
26638 B <ref group="X" name="b" />
26642 <references group="X">
26643 <ref name="b"><span id="Z">foo</span></ref>
26646 A <ref>foo bar for a</ref>
26647 B <ref group="X" name="b" />
26651 <references group="X">
26652 <ref name="b"><span id="Z">foo</span>bar</ref>
26666 <li class="mw-empty-li"></li>
26667 <li class="mw-empty-li"></li>