1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # noxml don't check for XML well-formedness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # parsoid parsoid-specific options (not run by PHP parser unless
25 # the test includes an html/php section)
26 # php php-only test (not run by the parsoid parser unless
27 # the test includes an html/parsoid section)
28 # showtitle make the first line the title
29 # showindicators make the first lines the page status indicators
30 # comment run through Linker::formatComment() instead of main parser
31 # local format section links in edit comment text as local links
32 # notoc disable table of contents
33 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # You can also set the following parser properties via test options:
36 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
37 # wgLinkHolderBatchSize, wgRawHtml
39 # For testing purposes, temporary articles can created:
40 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
41 # where '/' denotes a newline.
43 # This is the standard article assumed to exist.
80 MediaWiki:bad image list
82 * [[File:Bad.jpg]] except [[Nasty page]]
110 Template:echo_with_span
116 Template:echo_with_div
122 Template:table_attribs
125 |</noinclude>style="color:red;"|Foo
129 Template:table_attribs_2
132 |</noinclude>style="color:red;"|Foo
137 Template:table_attribs_3
140 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
144 Template:table_attribs_4
146 | style="background-color:#DC241f;" width="10px" |
150 Template:table_attribs_5
153 |</noinclude>style="color:red;"||Bar
157 Template:table_header_cells
159 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
165 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
169 Template:image_attribs
172 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
175 ## See T48811 for details
177 Template:mixed_attr_content_template
179 style="color:red;" title="T48811"
185 Template:definition_list
232 Template:EmptyTRWithHTMLAttrTest
235 <tr align="center"></tr>
236 <tr><td>foo</td></tr>
237 <tr align="center"></tr>
238 <tr><td>bar</td></tr>
255 This is a simple paragraph.
257 <p>This is a simple paragraph.
262 Paragraphs with extra newline spacing
285 Paragraphs with newline spacing with comment lines in between
293 <!--foo--><!--More than 1 comment, still stripped-->
297 <!--foo--> <!----> <!-- bar -->
358 Paragraphs with newline spacing with non-empty white-space lines in between
385 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
393 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
432 Extra newlines: More paragraphs with indented comment
447 Extra newlines followed by heading
462 <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>
463 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
466 <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>
471 Extra newlines between heading and content are swallowed
479 <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>
480 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
487 http://fr.wikipedia.org/wiki/🍺
488 <!-- EasterEgg we love beer, better be able be able to link to it -->
490 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
494 # Note that the html+tidy output removes the spaces after the <li>,
495 # which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
496 # This is an issue for all tests with lists. We intentionally do
497 # *not* add html+tidy clauses for these, as we don't want to
498 # document/test the broken behavior. (Parsoid matches the non-tidy
499 # output in these cases.)
508 <li> Item 2</li></ul>
516 * plain''italic''plain
517 * plain''italic''plain''italic''plain
518 * plain'''bold'''plain
519 * plain'''bold'''plain'''bold'''plain
520 * plain''italic''plain'''bold'''plain
521 * plain'''bold'''plain''italic''plain
522 * plain''italic'''bold-italic'''italic''plain
523 * plain'''bold''bold-italic''bold'''plain
524 * plain'''''bold-italic'''italic''plain
525 * plain'''''bold-italic''bold'''plain
526 * plain''italic'''bold-italic'''''plain
527 * plain'''bold''bold-italic'''''plain
528 * plain l'''italic''plain
529 * plain l''''bold''' plain
532 <li> plain<i>italic</i>plain</li>
533 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
534 <li> plain<b>bold</b>plain</li>
535 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
536 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
537 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
538 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
539 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
540 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
541 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
542 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
543 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
544 <li> plain l'<i>italic</i>plain</li>
545 <li> plain l'<b>bold</b> plain</li></ul>
549 # this example taken from the [[simple:Moon]] article (bug 47326)
551 Italics and possessives (1)
553 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
555 <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
559 # this example taken from [[en:Flaming Pie]] (bug 49926)
561 Italics and possessives (2)
563 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
565 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
569 # this example taken from [[en:Dictionary]] (bug 49926)
571 Italics and possessives (3)
573 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''.
575 <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>.
581 ### 2-quote opening sequence tests
584 Italics and bold: 2-quote opening sequence: (2,2)
593 Italics and bold: 2-quote opening sequence: (2,3)
602 Italics and bold: 2-quote opening sequence: (2,4)
612 # same html as previous, but wikitext adjusted to match parsoid html2wt
614 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
616 ''foo<nowiki>''</nowiki>''
622 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
624 Italics and bold: 2-quote opening sequence: (2,5)
637 # same html as previous, but wikitext adjusted to match parsoid html2wt
639 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
641 ''foo'''''<nowiki/>'''
652 ### 3-quote opening sequence tests
656 Italics and bold: 3-quote opening sequence: (3,2)
665 Italics and bold: 3-quote opening sequence: (3,3)
674 Italics and bold: 3-quote opening sequence: (3,4)
682 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
684 Italics and bold: 3-quote opening sequence: (3,5)
697 # same html as previous, but wikitext adjusted to match parsoid html2wt
699 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
701 '''foo'''''<nowiki/>''
712 ### 4-quote opening sequence tests
716 Italics and bold: 4-quote opening sequence: (4,2)
726 # same html as previous, but wikitext adjusted to match parsoid html2wt
728 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
730 <nowiki>''</nowiki>''foo''
737 Italics and bold: 4-quote opening sequence: (4,3)
746 Italics and bold: 4-quote opening sequence: (4,4)
756 # same html as previous, but wikitext adjusted to match parsoid html2wt
758 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
766 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
768 Italics and bold: 4-quote opening sequence: (4,5)
777 <p>'<b>foo</b><i></i>
781 # same html as previous, but wikitext adjusted to match parsoid html2wt
783 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
785 '<nowiki/>'''foo'''''<nowiki/>''
790 <p>'<b>foo</b><i></i>
796 ### 5-quote opening sequence tests
800 Italics and bold: 5-quote opening sequence: (5,2)
810 # same html as previous, but wikitext adjusted to match parsoid html2wt
811 # skipping wt2html and html2html because it wants to put <i> before <b>
813 Italics and bold: 5-quote opening sequence: (5,2+3)
815 parsoid=wt2wt,html2wt
824 Italics and bold: 5-quote opening sequence: (5,3)
834 # same html as previous, but wikitext adjusted to match parsoid html2wt
836 Italics and bold: 5-quote opening sequence: (5,3+2)
845 Italics and bold: 5-quote opening sequence: (5,4)
851 <p><i><b>foo'</b></i>
856 Italics and bold: 5-quote opening sequence: (5,5)
865 Italics and bold: 5-quote opening sequence: (5,6)
869 <p><i><b>foo'</b></i>
874 ### multiple quote sequences in a line
877 Italics and bold: multiple quote sequences: (2,4,2)
883 <p><i>foo'<b>bar</b></i>
888 # same html as previous, but wikitext adjusted to match parsoid html2wt
890 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
892 ''foo'<nowiki/>'''bar'''''
894 <p><i>foo'<b>bar</b></i>
900 Italics and bold: multiple quote sequences: (2,4,3)
906 <p><i>foo'<b>bar</b></i>
911 # same html as previous, but wikitext adjusted to match parsoid html2wt
913 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
915 ''foo'<nowiki/>'''bar'''''
917 <p><i>foo'<b>bar</b></i>
923 Italics and bold: multiple quote sequences: (2,4,4)
929 <p><i>foo'<b>bar'</b></i>
934 # same html as previous, but wikitext adjusted to match parsoid html2wt
936 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
938 ''foo'<nowiki/>'''bar'<nowiki/>'''''
940 <p><i>foo'<b>bar'</b></i>
945 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
947 Italics and bold: multiple quote sequences: (3,4,2)
956 <p><b>foo'</b>bar<i></i>
960 # same html as previous, but wikitext adjusted to match parsoid html2wt
962 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
966 '''<nowiki>foo'</nowiki>'''bar''<nowiki/>''
971 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<i></i>
976 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
978 Italics and bold: multiple quote sequences: (3,4,3)
987 <p><b>foo'</b>bar<b></b>
991 # same html as previous, but wikitext adjusted to match parsoid html2wt
993 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
995 '''<nowiki>foo'</nowiki>'''bar'''<nowiki/>'''
1000 <p><b><span typeof="mw:Nowiki">foo'</span></b>bar<b></b>
1005 ### other quote tests
1008 Italics and bold: other quote tests: (2,3,5)
1010 ''this is about '''foo's family'''''
1012 <p><i>this is about <b>foo's family</b></i>
1018 Italics and bold: other quote tests: (2,(3,3),2)
1020 ''this is about '''foo's''' family''
1022 <p><i>this is about <b>foo's</b> family</i>
1028 Italics and bold: other quote tests: (3,2,3,2)
1032 '''this is about ''foo'''s family''
1034 <p><b>this is about <i>foo</i></b><i>s family</i>
1039 # same html as previous, but wikitext adjusted to match parsoid html2wt
1041 Italics and bold: other quote tests: (3,2,3+2+2,2)
1043 '''this is about ''foo'''''<nowiki/>''s family''
1045 <p><b>this is about <i>foo</i></b><i>s family</i>
1051 Italics and bold: other quote tests: (3,2,3,3)
1053 '''this is about ''foo'''s family'''
1055 <p>'<i>this is about </i>foo<b>s family</b>
1061 Italics and bold: other quote tests: (3,(2,2),3)
1063 '''this is about ''foo's'' family'''
1065 <p><b>this is about <i>foo's</i> family</b>
1071 Italicized possessive
1073 The ''[[Main Page]]'''s talk page.
1075 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1078 <p>The <i><a rel="mw:WikiLink" href="Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1082 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1083 (Requires tidy for PHP parser output to be fixed up)
1085 parsoid=wt2html,wt2wt
1102 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1103 <td><i>a</i></td><td><i>b</i></td></tr>
1112 Non-html5 tags should be accepted
1114 <center>''foo''</center>
1116 <font>''foo''</font>
1117 <strike>''foo''</strike>
1120 <center><i>foo</i></center>
1121 <p><big><i>foo</i></big>
1122 <font><i>foo</i></font>
1123 <strike><i>foo</i></strike>
1129 <wbr> is valid wikitext (bug 52468)
1137 # <strike> is HTML4, <s> is HTML4/5.
1139 <s> or <strike> for strikethrough
1141 <strike>strike</strike>
1145 <p><strike>strike</strike>
1153 Text-level semantic html elements in wikitext
1156 <strong>text</strong>
1172 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1179 <strong>text</strong>
1195 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1203 # test cases taken from
1204 # http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1206 Ruby markup (W3C-style)
1208 ; Mono-ruby for individual base characters
1209 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1211 : <ruby>今日<rt>きょう</rt></ruby>
1213 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1215 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1217 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1219 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1220 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1221 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1224 <dl><dt> Mono-ruby for individual base characters</dt>
1225 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1226 <dt> Group ruby</dt>
1227 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1228 <dt> Jukugo ruby</dt>
1229 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1230 <dt> Inline ruby</dt>
1231 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1232 <dt> Double-sided ruby</dt>
1233 <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>
1235 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1236 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1237 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1242 # The next two test different paths in the sanitizer.
1244 Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
1246 <blockquote|>a</blockquote>
1248 <b→> doesn't terminate </b→>
1250 <bä> doesn't terminate </bä>
1252 <boo> doesn't terminate </boo>
1254 <s.foo> doesn't terminate </s.foo>
1258 <p><blockquote|>a</blockquote>
1259 </p><p><b→> doesn't terminate </b→>
1260 </p><p><bä> doesn't terminate </bä>
1261 </p><p><boo> doesn't terminate </boo>
1262 </p><p><s.foo> doesn't terminate </s.foo>
1263 </p><p><sub-ID#1>
1267 # There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
1268 # If the non-word-character tag made it through the sanitizer, tidy
1269 # would munge it up.
1271 Non-word characters don't terminate tag names + tidy
1273 <blockquote|>a</blockquote>
1275 <b→> doesn't terminate </b→>
1277 <bä> doesn't terminate </bä>
1279 <boo> doesn't terminate </boo>
1281 <s.foo> doesn't terminate </s.foo>
1285 <p><blockquote|>a</p>
1286 <p><b→> doesn't terminate </b→></p>
1287 <p><bä> doesn't terminate </bä></p>
1288 <p><boo> doesn't terminate </boo></p>
1289 <p><s.foo> doesn't terminate </s.foo></p>
1290 <p><sub-ID#1></p>
1294 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1295 ### This checks that HTML5 tags (with non-word characters in the tag
1296 ### name) make it safely through the parser -- the Sanitizer will
1297 ### munge them later, as it should.
1300 Non-word characters are valid in extension tags (T19663)
1313 Isolated close tags should be treated as literal text (bug 52760)
1319 <p><s.foo>s</p>
1323 ### Special characters
1327 Bare pipe character (bug 52363)
1336 Bare pipe character from a template (bug 52363)
1345 ### <nowiki> test cases
1349 <nowiki> unordered list
1351 <nowiki>* This is not an unordered list item.</nowiki>
1353 <p>* This is not an unordered list item.
1360 <nowiki>Lorem ipsum dolor
1368 <p>Lorem ipsum dolor
1381 :There is not nowiki.
1382 :There is <nowiki>nowiki</nowiki>.
1384 #There is not nowiki.
1385 #There is <nowiki>nowiki</nowiki>.
1387 *There is not nowiki.
1388 *There is <nowiki>nowiki</nowiki>.
1390 <dl><dd>There is not nowiki.</dd>
1391 <dd>There is nowiki.</dd></dl>
1392 <ol><li>There is not nowiki.</li>
1393 <li>There is nowiki.</li></ol>
1394 <ul><li>There is not nowiki.</li>
1395 <li>There is nowiki.</li></ul>
1400 Entities inside <nowiki>
1402 <nowiki><</nowiki>
1409 Entities inside template parameters
1415 <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>
1419 Properly escape nowiki when combined with other wiki markup
1423 <p>* </nowiki> tag</p>
1425 <nowiki>* </nowiki></nowiki> tag
1429 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1433 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1434 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1435 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1437 This text: L'[[Foo]]
1438 This text: L<nowiki>''</nowiki>[[Foo]]
1439 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1442 # This test fails because wikitext whitespace is not normalized before comparing.
1444 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1448 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1451 This text : L<nowiki>''</nowiki>[[Foo]]
1454 # This test and the next one are html2wt only as they test that incorrect wikitext
1455 # passed in template arguments gets escaped or wrapped in nowikis where required.
1457 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1461 <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>
1462 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1464 {{echo|foo{{!}}bar}}
1465 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1469 T53961: Output correct nowikis in template arguments
1473 <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>
1474 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1475 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1476 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1477 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1480 {{echo|a <nowiki>}}</nowiki> b}}
1481 {{echo|<nowiki>a [[ b</nowiki>}}
1482 {{echo|a {{!}} <nowiki>{{ ]]</nowiki>}}
1483 {{echo|a <nowiki>}</nowiki>}}
1490 Comments and Indent-Pre
1492 <!-- comment 1 --> asdf
1494 <!-- comment 1 --> asdf
1497 <!-- comment 1 --> asdf
1498 <!-- comment 2 -->xyz
1500 <!-- comment 1 --> asdf
1501 <!-- comment 2 --> xyz
1557 asdf<!-- comment 1 -->jkl
1567 <!-- foo --> b <!-- bar -->
1581 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1587 Comment semantics and delimiters
1589 <!-- --><!----><!-----><!------>
1595 Comment semantics and delimiters, redux
1597 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1598 -- foo -- funky huh? ... -->
1604 Comment semantics and delimiters: directors cut
1606 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1607 everything starting with < followed by !-- until the first -- and > we see,
1608 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1616 Comment semantics: nesting
1618 <!--<!-- no, we're not going to do anything fancy here -->-->
1625 Comment semantics: unclosed comment at end
1627 <!--This comment will run out to the end of the document
1632 # Bug 58184: document parsoid's behaviour
1634 Suppress comment closing tag in lenient browsers
1636 parsoid=wt2html,html2html
1638 <!-- Browsers--!> think this is closed -->
1642 <!-- Browsers--¡> think this is closed -->
1646 Comment in template title
1655 Comment on its own line post-expand
1667 Comment on its own line post-expand with non-significant whitespace
1679 Multiple comments should still parse as SOL-transparent
1681 parsoid=wt2html,wt2wt
1684 <!--c2--><!--c3--><!--c4-->*b
1695 ### paragraph wrapping tests
1710 Block tag on one line (<div>)
1726 Block tag on one line (<blockquote>)
1728 a <blockquote>foo</blockquote>
1732 a <blockquote>foo</blockquote>
1744 Block tag on both lines (<div>)
1761 Block tag on both lines (<blockquote>)
1763 a <blockquote>foo</blockquote>
1765 b <blockquote>foo</blockquote>
1767 a <blockquote>foo</blockquote>
1768 b <blockquote>foo</blockquote>
1782 Multiple lines without block tags
1806 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1807 # So, we have a separate section for Parsoid. We don't want
1808 # to mimic this stripping behavior in Parsoid. It affects
1809 # editing experience and also requires us to maintain additional
1812 Empty lines between lines with block tags
1850 <div data-parsoid='{"stx":"html"}'></div>
1853 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
1856 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
1858 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
1861 <div data-parsoid='{"stx":"html"}'>e</div>
1864 ## PHP parser emits output which is broken
1866 Unclosed HTML p-tags should be handled properly
1879 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
1884 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
1885 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
1888 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
1892 a [[Category:A1]] [[Category:A2]]
1897 <link href="Category:A1"/> <link href="Category:A2"/> <link href="Category:A3"/> <link href="Category:A4"/>
1901 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
1907 <link href="Category:A1"/><p>a</p>
1911 ### Preformatted text
1920 And a [[Main Page|link]]
1926 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1931 Tabs don't trigger preformatted text
1935 This is preformatted text.
1941 <pre>This is preformatted text.
1947 Ident preformatting with inline content
1958 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1975 Regression with preformatted in <center>
1989 Bug 52763: Preformatted in <blockquote>
1995 indented cell (no pre-wrapping!)
2005 <p> indented cell (no pre-wrapping!)
2013 Bug 51086: Double newlines in blockquotes should be turned into paragraphs
2030 Bug 15491: <ins>/<del> in blockquote
2033 Foo <del>bar</del> <ins>baz</ins> quux
2037 <p>Foo <del>bar</del> <ins>baz</ins> quux
2043 # Note that the p-wrapping is newline sensitive, which could be
2044 # considered a bug: tidy will wrap only the 'Foo' in the example
2045 # below in a <p> tag. (see comment 23-25 of bug #6200)
2047 Bug 15491: <ins>/<del> in blockquote (2)
2049 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2052 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2058 <del>bar</del> <ins>baz</ins> quux</blockquote>
2062 <pre> with attributes (bug 3202)
2064 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2066 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2071 <pre> with width attribute (bug 3202)
2073 <pre width="8">Narrow screen goodies</pre>
2075 <pre width="8">Narrow screen goodies</pre>
2080 <pre> with forbidden attribute (bug 3202)
2082 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2084 <pre width="8">Narrow screen goodies</pre>
2089 Entities inside <pre>
2098 <pre> with forbidden attribute values (bug 3202)
2100 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2102 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2107 <nowiki> inside <pre> (bug 13238)
2115 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2123 <pre><nowiki>Foo</nowiki></pre>
2128 <nowiki> and <pre> preference (first one wins)
2159 </pre> inside nowiki
2161 <nowiki></pre></nowiki>
2167 # Parsoid doesn't strip empty tags, like Tidy does.
2169 Empty pre; pre inside other HTML tags (bug 54946)
2171 parsoid=wt2html,wt2wt
2202 HTML pre followed by indent-pre
2217 <p><pre>foo</pre></p>
2219 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre data-parsoid='{"stx":"html"}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2223 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2231 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2241 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2253 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2274 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2278 {{echo| foo}}{{echo| bar}}
2283 {{echo|<!--cmt--> foo}}
2285 <!--cmt-->{{echo| foo}}
2287 {{echo|{{echo| }}bar}}
2305 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2342 Things that look like <pre> tags aren't treated as such
2344 Barack Obama <President> of the United States
2345 <President></President>
2347 <p>Barack Obama <President> of the United States
2348 <President></President>
2352 ## PHP parser discards the "<pre " string
2354 Handle broken pre-like tags (bug 64025)
2358 {{echo|<pre <pre>x</pre>}}
2360 <table><pre </table>
2363 <table><pre></pre></table>
2366 <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>
2375 Parsoid: handle pre with space after attribute
2379 <pre style="width:50%;" >{{echo|foo}}</pre>
2381 <pre style="width:50%;">{{echo|foo}}</pre>
2384 # TODO / maybe: fix wt2wt for this
2386 Parsoid: Don't paragraph-wrap fosterable content
2412 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2440 #--------------------------------------------------------------------
2441 # Transclusion parameter whitespace stripping tests
2442 # Behavior is different for positional and named parameters
2443 #--------------------------------------------------------------------
2445 Templates: Strip leading and trailing whitespace from named-param values
2449 {{echo|1= {{echo|b}} }}
2462 <ul><li> d</li></ul>
2467 Templates: Don't strip whitespace from positional-param values
2471 {{echo|{{echo|b}} }}
2503 <ul><li> f</li></ul>
2511 Templates: Handle empty comment-and-ws-only lines correctly
2514 <!--should be ignored-->
2515 <!--should be ignored as well-->
2524 Templates: Handle comments in the target
2527 <!-- should be ignored -->
2530 {{echo<!-- should be ignored -->
2533 {{echo<!-- should be ignored -->|foo}}
2535 {{<!-- should be ignored -->echo|foo}}
2537 <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>
2539 <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>
2541 <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>
2543 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2547 Templates: Handle comments in parameter names (bug 67657)
2550 <!-- should be ignored -->
2554 <!-- should be ignored -->
2557 {{echo|1<!-- should be ignored --> = foo}}
2559 {{echo|<!-- should be ignored -->1 = foo}}
2561 <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>
2563 <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>
2565 <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>
2567 <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>
2571 Templates: Other wikitext in parameter names (bug 67657)
2575 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2581 #--------------------------------------------------------------------
2582 # Transclusion parameter escaping tests
2583 #--------------------------------------------------------------------
2585 Templates: Parsoid parameter escaping test 1
2589 {{echo|[foo]|{{echo|[bar]}}}}
2591 <p about="#mwt1" typeof="mw:Transclusion"
2592 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2596 Parsoid: Pipes in external links in template parameter
2600 {{echo|[{{echo|http://example.com}} link]}}
2602 <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>
2606 Parsoid: pipe in transclusion parameter
2610 {{echo|http://foo.com/a|b}}
2612 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2613 typeof="mw:Transclusion"
2614 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>
2618 Parsoid: Pipe in external link target and content in template parameter
2620 parsoid=html2wt,wt2wt
2622 {{echo|[http://foo.com/a|b a|b]}}
2624 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2625 typeof="mw:Transclusion"
2626 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2627 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2631 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2635 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2637 <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>
2641 Templates: Don't escape already nowiki-escaped text in template parameters
2643 parsoid=html2wt,wt2wt
2645 {{echo|foo<nowiki>|</nowiki>bar}}
2646 {{echo|<nowiki><div></nowiki>}}
2647 {{echo|<nowiki></nowiki>}}
2649 <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>
2650 <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>
2651 <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>
2657 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2659 parsoid=html2wt,wt2wt
2661 {{echo|{{echo|1=bar}}}}
2663 <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>
2668 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2674 <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:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
2679 Templates: Preserve blank parameter names
2686 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2690 ### Parsoid-centric tests for testing RT edge cases for pre
2694 1a. Indent-Pre and Comments
2707 1b. Indent-Pre and Comments
2720 1c. Indent-Pre and Comments
2733 1d. Indent-Pre and Comments
2734 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
2747 2a. Indent-Pre and tables
2768 2b. Indent-Pre and tables
2784 2c. Indent-Pre and tables (bug 42252)
2801 2d. Indent-Pre and tables
2818 <tbody><tr><td> b</td></tr>
2823 2e. Indent-Pre and table-line syntax
2836 2f. Indent-pre started by table-line syntax
2855 3a. Indent-Pre and block tags (single-line html)
2859 c <blockquote> foo </blockquote>
2864 c <blockquote> foo </blockquote>
2865 <pre><span> foo </span>
2868 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
2869 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
2870 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
2871 <pre><span> foo </span>
2888 3b. Indent-Pre and block tags (multi-line html)
2893 <pre>a <span>foo</span>
2898 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
2899 b <div data-parsoid='{"stx":"html"}'> foo </div>
2909 3c. Indent-Pre and block tags (pre-content on separate line)
2973 4. Indent-Pre and extension tags
2979 a <ul class="gallery mw-gallery-traditional">
2980 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
2981 <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>
2982 <div class="gallerytext">
2989 <ul class="gallery mw-gallery-traditional">
2990 <li class="gallerybox" style="width: 155px">
2991 <div style="width: 155px">
2992 <div class="thumb" style="width: 150px;">
2993 <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>
2995 <div class="gallerytext"></div>
3002 Table wikitext syntax outside wiki-tables
3005 ! not a table heading
3008 | class="foo bar" | baz
3015 ! not a table heading
3018 | class="foo bar" | baz
3027 Render paragraphs when indent-pre is suppressed in blocklevels
3044 4. Multiple spaces at start-of-line
3062 ## NOTE: the leading white-space chars on empty line are significant
3064 5a. White-space in indent-pre
3076 ## NOTE: the leading white-space chars on empty line are significant
3078 5b. White-space in indent-pre
3097 5c. White-space in indent-pre
3110 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3133 7a. Indent-pre and category links
3135 parsoid=wt2html,wt2wt
3137 [[Category:foo]] <!-- No pre-wrapping -->
3138 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3140 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3141 <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 -->
3145 7b. Indent-pre and category links
3147 parsoid=wt2html,wt2wt
3150 [[Category:foo]] {{echo|b}}
3153 <link rel="mw:PageProp/Category" href="./Category:Foo"> a
3154 <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>
3158 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3162 HTML-pre: 1. embedded newlines
3196 <pre data-parsoid='{"stx":"html"}'>foo</pre>
3198 <pre data-parsoid='{"stx":"html","strippedNL":"\n"}'>
3202 <pre data-parsoid='{"stx":"html"}'>
3207 <pre data-parsoid='{"stx":"html"}'>
3215 HTML-pre: big spaces
3252 <pre data-parsoid='{"stx":"html"}'>
3271 HTML-pre: 2: indented text
3284 HTML-pre: 3: other wikitext
3305 ### Definition lists
3312 <dl><dt> name </dt>
3313 <dd> Definition</dd></dl>
3318 Definition list for indentation only
3322 <dl><dd> Indented text</dd></dl>
3327 Definition list with no space
3332 <dd>Definition</dd></dl>
3337 Definition list with URL link
3339 ; http://example.com/ : definition
3341 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3342 <dd> definition</dd></dl>
3347 Definition list with bracketed URL link
3349 ;[http://www.example.com/ Example]:Something about it
3351 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3352 <dd>Something about it</dd></dl>
3357 Definition list with wikilink containing colon
3359 ; [[Help:FAQ]]: The least-read page on Wikipedia
3361 <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>
3362 <dd> The least-read page on Wikipedia</dd></dl>
3366 # At Brion's and JeLuF's insistence... :)
3368 Definition list with news link containing colon
3370 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3372 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3373 <dd> This isn't even a real newsgroup!</dd></dl>
3376 <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>
3380 Malformed definition list with colon
3382 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3384 <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>
3389 Definition lists: colon in external link text
3391 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3393 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3394 <dd> OK, I made that up</dd></dl>
3399 Definition lists: colon in HTML attribute
3401 ;<b style="display: inline">bold</b>
3403 <dl><dt><b style="display: inline">bold</b></dt></dl>
3408 Definition lists: self-closed tag
3410 ;one<br/>two : two-line fun
3412 <dl><dt>one<br />two </dt>
3413 <dd> two-line fun</dd></dl>
3418 Bug 11748: Literal closing tags
3422 <dd>test test test test test</dd>
3424 <dd>test test test test test</dd>
3429 <dd>test test test test test</dd>
3431 <dd>test test test test test</dd>
3437 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3440 ; term : description
3445 <dl><dt> term </dt>
3446 <dd> description</dd></dl>
3447 <ul><li> unordered</li></ul>
3454 Definition list with empty definition and following paragraph
3466 Nested definition lists using html syntax
3475 Definition Lists: No nesting: Multiple dd's
3488 Definition Lists: Indentation: Regular
3496 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3501 Definition Lists: Indentation: Missing 1st level
3507 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3512 Definition Lists: Indentation: Multi-level indent
3516 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3521 Definition Lists: Hacky use to indent tables
3528 should be left alone
3530 <dl><dd><dl><dd><table>
3535 </td></tr></table></dd></dl></dd></dl>
3537 should be left alone
3542 Definition Lists: Hacky use to indent tables, with comments (bug 63979)
3550 should be left alone
3553 <dl><dd><dl><dd><table><tr>
3556 </tr></table><!-- bar --></dd></dl></dd></dl>
3558 should be left alone</p>
3562 Definition Lists: Hacky use to indent tables, with comment before table
3568 <dl><dd><dl><dd><!-- foo --><table><tr>
3570 </tr></table></dd></dl></dd></dl>
3575 Definition Lists: Hacky use to indent tables (WS-insensitive)
3584 <dd> <table><tr><td>a</td></tr></table> </dd>
3587 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3588 ## as an empty dt item. It also ignores all but the last ";" when followed
3589 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3590 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3593 ## Ex: ";;t2 ::d2" is transformed into:
3605 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3606 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3617 ## All Parsoid only definition list tests have this difference.
3619 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
3620 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3623 Table / list interaction: indented table with lists in table contents
3638 <ul><li> b</li></ul>
3642 <ul><li> d</li></ul>
3643 </td></tr></table></dd></dl>
3648 Table / list interaction: lists nested in tables nested in indented lists
3671 </td></tr></table></dd></dl>
3678 Definition Lists: Nesting: Multi-level (Parsoid only)
3708 Definition Lists: Nesting: Test 2 (Parsoid only)
3728 Definition Lists: Nesting: Test 3 (Parsoid only)
3756 Definition Lists: Nesting: Test 4
3761 <dl><dd><dl><dd><dl><dt>t3</dt>
3762 <dd>d3</dd></dl></dd></dl></dd></dl>
3767 ## The Parsoid team believes the following three test exposes a
3768 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
3769 ## wrong to close the <dl> after the <dt> containing the <ul>.)
3770 ## It also exposes a "misfeature" in tidy, which doesn't like
3771 ## <dl> tags with a single <dt> child; it converts the <dt> into
3772 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
3774 Definition Lists: Mixed Lists: Test 1
3780 <dl><dd><dl><dt><ul><li> foo</li>
3781 <li> bar</li></ul></dt></dl>
3782 <dl><dt> baz</dt></dl></dd></dl>
3817 Definition Lists: Mixed Lists: Test 2
3822 <ul><li><dl><dd> d1</dd>
3823 <dd> d2</dd></dl></li></ul>
3829 Definition Lists: Mixed Lists: Test 3
3834 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
3835 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
3841 Definition Lists: Mixed Lists: Test 4
3846 <ul><li><dl><dt>d1 </dt>
3849 <dd>d4</dd></dl></li></ul>
3855 Definition Lists: Mixed Lists: Test 5
3861 <dl><dd> d2</dd></dl></dd></dl></li></ul>
3867 Definition Lists: Mixed Lists: Test 6
3872 <ol><li><ul><li><dl><dd>d1
3873 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
3879 Definition Lists: Mixed Lists: Test 7
3884 <dl><dd><ul><li> d1</li>
3885 <li> d2</li></ul></dd></dl>
3891 Definition Lists: Mixed Lists: Test 8
3896 <dl><dd><ul><li> d1</li></ul>
3897 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
3903 Definition Lists: Mixed Lists: Test 9
3907 <ul><li><dl><dt>foo </dt>
3908 <dd>bar</dd></dl></li></ul>
3914 Definition Lists: Mixed Lists: Test 10
3918 <ul><li><ol><li><dl><dt>foo </dt>
3919 <dd>bar</dd></dl></li></ol></li></ul>
3923 # The Parsoid team disagrees with the PHP parser's seemingly-random
3924 # rules regarding dd/dt on the next two tests. Parsoid is more
3925 # consistent, and recognizes the shared nesting and keeps the
3926 # still-open tags around until the nesting is complete.
3927 # (And tidy again converts <dt> to <dd> before 'bar'.)
3930 Definition Lists: Mixed Lists: Test 11
3935 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
3936 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
3937 <dl><dt>boo </dt>
3938 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
3993 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3994 <dd data-parsoid='{"stx":"row"}'>bar</dd>
3998 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
3999 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4008 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4010 Definition Lists: Weird Ones: Test 1
4012 *#;*::;; foo : bar (who uses this?)
4014 <ul><li><ol><li><dl><dt> foo </dt>
4015 <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>
4034 <dt>bar (who uses this?)</dt>
4066 <dt> foo<span typeof="mw:Placeholder"> </span></dt>
4067 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4079 Definition Lists: colons occurring in tags
4097 <dt><span>a:b</span></dt>
4126 Definition Lists: colons and tables 1
4138 </td></tr></table></dd></dl>
4142 </td></tr></table></dd></dl>
4146 # Parsoid's output (as documented below) differs from php's in this case.
4147 # This is probably a bug. If we fixup parsoid to match php's output, the
4148 # above test should pass and the below test case can be removed. It is
4149 # unclear which output is more desirable.
4152 Definition Lists: colons and tables 2
4164 </td></tr></table></dd>
4168 </td></tr></table></dd></dl>
4172 Definition Lists: template interaction
4174 ::{{definition_list}}
4177 ::{{definition_list}}
4182 <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">
4183 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4185 <dl><dd data-parsoid='{}'>one
4186 <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">
4187 </span><dd about="#mwt2">two
4189 <dd>three</dd></dl></dd>
4190 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4198 External links: non-bracketed
4200 Non-bracketed: http://example.com
4202 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4206 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4208 External links: numbered
4210 Numbered: [http://example.com]
4211 Numbered: [http://example.net]
4212 Numbered: [http://example.com]
4214 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4215 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4216 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4219 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4220 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4221 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4225 External links: specified text
4227 Specified text: [http://example.com link]
4229 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4234 External links: trail
4236 Linktrails should not work for external links: [http://example.com link]s
4238 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4243 External links: dollar sign in URL
4245 http://example.com/1$2345
4247 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4251 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4253 External links: dollar sign in URL (autonumber)
4255 [http://example.com/1$2345]
4257 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4260 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4264 External links: open square bracket forbidden in URL (bug 4377)
4266 parsoid=wt2html,wt2wt,html2html
4268 http://example.com/1[2345
4270 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4273 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4277 External links: open square bracket forbidden in URL (named) (bug 4377)
4279 parsoid=wt2html,html2html
4281 [http://example.com/1[2345]
4283 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4286 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4289 # parsoid adds a space before the link name
4291 External links: open square bracket forbidden in URL (named) (bug 4377)
4294 [http://example.com/1 [2345]
4296 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4301 External links: nowiki in URL link text (bug 6230)
4303 [http://example.com/ <nowiki>''example site''</nowiki>]
4305 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4310 External links: newline forbidden in text (bug 6230 regression check)
4312 [http://example.com/ first
4315 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4321 External links: Pipe char between url and text
4323 [http://example.com | link]
4325 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4330 External links: protocol-relative URL in brackets
4332 [//example.com/ Test]
4334 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4338 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4340 External links: protocol-relative URL in brackets without text
4344 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4347 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4351 External links: protocol-relative URL in free text is left alone
4355 <p>//example.com/Foo
4360 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
4362 foo//example.com/Foo
4364 <p>foo//example.com/Foo
4369 External links: with no contents
4371 [http://en.wikipedia.org/wiki/Foo]
4373 [[wikipedia:Foo|Bar]]
4375 [[wikipedia:Foo|<span>Bar</span>]]
4377 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4378 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4379 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4382 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4383 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4384 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4388 External links: Free with trailing punctuation
4398 http://example.com/url_with_(brackets)
4399 (http://example.com/url_without_brackets)
4400 http://example.com/url_with_entity
4401 http://example.com/url_with_entity 
4402 http://example.com/url_with_entity 
4403 http://example.com/url_with_entity<
4404 http://example.com/url_with_entity<
4405 http://example.com/url_with_entity<
4407 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4408 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4409 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4410 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4411 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4412 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4413 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4414 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4415 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4416 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4417 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4418 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4419 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4420 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4421 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4422 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity%3C">http://example.com/url_with_entity%3C</a>
4425 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4426 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4427 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4428 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4429 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4430 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4431 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4432 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4433 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4434 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4435 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4436 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4437 <a rel="mw:ExtLink" href="http://example.com/url_with_entity ">http://example.com/url_with_entity </a>
4438 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity"><</span>
4439 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a>
4440 <a rel="mw:ExtLink" href="http://example.com/url_with_entity<">http://example.com/url_with_entity<</a></p>
4444 External links: No preceding word characters allowed (bug 65278)
4446 NOPEhttp://example.com
4447 N0http://example.com
4448 ok:http://example.com
4449 ok-http://example.com
4451 <p>NOPEhttp://example.com
4452 N0http://example.com
4453 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4454 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4461 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4463 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4468 External image from https
4470 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4472 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
4477 External image (when not allowed)
4479 wgAllowExternalImages=0
4481 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4483 <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>
4488 Link to non-http image, no img tag
4490 Link to non-http image, no img tag: ftp://example.com/test.jpg
4492 <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>
4497 External links: terminating separator
4499 Terminating separator: http://example.com/thing,
4501 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4506 External links: intervening separator
4508 Intervening separator: http://example.com/1,2,3
4510 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4515 External links: old bug with URL in query
4517 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4519 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4524 External links: old URL-in-URL bug, mixed protocols
4526 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4528 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4533 External links: URL in text
4535 URL in text: [http://example.com http://example.com]
4537 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4542 External links: Clickable images
4544 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4546 <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>
4549 <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>
4553 External links: raw ampersand
4555 Old & use: http://x&y
4557 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4562 External links: encoded ampersand
4564 Old & use: http://x&y
4566 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4569 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
4573 External links: encoded equals (bug 6102)
4575 http://example.com/?foo=bar
4577 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4580 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4584 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4585 ## does it number them. As discussed in bug 53505, we can identify
4586 ## autonumbered links via CSS.
4590 External links: [raw ampersand]
4592 Old & use: [http://x&y]
4594 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4597 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4600 # note that parsoid html is identical to [raw ampersand] case; so html2wt
4601 # mode will return the [raw ampersand] wikitext
4603 External links: [encoded ampersand]
4605 parsoid=wt2html,wt2wt,html2html
4607 Old & use: [http://x&y]
4609 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
4612 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
4616 External links: [raw equals]
4618 [http://example.com/?foo=bar]
4620 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4623 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4626 # note that parsoid html is identical to [raw equals] case; so html2wt
4627 # mode will return the [raw equals] wikitext
4629 External links: [encoded equals] (bug 6102)
4631 parsoid=wt2html,wt2wt,html2html
4633 [http://example.com/?foo=bar]
4635 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
4638 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
4641 # xxx parsoid strips the IDN character, so the round-trip tests will
4642 # obviously fail and are disabled. --cscott
4644 External links: [IDN ignored character reference in hostname; strip it right off]
4646 parsoid=wt2html,wt2wt,html2html
4648 [http://e‌xample.com/]
4650 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
4653 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
4656 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
4657 # Where an external link could easily circumvent the sanitization of the text of
4658 # a link like this (where an IDN-ignore character is in the URL somewhere), this
4659 # test demands a higher standard. That's a bit strange.
4663 # http://example.com -> [http://example.com|http://example.com]
4664 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
4666 # The first example is sanitized, but the second is not. Any security benefits
4667 # from this production are trivial to circumvent. Either remove this test and
4668 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
4669 # the test accordingly.
4673 # xxx parsoid strips the IDN character, so the round-trip tests will
4674 # obviously fail and are disabled. --cscott
4676 External links: IDN ignored character reference in hostname; strip it right off
4678 parsoid=wt2html,html2html
4680 http://e‌xample.com/
4682 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
4685 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
4689 External links: www.jpeg.org (bug 554)
4693 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
4697 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
4699 External links: URL within URL (original bug 2)
4701 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
4703 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
4706 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
4710 BUG 361: URL inside bracketed URL
4712 [http://www.example.com/foo http://www.example.com/bar]
4714 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
4719 BUG 361: URL within URL, not bracketed
4721 http://www.example.com/foo?=http://www.example.com/bar
4723 <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>
4728 BUG 289: ">"-token in URL-tail
4730 http://www.example.com/<hello>
4732 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
4737 BUG 289: literal ">"-token in URL-tail
4739 http://www.example.com/<b>html</b>
4741 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
4744 <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>
4748 BUG 289: ">"-token in bracketed URL
4750 [http://www.example.com/<hello> stuff]
4752 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
4757 BUG 289: literal ">"-token in bracketed URL
4759 [http://www.example.com/<b>html</b> stuff]
4761 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
4766 BUG 289: literal double quote at end of URL
4768 http://www.example.com/"hello"
4770 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
4775 BUG 289: literal double quote in bracketed URL
4777 [http://www.example.com/"hello" stuff]
4779 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
4784 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
4786 [http://www.example.com test]
4788 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
4793 External links: link text with spaces
4795 [http://www.example.com a b c]
4796 [http://www.example.com ''a'' ''b'']
4798 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
4799 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
4804 External links: wiki links within external link (Bug 3695)
4806 [http://example.com [[wikilink]] embedded in ext link]
4808 <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>
4811 <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>
4815 BUG 787: Links with one slash after the url protocol are invalid
4819 [http:/example.com title]
4821 <p>http:/example.com
4822 </p><p>[http:/example.com title]
4827 Bracketed external links with template-generated invalid target
4829 [{{echo|http:/example.com}} title]
4831 <p>[http:/example.com title]
4836 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
4838 ''[http://example.com text'']
4839 [http://example.com '''text]'''
4840 ''Something [http://example.com in italic'']
4841 ''Something [http://example.com mixed''''', even bold]'''
4842 '''''Now [http://example.com both''''']
4844 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
4845 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
4846 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
4847 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
4848 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
4854 Bug 4781: %26 in URL
4856 http://www.example.com/?title=AT%26T
4858 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
4861 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
4864 # According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
4865 # % is actually legal in HTML5. Any change in output would need testing though.
4867 Bug 4781, 5267: %25 in URL
4869 http://www.example.com/?title=100%25_Bran
4871 <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>
4874 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
4878 Bug 4781, 5267: %28, %29 in URL
4880 http://www.example.com/?title=Ben-Hur_%281959_film%29
4882 <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>
4885 <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>
4890 Bug 4781: %26 in autonumber URL
4892 [http://www.example.com/?title=AT%26T]
4894 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
4897 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
4901 Bug 4781, 5267: %26 in autonumber URL
4903 [http://www.example.com/?title=100%25_Bran]
4905 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
4908 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
4912 Bug 4781, 5267: %28, %29 in autonumber URL
4914 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
4916 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
4919 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
4924 Bug 4781: %26 in bracketed URL
4926 [http://www.example.com/?title=AT%26T link]
4928 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
4931 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
4935 Bug 4781, 5267: %25 in bracketed URL
4937 [http://www.example.com/?title=100%25_Bran link]
4939 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
4944 Bug 4781, 5267: %28, %29 in bracketed URL
4946 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
4948 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
4951 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
4955 External link containing a period in the anchor. (bug 63947)
4957 [//foo.org/bar#baz. bang]
4959 [//foo.org/bar. bang]
4961 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4962 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4965 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4966 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
4970 External link containing a single quote. (bug 63947)
4974 [//foo.org/bar'baz bang]
4976 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
4977 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
4980 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
4981 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
4986 External link containing a period in the anchor. (bug 63947)
4988 [//foo.org/bar#baz. bang]
4990 [//foo.org/bar. bang]
4992 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
4993 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
4996 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
4997 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5001 External link containing a single quote. (bug 63947)
5005 [//foo.org/bar'baz bang]
5007 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5008 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5011 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5012 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5017 External link containing double-single-quotes in text '' (bug 4598 sanity check)
5019 Some [http://example.com/ pretty ''italics'' and stuff]!
5021 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5026 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
5028 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5030 <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>
5035 External link containing double-single-quotes with no space separating the url from text in italics
5037 [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]].]
5039 <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>
5042 <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>
5044 <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>
5048 External link with comments in link text
5050 [http://www.google.com Google <!-- comment -->]
5052 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5057 URL-encoding in URL functions (single parameter)
5059 {{localurl:Some page|amp=&}}
5061 <p>/index.php?title=Some_page&amp=&
5066 URL-encoding in URL functions (multiple parameters)
5068 {{localurl:Some page|q=?&=&}}
5070 <p>/index.php?title=Some_page&q=?&amp=&
5077 http://example.com/index.php?foozoid%5B%5D=bar
5079 http://example.com/index.php?foozoid[]=bar
5081 <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>
5082 </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>
5085 <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>
5087 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid[]=bar">http://example.com/index.php?foozoid[]=bar</a></p>
5091 IPv6 urls (bug 21261)
5095 http://[2404:130:0:1000::187:2]/index.php
5097 <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>
5102 Non-extlinks in brackets
5111 [{{echo|foo}} ''bar'']
5112 [{{echo|foo}}l's] errand
5113 [{{echo|foo}}l's errand]
5115 [url=http://example.com]
5128 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5133 Percent encoding in external links
5135 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5137 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5140 <p><a rel="mw:ExtLink"
5141 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5145 Use url link syntax for links where the content is equal the link target
5149 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5152 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5156 Parenthesis in external links, especially URL links
5160 http://example.com/test)
5162 http://example.com/(test)
5164 http://example.com/((test)
5166 (http://example.com/(test))
5168 (http://example.com/(test)))))
5170 http://example.com/a)b
5172 [http://example.com) foo]
5174 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5175 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5176 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5177 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5178 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5179 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5180 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5181 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5184 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5185 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5186 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5187 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5188 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5189 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5190 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5191 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5195 Parenthesis in external links, w/ transclusion or comment
5197 (http://example.com/{{echo|hi}})
5199 (http://example.com<!-- hi -->)
5201 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5202 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5205 <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>
5207 <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>
5211 Replace invalid link targets when serializing
5215 <a rel="mw:WikiLink" href="./]] foo [[bar">Manual</a>
5217 [[MediaWiki:Badtitletext|Manual]]
5227 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5229 Normal text. '''''Bold italic text.''''' Normal text.
5231 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5232 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5237 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5238 # parser strips. The wikitext contains just the first half of the bold
5241 Unclosed and unmatched quotes
5243 '''''Bold italic text '''with bold deactivated''' in between.'''''
5245 '''''Bold italic text ''with italic deactivated'' in between.'''''
5249 ..spanning two paragraphs (should not work).'''
5251 '''Bold tag left open
5253 ''Italic tag left open
5257 <!-- Unmatching number of opening, closing tags: -->
5258 '''This year''''s election ''should'' beat '''last year''''s.
5260 ''Tom'''s car is bigger than ''Susan'''s.
5262 Plain ''italic'''s plain
5264 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5265 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5266 </p><p><b>Bold text..</b>
5267 </p><p>..spanning two paragraphs (should not work).
5268 </p><p><b>Bold tag left open</b>
5269 </p><p><i>Italic tag left open</i>
5271 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5272 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5273 </p><p>Plain <i>italic'</i>s plain
5276 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5277 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5278 </p><p><b>Bold text..</b>
5279 </p><p>..spanning two paragraphs (should not work).<b></b>
5280 </p><p><b>Bold tag left open</b>
5281 </p><p><i>Italic tag left open</i>
5283 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5284 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5285 </p><p>Plain <i>italic'</i>s plain
5292 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5295 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5296 # is the bare minimum required by the spec, see:
5297 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5298 # Parsoid team replies: empty table tags are legal in HTML5
5300 A table with no data.
5313 A table with stray table end tags on start tag line (wt2html)
5317 {|style="color: red;"|}
5319 {|style="color: red;" |}
5323 {|style="color: red;"|} id="foo"
5327 {|style="color: red;" |} id="foo"
5331 <table style="color: red;"></table>
5333 <table style="color: red;">
5339 <table style="color: red;" id="foo">
5345 <table style="color: red;" id="foo">
5354 A table with no data (take 2)
5362 # A table with nothing but a caption is invalid XHTML, we might want to render
5363 # this as <p>caption</p>
5364 # Parsoid team replies: table with only a caption is legal in HTML5
5366 A table with nothing but a caption
5374 </caption><tr><td></td></tr></table>
5377 <table><caption> caption</caption></table>
5381 A table with caption with default-spaced attributes and a table row
5384 |+ style="color: red;" | caption1
5390 <caption style="color: red;"> caption1
5399 A table with captions with non-default spaced attributes and a table row
5402 |+style="color: red;"|caption2
5403 |+ style="color: red;"| caption3
5409 <caption style="color: red;">caption2
5411 <caption style="color: red;"> caption3
5420 Table td-cell syntax variations
5424 | foo bar foo || baz
5425 | style='color:red;' | baz
5426 | style='color:red;' || baz
5433 <td> foo bar foo </td>
5436 <td style="color:red;"> baz
5438 <td> style='color:red;' </td>
5466 Simple table but with multiple dashes for row wikitext
5484 Multiplication table
5486 {| border="1" cellpadding="2"
5487 |+Multiplication table
5489 ! × !! 1 !! 2 !! 3
5507 <table border="1" cellpadding="2">
5508 <caption>Multiplication table
5555 Accept "||" in table headings
5570 Accept "!!" in table data
5584 <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>
5589 Accept "||" in indented table headings
5599 </th></tr></table></dd></dl>
5604 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
5621 Accept "| !" at start of line in tables (ignore !-attribute)
5625 | !style="color:red" | bar
5637 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 +/-
5641 |style='color:red;'|+1
5642 |style='color:blue;'|-1
5654 <td style="color:red;">+1
5656 <td style="color:blue;">-1
5680 |rowspan=2| Cell 2, row 1 (and 2)
5691 <td rowspan="2"> Cell 2, row 1 (and 2)
5709 {| bgcolor=#ABCDEF border=2
5714 |the original table again
5722 <table bgcolor="#ABCDEF" border="2">
5730 <td>the original table again
5736 Invalid attributes in table cell (bug 1830)
5749 # The "|}" to close the table is missing from the input, so parsoid's
5750 # *2wt modes will fail.
5752 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
5754 parsoid=wt2html,html2html
5757 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
5761 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
5762 <td>]" onmouseover="alert(document.cookie)">test
5770 <td><a rel="mw:ExtLink" href="ftp://|x||"></a>" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
5773 # FIXME: The php output is broken.
5775 ! and || in td attributes should not be parsed as <th>/<td>
5778 | style="color: red !important;" data-contrived="put this here ||" | foo
5783 <td> style="color: red !important;" data-contrived="put this here </td>
5789 <tbody><tr><td style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"autoInsertedEnd":true}'> foo</td></tr>
5794 Indented table markup mixed with indented pre content (proposed in bug 6200)
5799 Text that should be rendered preformatted
5807 <pre>Text that should be rendered preformatted
5816 1. Template-generated table cell attributes and cell content
5821 || {{table_attribs_5}}
5822 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
5823 |align=center {{table_attribs}}
5824 | <!--foo--> align=center <!--bar--> {{table_attribs}}
5829 <td style="color:red;">Foo
5831 <td style="color:red;">Foo
5833 <td> style="color:red;"</td>
5836 <td style="color:red;">Foo
5838 <td align="center" style="color:red;">Foo
5840 <td align="center" style="color:red;">Foo
5846 2. Template-generated table cell attributes and cell content
5849 |{{table_attribs_2}}
5854 <td style="color:red;">Foo
5862 <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>
5863 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
5868 3. Template-generated table cell attributes and cell content
5871 !align=center {{table_header_cells}}
5873 |align=center {{table_cells}}
5878 <th align="center" style="color:red;">Foo</th>
5879 <th style="color:red;"><i>Bar</i></th>
5880 <th style="color:brown;"><i>Foo</i> and Baz
5883 <td align="center" style="color:red;">Foo</td>
5884 <td style="color:red;"><i>Bar</i></td>
5885 <td style="color:brown;"><i>Foo</i> and Baz
5890 <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>
5891 <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>
5896 Table with row followed by newlines and table heading
5914 Table with empty line following the start tag
5931 # FIXME: Preserve the attribute properly (with an empty string as value) in
5932 # the PHP parser. Parsoid implements the behavior below.
5934 Table attributes with empty value
5944 </td></tr></tbody></table>
5949 Wikitext table with a lot of comments
5972 Wikitext table comments represented in parsoid dom
5974 {|<!--c1--><!--c2-->
5985 <table><!--c1--><!--c2-->
5986 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
5987 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
5992 Wikitext table with double-line table cell
6009 Table cell with a single comment
6026 Table-cell after a comment-only-empty-line
6043 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6045 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6051 Build table with {{!}}
6053 {{{!}} class="wikitable"
6056 {{!}}- style="color:red;"
6057 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6060 <table class="wikitable">
6066 <tr style="color:red;">
6068 <td style="color:red;"> second data
6074 Build table with pipe as data
6076 {| class="wikitable"
6079 |- style="color:red;"
6080 | data || style="color:red;" | second data
6082 | style="color:red;" | data with | || style="color:red;" | second data with |
6084 || data with | ||| second data with |
6087 <table class="wikitable">
6093 <tr style="color:red;">
6095 <td style="color:red;"> second data
6098 <td style="color:red;"> data with | </td>
6099 <td style="color:red;"> second data with |
6102 <td> data with | </td>
6103 <td> second data with |
6109 Build table with wikilink
6111 {| class="wikitable"
6112 ! header || second header
6113 |- style="color:red;"
6114 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6116 | data || second data [[Main Page|link|text with pipe]]
6119 <table class="wikitable">
6124 <tr style="color:red;">
6125 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6126 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6130 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6135 # The expected HTML structure in this test is debatable. The PHP parser does
6136 # not parse this kind of table at all. The main focus for Parsoid is on
6137 # round-tripping, so this output is ok for now. TODO: revisit!
6139 Wikitext table with html-syntax row
6149 <td>foo</td></tr></tbody></table>
6152 ## Note that Parsoid output differs from PHP and PHP+tidy here.
6153 ## The lack of <tr> tags in the PHP output is arguably a bug in the
6154 ## PHP parser, which tidy then compounds by fostering the content
6155 ## entirely out of the table. Parsoid recognizes the table context
6156 ## and generates <tr> and <td> wrappers as needed. Hopefully nobody
6157 ## depends on PHP's treatment of broken table markup!
6159 Implicit <td> after a |-
6161 parsoid=wt2html,html2html
6181 # Again, Parsoid adds implicit <td>s here, PHP and Tidy strip the b out.
6183 <pre> tags should be recognized in an explicit <td> context, but not in an implicit <td> context
6185 parsoid=wt2html,html2html
6218 <tr><td><pre>a</pre></td></tr>
6219 <tr><td> b</td></tr>
6224 # PHP + Tidy strips the list out of the table; Parsoid wraps it.
6225 # Parsoid generates the missing <td>, so wt2wt won't succeed.
6227 Lists should be recognized in an implicit <td> context
6229 parsoid=wt2html,html2html
6256 Table cells not properly parsed in an implicit-td context
6260 {{table_attribs_4}} || a || b
6265 <td style="background-color:#DC241f;" width="10px"></td>
6272 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
6273 <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>
6278 Parsoid: Round-trip tables directly followed by content (bug 51219)
6280 parsoid=wt2html,wt2wt
6305 Parsoid: Default to a newline after tables in new content (bug 51219)
6310 <tr><td>foo</td></tr></tbody></table> bar
6312 <tr><td>baz</td></tr></tbody></table><b>quux</b>
6317 <nowiki> </nowiki>bar
6325 Parsoid: newline inducing block nodes don't suppress <nowiki>
6337 Parsoid: Row-syntax table headings followed by comment & table cells
6339 parsoid=wt2html,wt2wt
6343 <!-- foo --> || baz || quux
6357 <tbody><tr><th> foo </th><th> bar
6358 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
6363 # PHP throws away the (semi-broken) "foo" class here; Parsoid
6366 Parsoid: Recover better from broken table attributes
6386 <p>foo</p></td></tr>
6391 Strip unsupported table tags
6439 Testing serialization after deletion of table cells
6442 "modes": ["wt2wt", "selser"],
6450 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
6463 Plain link, capitalized
6467 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6472 Plain link, uncapitalized
6476 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
6483 [[Main Page|The Main Page]]
6485 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6490 Piped link with comment in link text
6492 [[Main Page|The Main<!--front--> Page]]
6494 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
6499 Piped link with multiple pipe characters in link text
6501 [[Main Page||The|Main|Page|]]
6503 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
6506 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
6514 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
6519 Broken link with fragment
6521 [[Zigzagzogzagzig#zug]]
6523 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
6528 Special page link with fragment
6530 [[Special:Version#anchor]]
6532 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
6537 Nonexistent special page link with fragment
6539 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
6541 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
6548 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
6550 <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>
6557 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
6559 <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>!!!
6570 Bug 43661: Piped links with identical prefixes
6572 [[prefixed article|prefixed articles with spaces]]
6574 [[prefixed article|prefixed articlesaoeu]]
6576 [[Main Page|Main Page test]]
6578 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
6579 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
6580 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
6586 Link with HTML entity in suffix / tail
6588 [[Main Page]]", [[Main Page]]a
6590 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
6593 <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>
6597 Link with 3 brackets
6606 Link with 4 brackets
6610 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
6615 Piped link with 3 brackets
6617 [[[main page|the main page]]]
6619 <p>[[[main page|the main page]]]
6624 Piped link with extlink-like text
6627 [[Main Page|This is a [bar]]]
6629 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
6630 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
6633 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
6634 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
6638 Link with multiple pipes
6640 [[Main Page|The|Main|Page]]
6642 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
6646 # Note that parsoid does not munge anchor text; all non-space
6647 # characters are valid in HTML5 ids.
6649 Anchor containing a #. (bug 63430)
6651 [[Main Page#And#Link]]
6653 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
6656 <p><a rel="mw:WikiLink" href="./Main_Page#And%23Link" title="Main Page">Main Page#And#Link</a></p>
6662 [[Talk:Parser testing]], [[Meta:Disclaimers]]
6664 <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>
6669 Link with space in namespace
6671 [[User talk:Foo bar]]
6673 <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>
6678 MemoryAlpha:AlphaTest
6680 This is an article in the MemoryAlpha namespace
6681 (which shadows the memoryalpha interwiki link).
6685 Namespace takes precedence over interwiki link (bug 51680)
6687 [[MemoryAlpha:AlphaTest]]
6689 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
6693 # The previous test doesn't work correctly in html2*, due to not recognizing the
6694 # link as an internal one. This one checks for the correct behavior.
6696 Link to namespace preferred over interwiki with correct rel attribute
6698 parsoid=html2wt,html2html
6700 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
6702 [[MemoryAlpha:AlphaTest]]
6706 Piped link to namespace
6708 [[Meta:Disclaimers|The disclaimers]]
6710 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
6717 [[Usually caused by a typo (oops}]]
6719 <p>[[Usually caused by a typo (oops}]]
6726 Just a test of an article title containing a percent.
6730 Link containing % (not as a hex sequence)
6734 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6737 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6740 # note that the parsoid HTML is identical to the previous test output,
6741 # so the previous test ensures that the html2wt mode will generate the
6742 # "not as a hex sequence" wikitext.
6744 Link containing % as a single hex sequence interpreted to char
6746 parsoid=wt2wt,wt2html,html2html
6750 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
6753 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a></p>
6757 Link containing % as a double hex sequence interpreted to hex sequence
6761 <p>[[7%2525 Solution]]
6765 # note that parsoid does not munge anchor text; all non-space
6766 # characters are valid in HTML5 anchors.
6768 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
6769 Example for such a section: == < ==
6771 [[%23%3c]][[%23%3e]]
6773 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
6776 <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>
6780 Link containing "<#" and ">#" as a hex sequences
6782 [[%3c%23]][[%3e%23]]
6784 <p>[[%3c%23]][[%3e%23]]
6789 Link containing an equals sign
6791 [[Special:BookSources/isbn=4-00-026157-6]]
6793 <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>
6796 <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>
6802 Just a test of an article title containing a tilde.
6805 # note that links containing signatures, like [[Foo~~~~]], are
6806 # massaged by the pre-save transform (PST) and so the tildes are never
6807 # seen by the parser.
6809 Link containing a tilde
6813 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
6816 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
6820 Link containing double-single-quotes '' (bug 4598)
6822 [[Lista d''e paise d''o munno]]
6824 <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>
6827 <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>
6831 Link containing double-single-quotes '' in text (bug 4598 sanity check)
6833 Some [[Link|pretty ''italics'' and stuff]]!
6835 <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>!
6838 <p>Some <a rel="mw:WikiLink" href="Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
6842 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
6844 ''Some [[Link|pretty ''italics'' and stuff]]!''
6846 <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>
6851 Link with double quotes in title part (literal) and alternate part (interpreted)
6853 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
6857 [[''Pentecoste''|Pentecoste]]
6859 [[''Pentecoste''|''Pentecoste'']]
6861 <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>
6862 </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>
6863 </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>
6864 </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>
6867 <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>
6868 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
6869 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
6870 <p><a rel="mw:WikiLink" href="''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
6874 Broken image links with HTML captions (bug 39700)
6876 [[File:Nonexistent|<script></script>]]
6877 [[File:Nonexistent|100x100px|<script></script>]]
6878 [[File:Nonexistent|<]]
6879 [[File:Nonexistent|a<i>b</i>c]]
6881 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6882 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
6883 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
6884 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
6887 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<script></script>"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
6888 <span typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"<script></script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100"/></a></span>
6889 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"&lt;"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span>
6890 <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>b</i>c"}'><a href="./File:Nonexistent"><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220"/></a></span></p>
6896 [[http://www.example.com]]
6898 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
6901 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
6905 Plain link to URL with link text
6907 [[http://www.example.com Link text]]
6909 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
6914 Plain link to protocol-relative URL
6916 [[//www.example.com]]
6918 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
6921 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
6925 Plain link to protocol-relative URL with link text
6927 [[//www.example.com Link text]]
6929 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
6934 Plain link to page with question mark in title
6940 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
6941 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
6946 # I'm fairly sure the expected result here is wrong.
6947 # We want these to be URL links, not pseudo-pages with URLs for titles....
6948 # However the current output is also pretty screwy.
6951 # I'm changing it to match the current output--it arguably makes more
6952 # sense in the light of the test above. Old expected result was:
6953 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
6955 # But I think this test is bordering on "garbage in, garbage out" anyway.
6960 Piped link to URL: [[http://www.example.com|an example URL]]
6962 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
6965 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com|an">example URL</a>]</p>
6969 BUG 2: [[page|http://url/]] should link to page, not http://url/
6971 [[Main Page|http://url/]]
6973 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
6976 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
6979 # Parsoid does not mark self-links, by design.
6981 BUG 337: Escaped self-links should be bold
6985 [[Bug462]] [[Bug462]]
6987 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
6990 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong></p>
6992 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
6996 Self-link to section should not be bold
7000 [[Main Page#section]]
7002 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
7013 Self-link to numeric title
7019 <p><strong class="selflink">0</strong>
7024 Link to numeric-equivalent title
7030 <p><a href="/wiki/00" title="00">00</a>
7035 <nowiki> inside a link
7037 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
7039 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
7044 Non-breaking spaces in title
7046 [[ Main Page ]]
7048 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
7053 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
7059 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
7064 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
7070 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
7075 Internal link with en linktrail: no apostrophes (bug 27473)
7081 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
7086 Internal link with ca linktrail with apostrophes (bug 27473)
7092 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
7097 Internal link with kaa linktrail with apostrophes (bug 27473)
7103 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
7108 Link with multiple ":" in a subpage-supporting namespace (bug 63636)
7110 [[User:Foo/Test/63636:Bar|Test]]
7112 <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>
7115 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
7119 Purely hash wikilink
7121 title=[[User:test/123]]
7125 <p><a href="#a">b</a>
7128 <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>
7132 1. Interaction of linktrail and template encapsulation
7138 <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>
7142 2. Interaction of linktrail and template encapsulation
7146 {{echo|Some [[Fool]]}}s
7148 <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>
7152 3. Interaction of linktrail and template encapsulation
7156 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
7158 <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>
7168 Internal link with is link prefix
7172 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
7174 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
7185 Internal link with is link trail and link prefix
7189 [[mótmælendatrú|xxx]]ar
7191 mótmælenda[[söfnuður]]
7192 mótmælenda[[söfnuður|söfnuðir]]
7193 mótmælenda[[söfnuður|söfnuðir]]xxx
7195 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
7196 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
7197 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
7198 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
7199 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
7204 Parsoid link trail escaping
7206 parsoid=html2wt,html2html
7208 <p><a rel="mw:WikiLink" href="Apple" title="Apple">apple</a>s</p>
7214 Parsoid link prefix escaping
7217 parsoid=html2wt,html2html
7219 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður">söfnuður</a></p>
7221 Aðrir mótmælenda<nowiki/>[[söfnuður]]
7225 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
7233 [http://wp.org ''foo'']
7235 <p><a href="/wiki/Foo" title="Foo"> bar</a>
7236 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
7237 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
7238 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
7243 Parsoid: Scoped parsing should handle mixed transclusions and plain text
7247 [[Foo|{{echo|a}} b {{echo|c}}]]
7249 <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>
7253 Link with angle bracket after anchor
7257 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
7260 <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>
7264 ### Interwiki links (see maintenance/interwiki.sql)
7268 Inline interwiki link
7270 parsoid=wt2html,wt2wt,html2html
7272 [[MeatBall:SoftSecurity]]
7274 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
7277 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
7281 Inline interwiki link with empty title (bug 2372)
7283 parsoid=wt2html,wt2wt,html2html
7287 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
7290 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
7294 Interwiki link encoding conversion (bug 1636)
7296 *[[Wikipedia:ro:Olteniţa]]
7297 *[[Wikipedia:ro:Olteniţa]]
7299 <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>
7300 <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>
7304 <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>
7305 <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>
7310 Interwiki link with fragment (bug 2130)
7312 [[MeatBall:SoftSecurity#foo]]
7314 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
7318 # Ideally the wikipedia: prefix here should be proto-relative too
7319 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
7320 # define the 'en' prefix, and originally the test used 'wikipedia',
7321 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
7324 Different interwiki prefixes mapping to the same URL
7332 [[:wikipedia:Foo|Foo]]
7334 [[wikipedia:en:Foo]]
7336 [[:wikipedia:en:Foo]]
7340 <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>
7342 <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>
7344 <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>
7346 <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>
7348 <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>
7350 <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>
7352 <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>
7356 Interwiki links that cannot be represented in wiki syntax
7359 [[meatball:ok#foo|ok with fragment]]
7360 [[meatball:ok_as_well?|ok ending with ? mark]]
7361 [http://de.wikipedia.org/wiki/Foo?action=history has query]
7362 [http://de.wikipedia.org/wiki/#foo is just fragment]
7365 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
7366 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
7367 <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>
7368 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7369 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
7372 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
7373 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
7374 <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>
7375 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
7376 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
7380 Interwiki links: trail
7382 [[wikipedia:Foo|Ba]]r
7384 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
7387 <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>
7391 Local interwiki link
7393 parsoid=wt2html,wt2wt,html2html
7395 [[local:Template:Foo]]
7397 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
7400 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
7403 # Parsoid does not mark self-links, by design.
7405 Local interwiki link: self-link to current page
7408 parsoid=wt2html,wt2wt,html2html
7412 <p><strong class="selflink">local:Main Page</strong>
7415 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
7419 Local interwiki link: prefix only (bug 64167)
7421 parsoid=wt2html,wt2wt,html2html
7425 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
7428 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
7432 Local interwiki link: with additional interwiki prefix (bug 61357)
7434 parsoid=wt2html,wt2wt,html2html
7436 [[local:meatball:Hello]]
7438 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
7441 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
7445 Multiple local interwiki link prefixes
7447 [[local:local:local:local:mi:local:Foo]]
7449 parsoid=wt2html,wt2wt,html2html
7451 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
7454 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
7458 ### Interlanguage links
7459 ### Language links (so that searching for '### language' matches..)
7465 parsoid=wt2html,wt2wt,html2html
7473 <p>Blah blah blah</p>
7474 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7478 Interlanguage link with spacing
7480 parsoid=wt2html,wt2wt,html2html
7488 <p>Blah blah blah</p>
7489 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7493 Double interlanguage link
7495 parsoid=wt2html,wt2wt,html2html
7504 <p>Blah blah blah</p>
7505 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7506 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7510 Interlanguage link variations
7512 parsoid=wt2html,wt2wt,html2html
7523 <p>Blah blah blah</p>
7524 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
7525 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
7526 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7527 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
7531 Interlanguage link, with prefix links
7541 <p>Blah blah blah</p>
7542 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7546 Double interlanguage link, with prefix links (bug 8897)
7557 <p>Blah blah blah</p>
7558 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
7559 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
7563 "Extra" interlanguage links (bug 32189 / gerrit 111390)
7571 <p>Blah blah blah</p>
7572 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
7576 Parsoid-specific test: Wikilinks with should RT properly
7582 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
7587 Parsoid bug 53221: Wikilinks should be properly entity-escaped
7591 <p>He&nbsp;llo <a href="Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7592 <p>He&nbsp;llo <a href="He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
7594 He&nbsp;llo [[Foo|He&nbsp;llo]]
7596 He&nbsp;llo [[He&nbsp;llo]]
7600 Parsoid: handle constructor well
7606 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
7607 </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>
7610 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid="{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}">constructor</a></p>
7612 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid="{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"constructor:foo"}}">constructor:foo</a></p>
7621 # Note that `ko` isn't a known interlanguage prefix
7623 Parsoid: recognize interlanguage links without a target page
7633 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
7635 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7638 # Note that `ko` isn't a known interwiki prefix
7640 Parsoid: recognize interwiki links without a target page
7642 parsoid=wt2html,wt2wt,html2html
7648 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
7649 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
7652 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
7653 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
7657 Handle interwiki links pointing to the current wiki as plain wiki links (bug 45209)
7661 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
7664 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
7668 Interlanguage link with preceding local interwiki link (bug 68085)
7670 parsoid=wt2html,wt2wt,html2html
7673 [[local:es:Spanish]]
7676 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
7680 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
7684 Looks like an interlanguage link, but is actually a local interwiki
7686 parsoid=wt2html,wt2wt,html2html
7692 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
7696 <a rel="mw:WikiLink" href="Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
7700 ### Redirects, Parsoid-only
7704 1. Simple redirect to page
7708 #REDIRECT [[Main Page]]
7710 <link rel="mw:PageProp/redirect" href="./Main_Page">
7714 2. Other redirect variants
7716 #REDIRECT [[Main_Page]]
7718 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
7722 3. Other redirect variants
7724 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
7726 <link rel="mw:PageProp/redirect" href="./%5B%5BBar%5D%5D" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./%5B%5BBar%5D%5D"},"sa":{"href":"<nowiki>[[Bar]]</nowiki>"}}'/>
7732 parsoid=wt2html,wt2wt
7737 <li>REDIRECT [[]]</li></ol>
7741 Optional colon in #REDIRECT
7743 # the colon is archaic syntax. we support it for wt2html, but we
7744 # don't care that it roundtrips back to the modern syntax.
7745 parsoid=wt2html,html2html
7747 #REDIRECT:[[Main Page]]
7749 <link rel="mw:PageProp/redirect" href="./Main_Page">
7753 Whitespace in #REDIRECT with optional colon
7755 # the colon and gratuitous whitespace is archaic syntax. we support
7756 # it for wt2html, but we don't care that it roundtrips back to the
7757 # modern syntax (without extra whitespace)
7758 parsoid=wt2html,html2html
7765 <link rel="mw:PageProp/redirect" href="./Main_Page">
7769 Piped link in #REDIRECT
7771 # content after piped link is ignored. we support this syntax,
7772 # but don't care that the piped link is lost when we roundtrip this.
7775 #REDIRECT [[Main Page|bar]]
7777 <link rel="mw:PageProp/redirect" href="./Main_Page">
7781 Redirect to category
7783 parsoid=wt2wt,wt2html
7785 #REDIRECT [[Category:Foo]]
7787 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7791 Redirect to category with URL encoding
7795 #REDIRECT [[Category%3AFoo]]
7797 <link rel="mw:PageProp/redirect" href="./Category:Foo"><link rel="mw:PageProp/Category" href="./Category:Foo">
7801 Redirect to category page
7805 #REDIRECT [[:Category:Foo]]
7807 <link rel="mw:PageProp/redirect" href="Category:Foo" title="Category:Foo"/>
7811 Redirect to image page (1)
7815 #REDIRECT [[File:Wiki.png]]
7817 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7821 Redirect to image page (2)
7825 #REDIRECT [[Image:Wiki.png]]
7827 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7831 Redirect to language
7835 #REDIRECT [[en:File:Wiki.png]]
7837 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7841 Redirect to interwiki
7845 #REDIRECT [[meatball:File:Wiki.png]]
7847 <link rel="mw:PageProp/redirect" href="./File:Wiki.png">
7851 Non-English #REDIRECT
7856 #TILVÍSUN [[Main Page]]
7858 <link rel="mw:PageProp/redirect" href="./Main_Page">
7862 Redirect syntax under text isn't considered a redirect
7865 #redirect [[Main Page]]
7868 <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>
7871 # FIXME: Should hoist the redirect to the top of the page and ensure there
7878 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"></p>
7898 Broken br tag sanitization
7906 # TODO: Fix html2html mode (bug 51055)!
7908 Parsoid: Broken br tag recognition
7921 Incorrecly removing closing slashes from correctly formed XHTML
7923 <br style="clear:both;" />
7925 <p><br style="clear:both;" />
7930 Failing to transform badly formed HTML into correct XHTML
7932 <br style="clear: left;">
7933 <br style="clear: right;">
7934 <br style="clear: both;">
7936 <p><br style="clear: left;" />
7937 <br style="clear: right;" />
7938 <br style="clear: both;" />
7942 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
7943 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
7945 Handling html with a div self-closing tag
7954 <p><div title />
7958 <p><div title=bar />
7959 <div title=bar/>
7961 <div title="bar/"></div>
7965 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7966 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
7967 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
7968 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7969 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
7970 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
7974 Handling html with a br self-closing tag
7983 <p><br title="title" />
7984 <br title="title" />
8001 Horizontal ruler (should it add that extra space?)
8016 Horizontal ruler -- 4+ dashes render hr
8025 Horizontal ruler -- eats additional dashes on the same line
8034 Horizontal ruler -- does not collapse dashes on consecutive lines
8045 Horizontal ruler -- <4 dashes render as plain text
8054 Horizontal ruler -- Supports content following dashes on same line
8066 ### Block-level elements
8075 <ul><li>Common list</li>
8077 <li>item 3</li></ul>
8088 <ol><li>Numbered list</li>
8090 <li> item 3</li></ol>
8104 ***#Number on level 4
8106 **#Number on level 3
8107 **#Number on level 3
8111 #** Level 3, but ordered
8114 <ol><li> with numbers</li></ol>
8115 <ul><li> and bullets</li></ul>
8116 <ol><li> and numbers</li></ol></li>
8118 <ul><li>bullet level 2
8119 <ul><li>bullet level 3
8120 <ol><li>Number on level 4</li></ol></li></ul></li>
8122 <ol><li>Number on level 3</li>
8123 <li>Number on level 3</li></ol></li></ul>
8124 <ol><li>number level 2</li></ol></li>
8126 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
8127 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
8138 <ul><li>bar</li></ul></li></ul>
8148 <ul><li><ul><li>foo</li></ul></li>
8154 Nested lists 3 (first element empty)
8160 <ul><li>bar</li></ul></li></ul>
8165 Nested lists 4 (first element empty)
8170 <ul><li><ul><li></li></ul></li>
8176 Nested lists 5 (both elements empty)
8181 <ul><li><ul><li></li></ul></li>
8187 Nested lists 6 (both elements empty)
8193 <ul><li></li></ul></li></ul>
8198 Nested lists 7 (skip initial nesting levels)
8202 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
8207 Nested lists 8 (multiple nesting transitions)
8215 <ul><li><ul><li> bar</li></ul></li>
8216 <li> baz</li></ul></li>
8222 Nested lists 9 (extension interaction)
8228 <ul><li data-parsoid='{}'><ol class="references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
8232 1. Lists with start-of-line-transparent tokens before bullets: Comments
8245 2. Lists with start-of-line-transparent tokens before bullets: Template close
8250 <ul><li>foo bar</li>
8256 List items are not parsed correctly following a <pre> block (bug 785)
8262 <ul><li> <pre>foo</pre></li>
8263 <li> <pre>bar</pre></li>
8269 List items from template
8280 * notSOL{{inner list}}
8283 <ul><li> item 1</li>
8284 <li> item 2</li></ul>
8285 <ul><li> item 0</li>
8287 <li> item 2</li></ul>
8288 <ul><li> item 0</li>
8291 <li> item 2</li></ul>
8296 List interrupted by empty line or heading
8304 <ul><li> foo</li></ul>
8305 <ul><li><ul><li> bar</li></ul></li></ul>
8306 <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>
8307 <ul><li> Another list item</li></ul>
8312 Multiple list tags generated by templates
8333 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
8336 <!--This line will NOT split the list-->
8338 <!--This line will NOT split the list either-->
8340 <!--foo--> <!----> <!--This line NOT split the list either-->
8351 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
8354 <!--This line will NOT split the list-->
8356 <!--This line will NOT split the list either-->
8358 <!--foo--> <!----> <!--This line NOT split the list
8371 (The PHP parser relies on Tidy for the hack)
8373 parsoid=wt2html,wt2wt
8377 * {{echo|<li>templated li-hack}}
8378 * <!--foo--> <li> unsupported li-hack with preceding comments
8381 <li><li>not a li-hack
8388 <li>templated li-hack</li>
8389 <li>unsupported li-hack with preceding comments</li>
8392 <li>not a li-hack</li>
8397 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
8424 Parsoid: Test of whitespace serialization with Templated bullets
8431 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
8435 # ------------------------------------------------------------------------
8436 # The next set of tests are about Parsoid's ability to handle badly nested
8437 # tags (parse, minimize scope of fixup, and roundtrip back)
8438 # ------------------------------------------------------------------------
8441 Unbalanced closing block tags break a list
8442 (php parser relies on Tidy to fix up)
8460 # Parsoid fails this test, but it might be tricky to support properly.
8463 Unbalanced closing non-block tags don't break a list
8464 (php parser relies on Tidy to fix up)
8471 <li><span>a</span></li>
8472 <li><span>b</span></li>
8486 Unclosed formatting tags that straddle lists are closed and reopened
8487 (php parser relies on Tidy to fix up)
8489 parsoid=wt2html,wt2wt,html2html
8499 <ol><li> <s> a</s></li>
8500 <li><s> b </s></li></ol>
8505 1. List embedded in a formatting tag
8512 <li><small>foo</small></li>
8522 ## Ugly Parsoid output here
8523 ## Not sure what the right output is.
8525 2. List embedded in a formatting tag
8532 <li><small>a</small></li>
8533 <li><small>b</small></li>
8540 <li><small>b</small></li>
8544 # Ugly Parsoid and PHP parser output here
8545 # Not sure if we want to make this a test!
8548 ## 3. Unclosed formatting tags in list elements
8554 ## <li><small>a</small></li>
8555 ## <li><small><small>b</small></small></li>
8559 ## <li><small>a</small></li>
8561 ## <li><small>b</small></li>
8565 # This is a bug in the PHP parser + tidy combination.
8566 # (The </tr> tag gets parsed as text and html-escaped by PHP,
8567 # and then fostered out of the table by tidy.)
8568 # We believe the Parsoid output to be correct.
8570 Table with missing opening <tr> tag
8572 parsoid=wt2html,wt2wt
8590 # Note that the current date is hard-coded as
8591 # 1970-01-01T00:02:03Z (a Thursday)
8592 # when running parser tests. The timezone is also fixed to GMT, so
8593 # local date will be identical to current date.
8596 Magic Word: {{CURRENTDAY}}
8605 Magic Word: {{CURRENTDAY2}}
8614 Magic Word: {{CURRENTDAYNAME}}
8623 Magic Word: {{CURRENTDOW}}
8632 Magic Word: {{CURRENTMONTH}}
8641 Magic Word: {{CURRENTMONTH1}}
8650 Magic Word: {{CURRENTMONTHABBREV}}
8652 {{CURRENTMONTHABBREV}}
8659 Magic Word: {{CURRENTMONTHNAME}}
8661 {{CURRENTMONTHNAME}}
8668 Magic Word: {{CURRENTMONTHNAMEGEN}}
8670 {{CURRENTMONTHNAMEGEN}}
8677 Magic Word: {{CURRENTTIME}}
8686 Magic Word: {{CURRENTHOUR}}
8695 Magic Word: {{CURRENTWEEK}} (@bug 4594)
8704 Magic Word: {{CURRENTYEAR}}
8713 Magic Word: {{CURRENTTIMESTAMP}}
8715 {{CURRENTTIMESTAMP}}
8722 Magic Words LOCAL (UTC)
8726 * {{LOCALMONTHNAME}}
8727 * {{LOCALMONTHNAMEGEN}}
8728 * {{LOCALMONTHABBREV}}
8737 * {{LOCALTIMESTAMP}}
8752 <li> 19700101000203</li></ul>
8757 Magic Word: {{FULLPAGENAME}}
8759 title=[[User:Ævar Arnfjörð Bjarmason]]
8763 <p>User:Ævar Arnfjörð Bjarmason
8768 Magic Word: {{FULLPAGENAMEE}}
8770 title=[[User:Ævar Arnfjörð Bjarmason]]
8774 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8779 Magic Word: {{TALKSPACE}}
8781 title=[[User:Ævar Arnfjörð Bjarmason]]
8790 Magic Word: {{TALKSPACE}}, same namespace
8792 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8801 Magic Word: {{TALKSPACE}}, main namespace
8803 title=[[Parser Test]]
8812 Magic Word: {{TALKSPACEE}}
8814 title=[[User:Ævar Arnfjörð Bjarmason]]
8823 Magic Word: {{SUBJECTSPACE}}
8825 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8834 Magic Word: {{SUBJECTSPACE}}, same namespace
8836 title=[[User:Ævar Arnfjörð Bjarmason]]
8845 Magic Word: {{SUBJECTSPACE}}, main namespace
8847 title=[[Parser Test]]
8855 Magic Word: {{SUBJECTSPACEE}}
8857 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8866 Magic Word: {{NAMESPACE}}
8868 title=[[User:Ævar Arnfjörð Bjarmason]]
8877 Magic Word: {{NAMESPACEE}}
8879 title=[[User:Ævar Arnfjörð Bjarmason]]
8888 Magic Word: {{NAMESPACENUMBER}}
8890 title=[[User:Ævar Arnfjörð Bjarmason]]
8899 Magic Word: {{SUBPAGENAME}}
8901 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8910 Magic Word: {{SUBPAGENAMEE}}
8912 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
8921 Magic Word: {{ROOTPAGENAME}}
8923 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8927 <p>Ævar Arnfjörð Bjarmason
8932 Magic Word: {{ROOTPAGENAMEE}}
8934 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
8938 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8943 Magic Word: {{BASEPAGENAME}}
8945 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8949 <p>Ævar Arnfjörð Bjarmason
8954 Magic Word: {{BASEPAGENAMEE}}
8956 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
8960 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8965 Magic Word: {{TALKPAGENAME}}
8967 title=[[User:Ævar Arnfjörð Bjarmason]]
8971 <p>User talk:Ævar Arnfjörð Bjarmason
8976 Magic Word: {{TALKPAGENAMEE}}
8978 title=[[User:Ævar Arnfjörð Bjarmason]]
8982 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
8987 Magic Word: {{SUBJECTPAGENAME}}
8989 title=[[User talk:Ævar Arnfjörð Bjarmason]]
8993 <p>User:Ævar Arnfjörð Bjarmason
8998 Magic Word: {{SUBJECTPAGENAMEE}}
9000 title=[[User talk:Ævar Arnfjörð Bjarmason]]
9002 {{SUBJECTPAGENAMEE}}
9004 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9009 Magic Word: {{NUMBEROFFILES}}
9018 Magic Word: {{PAGENAME}}
9020 title=[[User:Ævar Arnfjörð Bjarmason]]
9024 <p>Ævar Arnfjörð Bjarmason
9029 Magic Word: {{PAGENAME}} with metacharacters
9031 title=[['foo & bar = baz']]
9035 <p><i>'foo & bar = baz'</i>
9038 <p><i>'foo & bar = baz'</i></p>
9042 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
9044 title=[[*RFC 1234 http://example.com/]]
9048 <p>*RFC 1234 http://example.com/
9051 <p>*RFC 1234 http://example.com/</p>
9055 Magic Word: {{PAGENAMEE}}
9057 title=[[User:Ævar Arnfjörð Bjarmason]]
9061 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9066 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
9068 title=[[*RFC 1234 http://example.com/]]
9072 <p>*RFC_1234_http://example.com/
9075 <p>*RFC_1234_http://example.com/</p>
9079 Magic Word: {{REVISIONID}}
9088 Magic Word: {{SCRIPTPATH}}
9097 Magic Word: {{STYLEPATH}}
9106 Magic Word: {{SERVER}}
9110 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9115 Magic Word: {{SERVERNAME}}
9124 Magic Word: {{SITENAME}}
9133 Case-sensitive magic words, when cased differently, should just be template transclusions
9140 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
9141 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
9142 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
9143 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
9148 Case-insensitive magic words should still work with weird casing.
9158 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
9162 # From plwiki:PLOS_ONE
9164 Parsoid: Page property magic word with magic word contents
9166 {{DISPLAYTITLE:''{{PAGENAME}}''}}
9168 <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>"}]]}'/>
9172 Parsoid: Template-generated DISPLAYTITLE
9174 {{{{echo|DISPLAYTITLE}}:Foo}}
9176 <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}}]}'/>
9180 Namespace 1 {{ns:1}}
9189 Namespace 1 {{ns:01}}
9198 Namespace 0 {{ns:0}} (bug 4783)
9206 Namespace 0 {{ns:00}} (bug 4783)
9214 Namespace -1 {{ns:-1}}
9223 Namespace User {{ns:User}}
9232 Namespace User talk {{ns:User_talk}}
9241 Namespace User talk {{ns:uSeR tAlK}}
9250 Namespace File {{ns:File}}
9259 Namespace File {{ns:Image}}
9268 Namespace (lang=de) Benutzer {{ns:User}}
9279 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
9285 <p>Benutzer Diskussion
9293 {{urlencode:hi world?!}}
9294 {{urlencode:hi world?!|WIKI}}
9295 {{urlencode:hi world?!|PATH}}
9296 {{urlencode:hi world?!|QUERY}}
9306 Magic Word: prioritize type info over data-parsoid
9310 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
9316 Magic Word: serialize on separate line (parsoid)
9318 parsoid=wt2wt,html2wt
9324 foo<meta property="mw:PageProp/notoc"/>bar
9328 Magic Word: rt non-english wikis
9335 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
9342 Magic links: internal link to RFC (bug 479)
9346 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
9351 Magic links: RFC (bug 479)
9355 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9360 Magic links: RFC (bug 65278)
9362 This is RFC 822 but thisRFC 822 is not RFC 822linked.
9364 <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.
9369 Magic links: RFC (w/ non-newline whitespace, bug 28950/29025)
9371 RFC      822
9375 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
9382 Magic links: ISBN (bug 1937)
9386 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
9391 Magic links: ISBN (bug 65278)
9393 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
9395 <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.
9398 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:ExtLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
9402 Magic links: ISBN (w/ non-newline whitespace, bug 28950/29025)
9404 ISBN      978 0 316 09811 3
9410 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
9419 Magic links: PMID incorrectly converts space to underscore
9423 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9428 Magic links: PMID (bug 65278)
9430 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
9432 <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.
9437 Magic links: PMID (w/ non-newline whitespace, bug 28950/29025)
9439 PMID      1234
9443 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
9454 Nonexistent template
9456 {{thistemplatedoesnotexist}}
9458 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
9463 Template with invalid target containing tags
9465 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9467 <p>{{a<b>b</b>|foo|a=b|a = b}}
9472 Template with invalid target containing unclosed tag
9474 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
9476 <p>{{a<b>|foo|a=b|a = b}}</b>
9481 Template with invalid target containing wikilink
9485 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
9488 <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>
9492 Template with just whitespace in it, bug #68421
9496 <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>
9502 This is a test template
9510 <p>This is a test template
9515 Template with explicit namespace
9519 <p>This is a test template
9527 This is a test template with parameter {{{param}}}
9533 {{paramtest|param=foo}}
9535 <p>This is a test template with parameter foo
9540 Template:paramtestnum
9546 Template unnamed parameter
9548 {{paramtestnum|Main Page|the main page}}
9550 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
9555 Template:templatesimple
9561 Template:templateredirect
9563 #redirect [[Template:templatesimple]]
9567 Template:templateasargtestnum
9573 Template:templateasargtest
9575 {{template{{{templ}}}}}
9579 Template:templateasargtest2
9585 Template with template name as unnamed argument
9587 {{templateasargtestnum|templatesimple}}
9594 Template with template name as argument
9596 {{templateasargtest|templ=simple}}
9603 Template with template name as argument (2)
9605 {{templateasargtest2|templ=templatesimple}}
9612 Template:templateasargtestdefault
9614 {{{{{templ|templatesimple}}}}}
9624 Template with default value
9626 {{templateasargtestdefault}}
9633 Template with default value (value set)
9635 {{templateasargtestdefault|templ=templa}}
9644 {{templateredirect}}
9651 Template with argument in separate line
9653 {{ templateasargtest |
9661 Template with complex template as argument
9664 param ={{ templateasargtest |
9667 <p>This is a test template with parameter (test)
9672 Template with thumb image (with link in description)
9674 {{paramtest|param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
9676 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>
9679 <p>This is a test template with parameter</p>
9680 <div class="thumb tright">
9681 <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>
9682 <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>
9686 <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>
9690 Template:complextemplate
9692 {{{1}}} {{paramtest|
9693 param ={{{param}}}}}
9697 Template with complex arguments
9700 param ={{ templateasargtest |
9701 templ = simple }}|[[Template:complextemplate|link]]}}
9703 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
9708 BUG 553: link with two variables in a piped link
9711 |[[{{{1}}}|{{{2}}}]]
9716 <td>[[{{{1}}}|{{{2}}}]]
9722 Magic variable as template parameter
9724 {{paramtest|param={{SITENAME}}}}
9726 <p>This is a test template with parameter MediaWiki
9733 [[{{{param}}}|link]]
9737 Template parameter as link source
9739 {{linktest|param=Main Page}}
9741 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
9748 including another template, {{paramtest|param={{{arg}}}}}
9752 Template passing argument to another template
9754 {{paramtest2|arg='hmm'}}
9756 <p>including another template, This is a test template with parameter 'hmm'
9767 Template as link source
9771 [[{{linktest2}}|Main Page]]
9773 [[{{linktest2}}]]Page
9775 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9776 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
9777 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
9795 Template infinite loop
9799 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
9804 Template from main namespace
9823 BUG 529: Template with table, not included at beginning of line
9842 BUG 523: Template shouldn't eat newline (or add an extra one before table)
9862 BUG 41: Template parameters shown as broken links
9871 Template with targets containing wikilinks
9875 {{[[{{echo|foo}}]]}}
9877 {{{{echo|[[foo}}]]}}
9879 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9880 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
9888 ''None'' of '''this''' should be
9890 but rather passed unmodified
9897 # hmm, fix this or just deprecate msgnw and document its behavior?
9901 {{msgnw:MSGNW test}}
9903 <p>''None'' of '''this''' should be
9905  but rather passed unmodified
9906 {{test}}
9916 {{int:youhavenewmessages|lots of money|not!}}
9918 <p>You have lots of money (not!).
9925 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9929 <includeonly> and <noinclude> being included
9940 <onlyinclude>Foo</onlyinclude>bar
9944 <onlyinclude> being included
9956 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
9960 <onlyinclude> and <includeonly> being included
9969 <includeonly> and <noinclude> on a page
9971 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
9978 Un-closed <noinclude>
9985 <onlyinclude> on a page
9987 <onlyinclude>Foo</onlyinclude>bar
9994 Un-closed <onlyinclude>
10001 Self-closed noinclude, includeonly, onlyinclude tags
10012 Unbalanced includeonly and noinclude tags
10016 |b</noinclude></noinclude>
10017 |c</noinclude></includeonly>
10018 |d</includeonly></includeonly>
10027 <td>c</includeonly>
10029 <td>d</includeonly></includeonly>
10035 Template:Includeonly section
10038 ==Includeonly section==
10044 Bug 6563: Edit link generation for section shown by <includeonly>
10046 {{includeonly section}}
10048 <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>
10049 <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>
10053 # Uses same input as the contents of [[Template:Includeonly section]]
10055 Bug 6563: Section extraction for section shown by <includeonly>
10060 ==Includeonly section==
10068 Bug 6563: Edit link generation for section suppressed by <includeonly>
10071 ==Includeonly section==
10075 <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>
10080 Bug 6563: Section extraction for section suppressed by <includeonly>
10085 ==Includeonly section==
10093 Un-closed <includeonly>
10100 Includes and comments at SOL
10102 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
10106 </noinclude>* stuff
10109 <includeonly>can have stuff</includeonly>=== here ===
10112 <h2><span class="mw-headline" id="hu">hu</span></h2>
10115 <ul><li> stuff</li>
10116 <li> here</li></ul>
10117 <h3><span class="mw-headline" id="here">here</span></h3>
10120 <!-- 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>
10122 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
10124 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
10125 <li> here</li></ul>
10127 <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>
10131 # TODO: test with DOM fragment reuse!
10133 Parsoid: DOM fragment reuse
10135 parsoid=wt2wt,wt2html
10137 a{{echo|b<table></table>c}}d
10149 <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>
10151 <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">
10152 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
10153 </span><p about="#mwt2">cd</p>
10155 <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">
10157 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
10159 </span><p about="#mwt3">b</p>
10163 Parsoid: Merge double tds (bug 50603)
10168 |{{echo|{{!}} foo}}
10172 <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>
10177 Parsoid: Merge double tds in nested transclusion content (bug 50603)
10183 |{{echo|{{!}} foo}}
10187 <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}}]}'>
10189 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
10195 ### <includeonly> and <noinclude> in attributes
10198 0. includeonly around the entire attribute
10200 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
10202 <p><span id="v2">bar</span>
10207 1. includeonly in html attr key
10209 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
10211 <p><span id="foo">bar</span>
10216 2. includeonly in html attr value
10218 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
10219 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
10221 <p><span id="v1">bar</span>
10222 <span id="v1">bar</span>
10227 3. includeonly in part of an attr value
10229 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
10231 <p><span style="color:red;">bar</span>
10236 4. includeonly in table attributes
10260 ### Token Stream Patcher tests
10262 ### These tests won't always pass wt2wt and other modes because
10263 ### on serialization, the table will be output on a new line.
10264 ### For now, we are blacklisting them, and using this to test selser.
10268 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
10270 parsoid=wt2html,wt2wt
10272 {{echo|}}{| width = '100%'
10276 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
10277 <tbody><tr><td>foo</td></tr>
10282 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
10284 parsoid=wt2html,wt2wt
10286 <includeonly>a</includeonly>{| {{{b}}}
10290 <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}}}":""}}'>
10291 <tbody><tr><td>c</td></tr>
10297 ### Testing parsing of templates where a template arg
10298 ### has the same name as the template itself.
10304 {{{quote|{{{1}}}}}}
10308 Templates: Template Name/Arg clash: 1. Use of positional param
10317 Templates: Template Name/Arg clash: 2. Use of named param
10319 {{quote|quote=foo}}
10326 Templates: Template Name/Arg clash: 3. Use of named param with empty input
10335 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
10339 Templates: 1. Simple use
10348 Templates: 2. Inside a block tag
10350 <div>{{echo|Foo}}</div>
10351 <blockquote>{{echo|Foo}}</blockquote>
10354 <blockquote>Foo</blockquote>
10364 Templates: P-wrapping: 1a. Templates on consecutive lines
10375 Templates: P-wrapping: 1b. Templates on consecutive lines
10389 Templates: P-wrapping: 1c. Templates on consecutive lines
10392 {{echo|bar}} <div>baz</div>
10405 Templates: P-wrapping: 1d. Template preceded by comment-only line
10414 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
10418 Templates: Inline Text: 1. Multiple template uses
10420 {{echo|Foo}}bar{{echo|baz}}
10427 Templates: Inline Text: 2. Back-to-back template uses
10429 {{echo|Foo}}{{echo|bar}}
10436 Templates: Block Tags: 1. Multiple template uses
10438 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
10440 <div>Foo</div><div>bar</div><div>baz</div>
10445 Templates: Block Tags: 2. Back-to-back template uses
10447 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
10449 <div>Foo</div><div>bar</div>
10453 # This is an edge case relating to paragraph wrapping.
10455 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
10460 <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
10465 Templates: Links: 1. Simple example
10467 {{echo|[[Foo|bar]]}}
10469 <p><a href="/wiki/Foo" title="Foo">bar</a>
10474 Templates: Links: 2. Generation of link href
10476 [[{{echo|Foo}}|bar]]
10478 <p><a href="/wiki/Foo" title="Foo">bar</a>
10483 Templates: Links: 3. Generation of part of a link href
10485 [[Fo{{echo|o}}|bar]]
10487 [[Foo{{echo|bar}}]]
10489 [[Foo{{echo|bar}}baz]]
10491 [[Foo{{echo|bar}}|bar]]
10493 [[:Foo{{echo|bar}}]]
10495 [[:Foo{{echo|bar}}|bar]]
10497 <p><a href="/wiki/Foo" title="Foo">bar</a>
10498 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10499 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
10500 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10501 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10502 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
10507 Templates: Links: 4. Multiple templates generating link href
10509 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
10511 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
10516 Templates: Links: 5. Generation of link text
10518 [[Foo|{{echo|bar}}]]
10520 <p><a href="/wiki/Foo" title="Foo">bar</a>
10525 Templates: Links: 5. Nested templates (only outermost template should be marked)
10527 {{echo|[[{{echo|Foo}}|bar]]}}
10529 <p><a href="/wiki/Foo" title="Foo">bar</a>
10534 Templates: HTML Tag: 1. Generation of HTML attr. key
10536 <div {{echo|style}}="color:red;">foo</div>
10538 <div style="color:red;">foo</div>
10543 Templates: HTML Tag: 2. Generation of HTML attr. value
10545 <div style={{echo|'color:red;'}}>foo</div>
10547 <div style="color:red;">foo</div>
10552 Templates: HTML Tag: 3. Generation of HTML attr key and value
10554 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
10556 <div style="color:red;">foo</div>
10561 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
10563 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
10565 <div title="This is a long title with just one piece templated">foo</div>
10570 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
10572 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
10574 <div title="This is a long title with just one piece templated">foo</div>
10579 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
10581 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
10583 <div title="This is a long title with just one piece templated">foo</div>
10587 # SSS FIXME: While it is great we added support for all this,
10588 # do we want to make this part of the spec? Maybe we want to
10589 # deprecate this kind of usage in the future?
10591 Templates: HTML Tag: 7. Generation of partial attribute key string
10593 <div st{{echo|yle}}="color:red;">foo</div>
10595 <div style="color:red;">foo</div>
10600 Templates: HTML Tag: 8. Template-generated attribute (k=v)
10602 <div {{echo|1=id="v1"}}>bar</div>
10604 <div id="v1">bar</div>
10609 Templates: HTML Tag: 9. Multiple template-generated attributes
10611 <div {{echo|1=id="v1" title="foo"}}>bar</div>
10613 <div id="v1" title="foo">bar</div>
10618 Templates: Support for templates generating attributes and content
10620 {| {{mixed_attr_content_template}}
10625 <table style="color:red;" title="T48811">
10635 <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|}"]}'>
10644 1. Entities and nowikis inside templated attributes should be handled correctly
10646 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
10648 <div style="background:#f9f9f9;">foo</div>
10651 <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>
10655 2. Entities and nowikis inside templated attributes should be handled correctly
10658 |{{table_attribs_3}}
10663 <td style="background:#f9f9f9;">Foo
10668 <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>
10673 Templates: HTML Tables: 1. Generating start of a HTML table
10675 {{echo|<table><tr><td>foo</td>}}</tr></table>
10677 <table><tr><td>foo</td></tr></table>
10682 Templates: HTML Tables: 2a. Generating middle of a HTML table
10684 <table><tr>{{echo|<td>foo</td>}}</tr></table>
10686 <table><tr><td>foo</td></tr></table>
10691 Templates: HTML Tables: 2b. Generating middle of a HTML table
10693 <table>{{echo|<tr><td>foo</td></tr>}}</table>
10695 <table><tr><td>foo</td></tr></table>
10700 Templates: HTML Tables: 3. Generating end of a HTML table
10702 <table><tr>{{echo|<td>foo</td></tr></table>}}
10704 <table><tr><td>foo</td></tr></table>
10709 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
10711 {{echo|<table>}}<tr><td>foo</td></tr></table>
10713 <table><tr><td>foo</td></tr></table>
10718 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
10720 <table>{{echo|<tr>}}<td>foo</td></tr></table>
10722 <table><tr><td>foo</td></tr></table>
10727 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
10729 <table><tr>{{echo|<td>}}foo</td></tr></table>
10731 <table><tr><td>foo</td></tr></table>
10736 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
10738 <table><tr><td>foo{{echo|</td>}}</tr></table>
10740 <table><tr><td>foo</td></tr></table>
10745 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
10747 <table><tr><td>foo</td>{{echo|</tr>}}</table>
10749 <table><tr><td>foo</td></tr></table>
10754 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
10756 <table><tr><td>foo</td></tr>{{echo|</table>}}
10758 <table><tr><td>foo</td></tr></table>
10763 Templates: HTML Tables: 5. Proper fostering of categories from inside
10765 parsoid=wt2html,wt2wt
10767 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
10768 <!--Two categories (Bug 50330)-->
10769 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
10771 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
10772 <!--Two categories (Bug 50330)-->
10773 <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>
10777 Templates: Wiki Tables: 1a. Fostering of entire template content
10785 <tr><td></td></tr></table>
10797 Templates: Wiki Tables: 1b. Fostering of entire template content
10810 <tr><td></td></tr></table>
10824 Templates: Wiki Tables: 2. Fostering of partial template content
10834 <tr><td></td></tr></table>
10847 Templates: Wiki Tables: 3. td-content via multiple templates
10850 {{echo|{{pipe}}a}}{{echo|b}}
10861 Templates: Wiki Tables: 4. Templated tags, no content
10867 <tr><td></td></tr></table>
10872 Templates: Wiki Tables: 5. Templated tags, regular td-tags
10886 Templates: Wiki Tables: 6. Templated tags, templated td-tags
10900 Templates: Lists: Multi-line list-items via templates
10902 *{{echo|a {{nonexistent|
10904 *{{echo|b {{nonexistent|
10907 <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>
10908 <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>
10913 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
10915 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
10917 <p><i>ab</i>c<i>d</i>e
10922 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
10923 (PHP parser generates misnested html)
10925 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
10927 <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>
10931 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
10932 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
10934 parsoid=wt2html,wt2wt
10936 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
10938 <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>
10939 <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>
10940 <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>
10944 Templates: Ugly nesting: 4. Divs opened/closed across templates
10946 a<div>b{{echo|c</div>d}}e
10957 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
10963 |{{echo|foo</table>}}
10967 <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|}"]}'>
10971 <td>foo</td></tr></tbody></table><span about="#mwt1">
10972 </span><span about="#mwt1">|bar</span><span about="#mwt1">
10977 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
10987 <td>1. {{echo|foo </table>}}</td>
10989 <td>2. {{echo|baz </table>}}</td>
11002 <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>"]}'>
11007 <td>1. foo </td></tr></tbody></table></td>
11009 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
11010 </span><span about="#mwt2">
11011 </span><span about="#mwt2">
11012 </span><span about="#mwt2">abc</span><span about="#mwt2">
11013 </span><span about="#mwt2">
11014 </span><span about="#mwt2">
11015 </span><span about="#mwt2">
11016 </span><span about="#mwt2">
11017 </span><span about="#mwt2">
11018 </span><span about="#mwt2">xyz</span><span about="#mwt2">
11019 </span><span about="#mwt2">
11024 Templates: Ugly templates: 3. newline-only template parameter
11033 # This looks like a bug: a single newline triggers p/br for some reason.
11035 Templates: Ugly templates: 4. newline-only template parameter inconsistency
11044 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges that
11045 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
11047 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
11053 <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
11054 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11058 # Bug 64017 -- ugly wikitext with fostered content generates two template ranges
11059 # that are "identical" and generate nesting cycles in the algorithm
11061 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
11063 {{echo|<table><tr><td><table>}}
11067 <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"}'>
11068 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
11069 </table></td></tr></tbody></table>
11073 Parser Functions: 1. Simple example
11082 Parser Functions: 2. Nested use (only outermost should be marked up)
11091 ### Pre-save transform tests
11094 pre-save transform: subst:
11100 This is a test template
11104 pre-save transform: normal template
11114 pre-save transform: nonexistent template
11118 {{thistemplatedoesnotexist}}
11120 {{thistemplatedoesnotexist}}
11125 pre-save transform: subst magic variables
11134 # This is bug 89, which I fixed. -- wtm
11136 pre-save transform: subst: templates with parameters
11140 {{subst:paramtest|param="something else"}}
11142 This is a test template with parameter "something else"
11146 Template:nowikitest
11148 <nowiki>'''not wiki'''</nowiki>
11152 pre-save transform: nowiki in subst (bug 1188)
11156 {{subst:nowikitest}}
11158 <nowiki>'''not wiki'''</nowiki>
11163 Template:commenttest
11165 This template has <!-- a comment --> in it.
11169 pre-save transform: comment in subst (bug 1936)
11173 {{subst:commenttest}}
11175 This template has <!-- a comment --> in it.
11179 pre-save transform: unclosed tag
11183 <nowiki>'''not wiki'''
11185 <nowiki>'''not wiki'''
11189 pre-save transform: mixed tag case
11193 <NOwiki>'''not wiki'''</noWIKI>
11195 <NOwiki>'''not wiki'''</noWIKI>
11199 pre-save transform: unclosed comment in <nowiki>
11203 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11205 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
11208 # Leading @ in this template definition works around a limitation
11209 # in parsoid's parserTests which otherwise strips the <span> from the
11210 # result (confusing it for a template wrapper)
11214 @<span onmouseover="alert('crap')">Oh no</span>
11218 (confirming safety of fix for subst bug 1936)
11220 {{Template:dangerous}}
11222 <p>@<span>Oh no</span>
11227 pre-save transform: comment containing gallery (bug 5024)
11231 <!-- <gallery>data</gallery> -->
11233 <!-- <gallery>data</gallery> -->
11237 pre-save transform: comment containing extension
11241 <!-- <tag>data</tag> -->
11243 <!-- <tag>data</tag> -->
11247 pre-save transform: comment containing nowiki
11251 <!-- <nowiki>data</nowiki> -->
11253 <!-- <nowiki>data</nowiki> -->
11257 pre-save transform: <noinclude> in subst (bug 3298)
11267 pre-save transform: <onlyinclude> in subst (bug 3298)
11271 {{subst:Includes2}}
11279 {{<includeonly>subst:</includeonly>Includes}}
11283 Template:SafeSubstTest
11285 {{<includeonly>safesubst:</includeonly>Includes}}
11289 bug 22297: safesubst: works during PST
11293 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
11299 bug 22297: safesubst: works during normal parse
11308 subst: does not work during normal parse
11312 <p>{{subst:Includes}}
11317 pre-save transform: context links ("pipe trick")
11321 [[Article (context)|]]
11324 [[Bar:Article (context)|]]
11325 [[:Bar:Article (context)|]]
11327 [[|Article (context)]]
11331 [[Article (context)|Article]]
11332 [[Bar:Article|Article]]
11333 [[:Bar:Article|Article]]
11334 [[Bar:Article (context)|Article]]
11335 [[:Bar:Article (context)|Article]]
11337 [[Article (context)]]
11338 [[Bar:X (Y) Z|X (Y) Z]]
11339 [[:Bar:X (Y) Z|X (Y) Z]]
11343 pre-save transform: context links ("pipe trick") with interwiki prefix
11347 [[interwiki:Article|]]
11348 [[:interwiki:Article|]]
11349 [[interwiki:Bar:Article|]]
11350 [[:interwiki:Bar:Article|]]
11352 [[interwiki:Article|Article]]
11353 [[:interwiki:Article|Article]]
11354 [[interwiki:Bar:Article|Bar:Article]]
11355 [[:interwiki:Bar:Article|Bar:Article]]
11359 pre-save transform: context links ("pipe trick") with parens in title
11361 pst title=[[Somearticle (context)]]
11365 [[Article (context)|Article]]
11369 pre-save transform: context links ("pipe trick") with comma in title
11371 pst title=[[Someplace, Somewhere]]
11374 [[Otherplace, Elsewhere|]]
11375 [[Otherplace, Elsewhere, Anywhere|]]
11377 [[Otherplace, Somewhere|Otherplace]]
11378 [[Otherplace, Elsewhere|Otherplace]]
11379 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
11383 pre-save transform: context links ("pipe trick") with parens and comma
11385 pst title=[[Someplace (IGNORED), Somewhere]]
11388 [[Otherplace (place), Elsewhere|]]
11390 [[Otherplace, Somewhere|Otherplace]]
11391 [[Otherplace (place), Elsewhere|Otherplace]]
11395 pre-save transform: context links ("pipe trick") with comma and parens
11397 pst title=[[Who, me? (context)]]
11400 [[Me, Myself, and I (1937 song)|]]
11402 [[Yes, you. (context)|Yes, you.]]
11403 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
11407 pre-save transform: context links ("pipe trick") with namespace
11409 pst title=[[Ns:Somearticle]]
11413 [[Ns:Article|Article]]
11417 pre-save transform: context links ("pipe trick") with namespace and parens
11419 pst title=[[Ns:Somearticle (context)]]
11423 [[Ns:Article (context)|Article]]
11427 pre-save transform: context links ("pipe trick") with namespace and comma
11429 pst title=[[Ns:Somearticle, Context, Whatever]]
11433 [[Ns:Article, Context, Whatever|Article]]
11437 pre-save transform: context links ("pipe trick") with namespace, comma and parens
11439 pst title=[[Ns:Somearticle, Context (context)]]
11443 [[Ns:Article (context)|Article]]
11447 pre-save transform: context links ("pipe trick") with namespace, parens and comma
11449 pst title=[[Ns:Somearticle (IGNORED), Context]]
11453 [[Ns:Article, Context|Article]]
11457 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
11461 [[Article(context)|]]
11462 [[Bar:Article(context)|]]
11463 [[:Bar:Article(context)|]]
11464 [[|Article(context)]]
11468 [[Article(context)|Article]]
11469 [[Bar:Article(context)|Article]]
11470 [[:Bar:Article(context)|Article]]
11471 [[Article(context)]]
11472 [[Bar:X(Y)Z|X(Y)Z]]
11473 [[:Bar:X(Y)Z|X(Y)Z]]
11477 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
11481 [[Article (context)|]]
11482 [[Bar:Article (context)|]]
11483 [[:Bar:Article (context)|]]
11484 [[|Article (context)]]
11488 [[Article (context)|Article]]
11489 [[Bar:Article (context)|Article]]
11490 [[:Bar:Article (context)|Article]]
11491 [[Article (context)]]
11492 [[Bar:X (Y) Z|X (Y) Z]]
11493 [[:Bar:X (Y) Z|X (Y) Z]]
11497 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
11501 [[Article(context)|]]
11502 [[Bar:Article(context)|]]
11503 [[:Bar:Article(context)|]]
11504 [[|Article(context)]]
11508 [[Article(context)|Article]]
11509 [[Bar:Article(context)|Article]]
11510 [[:Bar:Article(context)|Article]]
11511 [[Article(context)]]
11512 [[Bar:X(Y)Z|X(Y)Z]]
11513 [[:Bar:X(Y)Z|X(Y)Z]]
11517 pre-save transform: context links ("pipe trick") with commas (bug 21660)
11521 [[Article (context), context|]]
11522 [[Article (context),context|]]
11523 [[Bar:Article (context), context|]]
11524 [[Bar:Article (context),context|]]
11525 [[:Bar:Article (context), context|]]
11526 [[:Bar:Article (context),context|]]
11528 [[Article (context), context|Article]]
11529 [[Article (context),context|Article]]
11530 [[Bar:Article (context), context|Article]]
11531 [[Bar:Article (context),context|Article]]
11532 [[:Bar:Article (context), context|Article]]
11533 [[:Bar:Article (context),context|Article]]
11537 pre-save transform: trim trailing empty lines
11541 Empty lines are trimmed
11547 Empty lines are trimmed
11551 pre-save transform: Signature expansion
11556 * <noinclude>~~~</noinclude>
11557 * <includeonly>~~~</includeonly>
11558 * <onlyinclude>~~~</onlyinclude>
11560 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
11561 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
11562 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
11563 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
11568 pre-save transform: Signature expansion in nowiki tags (bug 93)
11574 <nowiki>~~~~</nowiki>
11576 <includeonly><nowiki>~~~~</nowiki></includeonly>
11578 <noinclude><nowiki>~~~~</nowiki></noinclude>
11580 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11582 {{subst:Foo}} shall be converted to FOO
11584 As well as inside noinclude/onlyinclude
11585 <noinclude>{{subst:Foo}}</noinclude>
11586 <onlyinclude>{{subst:Foo}}</onlyinclude>
11588 But not inside includeonly
11589 <includeonly>{{subst:Foo}}</includeonly>
11593 <nowiki>~~~~</nowiki>
11595 <includeonly><nowiki>~~~~</nowiki></includeonly>
11597 <noinclude><nowiki>~~~~</nowiki></noinclude>
11599 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
11601 FOO shall be converted to FOO
11603 As well as inside noinclude/onlyinclude
11604 <noinclude>FOO</noinclude>
11605 <onlyinclude>FOO</onlyinclude>
11607 But not inside includeonly
11608 <includeonly>{{subst:Foo}}</includeonly>
11612 Parsoid: Recognize nowiki with trailing space in tags
11616 <nowiki ><div>[[foo]]</nowiki >
11624 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11631 Parsoid: Recognize nowiki with odd capitalization
11635 <noWikI ><div>[[foo]]</Nowiki >
11637 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
11642 Parsoid: Escape nowiki with trailing space in tags
11646 <p><nowiki > foo </nowiki ></p>
11647 <p>a<nowiki />b</p>
11648 <p>c<nowiki/ >d</p>
11650 <nowiki > foo </nowiki >
11658 Parsoid: Escape weird noWikI capitalizations
11662 <p><noWikI > foo </NoWikI ></p>
11664 <noWikI > foo </NoWikI >
11668 ### Message transform tests
11671 message transform: magic variables
11681 message transform: should not transform wiki markup
11691 message transform: <noinclude> in transcluded template (bug 4926)
11701 message transform: <onlyinclude> in transcluded template (bug 4926)
11711 {{#special:}} page name, known
11715 {{#special:Recentchanges}}
11717 Special:RecentChanges
11721 {{#special:}} page name with subpage, known
11725 {{#special:Recentchanges/param}}
11727 Special:RecentChanges/param
11731 {{#special:}} page name, unknown
11735 {{#special:foobar nonexistent}}
11737 Special:Foobar nonexistent
11741 {{#speciale:}} page name, known
11745 {{#speciale:Recentchanges}}
11747 Special:RecentChanges
11751 {{#speciale:}} page name with subpage, known
11755 {{#speciale:Recentchanges/param}}
11757 Special:RecentChanges/param
11761 {{#speciale:}} page name, unknown
11765 {{#speciale:foobar nonexistent}}
11767 Special:Foobar_nonexistent
11773 ### For Parsoid-specific tests, see
11774 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
11779 parsoid=wt2html,wt2wt,html2html
11781 [[Image:foobar.jpg]]
11783 <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>
11786 <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>
11790 Simple image (using File: namespace, now canonical)
11792 [[File:Foobar.jpg]]
11794 <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>
11797 <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>
11801 Right-aligned image
11803 [[File:Foobar.jpg|right]]
11805 <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>
11808 <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>
11814 [[File:Foobar.jpg|right|Caption text]]
11816 <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>
11819 <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>
11823 Image with caption, bug 53312 #1
11825 [[File:Foobar.jpg|right|Caption page stuff]]
11827 <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>
11830 <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>
11834 Image with caption, bug 53312 #2
11836 [[File:Foobar.jpg|right|Caption page=]]
11838 <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>
11841 <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>
11845 Image with caption, bug 53312 #3
11847 [[File:Foobar.jpg|right|Caption page=stuff]]
11849 <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>
11852 <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>
11856 Allow empty links in image captions (Bug 60753)
11860 [[File:Foobar.jpg|thumb|Caption [[Link1]]
11865 <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>
11868 <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>
11870 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
11871 </figcaption></figure>
11875 Titles in unlinked images (T23454)
11877 [[File:Foobar.jpg|link=|stuff]]
11879 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
11884 Link with empty target
11893 Image with link trail
11895 Linktrails should not work for images: [[File:Foobar.jpg]]s
11897 <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
11900 <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>
11904 Image with empty attribute
11906 parsoid=wt2html,wt2wt,html2html
11908 [[File:Foobar.jpg|right||Caption text]]
11910 <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>
11913 <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>
11917 1. Block image with individual attributes from templates
11919 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
11921 <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>
11924 <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/3/3a/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>
11928 2. Block Image with individual attributes from templates
11930 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
11932 <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>
11935 <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/3/3a/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>
11939 3. Inline image with individual attributes from templates
11941 [[File:Foobar.jpg|{{echo|50px}}]]
11943 <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>
11946 <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>
11949 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
11950 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
11952 Image with multiple attributes from the same template
11954 [[File:Foobar.jpg|{{image_attribs}}]]
11956 <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>
11959 <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>
11963 Image with link tails
11967 123[[File:Foobar.jpg]]456
11968 123[[File:Foobar.jpg|right]]456
11969 123[[File:Foobar.jpg|thumb]]456
11971 <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
11973 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
11974 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
11977 <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>
11979 <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>
11981 <div class="thumb tright">
11982 <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>
11983 <div class="thumbcaption">
11984 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
11990 <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>
11991 <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>
11992 <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/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure><p>456</p>
11996 Image with multiple captions -- only last one is accepted
11998 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
12000 <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>
12003 <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>
12007 Image with multiple widths -- use last
12009 [[File:Foobar.jpg|200px|300px|caption]]
12011 <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>
12014 <p><span 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="34" width="300"/></a></span></p>
12018 Image with multiple alignments -- use first (bug 48664)
12022 [[File:Foobar.jpg|thumb|left|right|center|caption]]
12024 [[File:Foobar.jpg|middle|text-top|caption]]
12026 <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>
12027 <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>
12030 <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/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
12031 <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>
12035 Image with width attribute at different positions
12037 [[File:Foobar.jpg|200px|right|Caption]]
12038 [[File:Foobar.jpg|right|200px|Caption]]
12039 [[File:Foobar.jpg|right|Caption|200px]]
12041 <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>
12042 <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>
12043 <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>
12046 <figure class="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="23" width="200"/></a><figcaption>Caption</figcaption></figure>
12047 <figure class="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="23" width="200"/></a><figcaption>Caption</figcaption></figure>
12048 <figure class="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="23" width="200"/></a><figcaption>Caption</figcaption></figure>
12051 # a sad bit of backward-compatibility
12053 Image with size specified with pxpx (bug 13500, 51628)
12055 parsoid=wt2html,wt2wt,html2html
12057 [[File:Foobar.jpg|20pxpx]]
12058 [[File:Foobar.jpg|200x20pxpx]]
12060 <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>
12061 <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>
12064 <p><span 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="2" width="20"/></a></span> <span 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="20" width="177"/></a></span></p>
12068 Image with link parameter, wiki target
12070 [[File:Foobar.jpg|link=Main Page]]
12072 <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>
12075 <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>
12078 # parsoid bug 49293 (part 1)
12080 Image with link parameter, URL target
12082 [[File:Foobar.jpg|link=http://example.com/]]
12084 <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>
12087 <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>
12090 # parsoid bug 49293 (part 2)
12092 Image with link parameter, protocol-less URL target
12094 [[File:Foobar.jpg|link=//example.com/]]
12096 <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>
12099 <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>
12103 Image with link parameter, wgExternalLinkTarget
12105 [[Image:foobar.jpg|link=http://example.com/]]
12107 wgExternalLinkTarget='foobar'
12109 <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>
12114 Image with link parameter, wgNoFollowLinks set to false
12116 [[Image:foobar.jpg|link=http://example.com/]]
12118 wgNoFollowLinks=false
12120 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12125 Image with link parameter, wgNoFollowDomainExceptions
12127 [[Image:foobar.jpg|link=http://example.com/]]
12129 wgNoFollowDomainExceptions='example.com'
12131 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
12136 Image with link parameter, wgExternalLinkTarget, unnamed parameter
12138 [[Image:foobar.jpg|link=http://example.com/|Title]]
12140 wgExternalLinkTarget='foobar'
12142 <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>
12147 Image with empty link parameter
12149 [[File:Foobar.jpg|link=]]
12151 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
12154 <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>
12158 Image with link parameter (wiki target) and unnamed parameter
12160 [[File:Foobar.jpg|link=Main_Page|Title]]
12162 <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>
12165 <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>
12169 Image with link parameter (URL target) and unnamed parameter
12171 [[File:Foobar.jpg|link=http://example.com/|Title]]
12173 <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>
12176 <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>
12180 Thumbnail image with link parameter
12183 parsoid=wt2html,wt2wt,html2html
12185 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
12187 <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>
12190 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption>Title</figcaption></figure>
12194 Manually-specified thumbnail image
12198 [[File:Foobar.jpg|thumb=Thumb.png|Title]]
12200 <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>
12203 <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>
12207 Manually-specified thumbnail image with explicit link to wiki page
12210 parsoid=wt2html,wt2wt,html2html
12212 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
12214 <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>
12217 <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>
12221 Manually-specified thumbnail image with explicit link to url
12224 parsoid=wt2html,wt2wt,html2html
12226 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
12228 <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>
12231 <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>
12235 Manually-specified thumbnail image with explicit no link
12238 parsoid=wt2html,wt2wt,html2html
12240 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
12242 <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>
12245 <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>
12249 Manually-specified thumbnail image with explicit link and alt text
12252 parsoid=wt2html,wt2wt,html2html
12254 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
12256 <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>
12259 <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>
12263 Image with frame and link
12265 parsoid=wt2html,wt2wt,html2html
12267 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
12269 <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>
12272 <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>
12276 Image with frame and link and explicit alt
12278 parsoid=wt2html,wt2wt,html2html
12280 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
12282 <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>
12285 <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>
12289 Image with wiki markup in implicit alt
12291 parsoid=wt2html,wt2wt,html2html
12293 [[Image:Foobar.jpg|testing '''bold''' in alt]]
12295 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
12297 <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>
12298 </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>
12301 <p><span class="mw-default-size" typeof="mw:Image" data-mw="{"caption":"testing '''bold''' 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"/></a></span></p>
12302 <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"/></a></span></p>
12306 Alt image option should handle most kinds of wikitext without barfing
12308 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
12310 <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>
12313 <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>
12316 ###################
12317 # Conflicting image format options.
12318 # First option specified should 'win'.
12319 # All three cases in each test should be identical.
12322 Image with 'frameless' first.
12324 parsoid=wt2html,wt2wt,html2html
12326 [[File:Foobar.jpg|frameless|caption]]
12328 [[File:Foobar.jpg|frameless|frame|caption]]
12330 [[File:Foobar.jpg|frameless|thumb|caption]]
12332 <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>
12333 </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>
12334 </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>
12337 <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/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
12338 <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/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
12339 <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/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
12343 Image with 'frame' first.
12345 parsoid=wt2html,wt2wt,html2html
12347 [[File:Foobar.jpg|frame|caption]]
12348 [[File:Foobar.jpg|frame|frameless|caption]]
12349 [[File:Foobar.jpg|frame|thumb|caption]]
12351 <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>
12352 <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>
12353 <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>
12356 <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>
12357 <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>
12358 <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>
12362 Image with 'thumb' first.
12364 parsoid=wt2html,wt2wt,html2html
12366 [[File:Foobar.jpg|thumb|caption]]
12367 [[File:Foobar.jpg|thumb|frameless|caption]]
12368 [[File:Foobar.jpg|thumb|frame|caption]]
12370 <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>
12371 <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>
12372 <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>
12375 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption>caption</figcaption></figure>
12376 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption>caption</figcaption></figure>
12377 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption>caption</figcaption></figure>
12380 ###################
12382 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
12383 # and https://bugzilla.wikimedia.org/show_bug.cgi?id=62258
12384 # Foobar has actual size of 1941x220
12385 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
12386 # a scalable format.
12387 # 2. Framed images always ignore size options; always render at default size.
12388 # 3. "Unspecified format" and border are the only types which can be
12392 Image: "unspecified format" and border enlarge
12394 parsoid=wt2html,wt2wt,html2html
12396 [[File:Foobar.jpg|2000px]]
12398 [[File:Foobar.jpg|border|2000px]]
12400 <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>
12401 </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>
12404 <p><span 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="227" width="2000"/></a></span></p>
12405 <p><span class="mw-image-border" 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="227" width="2000"/></a></span></p>
12409 Image: "unspecified format" and border reduce
12411 parsoid=wt2html,wt2wt,html2html
12413 [[File:Foobar.jpg|1000px]]
12415 [[File:Foobar.jpg|border|1000px]]
12417 <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>
12418 </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>
12421 <p><span 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="113" width="1000"/></a></span></p>
12422 <p><span class="mw-image-border" 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="113" width="1000"/></a></span></p>
12426 Image: thumbs reduce
12428 parsoid=wt2html,wt2wt,html2html
12430 [[File:Foobar.jpg|thumb|50px]]
12432 <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>
12435 <figure typeof="mw:Image/Thumb"><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="6" width="50"/></a></figure>
12439 Image: bitmap thumbs can't be enlarged past original size, but vector can.
12441 parsoid=wt2html,wt2wt,html2html
12443 [[File:Foobar.jpg|thumb|2000px]]
12445 [[File:Foobar.svg|thumb|2000px]]
12447 <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>
12448 <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>
12451 <figure typeof="mw:Image/Thumb"><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>
12452 <figure 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="1500" width="2000"/></a></figure>
12456 Image: frameless can reduce in size
12458 parsoid=wt2html,wt2wt,html2html
12460 [[File:Foobar.jpg|frameless|50px]]
12462 <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>
12465 <p><span typeof="mw:Image/Frameless"><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="6" width="50"/></a></span></p>
12469 Image: bitmap frameless can't be enlarged past original size, but vector can
12471 parsoid=wt2html,wt2wt,html2html
12473 [[File:Foobar.jpg|frameless|2000px]]
12475 [[File:Foobar.svg|frameless|2000px]]
12477 <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>
12478 </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>
12481 <p><span typeof="mw:Image/Frameless"><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>
12482 <p><span typeof="mw:Image/Frameless"><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="1500" width="2000"/></a></span></p>
12486 Image: framed images are always unscaled.
12488 parsoid=wt2html,wt2wt,html2html
12490 [[File:Foobar.jpg|frame]]
12492 [[File:Foobar.jpg|frame|50px]]
12494 [[File:Foobar.jpg|frame|50x50px]]
12496 [[File:Foobar.jpg|frame|2000px]]
12498 <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>
12499 <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>
12500 <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>
12501 <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>
12504 <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>
12505 <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>
12506 <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>
12507 <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>
12510 ###################
12513 Link to image page- image page normally doesn't exists, hence edit link
12514 Add test with existing image page
12515 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
12519 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
12524 bug 18784 Link to non-existent image page with caption should use caption as link text
12526 [[:Image:test|caption]]
12528 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
12533 Frameless image caption with a free URL
12535 [[File:Foobar.jpg|http://example.com]]
12537 <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>
12540 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"http://example.com"}'><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>
12544 Thumbnail image caption with a free URL
12548 [[File:Foobar.jpg|thumb|http://example.com]]
12550 <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>
12553 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
12557 Thumbnail image caption with a free URL and explicit alt
12560 parsoid=wt2html,wt2wt,html2html
12562 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
12564 <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>
12567 <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/3/3a/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>
12571 SVG thumbnails with no language set
12574 [[File:Foobar.svg|thumb|caption]]
12576 <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>
12579 <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>caption</figcaption></figure>
12583 SVG thumbnails with language de
12585 parsoid=wt2html,wt2wt,html2html
12587 [[File:Foobar.svg|thumb|caption|lang=de]]
12589 <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>
12592 <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" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
12596 SVG thumbnails with invalid language code
12598 parsoid=wt2html,wt2wt,html2html
12600 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
12602 <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>
12605 <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>
12609 BUG 1887: A ISBN with a thumbnail
12611 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
12613 <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>
12616 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption><a href="Special:BookSources/1235467890" rel="mw:ExtLink">ISBN 1235467890</a></figcaption></figure>
12620 BUG 1887: A RFC with a thumbnail
12622 [[File:Foobar.jpg|thumb|This is RFC 12354]]
12624 <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>
12627 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption>This is <a href="//tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
12631 BUG 1887: A mailto link with a thumbnail
12633 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
12635 <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>
12638 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption>Please <a rel="mw:ExtLink" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
12641 # Pending resolution to bug 368
12643 BUG 648: Frameless image caption with a link
12645 [[File:Foobar.jpg|text with a [[link]] in it]]
12647 <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>
12650 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[link]] 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>
12654 BUG 648: Frameless image caption with a link (suffix)
12656 [[File:Foobar.jpg|text with a [[link]]foo in it]]
12658 <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>
12661 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[link]]foo 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>
12665 BUG 648: Frameless image caption with an interwiki link
12667 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
12669 <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>
12672 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[MeatBall:Link]] 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>
12676 BUG 648: Frameless image caption with a piped interwiki link
12678 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
12680 <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>
12683 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"text with a [[MeatBall:Link|link]] 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>
12687 Escape HTML special chars in image alt text
12689 [[File:Foobar.jpg|& < > "]]
12691 <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>
12694 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"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>
12698 BUG 499: Alt text should have Ӓ, not &1234;
12700 [[File:Foobar.jpg|♀]]
12702 <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>
12705 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"&#9792;"}'><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>
12709 Broken image caption with link
12711 parsoid=wt2html,wt2wt,html2html
12713 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
12715 <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.
12718 <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>
12722 Image caption containing another image
12724 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
12726 <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>
12729 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="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>
12733 Image: caption containing a newline
12735 [[File:Foobar.jpg|This
12738 <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>
12741 <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>
12745 Image: caption containing leading space
12746 (The leading space should not trigger nowiki escaping in wt2wt mode)
12748 [[File:Foobar.jpg|thumb| bar]]
12750 <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>
12753 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption> bar</figcaption></figure>
12757 Image: caption containing a table
12759 parsoid=wt2html,wt2wt,html2html
12761 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
12767 and some more text.]]
12769 <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>
12772 <figure typeof="mw:Image/Thumb"><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="23" width="200"/></a><figcaption>This is an example image thumbnail caption with a table
12775 <tr><th>Foo </th><th>Bar</th></tr>
12778 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
12782 Bug 3090: External links other than http: in image captions
12784 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
12786 <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>
12789 <figure typeof="mw:Image/Thumb"><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="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>
12795 parsoid=wt2html,wt2wt,html2html
12797 [[Image:foobar.jpg|a|class=b]]
12799 <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>
12802 <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>
12806 Localized image handling (1).
12808 parsoid=wt2html,wt2wt,html2html
12811 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
12813 <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>
12816 <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>
12820 Localized image handling (2).
12823 parsoid=wt2html,wt2wt,html2html
12826 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
12828 <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>
12831 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption>caption</figcaption></figure>
12835 "border", "frameless" and "class" attributes on an image.
12838 parsoid=wt2html,wt2wt,html2html
12840 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
12842 <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>
12845 <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/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
12848 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
12850 Invalid image attributes (bug 62500)
12853 parsoid=wt2html,wt2wt,html2html
12855 [[File:Foobar.jpg|thumb|float|left|caption]]
12857 [[File:Foobar.jpg|thumb|righ|caption]]
12859 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
12861 <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>
12862 <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>
12863 <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>
12866 <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/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
12867 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption>caption</figcaption></figure>
12868 <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/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
12874 #REDIRECT [[File:Barfoo.jpg]]
12877 # FIXME: Parsoid should run this test -- but we'd need to teach the
12878 # mockAPI about the redirected Barfoo.jpg image.
12882 [[Image:Barfoo.jpg]]
12884 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
12889 Missing image with uploads disabled
12893 [[File:Foobaz.jpg]]
12895 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
12898 <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>
12901 # Parsoid-specific testing for images
12902 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
12903 # Currently imperfect due to a flaw in the Parsoid testrunner
12905 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
12909 Parsoid-specific image handling - simple image with size and middle alignment
12911 [[File:Foobar.jpg|middle|50px]]
12913 <p><span class="mw-valign-middle" 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="6" width="50"/></a></span></p>
12917 Parsoid-specific image handling - simple image with size, middle alignment,
12918 non-standard namespace alias
12920 parsoid=wt2wt,wt2html,html2html
12922 [[Image:Foobar.jpg|middle|50px]]
12924 <p><span class="mw-valign-middle" 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="6" width="50"/></a></span></p>
12928 Parsoid-specific image handling - simple image with size and middle alignment
12931 [[File:Foobar.jpg|50px|middle]]
12933 <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/3/3a/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>
12937 Parsoid-specific image handling - simple image with size and middle alignment
12938 and non-standard namespace name
12940 parsoid=wt2html,wt2wt,html2html
12942 [[Image:Foobar.jpg|50px|middle]]
12944 <p><span class="mw-valign-middle" 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="6" width="50"/></a></span></p>
12948 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
12950 [[File:Foobar.jpg|500x10px|baseline|caption]]
12952 <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>
12956 Parsoid-specific image handling - simple image with border and size spec
12958 [[File:Foobar.jpg|50px|border|caption]]
12960 <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>
12964 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12966 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
12968 <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/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption content</figcaption></figure>
12972 Parsoid-specific image handling - thumbnail with halign, valign, and caption
12975 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
12977 <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/180px-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>
12981 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
12983 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
12985 <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/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a><figcaption>caption</figcaption></figure>
12989 Parsoid-specific image handling - thumbnail with specific size, halign,
12990 valign, and caption (existing content)
12992 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
12994 <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>
12998 Parsoid-specific image handling - framed image with specific size and caption
13001 parsoid=wt2html,wt2wt,html2html
13003 [[File:Foobar.jpg|frame|500x50px|caption]]
13005 <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>
13009 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
13012 parsoid=wt2html,wt2wt,html2html
13014 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
13016 <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>
13020 Parsoid-specific image handling - frameless image with specific size, border, and caption
13022 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
13024 <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>
13028 Parsoid-specific image handling - simple image with a formatted caption
13030 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
13032 <p><span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></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>
13036 Parsoid-specific image handling - caption with a template in it
13038 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
13040 <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>
13044 Parsoid-specific image handling - caption with unbalanced tags in it
13046 parsoid=wt2html,wt2wt,html2html
13049 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
13053 <figure typeof="mw:Image/Thumb"><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="23" width="200"/></a><figcaption>This caption has a <center>unbalanced tag in it.</center></figcaption></figure>
13058 Parsoid-specific image handling - empty caption (1)
13060 parsoid=wt2html,wt2wt
13062 [[File:Foobar.jpg|thumb|]]
13064 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption></figcaption></figure>
13067 # empty captions don't get serialized unless we're in the "round trip" case
13069 Parsoid-specific image handling - empty caption (2)
13073 <figure class="mw-default-size" typeof="mw:Image/Thumb">
13074 <a href="./File:Foobar.jpg">
13075 <img resource="./File:Foobar.jpg"
13076 src="//example.com/images/3/3a/Foobar.jpg"
13077 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
13078 height="25" width="220"/>
13080 <figcaption></figcaption>
13083 [[File:Foobar.jpg|thumb]]
13087 Parsoid-specific image handling - whitespace caption
13089 [[File:Foobar.jpg|thumb| ]]
13091 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption> </figcaption></figure>
13095 Parsoid-specific image handling - lang option
13098 [[File:Foobar.svg|lang=de|caption]]
13102 <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>
13111 Subpage test/subpage
13119 subpage title=[[Subpage test]]
13123 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
13128 Subpage noslash link
13130 subpage title=[[Subpage test]]
13134 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
13139 Subpage test/1/2/subpage
13145 Relative subpage noslash link
13147 parsoid=wt2wt,wt2html,html2html
13148 subpage title=[[Subpage test/1/2/3/4]]
13154 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
13155 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
13158 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
13159 <p><a rel="mw:WikiLink" href="Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
13163 Parsoid: dot-slash prefixed wikilinks
13173 </p><p>[[././baz/]]
13178 </p><p>[[././baz/]]
13183 Render invalid page names as plain text (bug 51090)
13196 [[{{echo|./../foo}}|bar]]
13197 [[{{echo|foo/.}}|bar]]
13198 [[{{echo|foo/..}}|bar]]
13199 [[{{echo|foo~~~~bar}}]]
13200 [[{{echo|foo>bar}}]]
13201 [[{{echo|foo././bar}}]]
13202 [[{{echo|foo{bar}}]]
13203 [[{{echo|foo}bar}}]]
13204 [[{{echo|foo[bar}}]]
13205 [[{{echo|foo]bar}}]]
13206 [[{{echo|foo<bar}}]]
13208 <p>[[./../foo|bar]]
13218 </p><p>[[./../foo|bar]]
13231 <p>[[./../foo|bar]]
13242 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
13243 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
13244 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
13245 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
13246 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
13247 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
13248 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
13249 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
13250 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
13251 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
13252 [[<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>
13260 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
13265 BUG 561: {{/Subpage}}
13267 subpage title=[[Page]]
13271 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
13279 Category:MediaWiki User's Guide
13287 [[:Category:MediaWiki User's Guide]]
13289 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
13298 [[Category:MediaWiki User's Guide]]
13300 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13304 PAGESINCATEGORY invalid title fatal (r33546 fix)
13306 {{PAGESINCATEGORY:<bogus>}}
13313 Category with different sort key
13317 [[Category:MediaWiki User's Guide|Foo]]
13319 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13323 Category with identical sort key
13327 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13329 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
13333 Category with empty sort key
13338 [[Category:MediaWiki User's Guide|]]
13340 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
13344 Category with empty sort key and parentheses
13349 [[Category:Foo (bar)|]]
13351 [[Category:Foo (bar)|Foo]]
13355 Category with link tail
13360 123[[Category:Foo]]456
13362 123[[Category:Foo]]456
13366 Category with template
13371 [[Category:{{echo|Foo}}]]
13373 [[Category:{{echo|Foo}}]]
13377 Category with template in sort key
13382 [[Category:Foo|{{echo|Bar}}]]
13384 [[Category:Foo|{{echo|Bar}}]]
13388 Category with template in sort key and title
13393 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13395 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
13399 Category / paragraph interactions
13401 Foo [[Category:Baz]] Bar
13403 Foo [[Category:Baz]]
13411 [[Category:Baz]] Bar
13424 {{echo|[[Category:Baz]]}}
13439 Parsoid: Serialize link to category page with colon escape
13445 [[:Category:Foo|Bar]]
13448 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Category:Foo</a>
13449 <a rel="mw:WikiLink" href="Category:Foo" title="Category:Foo">Bar</a>
13454 Parsoid: Link prefix/suffixes aren't applied to category links
13456 parsoid=wt2html,wt2wt,html2html
13461 <p>x<link rel="mw:PageProp/Category" href="Category:Foo">y</p>
13465 Parsoid: Serialize link to file page with colon escape
13471 [[:File:Foo.png|Bar]]
13474 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
13475 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
13480 Parsoid: Serialize a genuine category link without colon escape
13485 [[Category:Foo|Bar]]
13487 <link rel="mw:PageProp/Category" href="Category:Foo">
13488 <link rel="mw:PageProp/Category" href="Category:Foo#Bar">
13492 Normalize hrefs properly before testing for invalid link targets (bug 70894)
13496 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
13498 [[Category:Toxine bactérienne]]
13502 Parsoid: Defaultsort
13504 {{DEFAULTSORT:Foo}}
13506 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
13510 Parsoid: Defaultsort (template-generated)
13512 {{{{echo|DEFAULTSORT}}:Foo}}
13514 <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}}]}'/>
13518 ### Inter-language links
13521 Interlanguage links
13529 es:Alimento fr:Nourriture zh:食品
13531 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
13532 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
13533 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
13537 Duplicate interlanguage links (bug 24502)
13548 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
13549 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
13550 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
13551 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
13558 Basic section headings
13565 ===Smaller headline===
13568 <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>
13571 <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>
13574 <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>
13580 Section headings with TOC
13583 === Subheadline 1 ===
13584 ===== Skipping a level =====
13585 ====== Skipping a level ======
13589 ===Another headline===
13591 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13593 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
13595 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
13597 <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>
13599 <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>
13606 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
13608 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
13614 <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>
13615 <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>
13616 <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>
13617 <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>
13618 <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>
13621 <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>
13626 TOC anchors don't collide
13634 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13636 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
13637 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
13638 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
13639 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
13643 <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>
13644 <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>
13645 <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>
13646 <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>
13650 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
13652 Handling of sections up to level 6 and beyond
13655 == Level 2 Heading==
13656 === Level 3 Heading===
13657 ==== Level 4 Heading====
13658 ===== Level 5 Heading=====
13659 ====== Level 6 Heading======
13660 ======= Level 7 Heading=======
13661 ======== Level 8 Heading========
13662 ========= Level 9 Heading=========
13663 ========== Level 10 Heading==========
13665 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13667 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
13669 <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>
13671 <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>
13673 <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>
13675 <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>
13677 <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>
13678 <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>
13679 <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>
13680 <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>
13681 <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>
13695 <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>
13696 <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>
13697 <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>
13698 <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>
13699 <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>
13700 <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>
13701 <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>
13702 <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>
13703 <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>
13704 <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>
13709 TOC regression (T11764)
13713 ==== title 1.1.1 ====
13718 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13720 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13722 <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>
13724 <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>
13727 <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>
13730 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13732 <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>
13738 <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>
13739 <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>
13740 <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>
13741 <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>
13742 <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>
13743 <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>
13748 TOC with wgMaxTocLevel=3 (bug 6204)
13754 ==== title 1.1.1 ====
13759 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13761 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13763 <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>
13764 <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>
13767 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
13769 <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>
13775 <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>
13776 <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>
13777 <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>
13778 <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>
13779 <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>
13780 <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>
13785 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
13791 ====Section 1.1.1====
13792 ====Section 1.1.1.1====
13795 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13797 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
13799 <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>
13802 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
13806 <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>
13807 <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>
13808 <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>
13809 <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>
13810 <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>
13816 Resolving duplicate section names
13821 <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>
13822 <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>
13827 Resolving duplicate section names with differing case (bug 10721)
13832 <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>
13833 <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>
13845 Template with sections, __NOTOC__
13852 <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>
13853 <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>
13854 <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>
13855 <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>
13860 __NOEDITSECTION__ keyword
13866 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
13867 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
13872 Link inside a section heading
13874 ==Section with a [[Main Page|link]] in it==
13876 <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>
13881 TOC regression (T14077)
13888 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13890 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
13892 <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>
13895 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
13899 <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>
13900 <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>
13901 <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>
13906 BUG 1219 URL next to image (good)
13908 http://example.com [[File:Foobar.jpg]]
13910 <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>
13913 <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>
13917 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
13920 The line above must have a trailing space!
13923 But just in case it doesn't...
13925 <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>
13926 <p>The line above must have a trailing space!
13928 <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>
13929 <p>But just in case it doesn't...
13934 Header with special characters (bug 25462)
13936 The tooltips shall not show entities to the user (ie. be double escaped)
13953 <p>The tooltips shall not show entities to the user (ie. be double escaped)
13955 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
13957 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
13958 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
13959 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
13960 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
13961 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
13965 <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>
13968 <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>
13971 <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>
13974 <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>
13977 <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>
13983 Header with space, plus and underscore as entity
13985 Id should not contain + for spaces
13987 == Space between Text ==
13990 == Space-Entity between Text ==
13993 == Plus+between+Text ==
13996 == Plus-Entity+between+Text ==
13999 == Underscore_between_Text ==
14002 == Underscore-Entity_between_Text ==
14005 [[#Space between Text]]
14006 [[#Space-Entity between Text]]
14007 [[#Plus+between+Text]]
14008 [[#Plus-Entity+between+Text]]
14009 [[#Underscore_between_Text]]
14010 [[#Underscore-Entity_between_Text]]
14012 <p>Id should not contain + for spaces
14014 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14016 <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>
14017 <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>
14018 <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>
14019 <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>
14020 <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>
14021 <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>
14025 <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>
14028 <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>
14031 <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>
14034 <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>
14037 <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>
14040 <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>
14042 </p><p><a href="#Space_between_Text">#Space between Text</a>
14043 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
14044 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
14045 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
14046 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
14047 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
14052 Headers with excess '=' characters
14053 (Are similar tests necessary beyond the 1st level?)
14057 =''italic'' heading==
14058 ==''italic'' heading=
14060 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14062 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
14063 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
14064 <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>
14065 <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>
14069 <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>
14070 <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>
14071 <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>
14072 <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>
14077 HTML headers vs TOC (bug 23393)
14078 (__NOEDITSECTION__ for clearer output, doesn't matter here)
14090 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
14092 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
14094 <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>
14095 <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>
14098 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
14100 <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>
14101 <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>
14107 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
14108 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
14109 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
14110 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
14111 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
14112 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
14117 Single-line or multiline-comments can follow headings
14119 parsoid=wt2html,wt2wt
14127 <h2><span class="mw-headline" id="foo">foo</span></h2>
14128 <h2><span class="mw-headline" id="bar">bar</span></h2>
14129 <h2><span class="mw-headline" id="baz">baz</span></h2>
14134 BUG 1219 URL next to image (broken)
14136 http://example.com[[File:Foobar.jpg]]
14138 <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>
14141 <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>
14145 Bug 1186 news: in the middle of text
14147 http://en.wikinews.org/wiki/Wikinews:Workplace
14149 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
14155 Namespaced link must have a title
14164 Namespaced link must have a title (bad fragment version)
14166 [[Project:#fragment]]
14168 <p>[[Project:#fragment]]
14174 ### HTML tags and HTML attributes
14178 div with no attributes
14180 <div>HTML rocks</div>
14182 <div>HTML rocks</div>
14187 div with double-quoted attribute
14189 <div id="rock">HTML rocks</div>
14191 <div id="rock">HTML rocks</div>
14196 div with single-quoted attribute
14198 <div id='rock'>HTML rocks</div>
14200 <div id="rock">HTML rocks</div>
14205 div with unquoted attribute
14207 <div id=rock>HTML rocks</div>
14209 <div id="rock">HTML rocks</div>
14214 div with illegal double attributes
14216 <div id="a" id="b">HTML rocks</div>
14218 <div id="b">HTML rocks</div>
14222 # FIXME: produce empty string instead of "class" in the PHP parser, following
14225 div with empty attribute value, space before equals
14229 <div class =>HTML rocks</div>
14231 <div class="">HTML rocks</div>
14236 div with multiple empty attribute values
14240 <div id= title=>HTML rocks</div>
14242 <div id="" title="">HTML rocks</div>
14247 table with multiple empty attribute values
14255 <table title="" id="">
14256 <tbody><tr><td> hi</td></tr>
14261 div with braces in attribute value
14263 <div title="{}">Foo</div>
14265 <div title="{}">Foo</div>
14268 <div title="{}">Foo</div>
14271 # This it very inconsistent in the PHP parser: it returns
14272 # class="class" if there is a space between the name and the equal sign (see
14273 # 'div with empty attribute value, space before equals'), but strips the
14274 # attribute completely if the space is missing. We hope that not much content
14275 # depends on this, so are implementing the behavior below in Parsoid for
14276 # consistencies' sake.
14277 # FIXME: fix this behavior in the PHP parser?
14279 div with empty attribute value, no space before equals
14281 parsoid=wt2html,html2html
14283 <div class=>HTML rocks</div>
14285 <div>HTML rocks</div>
14288 <div class="">HTML rocks</div>
14292 HTML multiple attributes correction
14294 <p class="error" class="awesome">Awesome!</p>
14296 <p class="awesome">Awesome!</p>
14301 Table multiple attributes correction
14304 !+ class="error" class="awesome"| status
14309 <th class="awesome"> status
14317 <DIV ID="x">HTML ROCKS</DIV>
14319 <div id="x">HTML ROCKS</div>
14324 Non-ASCII pseudo-tags are rendered as text
14333 Pseudo-tag with URL 'name' renders as url link
14335 <http://example.com/>
14337 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
14342 text with amp in the middle of nowhere
14346 <p>Remember AT&T?
14351 text with character entity: eacute
14353 I always thought é was a cute letter.
14355 <p>I always thought é was a cute letter.
14358 <p>I always thought é was a cute letter.</p>
14362 text with entity-escaped character entity-like string: eacute
14364 I always thought &eacute; was a cute letter.
14366 <p>I always thought &eacute; was a cute letter.
14371 text with undefined character entity: xacute
14373 I always thought &xacute; was a cute letter.
14375 <p>I always thought &xacute; was a cute letter.
14379 # TODO: generalize to PHP parser?
14385 <data value="5">five</data>
14386 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14387 <mark>This highlighted text</mark>
14389 <p><data value="5">five</data>
14390 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
14391 <mark>This highlighted text</mark></p>
14395 HTML tag with leading space is parsed as text
14399 <p>< div>foo< /div>
14404 ### Nesting tests (see bug 41545, 50604, 51081)
14407 # This test case is fixed in Parsoid by domino 1.0.12. (bug 50604)
14408 # Note that html2wt is considerably more difficult if we use <b> in
14409 # the test case, instead of <big>
14411 Ensure that HTML adoption agency algorithm is properly implemented.
14413 <big>X<big>Y</big>Z</big>
14415 <p><big>X<big>Y</big>Z</big>
14419 # This was bug 41545 in the PHP parser.
14420 # Note that tidy doesn't handle this correctly.
14424 <kbd>X<kbd>Y</kbd>Z</kbd>
14426 <p><kbd>X<kbd>Y</kbd>Z</kbd>
14430 # The following cases were bug 51081 in the PHP parser.
14431 # Note that there are some other nestable tags (b, i, etc) which are
14432 # not covered; see bug 51081 for discussion.
14434 # Note that tidy doesn't handle this correctly.
14438 <em>X<em>Y</em>Z</em>
14440 <p><em>X<em>Y</em>Z</em>
14444 # Note that tidy doesn't handle this correctly.
14446 Nesting of <strong>
14448 <strong>X<strong>Y</strong>Z</strong>
14450 <p><strong>X<strong>Y</strong>Z</strong>
14459 <p><q>X<q>Y</q>Z</q></p>
14462 # Note that tidy doesn't handle this correctly.
14466 <ruby>X<ruby>Y</ruby>Z</ruby>
14468 <p><ruby>X<ruby>Y</ruby>Z</ruby>
14472 # Note that tidy doesn't handle this correctly.
14476 <bdo>X<bdo>Y</bdo>Z</bdo>
14478 <p><bdo>X<bdo>Y</bdo>Z</bdo>
14490 [[Media:Foobar.jpg]]
14492 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
14497 Media link with text
14499 [[Media:Foobar.jpg|A neat file to look at]]
14501 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
14505 # FIXME: this is still bad HTML tag nesting
14506 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
14508 Media link with nasty text
14510 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
14512 <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>
14515 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
14516 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
14520 Media link to nonexistent file (bug 1702)
14522 [[Media:No such.jpg]]
14524 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
14529 Image link to nonexistent file (bug 1850 - good)
14531 [[File:No_such.jpg]]
14533 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
14536 <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>
14540 :Image link to nonexistent file (bug 1850 - bad)
14542 [[:Image:No such.jpg]]
14544 <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>
14547 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
14553 Character reference normalization in link text (bug 1938)
14555 [[Main Page|this&that]]
14557 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
14564 Test for unicode normalization
14566 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
14570 (bug 19451) Links should refer to the normalized form.
14578 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14579 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14580 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14581 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14582 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
14587 Empty attribute crash test (bug 2067)
14589 <font color="">foo</font>
14591 <p><font color="">foo</font>
14596 Empty attribute crash test single-quotes (bug 2067)
14598 <font color=''>foo</font>
14600 <p><font color="">foo</font>
14605 Attribute test: equals, then nothing
14607 <font color=>foo</font>
14609 <p><font>foo</font>
14614 Attribute test: unquoted value
14616 <font color=x>foo</font>
14618 <p><font color="x">foo</font>
14623 Attribute test: unquoted but illegal value (hash)
14625 <font color=#x>foo</font>
14627 <p><font color="#x">foo</font>
14632 Attribute test: no value
14634 <font color>foo</font>
14636 <p><font color="color">foo</font>
14641 Bug 2095: link with three closing brackets
14645 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
14648 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
14652 Bug 2095: link with pipe and three closing brackets
14654 [[Main Page|link]]]
14656 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
14659 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
14663 Bug 2095: link with pipe and three closing brackets, version 2
14665 [[Main Page|[http://example.com/]]]
14667 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
14670 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
14679 Template:Dangerous attribute
14681 " onmouseover="alert(document.cookie)
14685 Template:Dangerous style attribute
14687 border-size: expression(alert(document.cookie))
14693 <div style="float: right; {{{1}}}">Magic div</div>
14697 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
14699 <div title="{{test}}"></div>
14701 <div title="This is a test template"></div>
14705 # Parsoid has enough context to handle this case
14707 Bug 2304: HTML attribute safety (dangerous template; 2309)
14709 <div title="{{dangerous attribute}}"></div>
14711 <div title=""></div>
14714 <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>
14718 Bug 2304: HTML attribute safety (dangerous style template; 2309)
14720 <div style="{{dangerous style attribute}}"></div>
14722 <div style="/* insecure input */"></div>
14727 Bug 2304: HTML attribute safety (safe parameter; 2309)
14729 {{div style|width: 200px}}
14731 <div style="float: right; width: 200px">Magic div</div>
14736 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
14738 {{div style|width: expression(alert(document.cookie))}}
14740 <div style="/* insecure input */">Magic div</div>
14745 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
14747 {{div style|"><script>alert(document.cookie)</script>}}
14749 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14754 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
14756 {{div style|" ><script>alert(document.cookie)</script>}}
14758 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
14763 Bug 2304: HTML attribute safety (link)
14765 <div title="[[Main Page]]"></div>
14767 <div title="[[Main Page]]"></div>
14772 Bug 2304: HTML attribute safety (italics)
14774 <div title="''foobar''"></div>
14776 <div title="''foobar''"></div>
14781 Bug 2304: HTML attribute safety (bold)
14783 <div title="'''foobar'''"></div>
14785 <div title="'''foobar'''"></div>
14791 Bug 2304: HTML attribute safety (ISBN)
14793 <div title="ISBN 1234567890"></div>
14795 <div title="ISBN 1234567890"></div>
14800 Bug 2304: HTML attribute safety (RFC)
14802 <div title="RFC 1234"></div>
14804 <div title="RFC 1234"></div>
14809 Bug 2304: HTML attribute safety (PMID)
14811 <div title="PMID 1234567890"></div>
14813 <div title="PMID 1234567890"></div>
14818 Bug 2304: HTML attribute safety (web link)
14820 <div title="http://example.com/"></div>
14822 <div title="http://example.com/"></div>
14827 Bug 2304: HTML attribute safety (named web link)
14829 <div title="[http://example.com/ link]"></div>
14831 <div title="[http://example.com/ link]"></div>
14836 Bug 3244: HTML attribute safety (extension; safe)
14838 <div style="<nowiki>background:blue</nowiki>"></div>
14840 <div style="background:blue"></div>
14845 Bug 3244: HTML attribute safety (extension; unsafe)
14847 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
14849 <div style="/* insecure input */"></div>
14853 # More MSIE fun discovered by Tom Gilder
14856 MSIE CSS safety test: spurious slash
14858 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
14860 <div style="/* insecure input */">evil</div>
14865 MSIE CSS safety test: hex code
14867 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
14869 <div style="/* insecure input */">evil</div>
14874 MSIE CSS safety test: comment in url
14876 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
14878 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
14883 MSIE CSS safety test: comment in expression
14885 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
14887 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
14892 CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567)
14894 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
14896 <p style="/* invalid control char */">A</p>
14901 MSIE 6 CSS safety test: Fullwidth (bug 55332)
14903 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
14904 <div style="top:EXPRESSION(alert())">B</div>
14906 <p style="/* insecure input */">A</p>
14907 <div style="/* insecure input */">B</div>
14912 MSIE 6 CSS safety test: IPA extensions (bug 55332)
14914 <div style="background-image:uʀʟ(javascript:alert())">A</div>
14915 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
14917 <div style="/* insecure input */">A</div>
14918 <p style="/* insecure input */">B</p>
14923 MSIE 6 CSS safety test: sup/sub script (bug 55332)
14925 <div style="background-image:url⁽javascript:alert())">A</div>
14926 <div style="background-image:url₍javascript:alert())">B</div>
14927 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
14929 <div style="/* insecure input */">A</div>
14930 <div style="/* insecure input */">B</div>
14931 <p style="/* insecure input */">C</p>
14939 title="data:text/html,<img src=1 onerror=alert(1)>"
14940 style="-o-link:attr(title);-o-link-source:current">X</div>
14942 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
14947 MSIE 6 CSS safety test: Repetition markers (bug 55332)
14949 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
14950 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
14951 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
14952 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
14953 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
14954 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
14955 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
14957 <p style="/* insecure input */">A</p>
14958 <p style="/* insecure input */">B</p>
14959 <p style="/* insecure input */">C</p>
14960 <p style="/* insecure input */">D</p>
14961 <p style="/* insecure input */">E</p>
14962 <p style="/* insecure input */">F</p>
14963 <p style="/* insecure input */">G</p>
14968 Table attribute legitimate extension
14971 !+ style="<nowiki>color:blue</nowiki>"| status
14976 <th style="color:blue"> status
14982 Table attribute safety
14985 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
14990 <th style="/* insecure input */"> status
14996 CSS line continuation 1
14998 <div style="background-image: u\ rl(test.jpg);"></div>
15000 <div style="/* insecure input */"></div>
15005 CSS line continuation 2
15007 <div style="background-image: u\ rl(test.jpg); "></div>
15009 <div style="/* insecure input */"></div>
15020 Expansion of multi-line templates in attribute values (bug 6255)
15022 <div style="background: {{identity|#00FF00}}">-</div>
15024 <div style="background: #00FF00">-</div>
15030 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
15032 <div style="background:
15035 <div style="background: #00FF00">-</div>
15038 <div style="background:
15043 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
15045 <div style="background: #00FF00">-</div>
15047 <div style="background: #00FF00">-</div>
15052 evil <math>-wiki-tags without Extension:Math enabled
15054 <math><img src="some evil external link"><script>some_evil_javascript();</script></math>
15056 <p><math><img src="some evil external link"><script>some_evil_javascript();</script></math></p>
15060 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
15063 Parser hook: empty input
15076 Parser hook: empty input using terminated empty elements
15089 Parser hook: empty input using terminated empty elements (space before)
15102 Parser hook: basic input
15116 Parser hook: case insensitive
15130 Parser hook: case insensitive, redux
15143 Parser hook: nested tags
15147 <tag><tag></tag></tag>
15158 Parser hook: basic arguments
15160 <tag width=200 height = "100" depth = '50' square></tag>
15168 'square' => 'square',
15175 Parser hook: argument containing a forward slash (bug 5344)
15177 <tag filename='/tmp/bla'></tag>
15182 'filename' => '/tmp/bla',
15189 Parser hook: empty input using terminated empty elements (bug 2374)
15202 # </tag> should be output literally since there is no matching tag that begins it
15204 Parser hook: basic arguments using terminated empty elements (bug 2374)
15206 <tag width=200 height = "100" depth = '50' square/>
15216 'square' => 'square',
15225 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
15229 Parser hook: static parser hook not inside a comment
15231 <statictag>hello, world</statictag>
15232 <statictag action=flush/>
15240 Parser hook: static parser hook inside a comment
15242 <!-- <statictag>hello, world</statictag> -->
15243 <statictag action=flush/>
15249 # Nested template calls; this case was broken by Parser.php rev 1.506,
15253 Template:One-parameter
15255 (My parameter is: {{{1}}})
15259 Template:Map-one-parameter
15261 {{{{{1}}}|{{{2}}}}}
15265 Nested template calls
15267 {{Map-one-parameter|One-parameter|param}}
15269 <p>(My parameter is: param)
15278 # HTML+Tidy effectively strips out the empty tags completely
15279 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
15280 # which Tidy would have done for the PHP parser had there been content inside it.
15282 Sanitizer: Closing of open tags
15284 <s></s><table></table>
15286 <s></s><table></table>
15289 <p><s></s></p><table></table>
15293 Sanitizer: Closing of open but not closed tags
15302 Sanitizer: Closing of closed but not open tags
15311 Sanitizer: Closing of closed but not open table tags
15313 Table not started</td></tr></table>
15315 <p>Table not started</td></tr></table>
15320 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
15322 <span id="æ: v">byte</span>[[#æ: v|backlink]]
15324 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
15328 # In HTML5, the restrictions are that id must contain at least one character,
15329 # and must not contain any space characters.
15331 Sanitizer: Validating the contents of the id attribute (bug 4515)
15335 <br id="" /><br id="a space" />
15340 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
15342 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
15346 <br id="foo" /><br id="foo" />
15348 Something need to be done. foo-2 ?
15352 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
15355 <meta itemprop="hello" content="world">
15356 <meta http-equiv="refresh" content="5">
15357 <meta itemprop="hello" http-equiv="refresh" content="5">
15358 <link itemprop="hello" href="{{SERVER}}">
15359 <link rel="stylesheet" href="{{SERVER}}">
15360 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
15363 <div itemscope="itemscope">
15364 <p> <meta itemprop="hello" content="world" />
15365 <meta http-equiv="refresh" content="5">
15366 <meta itemprop="hello" content="5" />
15368 <link itemprop="hello" href="http://example.org" />
15369 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
15370 <link itemprop="hello" href="http://example.org" />
15376 Language converter: output gets cut off unexpectedly (bug 5757)
15380 this bit is safe: }-
15382 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
15384 then we get cut off here: }-
15386 all additional text is vanished
15388 <p>this bit is safe: }-
15389 </p><p>but if we add a conversion instance: xxx
15390 </p><p>then we get cut off here: }-
15391 </p><p>all additional text is vanished
15396 Self closed html pairs (bug 5487)
15399 <center><font id="bug" />Centered text</center>
15400 <div><font id="bug2" />In div text</div>
15402 <center><font id="bug" />Centered text</center>
15403 <div><font id="bug2" />In div text</div>
15412 Punctuation: nbsp before exclamation
15416 <p>C'est grave !
15421 Punctuation: CSS !important (bug 11874)
15423 <div style="width:50% !important">important</div>
15425 <div style="width:50% !important">important</div>
15430 Punctuation: CSS ! important (bug 11874; with space after)
15432 <div style="width:50% ! important">important</div>
15434 <div style="width:50% ! important">important</div>
15439 HTML bullet list, closed tags (bug 5497)
15452 <ul data-parsoid='{"stx":"html"}'>
15453 <li data-parsoid='{"stx":"html"}'>One</li>
15454 <li data-parsoid='{"stx":"html"}'>Two</li>
15460 HTML bullet list, unclosed tags (bug 5497)
15472 <ul data-parsoid='{"stx":"html"}'>
15473 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15474 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15480 HTML ordered list, closed tags (bug 5497)
15493 <ol data-parsoid='{"stx":"html"}'>
15494 <li data-parsoid='{"stx":"html"}'>One</li>
15495 <li data-parsoid='{"stx":"html"}'>Two</li>
15501 HTML ordered list, unclosed tags (bug 5497)
15514 <ol data-parsoid='{"stx":"html"}'>
15515 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
15516 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
15522 HTML nested bullet list, closed tags (bug 5497)
15547 HTML nested bullet list, open tags (bug 5497)
15584 HTML nested ordered list, closed tags (bug 5497)
15609 HTML nested ordered list, open tags (bug 5497)
15646 HTML ordered list item with parameters oddity
15648 <ol><li id="fragment">One</li>
15651 <ol><li id="fragment">One</li>
15656 # parsoid doesn't explicitly mark autonumbered links, see bug 53505
15658 bug 5918: autonumbering
15660 [http://first/] [http://second] [ftp://ftp]
15664 [mailto:enclosed@mail.tld With target]
15666 [mailto:enclosed@mail.tld]
15668 mailto:inline@mail.tld
15670 <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>
15671 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
15672 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
15673 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
15674 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
15677 <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>
15678 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
15679 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
15680 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
15681 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
15686 # Security and HTML correctness
15687 # From Nick Jenkins' fuzz testing
15691 Fuzz testing: Parser13
15706 Fuzz testing: Parser14
15711 <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>
15712 http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
15714 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15720 <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>
15722 <div id="toc" class="toc">
15723 <div id="toctitle">
15727 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
15734 Fuzz testing: Parser14-table
15739 <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>
15740 <table style="__TOC__">
15745 <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>
15746 <table style="__TOC__">
15753 # Known to produce bogus xml (extra </td>)
15755 Fuzz testing: Parser16
15784 Fuzz testing: Parser21
15787 ! irc://{{ftp://a" onmouseover="alert('hello world');"
15792 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
15802 Fuzz testing: Parser22
15804 http://===r:::https://b
15808 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
15816 # Known to produce bad XML for now
15818 Fuzz testing: Parser24
15825 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
15826 <br style="onmouseover='alert(document.cookie);' " />
15828 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15833 <u class="|">}}}} >
15834 <br style="onmouseover='alert(document.cookie);'" />
15836 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
15845 # Note: the current result listed for this is not what the original one was,
15846 # but the original bug was JavaScript injection, which is fixed in any case.
15847 # It's not clear that the original result listed was any more correct than the
15848 # current one. Original result:
15851 # <li class="||">
15852 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15854 Fuzz testing: Parser25 (bug 6055)
15860 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
15862 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
15867 Fuzz testing: URL adjacent extension (with space, clean)
15869 http://example.com <nowiki>junk</nowiki>
15871 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
15874 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
15878 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
15880 http://example.com<nowiki>junk</nowiki>
15882 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
15885 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
15889 Fuzz testing: URL adjacent extension (no space, dirty; pre)
15891 http://example.com<pre>junk</pre>
15893 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
15896 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
15901 <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>
15905 Fuzz testing: image with bogus manual thumbnail
15907 [[Image:foobar.jpg|thumbnail= ]]
15909 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
15912 <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>
15916 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
15918 <pre dir=" "></pre>
15920 <pre dir=" "></pre>
15925 Parsing optional HTML elements (Bug 6171)
15930 <td> Some tabular data</td>
15931 <td> More tabular data ...
15932 <td> And yet som tabular data</td>
15938 <td> Some tabular data</td>
15939 <td> More tabular data ...
15940 </td><td> And yet som tabular data</td>
15947 Correct handling of <td>, <tr> (Bug 6171)
15952 <td> Some tabular data</td>
15953 <td> More tabular data ...</td>
15954 <td> And yet som tabular data</td>
15960 <td> Some tabular data</td>
15961 <td> More tabular data ...</td>
15962 <td> And yet som tabular data</td>
15970 Parsing crashing regression (fr:JavaScript)
15974 <p></body></x>
15979 Inline wiki vs wiki block nesting
15985 <p><b>Bold paragraph</b>
15986 </p><p>New wiki paragraph
15990 # FIXME: The current php output is documented
15991 # and desired output is the parsoid target.
15993 Inline HTML vs wiki block nesting
15999 <p><b>Bold paragraph
16000 </p><p>New wiki paragraph</b>
16003 <p><b>Bold paragraph</b>
16004 </p><p>New wiki paragraph
16008 # Original result was this:
16009 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
16011 # While that might be marginally more intuitive, maybe, the six-apostrophe
16012 # construct is clearly pathological and the result stated here (which is what
16013 # the parser actually does) is about as reasonable as anything.
16015 Mixing markup for italics and bold
16018 '''bold''''''bold''bolditalics'''''
16020 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
16028 Article for special page transclusion test
16032 Special page transclusion
16035 {{Special:Prefixindex/Xyzzyx}}
16037 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16042 Special page transclusion twice (bug 5021)
16045 {{Special:Prefixindex/Xyzzyx}}
16046 {{Special:Prefixindex/Xyzzyx}}
16048 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16049 <table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
16054 Transclusion of default MediaWiki message
16056 {{MediaWiki:Mainpage}}
16063 Transclusion of nonexistent MediaWiki message
16065 {{MediaWiki:Mainpagexxx}}
16067 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
16072 Transclusion of MediaWiki message with underscore
16074 {{MediaWiki:history_short}}
16081 Transclusion of MediaWiki message with space
16083 {{MediaWiki:history short}}
16090 Invalid header with following text
16100 Section extraction test (section 0)
16120 Section extraction test (section 1)
16142 Section extraction test (section 2)
16163 Section extraction test (section 3)
16183 Section extraction test (section 4)
16207 Section extraction test (section 5)
16227 Section extraction test (section 6)
16248 Section extraction test (section 7)
16268 Section extraction test (section 8)
16288 Section extraction test (section 9)
16309 Section extraction test (section 10)
16329 Section extraction test (nonexistent section 11)
16348 Section extraction test with bogus heading (section 1)
16353 ==bogus== not a legal section
16357 ==bogus== not a legal section
16361 Section extraction test with bogus heading (section 2)
16366 ==bogus== not a legal section
16373 Section extraction test with comment after heading (section 1)
16385 Section extraction test with comment after heading (section 2)
16397 Section extraction test with bogus <nowiki> heading (section 1)
16402 ==bogus== <nowiki>not a legal section</nowiki>
16406 ==bogus== <nowiki>not a legal section</nowiki>
16410 Section extraction test with bogus <nowiki> heading (section 2)
16415 ==bogus== <nowiki>not a legal section</nowiki>
16422 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
16423 # instead of respecting commented sections
16425 Section extraction prefixed by comment (section 1)
16436 Section extraction prefixed by comment (section 2)
16447 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
16448 # instead of respecting HTML-style headings
16450 Section extraction, mixed wiki and html (section 1)
16466 Section extraction, mixed wiki and html (section 2)
16482 # Formerly testing for bug 3342
16484 Section extraction, heading surrounded by <noinclude>
16488 <noinclude>==unmarked==</noinclude>
16494 # Test behavior of bug 19910
16496 Sectiion with all-equals
16501 The line above must have a trailing space
16504 But just in case it doesn't...
16508 But just in case it doesn't...
16512 Section replacement test (section 0)
16543 Section replacement test (section 1)
16572 Section replacement test (section 2)
16602 Section replacement test (section 3)
16633 Section replacement test (section 4)
16660 Section replacement test (section 5)
16691 Section replacement test (section 6)
16721 Section replacement test (section 7)
16752 Section replacement test (section 8)
16783 Section replacement test (section 9)
16812 Section replacement test (section 10)
16842 Section replacement test with initial whitespace (bug 13728)
16846 Preformatted initial line
16850 Preformatted initial line
16857 Section extraction, heading followed by pre with 20 spaces (bug 6398)
16869 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
16882 Section extraction, <pre> around bogus header (bug 10309)
16899 Section replacement, <pre> around bogus header (bug 10309)
16901 noxml replace=2,"xxx"
16922 Handling of 
 in URLs
16926 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16929 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://
16931 a</a></li></ul></li></ul>
16935 Handling of %0A in URLs
16939 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16942 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
16946 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
16948 5 quotes, code coverage +1 line
16955 <p><b><i></i></b></p>
16958 # same html as previous, but wikitext adjusted to match parsoid html2wt
16959 # note that wt2html and html2html will put the <i> before the <b>
16961 5 quotes, code coverage +1 line w/ nowiki (1)
16963 parsoid=wt2wt,html2wt
16965 '''''<nowiki/>'''''
16970 <p><b><i></i></b></p>
16973 # same as previous, just swapping the <i> and <b>
16975 5 quotes, code coverage +1 line w/ nowiki (2)
16977 '''''<nowiki/>'''''
16982 <p><i><b></b></i></p>
16986 Special:Search page linking.
16990 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
16995 {{!}} is a magic word
16997 {{!}} is a magic word there and {{!}} is still a magic word here
16999 <p>| is a magic word there and | is still a magic word here
17002 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}' data-parsoid='{"pi":[[]]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}' data-parsoid='{"pi":[[]]}'>|</span> is still a magic word here</p>
17008 title=[[Parser test]]
17013 * {{FULLPAGENAMEE}}
17015 * {{BASEPAGENAMEE}}
17019 * {{ROOTPAGENAMEE}}
17021 * {{TALKPAGENAMEE}}
17022 * {{SUBJECTPAGENAME}}
17023 * {{SUBJECTPAGENAMEE}}
17026 * {{NAMESPACENUMBER}}
17030 * {{SUBJECTSPACEE}}
17031 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
17033 <ul><li> Parser test</li>
17034 <li> Parser_test</li>
17035 <li> Parser test</li>
17036 <li> Parser_test</li>
17037 <li> Parser test</li>
17038 <li> Parser_test</li>
17039 <li> Parser test</li>
17040 <li> Parser_test</li>
17041 <li> Parser test</li>
17042 <li> Parser_test</li>
17043 <li> Talk:Parser test</li>
17044 <li> Talk:Parser_test</li>
17045 <li> Parser test</li>
17046 <li> Parser_test</li>
17054 <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>
17057 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
17067 image4 |300px| centre
17068 image5.svg| http://///////
17073 <ul class="gallery mw-gallery-traditional">
17074 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17075 <div class="thumb" style="height: 150px;">Image1.png</div>
17076 <div class="gallerytext">
17079 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17080 <div class="thumb" style="height: 150px;">Image2.gif</div>
17081 <div class="gallerytext">
17086 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17087 <div class="thumb" style="height: 150px;">Image3</div>
17088 <div class="gallerytext">
17091 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17092 <div class="thumb" style="height: 150px;">Image4</div>
17093 <div class="gallerytext">
17098 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17099 <div class="thumb" style="height: 150px;">Image5.svg</div>
17100 <div class="gallerytext">
17101 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
17105 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17106 <div class="thumb" style="height: 150px;">* image6</div>
17107 <div class="gallerytext">
17115 Gallery (with options)
17117 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
17118 File:Nonexistent.jpg|caption
17119 File:Nonexistent.jpg
17120 image:foobar.jpg|some '''caption''' [[Main Page]]
17122 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
17125 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
17126 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
17127 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17128 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17129 <div class="gallerytext">
17134 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17135 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
17136 <div class="gallerytext">
17139 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17140 <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>
17141 <div class="gallerytext">
17142 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17146 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17147 <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>
17148 <div class="gallerytext">
17151 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
17152 <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>
17153 <div class="gallerytext">
17163 Gallery with link that has fragment
17166 image:foobar.jpg|link=Main_Page
17167 image:foobar.jpg|link=Main_Page#section
17168 image:foobar.jpg|link=Main Page#section|caption
17171 <ul class="gallery mw-gallery-traditional">
17172 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17173 <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>
17174 <div class="gallerytext">
17177 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17178 <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>
17179 <div class="gallerytext">
17182 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17183 <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>
17184 <div class="gallerytext">
17194 Gallery with wikitext inside caption
17197 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
17198 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
17201 <ul class="gallery mw-gallery-traditional">
17202 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17203 <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>
17204 <div class="gallerytext">
17205 <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>
17209 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17210 <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>
17211 <div class="gallerytext">
17212 <p>This is a test template
17221 gallery (with showfilename option)
17223 <gallery showfilename>
17224 File:Nonexistent.jpg|caption
17225 File:Nonexistent.jpg
17226 image:foobar.jpg|some '''caption''' [[Main Page]]
17230 <ul class="gallery mw-gallery-traditional">
17231 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17232 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17233 <div class="gallerytext">
17234 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17239 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17240 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17241 <div class="gallerytext">
17242 <p><a href="/wiki/File:Nonexistent.jpg" title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
17246 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17247 <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>
17248 <div class="gallerytext">
17249 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17250 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
17254 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17255 <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>
17256 <div class="gallerytext">
17257 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
17266 Gallery (with namespace-less filenames)
17269 File:Nonexistent.jpg
17275 <ul class="gallery mw-gallery-traditional">
17276 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17277 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17278 <div class="gallerytext">
17281 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17282 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
17283 <div class="gallerytext">
17286 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17287 <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>
17288 <div class="gallerytext">
17291 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
17292 <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>
17293 <div class="gallerytext">
17301 HTML Hex character encoding (spells the word "JavaScript")
17303 parsoid=wt2html,wt2wt,html2html
17305 JavaScript
17307 <p>JavaScript
17312 <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>
17316 HTML Hex character encoding bogus encoding (bug 26437 regression check)
17320 <p>&#xsee;&#XSEE;
17323 <p>&#xsee;&#XSEE;</p>
17327 HTML Hex character encoding mixed case
17329 parsoid=wt2html,wt2wt,html2html
17338 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
17342 __FORCETOC__ override
17354 ISBN 978-0-1234-56 789
17356 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
17359 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
17361 <p><a href="./Special:BookSources/9780123456" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>789</p>
17365 ISBN followed by 5 spaces
17376 ISBN ISBN 1234567890
17378 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17381 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
17391 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
17392 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
17393 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
17396 <p><a href="./Special:BookSources/346204561X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
17397 <a href="./Special:BookSources/080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
17398 <a href="./Special:BookSources/978080442957X" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a></p>
17402 ISBN with empty prefix (parsoid test)
17406 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17409 <p><a href="Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567890</a></p>
17413 Bug 22905: <abbr> followed by ISBN followed by </a>
17415 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
17417 <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>
17420 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" href="http://www.example.com">example.com</a></p>
17428 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
17433 Double RFC with a wiki link
17437 <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>
17446 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
17449 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
17453 Centre-aligned image
17455 [[Image:foobar.jpg|centre]]
17457 <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>
17464 [[Image:foobar.jpg|none]]
17466 <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>
17471 Width + Height sized image (using px) (height is ignored)
17473 [[Image:foobar.jpg|640x480px]]
17475 <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>
17480 Width-sized image (using px, no following whitespace)
17482 [[Image:foobar.jpg|640px]]
17484 <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>
17489 Width-sized image (using px, with following whitespace - test regression from r39467)
17491 [[Image:foobar.jpg|640px ]]
17493 <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>
17498 Width-sized image (using px, with preceding whitespace - test regression from r39467)
17500 [[Image:foobar.jpg| 640px]]
17502 <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>
17507 Image with page parameter
17511 [[File:LoremIpsum.djvu|page=2]]
17513 <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>
17516 <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>
17520 Another italics / bold test
17528 # FIXME: The php output seems broken. It's interleaving some open/close tags.
17534 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
17537 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
17542 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
17544 Images with the "|" character in the comment
17546 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
17548 <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>
17551 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption>An <a rel="mw:ExtLink" href="http://test/?param1=|left|&param2=|x">external</a> URL</figcaption></figure>
17555 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
17557 <html><script>alert(1);</script></html>
17559 <p><html><script>alert(1);</script></html>
17564 HTML with raw HTML ($wgRawHtml==true)
17568 <html><script>alert(1);</script></html>
17570 <p><script>alert(1);</script>
17575 Parents of subpages, one level up
17577 subpage title=[[Subpage test/L1/L2/L3]]
17581 <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>
17587 Parents of subpages, one level up, not named
17589 subpage title=[[Subpage test/L1/L2/L3]]
17593 <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>
17600 Parents of subpages, two levels up
17602 subpage title=[[Subpage test/L1/L2/L3]]
17608 <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
17609 </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>
17614 Parents of subpages, two levels up, without trailing slash or name.
17616 subpage title=[[Subpage test/L1/L2/L3]]
17625 Parents of subpages, two levels up, with lots of extra trailing slashes.
17627 subpage title=[[Subpage test/L1/L2/L3]]
17631 <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>
17636 Subpage test/L1/L2/L3Sibling
17642 Transclusion of a sibling page (one level up)
17644 subpage title=[[Subpage test/L1/L2/L3]]
17653 Transclusion of a child page
17655 subpage title=[[Subpage test/L1/L2]]
17664 Non-transclusion because of too many up levels
17666 subpage title=[[Subpage test/L1/L2/L3]]
17668 {{../../../../More than parent}}
17670 <p>{{../../../../More than parent}}
17675 Definition list code coverage
17681 <dl><dt> title  </dt>
17683 <dt> title </dt>
17689 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17690 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
17691 <dt>title</dt><dd> def</dd></dl>
17695 Don't fall for the self-closing div
17697 <div>hello world</div/>
17699 <div>hello world</div>
17708 <p>[[:Template:Msg]]
17717 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
17721 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
17723 Always escape literal '>' in output, not just after '<'
17737 <p>This is a test template
17738 This is a test template
17750 Inclusion of !userCanEdit() content
17754 <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>
17760 Out-of-order TOC heading levels
17769 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
17771 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
17773 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
17774 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
17777 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
17779 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
17780 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
17786 <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>
17787 <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>
17788 <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>
17789 <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>
17790 <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>
17791 <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>
17797 ISBN with a dummy number
17807 ISBN with space-delimited number
17811 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
17817 ISBN with multiple spaces, no number
17836 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
17837 </p><p>ISBN 12345678901
17843 ISBN with trailing year (bug 8110)
17845 ISBN 1-234-56789-0 - 2006
17847 ISBN 1 234 56789 0 - 2006
17849 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
17850 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
17858 {{anchorencode:foo bar©#%n}}
17860 <p>foo_bar.C2.A9.23.25n
17865 anchorencode trims spaces
17867 {{anchorencode: __pretty__please__}}
17874 anchorencode deals with links
17876 {{anchorencode: [[hello|world]] [[hi]]}}
17883 anchorencode deals with templates
17885 {{anchorencode: {{Foo}} }}
17892 anchorencode encodes like the TOC generator: (bug 18431)
17894 === _ +:.3A%3A&&]] ===
17895 {{anchorencode: _ +:.3A%3A&&]] }}
17898 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
17899 <p>.2B:.3A.253A.26.26.5D.5D
17904 Bug 6200: blockquotes and paragraph formatting
17925 Bug 8293: Use of center tag ruins paragraph formatting
17946 Parsing of overlapping (improperly nested) inline html tags
17948 <span><s>x</span></s>
17950 <p><span><s>x</span></s></span>
17953 <p><span><s>x</s></span>
17958 ### Language variants related tests
17961 Self-link in language variants
17963 title=[[Dunav]] language=sr
17965 Both [[Dunav]] and [[Дунав]] are names for this river.
17967 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
17978 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
17980 title=[[Duna]] language=sr
17982 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
17984 <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.
17989 Link to a section of a variant of this title shouldn't be parsed as self-link
17991 title=[[Duna]] language=sr
17993 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
17995 <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.
18000 Link to pages in language variants
18004 Main Page can be written as [[Маин Паге]]
18006 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
18012 Multiple links to pages in language variants
18016 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
18018 <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>.
18024 Simple template in language variants
18030 <p>This is a test template
18036 Template with explicit namespace in language variants
18042 <p>This is a test template
18048 Basic test for template parameter in language variants
18052 {{парамтест|param=foo}}
18054 <p>This is a test template with parameter foo
18060 Simple category in language variants
18064 [[Category:МедиаWики Усер'с Гуиде]]
18066 <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>
18083 Don't convert blue categorylinks to another variant (bug 33210)
18087 [[A]][[Category:分类]]
18089 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
18094 Stripping -{}- tags (language variants)
18098 Latin proverb: -{Ne nuntium necare}-
18100 <p>Latin proverb: Ne nuntium necare
18106 Prevent conversion with -{}- tags (language variants)
18108 language=sr variant=sr-ec
18110 Latinski: -{Ne nuntium necare}-
18112 <p>Латински: Ne nuntium necare
18118 Prevent conversion of text with -{}- tags (language variants)
18120 language=sr variant=sr-ec
18122 Latinski: -{Ne nuntium necare}-
18124 <p>Латински: Ne nuntium necare
18130 Prevent conversion of links with -{}- tags (language variants)
18132 language=sr variant=sr-ec
18136 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
18142 -{}- tags within headlines (within html for parserConvert())
18144 language=sr variant=sr-ec
18148 <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>
18154 Explicit definition of language variant alternatives
18156 language=zh variant=zh-tw
18158 -{zh:China;zh-tw:Taiwan}-, not China
18160 <p>Taiwan, not China
18166 Conversion around HTML tags
18168 language=sr variant=sr-ec
18170 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
18171 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
18174 <span title="ЛаCтин">ски</span>
18180 Explicit session-wise language variant mapping (A flag and - flag)
18182 language=zh variant=zh-tw
18184 Taiwan is not China.
18185 But -{A|zh:China;zh-tw:Taiwan}- is China,
18186 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
18187 and -{China}- is China.
18189 <p>Taiwan is not China.
18190 But Taiwan is Taiwan,
18191 (This should be stripped!)
18192 and China is China.
18197 Explicit session-wise language variant mapping (H flag for hide)
18199 language=zh variant=zh-tw
18201 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
18204 <p>(This should be stripped!)
18210 Adding explicit conversion rule for title (T flag)
18212 language=zh variant=zh-tw showtitle
18214 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18217 <p>Should be stripped!
18222 Testing that changing the language variant here in the tests actually works
18224 language=zh variant=zh showtitle
18226 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18229 <p>Should be stripped!
18234 Recursive conversion of alt and title attrs shouldn't clear converter state
18236 language=zh variant=zh-cn showtitle
18238 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
18239 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
18243 Should be stripped<span title="Exclamation">!</span>
18248 Bug 24072: more test on conversion rule for title
18250 language=zh variant=zh-tw showtitle
18252 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
18253 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
18256 <p>This should be stripped!
18257 This won't take interferes with the title rule.
18262 Partly disable title conversion if variant == main language code
18264 language=zh variant=zh title=[[ZH]] showtitle
18266 -{T|zh-cn:CN;zh-tw:TW}-
18274 Partly disable title conversion if variant == main language code, more
18276 language=zh variant=zh title=[[ZH]] showtitle
18286 Raw output of variant escape tags (R flag)
18288 language=zh variant=zh-tw
18290 Raw: -{R|zh:China;zh-tw:Taiwan}-
18292 <p>Raw: zh:China;zh-tw:Taiwan
18297 Nested using of manual convert syntax
18299 language=zh variant=zh-hk
18301 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
18303 <p>Nested: Hello Hong Kong!
18308 Proper conversion of text in external links
18310 language=sr variant=sr-ec
18312 http://www.google.com
18313 gopher://www.google.com
18314 [http://www.google.com http://www.google.com]
18315 [gopher://www.google.com gopher://www.google.com]
18316 [https://www.google.com irc://www.google.com]
18317 [ftp://www.google.com www.google.com/ftp://dir]
18318 [//www.google.com www.google.com]
18320 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18321 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18322 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
18323 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
18324 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
18325 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
18326 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
18331 Do not convert roman numbers to language variants
18333 language=sr variant=sr-ec
18337 <p>Фридрих IV је цар.
18342 Unclosed language converter markup "-{"
18353 Don't convert raw rule "-{R|=>}-" to "=>"
18364 Don't break link parsing if language converter markup is in the caption.
18366 language=sr variant=sr-ec
18368 [[Main Page|-{R|main page}-]]
18370 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
18374 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18376 Don't break image parsing if language converter markup is in the caption.
18380 [[File:Foobar.jpg|-{R|caption}-]]
18382 <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>
18386 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18388 Don't break list handling if language converter markup is in the item.
18390 language=zh variant=zh-cn
18392 ;-{zh-cn:AAA;zh-tw:BBB}-
18394 <dl><dt><span class="error">在手动语言转换规则中检测到错误</span></dd></dl>
18401 # FIXME: This test is currently broken in the PHP parser (bug 52661)
18403 Don't break table handling if language converter markup is in the cell.
18405 language=sr variant=sr-ec
18428 Bug 529: Uncovered bullet
18437 # Plain MediaWiki does not remove empty lists, but tidy actually does.
18438 # Templates in Wikipedia rely on this behavior, as tidy has always been
18439 # enabled there. These tests are normally run *without* tidy, so specify the
18440 # full output here.
18441 # To test realistic parsing behavior, apply a tidy-like transformation to both
18442 # the expected output and your parser's output.
18444 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
18446 ******* Foo {{bullet}}
18448 <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>
18454 Bug 529: Uncovered table already at line-start
18477 Bug 529: Uncovered bullet in parser function result
18479 * Foo {{lc:{{bullet}} }}
18487 Bug 5678: Double-parsed template argument
18489 {{lc:{{{1}}}|hello}}
18496 Bug 5678: Double-parsed template invocation
18498 {{lc:{{paramtest {{!}} param = hello }} }}
18500 <p>{{paramtest | param = hello }}
18505 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
18508 title=[[Main Page]]
18510 {{PRVNÍVELKÉ:ěščř}}
18511 {{prvnívelké:ěščř}}
18531 Morwen/13: Unclosed link followed by heading
18538 <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>
18543 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
18550 <h1><span class="mw-headline" id="heading">heading</span></h1>
18555 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
18562 <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>
18577 Paragraphs inside divs (no extra line breaks)
18589 Paragraphs inside divs (extra line break on open)
18604 Paragraphs inside divs (extra line break on close)
18619 Paragraphs inside divs (extra line break on open and close)
18636 Nesting tags, paragraphs on lines which begin with <div>
18638 <div></div><strong>A
18641 <p><strong>A</strong></p>
18642 <p><strong>B</strong></p>
18650 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
18652 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
18654 <blockquote>Line one
18656 Line two</blockquote>
18658 <blockquote>Line one
18659 Line two</blockquote>
18663 <p>Line one Line two</p>
18668 Bug 6200: paragraphs inside blockquotes (extra line break on open)
18673 Line two</blockquote>
18678 Line two</blockquote>
18683 Line two</blockquote>
18687 Bug 6200: paragraphs inside blockquotes (extra line break on close)
18689 <blockquote>Line one
18694 <blockquote>Line one
18707 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
18729 Paragraphs inside blockquotes/divs (no extra line breaks)
18731 <blockquote><div>Line one
18733 Line two</div></blockquote>
18735 <blockquote><div>Line one
18736 Line two</div></blockquote>
18741 Paragraphs inside blockquotes/divs (extra line break on open)
18746 Line two</div></blockquote>
18751 Line two</div></blockquote>
18756 Paragraphs inside blockquotes/divs (extra line break on close)
18758 <blockquote><div>Line one
18761 </div></blockquote>
18763 <blockquote><div>Line one
18766 </div></blockquote>
18771 Paragraphs inside blockquotes/divs (extra line break on open and close)
18777 </div></blockquote>
18783 </div></blockquote>
18788 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
18790 wgLinkHolderBatchSize=0
18796 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
18797 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
18798 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
18803 Free external link invading image caption
18805 [[Image:Foobar.jpg|thumb|http://x|hello]]
18807 <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>
18812 Bug 15196: localised external link numbers
18816 [http://en.wikipedia.org/]
18818 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
18821 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
18825 Multibyte character in padleft
18827 {{padleft:-Hello|7|Æ}}
18834 Multibyte character in padright
18836 {{padright:Hello-|7|Æ}}
18843 formatdate parser function
18845 {{#formatdate:2009-03-24}}
18847 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
18852 formatdate parser function, with default format
18854 {{#formatdate:2009-03-24|mdy}}
18856 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
18861 Spacing of numbers in formatted dates
18863 {{#formatdate:January 15}}
18865 <p><span class="mw-formatted-date" title="01-15">January 15</span>
18870 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
18872 language=nl title=[[MediaWiki:Common.css]]
18874 {{#formatdate:2009-03-24|dmy}}
18876 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
18889 Edit comment with link
18893 I like the [[Main Page]] a lot
18895 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
18899 Edit comment with link and link text
18903 I like the [[Main Page|best pages]] a lot
18905 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18909 Edit comment with link and link text with suffix
18913 I like the [[Main Page|best page]]s a lot
18915 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
18919 Edit comment with section link (non-local, eg in history list)
18921 comment title=[[Main Page]]
18923 /* External links */ removed bogus entries
18925 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18929 Edit comment with section link and text before it (non-local, eg in history list)
18931 comment title=[[Main Page]]
18933 pre-comment text /* External links */ removed bogus entries
18935 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>
18939 Edit comment with section link (local, eg in diff view)
18941 comment local title=[[Main Page]]
18943 /* External links */ removed bogus entries
18945 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
18949 Edit comment with subpage link (bug 14080)
18953 title=[[Subpage test]]
18955 Poked at a [[/subpage]] here...
18957 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
18961 Edit comment with subpage link and link text (bug 14080)
18965 title=[[Subpage test]]
18967 Poked at a [[/subpage|neat little page]] here...
18969 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
18973 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
18976 title=[[Subpage test]]
18978 Poked at a [[/subpage]] here...
18980 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
18984 Edit comment with bare anchor link (local, as on diff)
18988 title=[[Main Page]]
18992 <a href="#section">#section</a>
18996 Edit comment with bare anchor link (non-local, as on history)
18999 title=[[Main Page]]
19003 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
19007 Anchor starting with underscore
19011 <p><a href="#_ref">One</a>
19016 Id starting with underscore
19018 <div id="_ref"></div>
19020 <div id="_ref"></div>
19025 Space normalisation on autocomment (bug 22784)
19028 title=[[Main Page]]
19030 /* __hello__world__ */
19032 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
19036 percent-encoding and + signs in comments (Bug 26410)
19040 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
19042 <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>
19045 # Parsoid doesn't support this yet: see bug 73581
19046 # but it *should* omit the 'src' attribute if the image is bad.
19047 # PHP side of tests was disabled in
19048 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
19049 # because of issues in the PHP parserTests infrastructure
19050 # (but the output below is indeed what the PHP side emits)
19052 Bad images - basic functionality
19055 !! DISABLED/html/php
19057 <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>
19061 Bad images - bug 16039: text after bad image disappears
19066 !! DISABLED/html/php
19072 <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>
19077 Verify that displaytitle works (bug #22501) no displaytitle
19081 wgAllowDisplayTitle=true
19082 wgRestrictDisplayTitle=false
19084 this is not the the title
19087 <p>this is not the the title
19092 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
19097 wgAllowDisplayTitle=true
19098 wgRestrictDisplayTitle=false
19100 this is not the the title
19101 {{DISPLAYTITLE:whatever}}
19104 <p>this is not the the title
19109 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
19114 wgAllowDisplayTitle=true
19115 wgRestrictDisplayTitle=true
19117 this is not the the title
19118 {{DISPLAYTITLE:whatever}}
19121 <p>this is not the the title
19126 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
19131 wgAllowDisplayTitle=true
19132 wgRestrictDisplayTitle=true
19134 this is not the the title
19135 {{DISPLAYTITLE:screen}}
19138 <p>this is not the the title
19143 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
19148 wgAllowDisplayTitle=false
19150 this is not the the title
19151 {{DISPLAYTITLE:screen}}
19154 <p>this is not the the title
19155 <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>
19160 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
19165 wgAllowDisplayTitle=false
19167 this is not the the title
19170 <p>this is not the the title
19175 Verify that displaytitle handles inline CSS styles (bug 26547) - rejected value
19180 wgAllowDisplayTitle=true
19181 wgRestrictDisplayTitle=true
19183 this is not the the title
19184 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
19186 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
19187 <p>this is not the the title
19192 Verify that displaytitle handles inline CSS styles (bug 26547) - accepted value
19197 wgAllowDisplayTitle=true
19198 wgRestrictDisplayTitle=true
19200 this is not the the title
19201 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
19203 <span style="color: red;">s</span>creen
19204 <p>this is not the the title
19209 Page status indicators: Empty name is invalid
19213 <indicator name=" "></indicator>
19214 <indicator></indicator>
19216 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19217 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
19222 Page status indicators: Weird syntaxes that are okay
19226 <indicator name="empty" />
19227 <indicator name></indicator>
19236 Page status indicators: Torture test
19240 <indicator name="01">hello world</indicator>
19241 <indicator name="02">[[Main Page]]</indicator>
19242 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
19243 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
19244 <indicator name="05">* foo
19246 <indicator name="06"><nowiki>foo</nowiki></indicator>
19247 <indicator name="07"> Preformatted</indicator>
19248 <indicator name="08"><div>Broken tag</indicator>
19249 <indicator name="09">{| class=wikitable
19252 <indicator name="10">Two
19254 paragraphs</indicator>
19257 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19258 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" />
19259 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>
19260 05=<ul><li> foo</li>
19264 07=<pre>Preformatted
19266 08=<div>Broken tag</div>
19268 09=<table class="wikitable">
19285 preload: check <noinclude> and <includeonly>
19289 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
19295 preload: check <onlyinclude>
19299 Goodbye <onlyinclude>Hello world</onlyinclude>
19305 preload: can pass tags through if we want to
19309 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
19311 <includeonly>Hello world</includeonly>
19315 preload: check that it doesn't try to do tricks
19319 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
19321 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
19325 Play a bit with r67090 and bug 3158
19327 <div style="width:50% !important"> </div>
19328 <div style="width:50% !important"> </div>
19329 <div style="width:50% !important"> </div>
19330 <div style="border : solid;"> </div>
19332 <div style="width:50% !important"> </div>
19333 <div style="width:50% !important"> </div>
19334 <div style="width:50% !important"> </div>
19335 <div style="border : solid;"> </div>
19338 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
19339 <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>
19340 <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>
19341 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
19346 HTML5 data attributes
19348 <span data-foo="bar">Baz</span>
19349 <p data-abc-def_hij="">Quuz</p>
19351 <p><span data-foo="bar">Baz</span>
19353 <p data-abc-def_hij="">Quuz</p>
19358 percent-encoding and + signs in internal links (Bug 26410)
19360 [[User:+%]] [[Page+title%]]
19361 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
19362 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
19363 [[%33%45]] [[%33%45+]]
19365 <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>
19366 <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>
19367 <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>
19368 <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>
19371 <p><a rel="mw:WikiLink" href="User:+%" title="User:+%">User:+%</a> <a rel="mw:WikiLink" href="Page+title%" title="Page+title%">Page+title%</a> <a rel="mw:WikiLink" href="%+" title="%+">%+</a> <a rel="mw:WikiLink" href="%+" title="%+">%20</a> <a rel="mw:WikiLink" href="%+" title="%+">%+ </a> <a rel="mw:WikiLink" href="%+r" title="%+r">%+r</a> <a rel="mw:WikiLink" href="%" title="%">%</a> <a rel="mw:WikiLink" href="+" title="+">+</a> <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"[[bar]]"}'><a href="./File:%+abc9"><img resource="./File:%25+abc9" src="./Special:FilePath/%+abc9" height="220" width="220"/></a></span> <a rel="mw:WikiLink" href="3E" title="3E">3E</a> <a rel="mw:WikiLink" href="3E+" title="3E+">3E+</a></p>
19375 Special characters in embedded file links (bug 27679)
19377 [[File:Contains & ampersand.jpg]]
19378 [[File:Does not exist.jpg|Title with & ampersand]]
19380 <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>
19381 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
19384 <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>
19385 <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 & 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>
19389 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
19391 Text's been normalized?
19393 <p>Text's been normalized?
19398 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
19400 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
19402 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
19407 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
19409 [http://www.example.org/ ideograms]
19411 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
19416 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
19418 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
19420 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
19444 Bug 31098 Template which includes system messages which includes the template
19448 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
19449 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
19454 Bug31490 Turkish: ucfirst 'blah'
19465 Bug31490 Turkish: ucfirst 'ix'
19476 Bug31490 Turkish: lcfirst 'BLAH'
19487 Bug31490 Turkish: ucfırst (with a dotless i)
19493 <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>
19498 Bug31490 ucfırst (with a dotless i) with English language
19504 <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>
19509 Bug 26375: TOC with italics
19511 title=[[Main Page]]
19514 == ''Lost'' episodes ==
19516 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19518 <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>
19522 <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>
19527 Bug 26375: TOC with bold
19529 title=[[Main Page]]
19532 == '''should be bold''' then normal text ==
19534 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19536 <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>
19540 <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>
19545 Bug 33845: Headings become cursive in TOC when they contain an image
19547 title=[[Main Page]]
19550 == Image [[Image:foobar.jpg]] ==
19552 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19554 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
19558 <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>
19563 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
19565 title=[[Main Page]]
19568 == <blockquote>Quote</blockquote> ==
19570 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19572 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19576 <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>
19580 <div id="toc" class="toc">
19581 <div id="toctitle">
19585 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
19589 <h2><span class="mw-headline" id="Quote"></span></h2>
19591 <p><span class="mw-headline" id="Quote">Quote</span></p>
19593 <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>
19597 Unclosed tags in TOC
19599 title=[[Main Page]]
19603 <small>Hanc marginis exiguitas non caperet.</small>
19606 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19608 <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>
19612 <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>
19613 <p><small>Hanc marginis exiguitas non caperet.</small>
19619 Multiple tags in TOC
19622 == <i>Foo</i> <b>Bar</b> ==
19624 == <i>Foo</i> <blockquote>Bar</blockquote> ==
19626 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19628 <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>
19629 <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>
19633 <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>
19634 <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>
19638 <div id="toc" class="toc">
19639 <div id="toctitle">
19643 <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>
19644 <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>
19648 <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>
19649 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
19651 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
19653 <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>
19657 Tags with parameters in TOC
19660 == <sup class="in-h2">Hello</sup> ==
19662 == <sup class="a > b">Evilbye</sup> ==
19664 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19666 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
19667 <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>
19671 <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>
19672 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup> 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>
19677 span tags with directionality in TOC
19680 == <span dir="ltr">C++</span> ==
19682 == <span dir="rtl">זבנג!</span> ==
19684 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
19686 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
19688 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
19690 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19692 <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>
19693 <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>
19694 <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>
19695 <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>
19696 <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>
19700 <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>
19701 <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>
19702 <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>
19703 <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>
19704 <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>
19709 Bug 72884: bdi element in ToC
19712 == <bdi>test</bdi> ==
19714 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19716 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
19720 <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>
19724 # Note that the html output does not have the <p></p>, but the
19725 # html+tidy output *does*. This is because the empty <p></p> is
19726 # removed by the sanitizer, but only when tidy is *not* enabled (!).
19728 Empty <p> tag in TOC, removed by Sanitizer (T92892)
19733 <div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
19735 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
19739 <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>
19743 <div id="toc" class="toc">
19744 <div id="toctitle">
19748 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
19752 <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>
19758 == {{int:headline_sample}} ==
19762 Bug 32057: Title needed when expanding <h> nodes.
19764 title=[[Main Page]]
19768 <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>
19773 Strip marker in urlencode
19775 {{urlencode:x<nowiki/>y}}
19776 {{urlencode:x<nowiki/>y|wiki}}
19777 {{urlencode:x<nowiki/>y|path}}
19804 Strip marker in formatNum
19806 {{formatnum:1<nowiki/>2}}
19807 {{formatnum:1<nowiki/>2|R}}
19815 Check noCommafy in formatNum
19819 {{formatnum:123456.78}}
19820 {{formatnum:123456.78|NOSEP}}
19828 Wrong option for formatNum (bug 56199)
19830 {{formatnum:1,234.56|Random}}
19831 {{formatnum:1,234.56|EVERYTHING}}
19832 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
19841 Strip marker in grammar
19845 {{grammar:elative|foo<nowiki/>bar}}
19852 Strip marker in padleft
19854 {{padleft:|2|x<nowiki/>y}}
19861 Strip marker in padright
19863 {{padright:|2|x<nowiki/>y}}
19870 Strip marker in anchorencode
19872 {{anchorencode:x<nowiki/>y}}
19879 nowiki inside link inside heading (bug 18295)
19881 ==[[foo|x<nowiki>y</nowiki>z]]==
19883 <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>
19888 new support for bdi element (bug 31817)
19890 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19892 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
19897 Ignore pipe between table row attributes
19901 |- id=foo | style='color: red'
19909 <tr id="foo" style="color: red">
19916 Gallery override link with WikiLink (bug 34852)
19919 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
19922 <ul class="gallery mw-gallery-traditional">
19923 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19924 <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>
19925 <div class="gallerytext">
19935 Gallery override link with absolute external link (bug 34852)
19938 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19941 <ul class="gallery mw-gallery-traditional">
19942 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19943 <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>
19944 <div class="gallerytext">
19954 Gallery override link with malicious javascript (bug 34852)
19957 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19960 <ul class="gallery mw-gallery-traditional">
19961 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19962 <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>
19963 <div class="gallerytext">
19973 Gallery with invalid title as link (bug 43964)
19976 File:foobar.jpg|link=<
19979 <ul class="gallery mw-gallery-traditional">
19980 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19981 <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>
19982 <div class="gallerytext">
19990 Language parser function
19999 Padleft and padright as substr
20001 {{padleft:|3|abcde}}
20002 {{padright:|3|abcde}}
20010 Special parser function
20012 {{#special:RandomPage}}
20013 {{#special:BaDtItLe}}
20014 {{#special:Foobar}}
20023 Bug 34939 - Case insensitive link parsing ([HttP://])
20025 [HttP://MediaWiki.Org/]
20027 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
20030 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
20034 Bug 34939 - Case insensitive link parsing ([HttP:// title])
20036 [HttP://MediaWiki.Org/ MediaWiki]
20038 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
20043 Bug 34939 - Case insensitive link parsing (HttP://)
20045 HttP://MediaWiki.Org/
20047 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
20050 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
20068 <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>
20069 <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>
20070 <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>
20071 <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>
20072 <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>
20078 ### Parsoid-specific tests
20079 ### Parsoid-PHP parser incompatibilities
20082 1. SOL-sensitive wikitext tokens as template-args
20084 parsoid=wt2html,wt2wt
20090 <span about="#mwt1" typeof="mw:Transclusion">
20091 </span><ul about="#mwt1"><li>a</li>
20093 <span about="#mwt2" typeof="mw:Transclusion">
20094 </span><ol about="#mwt2"><li>a</li>
20096 <span about="#mwt3" typeof="mw:Transclusion">
20097 </span><dl about="#mwt3"><dd>a</dd>
20101 #### -----------------------------------------------------------------
20102 #### Parsoid-specific functionality tests
20103 #### -----------------------------------------------------------------
20105 # Bug 63642/66749: Formatting elt fixup around images is cleaned up.
20106 # We know wt2wt will fail, but we expect selser to pass.
20107 # Due to the nature of our testing, wt2wt and selser tests will enter the
20108 # blacklist and we'll catch selser regressions based on changes to the
20109 # blacklist entries for selser tests.
20111 1. Bad treebuilder fixup of formatting elt is cleaned up
20113 parsoid=wt2html,wt2wt
20118 [[Image:Foobar.jpg|right|Test]]
20125 <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>
20132 2. Bad treebuilder fixup of formatting elt is cleaned up
20134 parsoid=wt2html,wt2wt
20136 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
20138 <small>[[Image:Foobar.jpg|right|300px]]</small>
20141 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption><b>caption</b></figcaption></figure>
20143 <small><figure class="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="34" width="300"/></a></figure></small>
20146 #### ----------------------------------------------------------------
20147 #### Parsoid-only testing of Parsoid's impl of <ref> and <references>
20148 #### tags. Parsoid's output for these tags differs from that of the
20150 #### ----------------------------------------------------------------
20153 Ref: 1. ref-location should be replaced with an index span
20158 B <ref name="x">foo</ref>
20162 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span>
20163 B <span about="#mwt4" class="reference" 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">[2]</a></span>
20164 C <span about="#mwt6" class="reference" 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">[3]</a></span></p>
20165 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20166 <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">foo</span></li>
20167 <li about="#cite_note-x-2" id="cite_note-x-2"><span rel="mw:referencedBy"><a href="#cite_ref-x_2-0">↑</a></span> <span id="mw-reference-text-cite_note-x-2" class="mw-reference-text">foo</span></li>
20168 <li about="#cite_note-y-3" id="cite_note-y-3"><span rel="mw:referencedBy"><a href="#cite_ref-y_3-0">↑</a></span> <span id="mw-reference-text-cite_note-y-3" class="mw-reference-text"></span></li>
20173 Ref: 2. ref-tags with identical names should all get the same index
20177 A <ref name="x">foo</ref>
20181 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span>
20182 B <span about="#mwt4" class="reference" 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">[1]</a></span></p>
20183 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20184 <li about="#cite_note-x-1" id="cite_note-x-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-x_1-0">1.0</a> <a href="#cite_ref-x_1-1">1.1</a></span> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
20189 Ref: 3. spaces in ref-names should be ignored
20193 A <ref name="x">foo</ref>
20194 B <ref name=" x " />
20198 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span>
20199 B <span about="#mwt4" class="reference" 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">[1]</a></span>
20200 C <span about="#mwt6" class="reference" 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">[1]</a></span></p>
20201 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20202 <li about="#cite_note-x-1" id="cite_note-x-1"><span rel="mw:referencedBy">↑ <a href="#cite_ref-x_1-0">1.0</a> <a href="#cite_ref-x_1-1">1.1</a> <a href="#cite_ref-x_1-2">1.2</a></span> <span id="mw-reference-text-cite_note-x-1" class="mw-reference-text">foo</span></li>
20206 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
20208 Ref: 4. 'constructor' should be accepted as a valid ref-name
20212 A <ref name="constructor">foo</ref>
20215 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span></p>
20216 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20217 <li about="#cite_note-constructor-1" id="cite_note-constructor-1"><span rel="mw:referencedBy"><a href="#cite_ref-constructor_1-0">↑</a></span> <span id="mw-reference-text-cite_note-constructor-1" class="mw-reference-text">foo</span></li>
20222 Ref: 5. body should accept generic wikitext
20227 This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
20232 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span></p>
20234 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
20235 <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">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>
20241 Ref: 6. indent-pres should not be output in ref-body
20253 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span></p>
20255 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20256 <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">foo
20264 Ref: 7. No p-wrapping in ref-body
20283 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span></p>
20285 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20286 <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">foo
20301 Ref: 8. transclusion wikitext has lower precedence
20305 A <ref> foo {{echo|</ref> B C}}
20309 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span> B C<span typeof="mw:Nowiki">}}</span></p>
20310 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20311 <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">foo <span typeof="mw:Nowiki" data-parsoid='{"src":"{{","dsr":[12,14,0,0]}'>{{</span>echo|</span></li>
20316 Ref: 9. unclosed comments should not leak out of ref-body
20320 A <ref> foo <!--</ref> B C
20323 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span> B C</p>
20324 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20325 <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">foo <!----></span></li>
20330 Ref: 10. Unclosed HTML tags should not leak out of ref-body
20334 A <ref> <b> foo </ref> B C
20338 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span> B C</p>
20341 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20342 <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"><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'> foo </b></span></li>
20347 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
20355 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span> B
20356 C <span about="#mwt4" class="reference" 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">[2]</a></span> D</p>
20357 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20358 <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">foo</span></li>
20359 <li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
20364 Ref: 12. ref-tags act as trailing newline migration barrier
20368 <!--the newline at the end of this line moves out of the p-tag-->a
20370 b<!--the newline at the end of this line stays inside the p-tag--> <ref />
20376 <p><!--the newline at the end of this line moves out of the p-tag-->a</p>
20379 <p>b<!--the newline at the end of this line stays inside the p-tag--> <span about="#mwt2" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-1">[1]</a></span>
20380 <span about="#mwt4" class="reference" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{}}'><a href="#cite_note-2">[2]</a></span></p>
20383 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20384 <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"></span></li>
20385 <li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text"></span></li></ol>
20389 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
20398 <p><span about="#mwt2" class="reference" 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">[1]</a></span> A
20399 <span about="#mwt4" class="reference" 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">[2]</a></span> B</p>
20400 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20401 <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">foo</span></li>
20402 <li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar
20408 Ref: 14. A nested ref-tag should be emitted as plain text
20412 <ref>foo <ref>bar</ref> baz</ref>
20416 <p><span about="#mwt2" class="reference" 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">[1]</a></span>
20418 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
20419 <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">foo <ref>bar</ref> baz</span></li>
20424 Ref: 15. ref-tags with identical names should get identical indexes
20428 A1 <ref name="a">foo</ref> A2 <ref name="a" />
20429 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
20433 <p>A1 <span about="#mwt3" class="reference" 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">[1]</a></span> A2 <span about="#mwt4" class="reference" 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">[1]</a></span>
20434 B1 <span about="#mwt7" class="reference" 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">[2]</a></span> B2 <span about="#mwt8" class="reference" 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">[2]</a></span></p>
20436 <ol class="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">1.0</a> <a href="#cite_ref-a_1-1">1.1</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">2.0</a> <a href="#cite_ref-b_2-1">2.1</a></span> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
20440 ## We don't bother wt2wt-ing non-standard whitespace
20442 Ref: 16. Tokenizer should accept non-standard whitespace in <ref> and </ref> tags
20450 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span></p>
20451 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20452 <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">foo</span></li></ol>
20456 Ref: 17. Generate valid HTML5 id/about attributes
20460 <ref name="a b">foo</ref>
20464 <p><span class="reference" 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">[1]</a></span>
20467 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20468 <li about="#cite_note-a_b-1" id="cite_note-a_b-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_b_1-0">↑</a></span> <span id="mw-reference-text-cite_note-a_b-1" class="mw-reference-text">foo</span></li>
20473 Ref: 18. T58916: Extension attributes should be parsed as plain text
20477 <ref name="{{echo|a}}">foo</ref>
20481 <p><span class="reference" 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">[1]</a></span>
20484 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20485 <li about="#cite_note-.7B.7Becho.7Ca.7D.7D-1" id="cite_note-.7B.7Becho.7Ca.7D.7D-1"><span rel="mw:referencedBy"><a href="#cite_ref-.7B.7Becho.7Ca.7D.7D_1-0">↑</a></span> <span id="mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1" class="mw-reference-text">foo</span></li>
20490 Ref: 19. ref-tags with identical name encodings should get identical indexes
20494 1 <ref name="a & b">foo</ref> 2 <ref name="a & b" />
20498 <p>1 <span about="#mwt3" class="reference" 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">[1]</a></span> 2 <span about="#mwt4" class="reference" 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">[1]</a></span>
20500 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20501 <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">1.0</a> <a href="#cite_ref-a_.26_b_1-1">1.1</a></span> <span id="mw-reference-text-cite_note-a_.26_b-1" class="mw-reference-text">foo</span></li>
20506 Ref: 20. ref-tags with identical names but different content should keep it
20510 A <ref name="foo">Foo one</ref>
20511 B <ref name="foo">Foo two</ref>
20512 C <ref name="foo" />
20516 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span>
20517 B <span about="#mwt4" class="reference" 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">[1]</a></span>
20518 C <span about="#mwt6" class="reference" 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">[1]</a></span></p>
20520 <ol class="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">1.0</a> <a href="#cite_ref-foo_1-1">1.1</a> <a href="#cite_ref-foo_1-2">1.2</a></span> <span id="mw-reference-text-cite_note-foo-1" class="mw-reference-text">Foo one</span></li>
20525 References: 1. references tag without any refs should be handled properly
20531 <ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
20535 References: 2. references tag with group only outputs references from that group
20539 A <ref group="a">foo</ref>
20540 B <ref group="b">bar</ref>
20543 <references group="a" />
20545 <references group="b" />
20547 <p>A <span about="#mwt2" class="reference" 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">[a 1]</a></span>
20548 B <span about="#mwt4" class="reference" 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">[b 1]</a></span>
20549 C <span class="reference" 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">[1]</a></span></p>
20551 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{"group":"a"}}'>
20552 <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">foo</span></li>
20554 <ol class="references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'>
20555 <li about="#cite_note-3" id="cite_note-3"><span rel="mw:referencedBy"><a href="#cite_ref-3">↑</a></span> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">baz</span></li>
20557 <ol class="references" typeof="mw:Extension/references" about="#mwt12" data-mw='{"name":"references","attrs":{"group":"b"}}'>
20558 <li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
20563 References: 3. ref list should be cleared after processing references
20575 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span></p>
20577 <ol class="references" typeof="mw:Extension/references" about="#mwt4" 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">foo</span></li>
20580 <p>B <span about="#mwt6" class="reference" 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">[1]</a></span></p>
20582 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","attrs":{}}'>
20583 <li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
20588 References: 4. only referenced group should be cleared after processing references
20592 A <ref group="a">afoo</ref>
20595 <references group="a" />
20601 <p>A <span about="#mwt2" class="reference" 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">[a 1]</a></span>
20602 B <span about="#mwt4" class="reference" 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">[1]</a></span></p>
20604 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{"group":"a"}}'><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">afoo</span></li>
20607 <p>C <span about="#mwt8" class="reference" 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">[2]</a></span></p>
20609 <ol class="references" typeof="mw:Extension/references" about="#mwt10" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bfoo</span></li><li about="#cite_note-3" id="cite_note-3"><span rel="mw:referencedBy"><a href="#cite_ref-3">↑</a></span> <span id="mw-reference-text-cite_note-3" class="mw-reference-text">cfoo</span></li>
20614 References: 5. ref tags in references should be processed while ignoring all other content
20619 B <ref name="b">bar</ref>
20622 <ref name="a">foo</ref>
20623 This should just get lost.
20626 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span>
20627 B <span about="#mwt4" class="reference" 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">[2]</a></span></p>
20630 <ol class="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=\"reference\" 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\">[1]</a></span>\n"},"attrs":{}}'><li about="#cite_note-a-1" id="cite_note-a-1"><span rel="mw:referencedBy"><a href="#cite_ref-a_1-0">↑</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">↑</a></span> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">bar</span></li>
20635 References: 6. <references /> from a transclusion
20639 <ref>Foo</ref> {{echo|<references />}}
20641 <p><span about="#mwt3" class="reference" 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">[1]</a></span></p> <ol class="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"><span rel="mw:referencedBy"><a href="#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">Foo</span></li>
20646 References: 7. Multiple references tags (one without and one with nested refs) should be correctly handled
20650 A <ref>foo bar for a</ref>
20651 B <ref group="X" name="b" />
20655 <references group="X">
20656 <ref name="b">foo</ref>
20659 <p>A <span about="#mwt2" class="reference" 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">[1]</a></span>
20660 B <span about="#mwt4" class="reference" 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">[X 1]</a></span>
20663 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
20664 <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">foo bar for a</span></li>
20667 <ol class="references" typeof="mw:Extension/references" about="#mwt8" data-mw='{"name":"references","body":{"extsrc":"<ref name=\"b\">foo</ref>","html":"\n<span about=\"#mwt10\" class=\"reference\" 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\">[X 1]</a></span>\n"},"attrs":{"group":"X"}}'>
20668 <li about="#cite_note-b-2" id="cite_note-b-2"><span rel="mw:referencedBy"><a href="#cite_ref-b_2-0">↑</a></span> <span id="mw-reference-text-cite_note-b-2" class="mw-reference-text">foo</span></li>
20673 References: 8. T88019: Remove <meta>s from templates inside <ref> that's itself inside a template
20677 X{{echo|<ref>foo {{echo|<b>bar</b>}} and {{echo|baz}} boo</ref>}}
20680 <p>X<span about="#mwt2" class="reference" 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">[1]</a></span></p>
20681 <ol class="references" typeof="mw:Extension/references" about="#mwt7" 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">foo <b data-parsoid='{"stx":"html"}'>bar</b> and baz boo</span></li>
20685 # This test only works in wt2html now as the <references /> are always generated
20686 # unless selser is active. Once T72722 is fixed, we should add a changes test
20687 # here to ensure that unrelated changes don't add the new <references /> in
20690 References: 9. Generate missing references list at the end
20695 B <ref group="inexistent">bar</ref>
20697 <p>A <span class="reference" 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">[1]</a></span> B <span class="reference" 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">[inexistent 1]</a></span></p>
20698 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
20699 <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">foo</span></li>
20701 <ol class="references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{"group":"inexistent"}}'>
20702 <li about="#cite_note-2" id="cite_note-2"><span rel="mw:referencedBy"><a href="#cite_ref-2">↑</a></span> <span id="mw-reference-text-cite_note-2" class="mw-reference-text">bar</span></li>
20707 References: 10. New <references/> shouldn't be added for unrelated edits.
20710 "modes": ["selser"],
20711 "changes": [["#x", "remove"]],
20715 Unrelated text<span id="x"> that's going to disappear</span>.
20723 Entities in ref name
20727 <ref name="test & me">hi</ref>
20730 <p><span about="#mwt2" class="reference" 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">[1]</a></span></p>
20731 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20732 <li about="#cite_note-test_.26_me-1" id="cite_note-test_.26_me-1"><span rel="mw:referencedBy"><a href="#cite_ref-test_.26_me_1-0">↑</a></span> <span id="mw-reference-text-cite_note-test_.26_me-1" class="mw-reference-text">hi</span></li>
20736 # This test is wt2html only because we're permitting the serializer to produce
20737 # dirty diffs, normalizing the unclosed references to the self-closed version.
20739 Generate references for unclosed references tag
20747 <p>a<span about="#mwt2" class="reference" 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">[1]</a></span></p>
20748 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
20749 <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">foo</span></li></ol>
20753 New reference serializes on its own line
20755 parsoid=wt2wt,html2wt
20760 foo<ol class="references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol>
20763 #### ----------------------------------------------------------------
20764 #### Parsoid-only testing of Parsoid's impl of LST
20765 #### Not implemented yet, see
20766 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
20767 #### ----------------------------------------------------------------
20770 LST Sections: 1. Simple section start and end
20772 <section begin="2011-05-16" />
20773 <section end="2014-04-10 (MW 1.23wmf22)" />
20775 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
20776 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
20779 #--------- Test stripping of empty nodes in template content ----------
20781 Empty LI and TR nodes should be stripped from template content
20786 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
20790 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
20803 Empty LI and TR nodes should not be stripped from top-level content
20830 Empty TR nodes should not be stripped if they have any attributes set
20832 {{EmptyTRWithHTMLAttrTest}}
20834 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
20835 <tr align="center"></tr>
20836 <tr><td>foo</td></tr>
20837 <tr align="center"></tr>
20838 <tr><td>bar</td></tr>
20842 #### ----------------------------------------------------------------
20843 #### The following section of tests are primarily to test
20844 #### wikitext escaping capabilities of Parsoid. Given that
20845 #### escaping can be done any number of ways, the wikitext (input)
20846 #### is always adjusted to reflect how Parsoid adds nowiki
20849 #### We are marking several tests as parsoid-only since the
20850 #### HTML in the result section is different from what the
20851 #### PHP parser generates for it.
20852 #### ----------------------------------------------------------------
20855 #### --------------- Headings ---------------
20857 #### 1. Nested inside html <h1>=foo=</h1>
20858 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
20859 #### 3. Nested inside html with wikitext split by html tags
20860 #### 4. No escape needed
20861 #### 5. Empty headings <h1></h1>
20862 #### 6. Heading chars in SOL context
20863 #### ----------------------------------------
20865 Headings: 0. Unnested
20869 <nowiki>=foo=</nowiki>
20871 <nowiki> =foo= </nowiki>
20873 <nowiki>=foo=</nowiki>
20875 =foo''a''<nowiki>=</nowiki>
20877 <p><span typeof="mw:Nowiki">=foo=</span></p>
20879 <p><span typeof="mw:Nowiki"> =foo= </span>
20881 <span typeof="mw:Nowiki">=foo=</span></p>
20883 <p>=foo<i>a</i><span typeof="mw:Nowiki">=</span></p>
20886 # New headings and existing headings are handled differently
20888 Headings: 1. Nested inside html
20896 <h1 data-parsoid=''>=foo=</h1>
20897 <h2 data-parsoid=''>=foo=</h2>
20898 <h3 data-parsoid=''>=foo=</h3>
20899 <h4 data-parsoid=''>=foo=</h4>
20900 <h5 data-parsoid=''>=foo=</h5>
20901 <h6 data-parsoid=''>=foo=</h6>
20909 =<nowiki>=foo=</nowiki>=
20910 ==<nowiki>=foo=</nowiki>==
20911 ===<nowiki>=foo=</nowiki>===
20912 ====<nowiki>=foo=</nowiki>====
20913 =====<nowiki>=foo=</nowiki>=====
20914 ======<nowiki>=foo=</nowiki>======
20919 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
20928 <nowiki>*</nowiki>bar
20934 <nowiki>=bar=</nowiki>
20938 Headings: 3. Nested inside html with wikitext split by html tags
20940 parsoid=html2wt,wt2wt
20942 = ='''bold'''<nowiki>foo=</nowiki> =
20944 <h1>=<b>bold</b>foo=</h1>
20948 Headings: 4a. No escaping needed (testing just h1 and h2)
20973 <h1><i>=</i>foo=</h1>
20977 Headings: 4b. No escaping needed (inside p-tags)
20992 Headings: 5. Empty headings
21004 =====<nowiki/>=====
21006 ======<nowiki/>======
21017 Headings: 6a. Heading chars in SOL context (with trailing spaces)
21021 <nowiki>=a=</nowiki>
21023 <nowiki>=a=</nowiki>
21025 <nowiki>=a=</nowiki>
21027 <nowiki>=a=</nowiki>
21036 Headings: 6b. Heading chars in SOL context (with trailing newlines)
21064 Headings: 6c. Heading chars in SOL context (leading newline break)
21069 <nowiki>=b=</nowiki>
21076 Headings: 6d. Heading chars in SOL context (with interspersed comments)
21080 <!--c0--><nowiki>=a=</nowiki>
21082 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
21084 <p><!--c0-->=a=</p>
21085 <p><!--c1-->=a= <!--c2--> <!--c3--></p>
21089 Headings: 6d. Heading chars in SOL context (No escaping needed)
21099 Headings: 7. Insert a newline between new content and headings
21105 <h2 data-parsoid='{"dsr":[0,5,2,2]}'>A</h2>
21106 <p data-parsoid='{"dsr":[6,7,0,0]}'>a</p>
21116 #### --------------- Lists ---------------
21117 #### 0. Outside nests (*foo, etc.)
21118 #### 1. Nested inside html <ul><li>*foo</li></ul>
21119 #### 2. Inside definition lists
21120 #### 3. Only bullets at start should be escaped
21121 #### 4. No escapes needed
21122 #### 5. No unnecessary escapes
21123 #### 6. Escape bullets in SOL position
21124 #### 7. Escape bullets in a multi-line context
21125 #### ----------------------------------------
21128 Lists: 0. Outside nests
21130 <nowiki>*</nowiki>foo
21132 <nowiki>#</nowiki>foo
21134 <nowiki>;Foo:</nowiki>bar
21143 Lists: 1. Nested inside html
21145 *<nowiki>*foo</nowiki>
21147 *<nowiki>#foo</nowiki>
21149 *<nowiki>:foo</nowiki>
21151 *<nowiki>;foo</nowiki>
21153 #<nowiki>*foo</nowiki>
21155 #<nowiki>#foo</nowiki>
21157 #<nowiki>:foo</nowiki>
21159 #<nowiki>;foo</nowiki>
21161 <ul><li>*foo</li></ul>
21162 <ul><li>#foo</li></ul>
21163 <ul><li>:foo</li></ul>
21164 <ul><li>;foo</li></ul>
21165 <ol><li>*foo</li></ol>
21166 <ol><li>#foo</li></ol>
21167 <ol><li>:foo</li></ol>
21168 <ol><li>;foo</li></ol>
21173 Lists: 2. Inside definition lists
21175 ;<nowiki>;foo</nowiki>
21177 ;<nowiki>:foo</nowiki>
21179 ;<nowiki>:foo</nowiki>
21182 :<nowiki>:foo</nowiki>
21184 <dl><dt>;foo</dt></dl>
21185 <dl><dt>:foo</dt></dl>
21188 <dl><dd>:foo</dd></dl>
21193 Lists: 3. Only bullets at start of text should be escaped
21195 *<nowiki>*foo*bar</nowiki>
21197 *<nowiki>*foo</nowiki>''it''*bar
21199 <ul><li>*foo*bar</li></ul>
21200 <ul><li>*foo<i>it</i>*bar</li></ul>
21205 Lists: 4. No escapes needed
21226 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
21230 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
21236 Lists: 5. No unnecessary escapes
21238 * bar <span><nowiki>[[foo]]</nowiki></span>
21240 * =bar <span><nowiki>[[foo]]</nowiki></span>
21242 * [[bar <span><nowiki>[[foo]]</nowiki></span>
21244 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
21246 * =bar <span>foo]]</span>=
21252 <ul><li> bar <span>[[foo]]</span></li></ul>
21253 <ul><li> =bar <span>[[foo]]</span></li></ul>
21254 <ul><li> [[bar <span>[[foo]]</span></li></ul>
21255 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
21256 <ul><li> =bar <span>foo]]</span>=</li></ul>
21257 <ul><li> <s></s>: a</li></ul>
21258 <ul><li> <i>* foo</i></li></ul>
21263 Lists: 6. Escape bullets in SOL position
21267 <p><!--cmt-->*foo</p>
21269 <!--cmt--><nowiki>*</nowiki>foo
21273 Lists: 7. Escape bullets in a multi-line context
21276 <nowiki>*</nowiki>b
21284 Lists: 8. Escape colons only if not present in tags
21288 <dl><dt>a:b<i>c:d</i></dt></dl>
21290 ; <nowiki>a:b</nowiki>''c:d''
21293 #### --------------- HRs ---------------
21294 #### 1. Single line
21295 #### -----------------------------------
21298 HRs: 1. Single line
21300 ----<nowiki>----</nowiki>
21312 #### --------------- Tables ---------------
21313 #### 1a. Simple example
21314 #### 1b. No escaping needed (!foo)
21315 #### 1c. No escaping needed (|foo)
21316 #### 1d. No escaping needed (|}foo)
21318 #### 2a. Nested in td (<td>foo|bar</td>)
21319 #### 2b. Nested in td (<td>foo||bar</td>)
21320 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
21322 #### 3a. Nested in th (<th>foo!bar</th>)
21323 #### 3b. Nested in th (<th>foo!!bar</th>)
21324 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
21328 #### 4c. No escaping needed
21329 #### --------------------------------------
21332 Tables: 1a. Simple example
21343 Tables: 1b. No escaping needed
21352 Tables: 1c. No escaping needed
21361 Tables: 1d. No escaping needed
21370 Tables: 2a. Nested in td
21375 <td>foo|bar</td></tr>
21376 <tr><td>x<div>a|b</div></td>
21380 |<nowiki>foo|bar</nowiki>
21382 |x<div><nowiki>a|b</nowiki></div>
21398 Tables: 2b. Nested in td
21404 <td>a<i>b||c</i></td>
21405 <td>a<i><div>b||c</div></i></td>
21406 </tr></tbody></table>
21409 |<nowiki>foo||bar</nowiki>
21410 |a''<nowiki>b||c</nowiki>''
21411 |a''<div><nowiki>b||c</nowiki></div>''
21420 <td>a<i><div>b||c</div></i>
21426 Tables: 2c. Nested in td -- no escaping needed
21442 Tables: 3a. Nested in th
21458 Tables: 3b. Nested in th
21463 <tr><th>foo!!bar</th>
21464 <th><i>foo|bar</i></th>
21465 <th><i>foo!!bar</i></th>
21466 <th><i><span>foo!!bar</span></i></th>
21467 </tr></tbody></table>
21470 !<nowiki>foo!!bar</nowiki>
21471 !''<nowiki>foo|bar</nowiki>''
21472 !''<nowiki>foo!!bar</nowiki>''
21473 !''<span><nowiki>foo!!bar</nowiki></span>''
21482 <th><i>foo!!bar</i>
21484 <th><i><span>foo!!bar</span></i>
21490 Tables: 3c. Nested in th
21495 <tr><th>foo||bar</th>
21496 <th><span typeof="mw:Nowiki">foo||bar</span></th>
21497 </tr></tbody></table>
21500 !<nowiki>foo||bar</nowiki>
21501 !<nowiki>foo||bar</nowiki>
21514 Tables: 4a. Escape -
21533 |<nowiki>-bar</nowiki>
21538 Tables: 4b. Escape +
21557 |<nowiki>+bar</nowiki>
21562 Tables: 4c. No escaping needed
21605 <tr><td>foo-bar</td><td>foo+bar</td></tr>
21606 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
21612 <div>a|b</div></td>
21617 Tables: 4d. No escaping needed
21627 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
21636 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
21637 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
21638 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
21643 Tables: Digest broken attributes on table and tr tag
21659 #### --------------- Links ----------------
21660 #### 1. Quote marks in link text
21661 #### 2. Wikilinks: Escapes needed
21662 #### 3. Wikilinks: No escapes needed
21663 #### 4. Extlinks: Escapes needed
21664 #### 5. Extlinks: No escapes needed
21665 #### --------------------------------------
21667 Links 1. WikiLinks: No escapes needed
21671 [[Foo|x [Foobar] x]]
21673 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
21674 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
21675 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
21678 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
21679 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
21680 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
21684 Links 2. WikiLinks: Escapes needed
21688 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
21689 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
21690 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
21691 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
21692 <a href="Foo" rel="mw:WikiLink">|Bar</a>
21693 <a href="Foo" rel="mw:WikiLink">]]bar</a>
21694 <a href="Foo" rel="mw:WikiLink">[[bar</a>
21695 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
21696 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
21697 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
21699 [[Foo|<nowiki>Foobar]</nowiki>]]
21700 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
21701 [[Foo|<nowiki>[[Bar]]</nowiki>]]
21702 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
21703 [[Foo|<nowiki>|Bar</nowiki>]]
21704 [[Foo|<nowiki>]]bar</nowiki>]]
21705 [[Foo|<nowiki>[[bar</nowiki>]]
21706 [[Foo|<nowiki>x [[ y</nowiki>]]
21707 [[Foo|<nowiki>x ]] y</nowiki>]]
21708 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
21710 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
21711 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
21712 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
21713 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
21714 <a href="/wiki/Foo" title="Foo">|Bar</a>
21715 <a href="/wiki/Foo" title="Foo">]]bar</a>
21716 <a href="/wiki/Foo" title="Foo">[[bar</a>
21717 <a href="/wiki/Foo" title="Foo">x [[ y</a>
21718 <a href="/wiki/Foo" title="Foo">x ]] y</a>
21719 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
21724 Links 3. WikiLinks: No escapes needed
21729 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
21730 <a href="/wiki/Foo" title="Foo">foo|bar</a>
21733 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
21734 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
21738 Links 4. ExtLinks: Escapes needed
21742 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
21743 <a rel="mw:ExtLink" href="http://google.com">google]</a></p>
21744 <p>[http://google.com]</p>
21745 <p>[http://google.com google]</p>
21747 [http://google.com <nowiki>[google]</nowiki>]
21748 [http://google.com <nowiki>google]</nowiki>]
21750 <nowiki>[http://google.com]</nowiki>
21752 <nowiki>[http://google.com google]</nowiki>
21755 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
21756 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
21757 </p><p>[http://google.com]
21758 </p><p>[http://google.com google]
21763 Links 5. ExtLinks: No escapes needed
21765 [http://google.com [google]
21767 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
21770 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
21774 Links 6. Add <nowiki/>s between text-nodes and url-links when required (bug 64300)
21776 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
21777 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
21778 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
21779 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
21780 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
21781 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
21782 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21783 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
21784 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
21785 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
21786 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
21787 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
21788 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
21791 x<nowiki/>http://example.com<nowiki/>y
21792 http://example.com<nowiki/>?x
21793 http://example.com<nowiki/>&x
21794 http://example.com<nowiki/>'x
21795 http://example.com<nowiki/>,x
21796 http://example.com<nowiki/>.x
21797 http://example.com<nowiki/>;x
21798 http://example.com<nowiki/>:x
21799 http://example.com<nowiki/>;x
21800 http://example.com<nowiki/>!x
21801 http://example.com<nowiki/>=x
21802 http://example.com<nowiki/>(x)
21803 http://example.com(x<nowiki/>)
21807 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21810 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
21812 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
21813 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
21814 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
21815 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
21816 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
21822 "http://example.com"
21823 (http://example.com)
21824 (http://example.com) foo
21825 http://example.com,
21826 http://example.com, foo
21829 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
21831 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
21832 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
21833 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
21834 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
21835 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
21840 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (bug 64300)
21842 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
21843 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
21845 http://example.com.,;:!?\
21846 -http://example.com:
21848 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
21849 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
21854 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (bug 64300)
21856 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
21857 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
21858 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
21862 X<nowiki/>RFC 123<nowiki/>y
21866 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (bug 64300)
21868 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
21869 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
21870 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
21877 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
21878 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
21879 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
21884 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (bug 64300)
21886 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
21887 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21888 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
21892 X<nowiki/>PMID 123<nowiki/>y
21896 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (bug 64300)
21898 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
21899 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
21900 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
21907 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
21908 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
21909 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
21914 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (bug 64300)
21916 <p><a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
21917 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
21918 a<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
21921 ISBN 1234567890<nowiki/>1
21922 ISBN 1234567890<nowiki/>x
21923 a<nowiki/>ISBN 1234567890<nowiki/>b
21927 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (bug 64300)
21929 <p>-<a href="./Special:BookSources/1234567890" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
21933 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
21938 Links 14. Protect link-like plain text. (Parsoid bug T78425)
21942 <p>this is not a link: http://example.com
21945 this is not a link: <nowiki>http://example.com</nowiki>
21949 Links 15. Link trails can't become link prefixes.
21953 [[Söfnuður]]-[[00]]
21955 <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>
21958 <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>
21961 #### --------------- Quotes ---------------
21962 #### 1. Quotes inside <b> and <i>
21963 #### 2. Link fragments separated by <i> and <b> tags
21964 #### 3. Link fragments inside <i> and <b>
21965 #### 4. No escaping needed
21966 #### --------------------------------------
21968 1a. Quotes inside <b> and <i>
21970 parsoid=html2wt,wt2wt
21973 ''<nowiki>''foo''</nowiki>''
21974 ''<nowiki>'''foo'''</nowiki>''
21976 '''<nowiki/>'foo''''
21977 '''<nowiki>''foo''</nowiki>'''
21978 '''<nowiki>'''foo'''</nowiki>'''
21979 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
21980 '''foo'''<nowiki/>'s
21986 '''foo'''<nowiki/>'
21987 ''''foo'''<nowiki/>'
21988 ''fools'<span> errand</span>''
21989 ''<span>fool</span>'s errand''
21990 '<nowiki/>''foo'' bar '''baz''
21991 a|!*#-:;+-~[]{}b'''x''
22000 <b>foo'<i>bar'</i>baz</b>
22009 <i>fools'<span> errand</span></i>
22010 <i><span>fool</span>'s errand</i>
22011 '<i>foo</i> bar '<i>baz</i>
22012 a|!*#-:;+-~[]{}b'<i>x</i>
22017 1b. Quotes inside <b> and <i> with other tags on same line
22019 parsoid=html2wt,wt2wt
22021 '''a'' foo ''[[bar]]''
22022 ''a''' foo ''[[bar]]''
22023 ''a''' foo '''{{echo|[[bar]]}}'''
22024 [[foo]] x'''[[bar]]''
22025 '''foo'' <ref>test</ref>
22026 '''foo'' <div title="name">test</div>
22027 '''foo'' and <br> bar
22030 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22031 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
22032 <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>
22033 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
22034 '<i>foo</i> <span class="reference" 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">[1]</a></span>
22035 '<i>foo</i> <div title="name">test</div>
22036 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
22037 <ol class="references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
22038 <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>
22043 2. Link fragments separated by <i> and <b> tags
22045 [[''foo''<nowiki>hello]]</nowiki>
22047 [['''foo'''<nowiki>hello]]</nowiki>
22049 <p>[[<i>foo</i>hello]]
22050 </p><p>[[<b>foo</b>hello]]
22054 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
22055 # this is one of the shortcomings of this format
22057 3. Link fragments inside <i> and <b>
22059 ''[[foo''<nowiki>]]</nowiki>
22061 '''[[foo'''<nowiki>]]</nowiki>
22064 </p><p><b>[[foo</b>]]
22069 4. No escaping needed
22071 '<span>''bar''</span>'
22072 '<span>'''bar'''</span>'
22075 <p>'<span><i>bar</i></span>'
22076 '<span><b>bar</b></span>'
22081 #### ----------- Paragraphs ---------------
22082 #### 1. No unnecessary escapes
22083 #### --------------------------------------
22086 1. No unnecessary escapes
22088 bar <span><nowiki>[[foo]]</nowiki></span>
22090 =bar <span><nowiki>[[foo]]</nowiki></span>
22092 [[bar <span><nowiki>[[foo]]</nowiki></span>
22094 ]]bar <span><nowiki>[[foo]]</nowiki></span>
22096 =bar <span>foo]]</span><nowiki>=</nowiki>
22098 <p>bar <span>[[foo]]</span>
22099 </p><p>=bar <span>[[foo]]</span>
22100 </p><p>[[bar <span>[[foo]]</span>
22101 </p><p>]]bar <span>[[foo]]</span>
22102 </p><p>=bar <span>foo]]</span>=
22106 #### ----------------------- PRE --------------------------
22107 #### 1. Leading whitespace in SOL context should be escaped
22108 #### ------------------------------------------------------
22110 1. Leading whitespace in SOL context should be escaped
22114 <nowiki> </nowiki>a
22116 <nowiki> </nowiki> a
22118 <nowiki> </nowiki>a(tab)
22120 <nowiki> </nowiki> a
22122 <nowiki> </nowiki> a
22125 <nowiki> </nowiki>b
22128 <nowiki> </nowiki>b
22131 <nowiki> </nowiki> b
22137 <p><!--cmt--> a</p>
22147 2. Leading whitespace in non-indent-pre contexts should not be escaped
22155 <p>foo <span about="#mwt2" class="reference" 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">[1]</a></span></p>
22156 <ol class="references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
22157 <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"><i data-parsoid='{"dsr":[9,14,2,2]}'>a</i>
22163 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
22182 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
22186 [[File:Foobar.jpg|thumb|caption]]
22188 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="25" width="220"/></a><figcaption>caption</figcaption></figure>
22192 5. Nowiki escaping should account for indent-pres
22201 #### --------------- Behavior Switches --------------------
22203 1. Valid behavior switches should be escaped
22210 <nowiki>__TOC__</nowiki>
22211 ''<nowiki>__TOC__</nowiki>''
22215 2. Invalid behavior switches should not be escaped
22226 #### --------------- HTML tags ---------------
22229 #### 3. multi-line html tag
22230 #### 4. extension tags
22231 #### -----------------------------------------
22237 <a href="http://google.com">google</a>
22239 <a href="http://google.com">google</a>
22245 * <nowiki><div>foo</div></nowiki>
22246 * <nowiki><div style="color:red">foo</div></nowiki>
22247 * <nowiki><td></nowiki>
22249 <ul><li> <div>foo</div></li>
22250 <li> <div style="color:red">foo</div></li>
22251 <li> <td></li></ul>
22256 3. multi-line html tag
22271 <nowiki><ref>foo</ref></nowiki>
22273 <nowiki><ref>bar</nowiki>
22275 baz<nowiki></ref></nowiki>
22277 <p><ref>foo</ref>
22278 </p><p><ref>bar
22279 </p><p>baz</ref>
22283 #### --------------- Others ---------------
22287 <nowiki>foo</nowiki>
22289 <p><nowiki>foo</nowiki>
22293 ## The quote-char in the input is necessary for triggering the bug
22295 (Bug 52035) Nowiki-escaping should not get tripped by " :" in text
22297 parsoid=wt2wt,html2wt
22306 Tag-like HTML structures are passed through as text
22328 </p><p>1<d e>f
22333 HTML tag with necessary entities in attributes
22335 <span title="&amp;">foo</span>
22337 <p><span title="&amp;">foo</span>
22342 HTML tag with 'unnecessary' entity encoding in attributes
22344 <span title="&">foo</span>
22346 <p><span title="&">foo</span>
22351 HTML tag with broken attribute value quoting
22353 <span title="Hello world>Foo</span>
22355 <p><span>Foo</span>
22358 <p><span title="Hello world">Foo</span>
22363 Parsoid-only: HTML tag with broken attribute value quoting
22367 <span title="Hello world>Foo</span>
22369 <p><span title="Hello world">Foo</span>
22374 Table with broken attribute value quoting
22377 | title="Hello world|Foo
22388 <td title="Hello world">Foo
22394 Table with broken attribute value quoting on consecutive lines
22397 | title="Hello world|Foo
22398 | style="color:red|Bar
22411 <td title="Hello world">Foo
22412 </td><td style="color: red">Bar
22413 </td></tr></tbody></table>
22418 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
22428 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
22438 Accept empty td cell attribute
22441 | align="center" | foo || |
22446 <td align="center"> foo </td>
22453 Non-empty attributes in th-cells
22456 ! Foo !! style="color: red" | Bar
22462 <th style="color: red"> Bar
22468 Accept empty attributes in th-cells
22483 Empty table rows go away
22504 ### Parsoid-centric tests for testing RTing of inter-element separators
22505 ### Edge cases not tested by existing parser tests and specific to
22506 ### Parsoid-specific serialization strategies.
22510 RT-ed inter-element separators should be valid separators
22522 # Parsoid-only since PHP parser relies on Tidy for correct output
22524 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
22538 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
22539 <p>bar</p></small></td></tr>
22543 <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>
22548 Empty TD followed by TD with tpl-generated attribute
22553 |{{echo|style='color:red'}}|foo
22567 Indented table with an empty td
22585 ## We have some newline diffs RT-ing this edge case
22586 ## and it is not important enough -- we seem to be emitting
22587 ## at most 2 newlines after a </tr> and this is unrelated to
22588 ## the issue from T85627 that this is testing.
22590 Indented table with blank lines in between (T85627)
22609 Indented block & table
22623 <div data-parsoid='{"stx":"html"}'>foo</div>
22625 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
22630 Indent and comment before table row
22645 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
22646 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
22650 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
22652 Empty TR followed by a template-generated TR
22658 {{echo|<tr><td>foo</td></tr>}}
22664 <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}}]}'>
22669 ## PHP and parsoid output differ for this, and since this is primarily
22670 ## for testing Parsoid's serializer, marking this Parsoid only
22672 Empty TR followed by mixed-ws-comment line should RT correctly
22688 <!--c--> </tr><!--d-->
22694 Multi-line image caption generated by templates with/without trailing newlines
22696 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
22697 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
22699 <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>
22700 <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>
22704 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
22708 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
22710 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
22712 <includeonly>foo</includeonly>
22720 ## PHP emits broken html for this, and since this is primarily
22721 ## a Parsoid serializer test, marking this Parsoid only
22723 Improperly nested inline or quotes tags with whitespace in between
22727 <span> <s>x</span> </s>
22730 <p><span> <s>x</s></span><s> </s>
22731 <b> <i>x</i></b><i> </i>
22736 Encapsulate protected attributes from wt
22740 <div typeof="mw:placeholder stuff" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
22742 <body><div data-x-typeof="mw:placeholder stuff" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">foo</div>
22746 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
22747 ## Having nested or stray pre tags results in the attempt to add duplicates,
22748 ## causing an assertion fail. This test tries to prevent that situation.
22750 Ensure ParagraphWrapper can deal with stray closing pre tags
22760 1. Ensure fostered text content is wrapped in element nodes
22764 <table>hi</table><table>ho</table>
22773 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
22775 parsoid=wt2html,wt2wt
22784 <tbody><tr><td> a</td></tr>
22789 Encapsulation properly handles null DSR information from foster box
22791 parsoid=wt2html,wt2wt
22793 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
22795 <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>
22799 1. Encapsulate foster-parented transclusion content
22801 parsoid=wt2wt,wt2html
22803 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
22805 <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>
22815 2. Encapsulate foster-parented transclusion content
22817 parsoid=wt2wt,wt2html
22819 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
22821 <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>
22832 3. Encapsulate foster-parented transclusion content
22834 parsoid=wt2wt,wt2html
22836 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22838 <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>"]}">
22851 4. Encapsulate foster-parented transclusion content
22853 parsoid=wt2wt,wt2html
22855 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
22857 <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>"]}">
22870 5. Encapsulate foster-parented transclusion content
22872 parsoid=wt2wt,wt2html
22874 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
22876 <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>
22891 6. Encapsulate foster-parented transclusion content
22893 parsoid=wt2wt,wt2html
22895 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
22897 <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>
22913 7. Encapsulate foster-parented transclusion content
22915 parsoid=wt2wt,wt2html
22917 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
22919 <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>
22930 8. Encapsulate foster-parented transclusion content
22932 parsoid=wt2wt,wt2html
22935 }}{|{{echo|style='color:red'}}
22940 <p typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}">a</p><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><table>
22950 9. Encapsulate foster-parented transclusion content
22952 parsoid=wt2wt,wt2html
22954 <table>{{echo|hi</table>hello}}
22956 <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>
22960 Table in fosterable position
22962 parsoid=wt2html,wt2wt
22971 <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">
22973 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
22979 # Parsoid only for bug 64747
22981 Properly encapsulate empty-content transclusions in fosterable positions
22989 <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":["","","",""]}]]}'>
22995 Support <object> element with .data attribute
22999 <object data="test.swf"></object>
23001 <object data="test.swf"></object>
23005 Don't block XML namespace declaration
23007 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
23009 <p><span>MediaWiki</span>
23012 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
23015 # -----------------------------------------------------------------
23016 # The following section of tests are primarily to spec requirements
23017 # around serialization of new/edited content.
23019 # All these tests are marked Parsoid html2wt and html2html only
23020 # ----------------------------------------------------------------
23022 # 'mi' is a localinterwiki prefix as well as a language
23024 Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869)
23028 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
23035 New wikilinks should be serialized properly
23039 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
23040 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
23047 New wiki links (href variations)
23051 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23052 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
23053 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
23054 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
23059 [[Toxine bactérienne]]
23063 New wiki links (content string variations)
23067 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
23068 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
23069 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
23073 [[Foo_bar|./Foo_bar]]
23077 New category links (href variations)
23081 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
23082 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
23083 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
23085 [[Category:Toxine bactérienne]]
23086 [[Category:Toxine bactérienne]]
23087 [[Category:Toxine bactérienne]]
23091 New sol transparent links don't need indent-pre nowiki protection
23096 <link rel="mw:PageProp/redirect" href="./Main_Page">
23097 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
23098 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
23100 #WEITERLEITUNG [[Main Page]]
23101 <!-- this is good --> [[Category:Good]]
23102 <!-- this is great --> [[Kategorie:Great]]
23106 New interlanguage links (href variations)
23110 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
23111 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
23112 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
23114 [[es:Toxine bactérienne]]
23115 [[es:Toxine_bactérienne]]
23116 [[es:Toxine_bactérienne]]
23120 Image: Modifying size of an image (1)
23123 "modes": ["wt2wt"],
23125 ["img[height]", "attr", "height", "22"],
23126 ["img[width]", "attr", "width", "200"]
23130 [[Image:Foobar.jpg|230x230px]]
23132 [[Image:Foobar.jpg|200x200px]]
23136 Image: Modifying size of an image (2)
23139 "modes": ["wt2wt"],
23141 ["img[height]", "attr", "height", "100"],
23142 ["img[width]", "attr", "width", "500"]
23146 [[Image:Foobar.jpg|230x230px]]
23148 [[Image:Foobar.jpg|500x500px]]
23151 # Change in size is ignored so long as class='mw-default-size'
23153 Image: Modifying size of an image (3)
23156 "modes": ["wt2wt"],
23158 ["figure[class]", "removeClass", "mw-default-size"],
23159 ["figure img", "attr", "height", "19"],
23160 ["figure img", "attr", "width", "170"]
23164 [[Image:Foobar.jpg|thumb]]
23166 [[Image:Foobar.jpg|thumb|170x170px]]
23170 Image: Modifying alignment of an image (bug 48665)
23173 "modes": ["wt2wt"],
23175 ["figure[class]", "removeClass", "mw-halign-right"],
23176 ["figure[class]", "addClass", "mw-halign-left"]
23180 [[Image:Foobar.jpg|thumb|caption|right]]
23182 [[Image:Foobar.jpg|thumb|caption|left]]
23186 Image: Modifying mw-default-size of an frameless image (bug 62805)
23189 "modes": ["wt2wt"],
23191 ["figure.mw-default-size", "removeClass", "mw-default-size"]
23195 [[Image:Foobar.jpg|frameless|right]]
23197 [[Image:Foobar.jpg|frameless|right|220x220px]]
23201 Image: Modifying valign of an image (bug 49221)
23204 "modes": ["wt2wt"],
23206 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
23207 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
23211 [[File:Foobar.jpg|20px|middle]]
23213 [[File:Foobar.jpg|20px|text-top]]
23217 Image: Modifying alt attribute of an image (bug 56400)
23220 "modes": ["wt2wt"],
23222 ["img[alt]", "attr", "alt", "some alternate edited text"]
23226 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
23228 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
23232 Image: Modifying caption of an image
23235 "modes": ["wt2wt"],
23237 ["figcaption", "text", "new caption"]
23241 [[Image:Foobar.jpg|thumb|original caption]]
23243 [[Image:Foobar.jpg|thumb|new caption]]
23247 Image: empty alt attribute (bug 48924)
23251 [[File:Foobar.jpg|thumb|alt=|bar]]
23253 <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>
23257 #Image: new attributes should be serialized in wiki's language for RTL languages (bug 51852)
23262 #<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>
23264 #[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
23268 Image: Block level image should have \n before and after
23271 [[File:Foobar.jpg|right|thumb|150x150px]]
23275 <figure class="mw-halign-right" typeof="mw:Image/Thumb"><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="17" width="150"/></a></figure>
23280 Image: New block level image should have \n before and after (existing content)
23283 [[File:Foobar.jpg|right|thumb|150x150px]]
23287 <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>
23292 Image: upright option (parsoid)
23296 [[File:Foobar.jpg|thumb|upright|caption]]
23297 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
23298 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
23300 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="19" width="170"/></a><figcaption>caption</figcaption></figure>
23301 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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="12" width="110"/></a><figcaption>caption</figcaption></figure>
23302 <figure typeof="mw:Image/Thumb"><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="57" width="500"/></a><figcaption>caption</figcaption></figure>
23306 Image: upright option is ignored on inline and frame images (parsoid)
23310 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
23312 <p><span 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="57" width="500"/></a></span></p>
23316 Image: from basic HTML (1)
23320 <span typeof="mw:Image">
23321 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
23324 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
23328 Image: from basic HTML (2)
23332 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
23334 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
23338 Image: from basic HTML (3)
23342 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
23344 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
23348 Image: from basic HTML (4)
23352 <img src="./File:Foobar.jpg">
23354 [[File:Foobar.jpg|link=]]
23358 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
23363 <li><p>foo</p></li>
23370 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
23374 <ul> <li>foo</li></ul>
23380 Don't strip leading whitespace when handling indent-pre suppressing tags
23385 <tr><td> indented row</td></tr>
23388 <b>This is very bold of you!</b>
23391 indented cell (no pre-wrapping!)
23401 '''This is very bold of you!'''
23405 indented cell (no pre-wrapping!)
23413 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
23418 <nowiki> </nowiki><span>bar</span>
23421 <nowiki> </nowiki></span>bar2
23424 <nowiki> </nowiki><span>bar</span>
23427 <nowiki> </nowiki><span>foo</span>
23445 Lists: Add space after bullets
23452 <li><span> baz</span></li>
23457 * <span> baz</span>
23461 Lists: Dont insert newlines in a serialized list item.
23465 <ul><li>a<br>b</li><li>c</li></ul>
23472 Headings: Add space before/after == (Bug 51744)
23479 <h2><span> baz</span></h2>
23487 == <span> baz</span> ==
23491 Headings: Force metas to serialize before/after
23495 <h2>hello there<link href="Category:A1" rel="mw:PageProp/Category" /></h2>
23496 <h2><link href="Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
23498 <h2><!--foo--> <link href="Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
23506 <!--foo--> [[Category:A3]]
23511 Parsoid: Serialize positional parameters with = in them as named parameter
23515 <p about="#mwt1" typeof="mw:Transclusion"
23516 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
23518 <p about="#mwt1" typeof="mw:Transclusion"
23519 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
23521 <!--Orig params with data-parsoid has heuristics for handling = chars-->
23522 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
23523 <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>
23527 {{echo|1 = f=oo|2 = bar}}
23529 <!--Orig params with data-parsoid has heuristics for handling = chars-->
23530 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
23531 {{echo|<nowiki>f=oo</nowiki>|bar}}
23535 Parsoid: Serialize positional parameters with = in extlink as named parameter
23539 <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>
23541 {{echo|1 = http://stuff?is=ok}}
23545 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
23549 <div>a<p>b</p></div>
23570 Substrings resembling wikitext in hrefs should not get nowiki escapes
23574 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
23580 Enforce single-line context in the serializer
23595 #-----------------------------
23596 # I/B quote minimization tests
23597 #-----------------------------
23600 1. I/B quote minimization: wikitext-only tags should be combined
23604 <p><i>A</i><i>B</i></p>
23605 <p><b>A</b><b>B</b></p>
23606 <p><i>A</i><b><i>B</i></b></p>
23607 <p><b>A</b><i><b>B</b></i></p>
23608 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
23609 <p><i><b>A</b></i><i><b>B</b></i></p>
23610 <p><i><b>A</b></i><b><i>B</i></b></p>
23611 <p><b><i>A</i></b><i><b>B</b></i></p>
23631 2. I/B quote minimization: wikitext and html tags should not be combined
23635 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
23636 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
23640 ''A''<nowiki/>'''<i>B</i>'''
23644 3. I/B quote minimization: templated content stops minimization
23648 <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>
23649 <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>
23651 ''A''{{echo|''B''}}
23653 ''A''{{echo|'''''B'''''}}
23657 4. I/B quote minimization: new content should be mimimized with adjacent old content
23661 <p><i>A</i><i>B</i></p>
23662 <p><b>A</b><b>B</b></p>
23663 <p><i>A</i><b><i>B</i></b></p>
23673 5a. Merge adjacent quote nodes if they've been edited
23676 "modes": ["wt2wt", "selser"],
23678 ["p", "contents", "remove", ":contains('b')"]
23688 5b. Merge adjacent quote nodes if they've been edited
23691 "modes": ["wt2wt", "selser"],
23697 ''a''<span id="x">b</span>''c''
23702 #------------------------------------
23703 # End of I/B quote minimization tests
23704 #------------------------------------
23707 Bug 54262: New entities
23713 <span typeof="mw:Entity"> </span>
23716 ## Note that there is no wikitext output for 'unknownproperty' ##
23717 ## Unknown magic words are silently dropped ##
23724 <meta property='mw:PageProp/toc' />
23725 <meta property='mw:PageProp/notoc' />
23726 <meta property='mw:PageProp/forcetoc' />
23727 <meta property='mw:PageProp/index' />
23728 <meta property='mw:PageProp/noindex' />
23729 <meta property='mw:PageProp/nogallery' />
23730 <meta property='mw:PageProp/noeditsection' />
23731 <meta property='mw:PageProp/notitleconvert' />
23732 <meta property='mw:PageProp/nocontentconvert' />
23733 <meta property='mw:PageProp/unknownproperty' />
23743 __NOCONTENTCONVERT__
23747 Consecutive <pre>s should not get merged
23749 parsoid=html2wt,html2html
23751 <pre>a</pre><pre>b</pre>
23779 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
23783 <a rel="mw:ExtLink" href="./Special:BookSources/1234567890">ISBN 1234567895</a>
23785 [[Special:BookSources/1234567890|ISBN 1234567895]]
23789 Edited RFC links not serializable as RFC links should serialize as extlinks
23793 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
23795 [//tools.ietf.org/html/rfc123 New RFC]
23799 Edited PMID links not serializable as PMID links should serialize as extlinks
23803 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
23805 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
23809 WTS of autolinks with trailing/surrounding context
23813 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
23814 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
23815 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
23816 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
23817 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
23818 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
23820 http://cscott.net<nowiki/>'''foo'''
23822 http://cscott.net<b>foo</b>
23824 '''http://cscott.net<nowiki/>'''
23826 '''http://cscott.net '''
23828 '''http://cscott.net<nowiki/>x'''
23830 http://cscott.net<nowiki/>x
23834 WTS of autolinks with nowikis (round-trip)
23836 x<nowiki/>http://cscott.net<nowiki/>x
23838 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
23841 # this is the "easy" test because it leaves in place all the
23842 # data-parsoid information indicating this is an autolink
23844 WTS of autolinks with escapes (editing)
23847 "modes": ["wt2wt"],
23849 [ "meta", "remove" ]
23853 x<nowiki/>http://cscott.net<nowiki/>x
23855 x<nowiki/>http://cscott.net<nowiki/>x
23859 Edited Redirect link should emit a non-piped wikitext link
23863 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
23869 T75121: Infer extension name from typeOf if data-mw is not present
23873 <div typeOf="mw:Extension/foo"></div>
23878 # Note that the <p> wrapping isn't present in PHP parser output
23879 # The important thing for this test is that P-wrapping doesn't
23880 # interfere with the <nowiki> protection for leading - in <td>
23881 # (which isn't necessary for <th>).
23883 T88318: p-wrapped dash in table.
23885 parsoid=html2wt,wt2wt
23888 <tr><th><p>-</p></th><th><p>- </p></th></tr>
23889 <tr><td><p>-</p></td><td><p>- </p></td></tr>
23890 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
23897 |<nowiki>-</nowiki>
23898 |<nowiki>- </nowiki>
23917 <td><small>-</small></td>
23929 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
23934 <td id='mwAc'>foo</td>
23935 <td id='serialize-this'>bar</td>
23940 | id="serialize-this" |bar
23945 Parsoid-like element ids should not be serialized to wikitext unless shadowed
23949 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
23951 <div id="hello">ok</div>
23958 "modes": ["wt2wt"],
23960 [ "#xyz", "before", "<b>before</b> stuff " ],
23961 [ "#xyz", "after", " stuff <i>after</i>" ],
23962 [ "#xyz", "html", "x <b>y</b> z" ]
23966 <span id="xyz">hello</span>
23968 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
23972 Never serialize a-tag as html, regardless of what data-parsoid has to say
23976 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
23981 # -----------------------------------------------------------------
23982 # End of section for Parsoid-only html2wt tests for serialization
23984 # -----------------------------------------------------------------
23986 # -----------------------------------------------------------------
23987 # The following section of tests are primarily to spec behavior of
23988 # the selective serializer. All these tests have manual selser
23989 # changes. The automated selser changes for all tests handle the
23990 # wide variation of changes, but these tests here capture specs
23991 # deterministically.
23992 # ----------------------------------------------------------------
23996 1. Selser: New comments should not be lost
23999 "modes": ["selser"],
24001 [ "#a", "after", "<!--c1-->" ],
24002 [ "#b", "before", "<!--c2-->" ]
24006 <span id="a">a</span>
24008 <span id="b">b</span>
24010 <span id="a">a</span><!--c1-->
24012 <!--c2--><span id="b">b</span>
24017 2. Selser: Check for validity of DSR before using it
24020 "modes": ["selser"],
24022 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
24026 <span id="a">a</span>
24028 {{DISPLAYTITLE:foo}}
24029 <span id="a">a</span>
24038 Try for 100% code coverage