1 # MediaWiki Parser test cases
2 # Some taken from https://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
83 MediaWiki:bad image list
85 * [[File:Bad.jpg]] except [[Nasty page]]
113 Template:echo_with_span
119 Template:echo_with_div
132 Template:table_attribs
135 |</noinclude>style="color:red;"|Foo
139 Template:table_attribs_2
142 |</noinclude>style="color:red;"|Foo
147 Template:table_attribs_3
150 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
154 Template:table_attribs_4
156 | style="background-color:#DC241f;" width="10px" |
160 Template:table_attribs_5
163 |</noinclude>style="color:red;"||Bar
167 Template:table_attribs_6
169 style="background: <nowiki>
176 Template:table_attribs_7
179 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
183 Template:table_header_cells
185 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
191 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
195 Template:PartialTable
202 Template:image_attribs
205 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
208 ## See T48811 for details
210 Template:mixed_attr_content_template
212 style="color:red;" title="T48811"
218 Template:definition_list
265 Template:EmptyTRWithHTMLAttrTest
268 <tr align="center"></tr>
269 <tr><td>foo</td></tr>
270 <tr align="center"></tr>
271 <tr><td>bar</td></tr>
278 <ref>{{CircularRef}}</ref>
296 <p><span about="#mwt1" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"CircularRef","href":"./Template:CircularRef"},"params":{},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
297 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">Error: Expansion loop detected at <a data-parsoid='{"a":{"href":null},"sa":{"href":"Template:CircularRef"}}'>Template:CircularRef</a></span></li></ol>
303 This is a simple paragraph.
305 <p>This is a simple paragraph.
310 Paragraphs with extra newline spacing
333 Paragraphs with newline spacing with comment lines in between
341 <!--foo--><!--More than 1 comment, still stripped-->
345 <!--foo--> <!----> <!-- bar -->
406 Paragraphs with newline spacing with non-empty white-space lines in between
433 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
441 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
480 Extra newlines: More paragraphs with indented comment
495 Extra newlines followed by heading
510 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
511 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
514 <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>
519 Extra newlines between heading and content are swallowed
527 <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>
528 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
533 Heading with line break in nowiki
540 <h2><span class="mw-headline" id="A_B.0AC">A B
541 C</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 B C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
544 <h2 id="A_B.0AC">A <span typeof="mw:Nowiki">B
551 http://fr.wikipedia.org/wiki/🍺
552 <!-- EasterEgg we love beer, better be able be able to link to it -->
554 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
558 # Note that the html+tidy output removes the spaces after the <li>,
559 # which is a bug (https://sourceforge.net/p/tidy/bugs/945/, etc).
560 # This is an issue for all tests with lists. We intentionally do
561 # *not* add html+tidy clauses for these, as we don't want to
562 # document/test the broken behavior. (Parsoid matches the non-tidy
563 # output in these cases.)
572 <li> Item 2</li></ul>
580 * plain''italic''plain
581 * plain''italic''plain''italic''plain
582 * plain'''bold'''plain
583 * plain'''bold'''plain'''bold'''plain
584 * plain''italic''plain'''bold'''plain
585 * plain'''bold'''plain''italic''plain
586 * plain''italic'''bold-italic'''italic''plain
587 * plain'''bold''bold-italic''bold'''plain
588 * plain'''''bold-italic'''italic''plain
589 * plain'''''bold-italic''bold'''plain
590 * plain''italic'''bold-italic'''''plain
591 * plain'''bold''bold-italic'''''plain
592 * plain l'''italic''plain
593 * plain l''''bold''' plain
596 <li> plain<i>italic</i>plain</li>
597 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
598 <li> plain<b>bold</b>plain</li>
599 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
600 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
601 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
602 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
603 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
604 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
605 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
606 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
607 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
608 <li> plain l'<i>italic</i>plain</li>
609 <li> plain l'<b>bold</b> plain</li></ul>
613 # this example taken from the [[simple:Moon]] article (T49326)
615 Italics and possessives (1)
617 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
619 <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
623 # this example taken from [[en:Flaming Pie]] (T51926)
625 Italics and possessives (2)
627 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
629 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
633 # this example taken from [[en:Dictionary]] (T51926)
635 Italics and possessives (3)
637 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''.
639 <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>.
645 ### 2-quote opening sequence tests
648 Italics and bold: 2-quote opening sequence: (2,2)
657 Italics and bold: 2-quote opening sequence: (2,3)
666 Italics and bold: 2-quote opening sequence: (2,4)
676 # same html as previous, but wikitext adjusted to match parsoid html2wt
678 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
680 ''foo<nowiki>''</nowiki>''
686 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
688 Italics and bold: 2-quote opening sequence: (2,5)
701 # same html as previous, but wikitext adjusted to match parsoid html2wt
703 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
705 ''foo'''''<nowiki/>'''
716 ### 3-quote opening sequence tests
720 Italics and bold: 3-quote opening sequence: (3,2)
729 Italics and bold: 3-quote opening sequence: (3,3)
738 Italics and bold: 3-quote opening sequence: (3,4)
746 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
748 Italics and bold: 3-quote opening sequence: (3,5)
761 # same html as previous, but wikitext adjusted to match parsoid html2wt
763 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
765 '''foo'''''<nowiki/>''
776 ### 4-quote opening sequence tests
780 Italics and bold: 4-quote opening sequence: (4,2)
790 # same html as previous, but wikitext adjusted to match parsoid html2wt
792 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
794 <nowiki>''</nowiki>''foo''
801 Italics and bold: 4-quote opening sequence: (4,3)
810 Italics and bold: 4-quote opening sequence: (4,4)
820 # same html as previous, but wikitext adjusted to match parsoid html2wt
822 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
830 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
832 Italics and bold: 4-quote opening sequence: (4,5)
841 <p>'<b>foo</b><i></i>
845 # same html as previous, but wikitext adjusted to match parsoid html2wt
847 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
849 '<nowiki/>'''foo'''''<nowiki/>''
854 <p>'<b>foo</b><i></i>
860 ### 5-quote opening sequence tests
864 Italics and bold: 5-quote opening sequence: (5,2)
874 # same html as previous, but wikitext adjusted to match parsoid html2wt
876 Italics and bold: 5-quote opening sequence: (5,2+3)
885 Italics and bold: 5-quote opening sequence: (5,3)
895 # same html as previous, but wikitext adjusted to match parsoid html2wt
897 Italics and bold: 5-quote opening sequence: (5,3+2)
906 Italics and bold: 5-quote opening sequence: (5,4)
912 <p><i><b>foo'</b></i>
917 Italics and bold: 5-quote opening sequence: (5,5)
926 Italics and bold: 5-quote opening sequence: (5,6)
930 <p><i><b>foo'</b></i>
935 ### multiple quote sequences in a line
939 Italics and bold: multiple quote sequences: (2,4,2)
945 <p><i>foo'<b>bar</b></i>
949 # same html as previous, but wikitext adjusted to match parsoid html2wt
951 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
953 ''foo'<nowiki/>'''bar'''''
955 <p><i>foo'<b>bar</b></i>
960 Italics and bold: multiple quote sequences: (2,4,3)
966 <p><i>foo'<b>bar</b></i>
970 # same html as previous, but wikitext adjusted to match parsoid html2wt
972 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
974 ''foo'<nowiki/>'''bar'''''
976 <p><i>foo'<b>bar</b></i>
981 Italics and bold: multiple quote sequences: (2,4,4)
987 <p><i>foo'<b>bar'</b></i>
991 # same html as previous, but wikitext adjusted to match parsoid html2wt
993 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
995 ''foo'<nowiki/>'''bar'<nowiki/>'''''
997 <p><i>foo'<b>bar'</b></i>
1001 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1003 Italics and bold: multiple quote sequences: (3,4,2)
1012 <p><b>foo'</b>bar<i></i>
1016 # same html as previous, but wikitext adjusted to match parsoid html2wt
1018 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1020 '''foo''''bar''<nowiki/>''
1025 <p><b>foo'</b>bar<i></i>
1029 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1031 Italics and bold: multiple quote sequences: (3,4,3)
1040 <p><b>foo'</b>bar<b></b>
1044 # same html as previous, but wikitext adjusted to match parsoid html2wt
1046 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1048 '''foo''''bar'''<nowiki/>'''
1053 <p><b>foo'</b>bar<b></b>
1058 ### other quote tests
1061 Italics and bold: other quote tests: (2,3,5)
1063 ''this is about '''foo's family'''''
1065 <p><i>this is about <b>foo's family</b></i>
1071 Italics and bold: other quote tests: (2,(3,3),2)
1073 ''this is about '''foo's''' family''
1075 <p><i>this is about <b>foo's</b> family</i>
1081 Italics and bold: other quote tests: (3,2,3,2)
1085 '''this is about ''foo'''s family''
1087 <p><b>this is about <i>foo</i></b><i>s family</i>
1092 # same html as previous, but wikitext adjusted to match parsoid html2wt
1094 Italics and bold: other quote tests: (3,2,3+2+2,2)
1096 '''this is about ''foo'''''<nowiki/>''s family''
1098 <p><b>this is about <i>foo</i></b><i>s family</i>
1104 Italics and bold: other quote tests: (3,2,3,3)
1106 '''this is about ''foo'''s family'''
1108 <p>'<i>this is about </i>foo<b>s family</b>
1114 Italics and bold: other quote tests: (3,(2,2),3)
1116 '''this is about ''foo's'' family'''
1118 <p><b>this is about <i>foo's</i> family</b>
1124 Italicized possessive
1126 The ''[[Main Page]]'''s talk page.
1128 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1131 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1135 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1136 (Requires tidy for PHP parser output to be fixed up)
1138 parsoid=wt2html,wt2wt
1155 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1156 <td><i>a</i></td><td><i>b</i></td></tr>
1165 Non-html5 tags should be accepted
1167 <center>''foo''</center>
1169 <font>''foo''</font>
1170 <strike>''foo''</strike>
1173 <center><i>foo</i></center>
1174 <p><big><i>foo</i></big>
1175 <font><i>foo</i></font>
1176 <strike><i>foo</i></strike>
1182 <wbr> is valid wikitext (T54468)
1190 # <strike> is HTML4, <s> is HTML4/5.
1192 <s> or <strike> for strikethrough
1194 <strike>strike</strike>
1198 <p><strike>strike</strike>
1206 Text-level semantic html elements in wikitext
1209 <strong>text</strong>
1225 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1232 <strong>text</strong>
1248 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1256 # test cases taken from
1257 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1259 Ruby markup (W3C-style)
1261 ; Mono-ruby for individual base characters
1262 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1264 : <ruby>今日<rt>きょう</rt></ruby>
1266 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1268 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1270 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1272 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1273 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1274 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1277 <dl><dt> Mono-ruby for individual base characters</dt>
1278 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1279 <dt> Group ruby</dt>
1280 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1281 <dt> Jukugo ruby</dt>
1282 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1283 <dt> Inline ruby</dt>
1284 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1285 <dt> Double-sided ruby</dt>
1286 <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>
1288 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1289 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1290 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1295 # The next two test different paths in the sanitizer.
1297 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1299 <blockquote|>a</blockquote>
1301 <b→> doesn't terminate </b→>
1303 <bä> doesn't terminate </bä>
1305 <boo> doesn't terminate </boo>
1307 <s.foo> doesn't terminate </s.foo>
1311 <p><blockquote|>a</blockquote>
1312 </p><p><b→> doesn't terminate </b→>
1313 </p><p><bä> doesn't terminate </bä>
1314 </p><p><boo> doesn't terminate </boo>
1315 </p><p><s.foo> doesn't terminate </s.foo>
1316 </p><p><sub-ID#1>
1320 # There is a tidy bug here: https://sourceforge.net/p/tidy/bugs/946/
1321 # If the non-word-character tag made it through the sanitizer, tidy
1322 # would munge it up.
1324 Non-word characters don't terminate tag names + tidy
1326 <blockquote|>a</blockquote>
1328 <b→> doesn't terminate </b→>
1330 <bä> doesn't terminate </bä>
1332 <boo> doesn't terminate </boo>
1334 <s.foo> doesn't terminate </s.foo>
1338 <p><blockquote|>a</p>
1339 <p><b→> doesn't terminate </b→></p>
1340 <p><bä> doesn't terminate </bä></p>
1341 <p><boo> doesn't terminate </boo></p>
1342 <p><s.foo> doesn't terminate </s.foo></p>
1343 <p><sub-ID#1></p>
1347 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1348 ### This checks that HTML5 tags (with non-word characters in the tag
1349 ### name) make it safely through the parser -- the Sanitizer will
1350 ### munge them later, as it should.
1353 Non-word characters are valid in extension tags (T19663)
1364 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1368 Isolated close tags should be treated as literal text (T54760)
1376 <p><s.foo>s</p>
1378 <p><s.foo>s</p>
1382 ### Special characters
1386 Bare pipe character (T54363)
1395 Bare pipe character from a template (T54363)
1404 ### <nowiki> test cases
1408 <nowiki> unordered list
1410 <nowiki>* This is not an unordered list item.</nowiki>
1412 <p>* This is not an unordered list item.
1415 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1421 <nowiki>Lorem ipsum dolor
1429 <p>Lorem ipsum dolor
1438 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1448 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1450 <nowiki><span class="error"></nowiki>
1452 <p><span class="error">
1455 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1461 :There is not nowiki.
1462 :There is <nowiki>nowiki</nowiki>.
1464 #There is not nowiki.
1465 #There is <nowiki>nowiki</nowiki>.
1467 *There is not nowiki.
1468 *There is <nowiki>nowiki</nowiki>.
1470 <dl><dd>There is not nowiki.</dd>
1471 <dd>There is nowiki.</dd></dl>
1472 <ol><li>There is not nowiki.</li>
1473 <li>There is nowiki.</li></ol>
1474 <ul><li>There is not nowiki.</li>
1475 <li>There is nowiki.</li></ul>
1478 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1479 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1481 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1482 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1484 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1485 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1489 Entities inside <nowiki>
1491 <nowiki><</nowiki>
1496 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1500 Entities inside template parameters
1506 <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>
1510 Properly escape nowiki when combined with other wiki markup
1514 <p>* </nowiki> tag</p>
1516 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1520 T93824: Put escaped HTML tags inside nowiki
1524 <p><h2>foo</h2></p>
1526 <nowiki><h2>foo</h2></nowiki>
1530 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1534 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1535 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1536 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1538 This text: L'[[Foo]]
1539 This text: L<nowiki>''</nowiki>[[Foo]]
1540 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1543 # This test fails because wikitext whitespace is not normalized before comparing.
1545 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1549 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1552 This text : L<nowiki>''</nowiki>[[Foo]]
1555 # This test and the next one are html2wt only as they test that incorrect wikitext
1556 # passed in template arguments gets escaped or wrapped in nowikis where required.
1558 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1562 <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>
1563 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1565 {{echo|foo{{!}}bar}}
1566 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1570 T53961: Output correct nowikis in template arguments
1574 <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>
1575 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1576 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1577 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1578 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1581 {{echo|<nowiki>a }} b</nowiki>}}
1582 {{echo|<nowiki>a [[ b</nowiki>}}
1583 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1584 {{echo|a <nowiki>}</nowiki>}}
1588 Cases where "!!" needs nowiki protection
1593 <tr><th>this needs protection !! here</th></tr>
1597 <tr><th>this does not need
1598 protection !! here</th></tr>
1602 !<nowiki>this needs protection !! here</nowiki>
1615 Comments and Indent-Pre
1617 <!-- comment 1 --> asdf
1619 <!-- comment 1 --> asdf
1622 <!-- comment 1 --> asdf
1623 <!-- comment 2 -->xyz
1625 <!-- comment 1 --> asdf
1626 <!-- comment 2 --> xyz
1682 asdf<!-- comment 1 -->jkl
1692 <!-- foo --> b <!-- bar -->
1706 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1712 Comment semantics and delimiters
1714 <!-- --><!----><!-----><!------>
1718 <!-- --><!----><!-----><!------>
1722 Comment semantics and delimiters, redux
1724 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1725 -- foo -- funky huh? ... -->
1729 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1730 -- foo -- funky huh? ... -->
1734 Comment semantics and delimiters: directors cut
1736 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1737 everything starting with < followed by !-- until the first -- and > we see,
1738 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1744 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1745 everything starting with < followed by !-- until the first -- and > we see,
1746 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1751 Comment semantics: nesting
1753 <!--<!-- no, we're not going to do anything fancy here -->-->
1758 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1761 # Parsoid closes the unclosed comment, even if it means a slight
1764 Comment semantics: unclosed comment at end
1766 parsoid=wt2html,html2html
1768 <!--This comment will run out to the end of the document
1772 <!--This comment will run out to the end of the document-->
1776 Comment semantics: normalize comments to play nice with XML and browsers
1778 <!-- Browsers --!> think this is closed -->
1779 <!--> This would normally be text -->
1780 <!---> As would this -->
1781 <!-- XML doesn't like trailing dashes -------->
1782 <!-- Nor doubled hyphens -- anywhere in the data -->
1783 But this is not a comment.
1785 <p>But this is not a comment.
1788 <!-- Browsers --!> think this is closed -->
1789 <!--> This would normally be text -->
1790 <!---> As would this -->
1791 <!-- XML doesn't like trailing dashes -------->
1792 <!-- Nor doubled hyphens -- anywhere in the data -->
1793 <p>But this is not a comment.</p>
1797 Comment semantics: round-trip even text which contains encoded -->
1799 <!-- hello & goodbye - > --> --&gt; --&xx -->
1801 <!-- hello & goodbye - > --> --&gt; --&xx -->
1805 Comment in template title
1814 Comment on its own line post-expand
1826 Comment on its own line post-expand with non-significant whitespace
1838 Multiple comments should still parse as SOL-transparent
1840 parsoid=wt2html,wt2wt
1843 <!--c2--><!--c3--><!--c4-->*b
1852 <!--c2--><!--c3--><!--c4-->
1859 ### paragraph wrapping tests
1874 Block tag on one line (<div>)
1890 Block tag on one line (<blockquote>)
1892 a <blockquote>foo</blockquote>
1896 a <blockquote>foo</blockquote>
1908 Block tag on both lines (<div>)
1925 Block tag on both lines (<blockquote>)
1927 a <blockquote>foo</blockquote>
1929 b <blockquote>foo</blockquote>
1931 a <blockquote>foo</blockquote>
1932 b <blockquote>foo</blockquote>
1946 Multiple lines without block tags
1970 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1971 # So, we have a separate section for Parsoid. We don't want
1972 # to mimic this stripping behavior in Parsoid. It affects
1973 # editing experience and also requires us to maintain additional
1976 Empty lines between lines with block tags
2014 <div data-parsoid='{"stx":"html"}'></div>
2017 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2020 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2022 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2025 <div data-parsoid='{"stx":"html"}'>e</div>
2028 ## PHP parser emits output which is broken
2030 Unclosed HTML p-tags should be handled properly
2043 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2048 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2049 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2052 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2056 a [[Category:A1]] [[Category:A2]]
2061 <link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
2065 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2071 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2075 ### Preformatted text
2084 And a [[Main Page|link]]
2090 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2095 Tabs don't trigger preformatted text
2099 This is preformatted text.
2105 <pre>This is preformatted text.
2110 preformatted text.</p>
2111 <pre>This is preformatted text.
2116 Space before tab needs nowiki pre protection
2122 <nowiki> </nowiki> a
2126 Ident preformatting with inline content
2137 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2154 Regression with preformatted in <center>
2168 T54763: Preformatted in <blockquote>
2174 indented cell (no pre-wrapping!)
2184 <p> indented cell (no pre-wrapping!)
2192 T53086: Double newlines in blockquotes should be turned into paragraphs
2209 T17491: <ins>/<del> in blockquote
2212 Foo <del>bar</del> <ins>baz</ins> quux
2216 <p>Foo <del>bar</del> <ins>baz</ins> quux
2222 # Note that the p-wrapping is newline sensitive, which could be
2223 # considered a bug: tidy will wrap only the 'Foo' in the example
2224 # below in a <p> tag. (see comment 23-25 of T8200)
2226 T17491: <ins>/<del> in blockquote (2)
2228 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2231 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2237 <del>bar</del> <ins>baz</ins> quux</blockquote>
2241 <pre> with attributes (T5202)
2243 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2245 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2250 <pre> with width attribute (T5202)
2252 <pre width="8">Narrow screen goodies</pre>
2254 <pre width="8">Narrow screen goodies</pre>
2259 <pre> with forbidden attribute (T5202)
2261 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2263 <pre width="8">Narrow screen goodies</pre>
2268 Entities inside <pre>
2277 <pre> with forbidden attribute values (T5202)
2279 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2281 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2286 <nowiki> inside <pre> (T15238)
2294 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2302 <pre><nowiki>Foo</nowiki></pre>
2307 <nowiki> inside of #tag:pre
2309 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2311 <pre>Foo →bar</pre>
2314 <pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"#tag"},"params":{"1":{"wt":"Foo <nowiki>&rarr;bar</nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
2317 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2318 ## aren't enclosed in nowikis.
2320 <nowiki> and <pre> preference (first one wins)
2351 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2356 <p><span typeof="mw:Nowiki">
2364 </pre> inside nowiki
2366 <nowiki></pre></nowiki>
2372 # Parsoid doesn't strip empty tags, like Tidy does.
2374 Empty pre; pre inside other HTML tags (T56946)
2399 <div data-parsoid='{"stx":"html"}'><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
2401 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2405 HTML pre followed by indent-pre
2415 # Note that tidy removes the empty <p> tags from the start and end.
2416 # Parsoid does not, by design.
2420 <p><pre>foo</pre></p>
2426 <p data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2430 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2438 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2448 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2460 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2481 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2485 {{echo| foo}}{{echo| bar}}
2490 {{echo|<!--cmt--> foo}}
2492 <!--cmt-->{{echo| foo}}
2494 {{echo|{{echo| }}bar}}
2512 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2548 ## Hmm, should Parsoid rt this?
2550 Pres with newline attributes
2552 parsoid=wt2html,html2html
2557 <pre class="one two">hi</pre>
2560 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2564 Things that look like <pre> tags aren't treated as such
2566 Barack Obama <President> of the United States
2567 <President></President>
2569 <p>Barack Obama <President> of the United States
2570 <President></President>
2575 Handle broken pre-like tags (T66025)
2579 {{echo|<pre <pre>x</pre>}}
2581 <table><pre </table>
2584 <table><pre </table>
2592 <pre about="#mwt1" typeof="mw:Transclusion mw:Extension/pre" data-parsoid='{"a":{"<pre":null},"sa":{"<pre":""},"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre <pre>x</pre>"}},"i":0}}]}'>x</pre>
2601 Parsoid: handle pre with space after attribute
2605 <pre style="width:50%;" >{{echo|foo}}</pre>
2607 <pre style="width:50%;">{{echo|foo}}</pre>
2610 <pre typeof="mw:Extension/pre" about="#mwt2" style="width:50%;" data-mw='{"name":"pre","attrs":{"style":"width:50%;"},"body":{"extsrc":"{{echo|foo}}"}}'>{{echo|foo}}</pre>
2613 # TODO / maybe: fix wt2wt for this
2615 Parsoid: Don't paragraph-wrap fosterable content
2641 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2669 #--------------------------------------------------------------------
2670 # Transclusion parameter whitespace stripping tests
2671 # Behavior is different for positional and named parameters
2672 #--------------------------------------------------------------------
2674 Templates: Strip leading and trailing whitespace from named-param values
2678 {{echo|1= {{echo|b}} }}
2691 <ul><li> d</li></ul>
2696 Templates: Don't strip whitespace from positional-param values
2700 {{echo|{{echo|b}} }}
2732 <ul><li> f</li></ul>
2740 Templates: Don't recognize targets split by newlines
2756 Templates: Recognize targets when newlines and comments don't split the target
2761 <!--X--> ech<!--X-->o<!--X-->
2769 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech<!--X-->o<!--X--> \n <!--X--> <!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2773 Templates: Handle empty comment-and-ws-only lines correctly
2776 <!--should be ignored-->
2777 <!--should be ignored as well-->
2784 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n<!--should be ignored-->\n <!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
2788 Templates: Handle comments in the target
2791 <!-- should be ignored -->
2795 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2798 {{echo<!-- should be ignored -->
2801 {{echo<!-- should be ignored -->|foo}}
2803 {{<!-- should be ignored -->echo|foo}}
2812 <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>
2814 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2816 <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>
2818 <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>
2820 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2824 Templates: Handle comments in parameter names (T69657)
2827 <!-- should be ignored -->
2831 <!-- should be ignored -->
2834 {{echo|1<!-- should be ignored -->=foo}}
2836 {{echo|<!-- should be ignored -->1=foo}}
2844 <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>
2846 <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>
2848 <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>
2850 <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>
2854 Templates: Other wikitext in parameter names (T69657)
2861 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2864 #--------------------------------------------------------------------
2865 # Transclusion parameter escaping tests
2866 #--------------------------------------------------------------------
2868 Templates: Parsoid parameter escaping test 1
2870 {{echo|[foo]|{{echo|[bar]}}}}
2874 <p about="#mwt1" typeof="mw:Transclusion"
2875 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2879 Parsoid: Pipes in external links in template parameter
2881 {{echo|[{{echo|http://example.com}} link]}}
2883 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2885 <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>
2889 Parsoid: pipe in transclusion parameter
2891 {{echo|http://foo.com/a|b}}
2893 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2895 <p><a rel="mw:ExtLink" href="http://foo.com/a%7Cb" about="#mwt1"
2896 typeof="mw:Transclusion"
2897 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%7Cb</a></p>
2901 Parsoid: Pipe in external link target and content in template parameter
2903 parsoid=html2wt,wt2wt
2905 {{echo|[http://foo.com/a|b a|b]}}
2907 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2909 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2910 typeof="mw:Transclusion"
2911 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2912 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2916 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2920 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2922 <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>
2926 Templates: Don't escape already nowiki-escaped text in template parameters
2928 parsoid=html2wt,wt2wt
2930 {{echo|foo<nowiki>|</nowiki>bar}}
2931 {{echo|<nowiki><div></nowiki>}}
2932 {{echo|<nowiki></nowiki>}}
2934 <p>foo|bar <div></p>
2936 <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>
2937 <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>
2938 <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>
2944 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2946 parsoid=html2wt,wt2wt
2948 {{echo|{{echo|1=bar}}}}
2952 <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>
2957 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2963 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
2968 Templates: Preserve blank parameter names
2974 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2978 Templates: Preserve blank parameter names in other positions
2980 {{blank_param|bar|=foo}}
2984 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
2989 ### Parsoid-centric tests for testing RT edge cases for pre
2993 1a. Indent-Pre and Comments
3006 1b. Indent-Pre and Comments
3019 1c. Indent-Pre and Comments
3032 1d. Indent-Pre and Comments
3033 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3046 2a. Indent-Pre and tables
3067 2b. Indent-Pre and tables
3083 2c. Indent-Pre and tables (T44252)
3100 2d. Indent-Pre and tables
3117 <tbody><tr><td> b</td></tr>
3122 2e. Indent-Pre and table-line syntax
3135 2f. Indent-pre started by table-line syntax
3154 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3159 Text that should be rendered preformatted
3167 <pre>Text that should be rendered preformatted
3176 3a. Indent-Pre and block tags (single-line html)
3180 c <blockquote> foo </blockquote>
3185 c <blockquote> foo </blockquote>
3186 <pre><span> foo </span>
3189 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3190 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3191 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3192 <pre><span> foo </span>
3209 3b. Indent-Pre and block tags (multi-line html)
3214 <pre>a <span>foo</span>
3219 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3220 b <div data-parsoid='{"stx":"html"}'> foo </div>
3230 3c. Indent-Pre and block tags (pre-content on separate line)
3294 4. Indent-Pre and extension tags
3305 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3309 5. Indent-Pre and html pre
3311 <pre class="123">hi</pre>
3313 <pre class="123">hi</pre>
3316 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3320 Render paragraphs when indent-pre is suppressed in blocklevels
3337 4. Multiple spaces at start-of-line
3355 ## NOTE: the leading white-space chars on empty line are significant
3357 5a. White-space in indent-pre
3369 ## NOTE: the leading white-space chars on empty line are significant
3371 5b. White-space in indent-pre
3390 5c. White-space in indent-pre
3403 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3426 7a. Indent-pre and category links
3428 parsoid=wt2html,wt2wt
3430 [[Category:foo]] <!-- No pre-wrapping -->
3431 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3434 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3435 <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 -->
3438 ## We used to, but no longer wt2wt this test since the default serializer
3439 ## will normalize all categories to serialize on their own line.
3440 ## This wikitext usage is going to be fairly uncommon in production and
3441 ## selser will take care of preserving formatting in those scenarios.
3443 7b. Indent-pre and category links
3448 [[Category:foo]] {{echo|b}}
3450 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3451 <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>
3455 Indent-Pre: Newlines in comments shouldn't affect sol state
3469 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3473 HTML-pre: 1. embedded newlines
3508 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3510 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3513 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3518 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3526 HTML-pre: big spaces
3562 <pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n"}}'>
3581 HTML-pre: 2: indented text
3594 HTML-pre: 3: other wikitext
3613 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n* foo\n# bar\n= no-h =\n'' no-italic ''\n[[ NoLink ]]\n"}}'>* foo
3622 ### Definition lists
3629 <dl><dt> name </dt>
3630 <dd> Definition</dd></dl>
3635 Definition list for indentation only
3639 <dl><dd> Indented text</dd></dl>
3644 Definition list with no space
3649 <dd>Definition</dd></dl>
3654 Definition list with URL link
3656 ; http://example.com/ : definition
3658 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3659 <dd> definition</dd></dl>
3664 Definition list with bracketed URL link
3666 ;[http://www.example.com/ Example]:Something about it
3668 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3669 <dd>Something about it</dd></dl>
3674 Definition list with wikilink containing colon
3676 ; [[Help:FAQ]]: The least-read page on Wikipedia
3678 <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>
3679 <dd> The least-read page on Wikipedia</dd></dl>
3683 # At Brion's and JeLuF's insistence... :)
3685 Definition list with news link containing colon
3687 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3689 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3690 <dd> This isn't even a real newsgroup!</dd></dl>
3693 <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>
3697 Malformed definition list with colon
3699 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3701 <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>
3706 Definition lists: colon in external link text
3708 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3710 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3711 <dd> OK, I made that up</dd></dl>
3716 Definition lists: colon in HTML attribute
3718 ;<b style="display: inline">bold</b>
3720 <dl><dt><b style="display: inline">bold</b></dt></dl>
3725 Definition lists: self-closed tag
3727 ;one<br/>two : two-line fun
3729 <dl><dt>one<br />two </dt>
3730 <dd> two-line fun</dd></dl>
3735 Definition lists: ignore colons inside tags
3737 ;one <b>two : tag <i>fun:</i>:</b>: def
3739 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3745 Definition lists: excess closed tags
3747 ;one</b>two : bad tag fun
3750 <dt>onetwo </dt>
3751 <dd>bad tag fun</dd>
3756 <dd>bad tag fun</dd>
3761 T13748: Literal closing tags
3765 <dd>test test test test test</dd>
3767 <dd>test test test test test</dd>
3772 <dd>test test test test test</dd>
3774 <dd>test test test test test</dd>
3780 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3783 ; term : description
3788 <dl><dt> term </dt>
3789 <dd> description</dd></dl>
3790 <ul><li> unordered</li></ul>
3796 Definition list with empty definition and following paragraph
3808 Nested definition lists using html syntax
3821 Definition Lists: No nesting: Multiple dd's
3834 Definition Lists: Indentation: Regular
3842 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3847 Definition Lists: Indentation: Missing 1st level
3853 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3858 Definition Lists: Indentation: Multi-level indent
3862 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3867 Definition Lists: Hacky use to indent tables
3874 should be left alone
3876 <dl><dd><dl><dd><table>
3881 </td></tr></table></dd></dl></dd></dl>
3883 should be left alone
3888 Definition Lists: Hacky use to indent tables, with comments (T65979)
3896 should be left alone
3899 <dl><dd><dl><dd><table><tr>
3902 </tr></table><!-- bar --></dd></dl></dd></dl>
3904 should be left alone</p>
3908 Definition Lists: Hacky use to indent tables, with comment before table
3914 <dl><dd><dl><dd><!-- foo --><table><tr>
3916 </tr></table></dd></dl></dd></dl>
3919 # The trailing whitespace in this test is to catch a regression in
3920 # Parsoid after T54473.
3922 Definition Lists: Hacky use to indent tables (WS-insensitive)
3931 </td></tr></table></dd></dl>
3935 <tbody><tr><td>a</td></tr>
3936 </tbody></table> </dd></dl>
3939 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3940 ## as an empty dt item. It also ignores all but the last ";" when followed
3941 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3942 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3945 ## Ex: ";;t2 ::d2" is transformed into:
3957 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3958 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3969 ## All Parsoid only definition list tests have this difference.
3971 ## See also: https://phabricator.wikimedia.org/T8569
3972 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3975 Table / list interaction: indented table with lists in table contents
3990 <ul><li> b</li></ul>
3994 <ul><li> d</li></ul>
3995 </td></tr></table></dd></dl>
4000 Table / list interaction: lists nested in tables nested in indented lists
4023 </td></tr></table></dd></dl>
4030 Definition Lists: Nesting: Multi-level (Parsoid only)
4060 Definition Lists: Nesting: Test 2 (Parsoid only)
4087 Definition Lists: Nesting: Test 3 (Parsoid only)
4130 Definition Lists: Nesting: Test 4
4135 <dl><dd><dl><dd><dl><dt>t3</dt>
4136 <dd>d3</dd></dl></dd></dl></dd></dl>
4141 ## The Parsoid team believes the following three test exposes a
4142 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4143 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4144 ## It also exposes a "misfeature" in tidy, which doesn't like
4145 ## <dl> tags with a single <dt> child; it converts the <dt> into
4146 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4148 Definition Lists: Mixed Lists: Test 1
4154 <dl><dd><dl><dt><ul><li> foo</li>
4155 <li> bar</li></ul></dt></dl>
4156 <dl><dt> baz</dt></dl></dd></dl>
4191 Definition Lists: Mixed Lists: Test 2
4196 <ul><li><dl><dd> d1</dd>
4197 <dd> d2</dd></dl></li></ul>
4203 Definition Lists: Mixed Lists: Test 3
4208 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4209 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4215 Definition Lists: Mixed Lists: Test 4
4220 <ul><li><dl><dt>d1 </dt>
4223 <dd>d4</dd></dl></li></ul>
4229 Definition Lists: Mixed Lists: Test 5
4235 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4241 Definition Lists: Mixed Lists: Test 6
4246 <ol><li><ul><li><dl><dd>d1
4247 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4253 Definition Lists: Mixed Lists: Test 7
4258 <dl><dd><ul><li> d1</li>
4259 <li> d2</li></ul></dd></dl>
4265 Definition Lists: Mixed Lists: Test 8
4270 <dl><dd><ul><li> d1</li></ul>
4271 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4277 Definition Lists: Mixed Lists: Test 9
4281 <ul><li><dl><dt>foo </dt>
4282 <dd>bar</dd></dl></li></ul>
4288 Definition Lists: Mixed Lists: Test 10
4292 <ul><li><ol><li><dl><dt>foo </dt>
4293 <dd>bar</dd></dl></li></ol></li></ul>
4297 # The Parsoid team disagrees with the PHP parser's seemingly-random
4298 # rules regarding dd/dt on the next two tests. Parsoid is more
4299 # consistent, and recognizes the shared nesting and keeps the
4300 # still-open tags around until the nesting is complete.
4301 # (And tidy again converts <dt> to <dd> before 'bar'.)
4304 Definition Lists: Mixed Lists: Test 11
4309 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4310 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4311 <dl><dt>boo </dt>
4312 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4367 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4368 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4372 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4373 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4382 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4384 # * The test is wrong, there are two colons where there should be :;
4385 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4387 Definition Lists: Weird Ones: Test 1
4389 *#;*::;; foo : bar (who uses this?)
4391 <ul><li><ol><li><dl><dt> foo </dt>
4392 <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>
4411 <dt>bar (who uses this?)</dt>
4443 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4444 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4456 Definition Lists: colons occurring in tags
4474 <dt><span>a:b</span></dt>
4501 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4503 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4504 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4505 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4506 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4508 <dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
4509 <dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"''a:b''"}},"i":0}}]}'>a:b</i>
4510 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4514 Definition Lists: colons and tables 1
4526 </td></tr></table></dd></dl>
4530 </td></tr></table></dd></dl>
4534 # Parsoid's output (as documented below) differs from php's in this case.
4535 # This is probably a bug. If we fixup parsoid to match php's output, the
4536 # above test should pass and the below test case can be removed. It is
4537 # unclear which output is more desirable.
4540 Definition Lists: colons and tables 2
4552 </td></tr></table></dd>
4556 </td></tr></table></dd></dl>
4560 Definition Lists: template interaction
4562 ::{{definition_list}}
4565 ::{{definition_list}}
4570 <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">
4571 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4573 <dl><dd data-parsoid='{}'>one
4574 <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">
4575 </span><dd about="#mwt2">two
4577 <dd>three</dd></dl></dd>
4578 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4586 External links: non-bracketed
4588 Non-bracketed: http://example.com
4590 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4594 # parsoid doesn't explicitly mark autonumbered links, see T55505
4596 External links: numbered
4598 Numbered: [http://example.com]
4599 Numbered: [http://example.net]
4600 Numbered: [http://example.com]
4602 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4603 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4604 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4607 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4608 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4609 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4613 External links: specified text
4615 Specified text: [http://example.com link]
4617 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4622 External links: trail
4624 Linktrails should not work for external links: [http://example.com link]s
4626 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4631 External links: dollar sign in URL
4633 http://example.com/1$2345
4635 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4639 # parsoid doesn't explicitly mark autonumbered links, see T55505
4641 External links: dollar sign in URL (autonumber)
4643 [http://example.com/1$2345]
4645 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4648 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4652 External links: open square bracket forbidden in URL (T6377)
4654 parsoid=wt2html,wt2wt,html2html
4656 http://example.com/1[2345
4658 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4661 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4665 External links: open square bracket forbidden in URL (named) (T6377)
4667 parsoid=wt2html,html2html
4669 [http://example.com/1[2345]
4671 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4674 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4677 # parsoid adds a space before the link name
4679 External links: open square bracket forbidden in URL (named) (T6377)
4682 [http://example.com/1 [2345]
4684 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4689 External links: nowiki in URL link text (T8230)
4691 [http://example.com/ <nowiki>''example site''</nowiki>]
4693 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4698 External links: newline forbidden in text (T8230 regression check)
4700 [http://example.com/ first
4703 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4709 External links: Pipe char between url and text
4711 [http://example.com | link]
4713 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4718 External links: protocol-relative URL in brackets
4720 [//example.com/ Test]
4722 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4726 # parsoid doesn't explicitly mark autonumbered links, see T55505
4728 External links: protocol-relative URL in brackets without text
4732 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4735 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4739 External links: protocol-relative URL in free text is left alone
4743 <p>//example.com/Foo
4748 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4750 foo//example.com/Foo
4752 <p>foo//example.com/Foo
4757 External links: with no contents
4759 [http://en.wikipedia.org/wiki/Foo]
4761 [[wikipedia:Foo|Bar]]
4763 [[wikipedia:Foo|<span>Bar</span>]]
4765 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4766 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4767 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4770 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4771 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4772 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4776 External links: Free with trailing punctuation
4786 http://example.com/url_with_(brackets)
4787 (http://example.com/url_without_brackets)
4788 http://example.com/url_with_entity&
4789 http://example.com/url_with_entity&
4790 http://example.com/url_with_entity&
4791 http://example.com/url_with_entity
4792 http://example.com/url_with_entity 
4793 http://example.com/url_with_entity 
4794 http://example.com/url_with_entity<
4795 http://example.com/url_with_entity<
4796 http://example.com/url_with_entity<
4798 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4799 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4800 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4801 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4802 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4803 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4804 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4805 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4806 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4807 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4808 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4809 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4810 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4811 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4812 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4813 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4814 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4815 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4816 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4819 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4820 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4821 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4822 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4823 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4824 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4825 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4826 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4827 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4828 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4829 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4830 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4831 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4832 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4833 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
4834 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4835 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4836 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4837 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#60;","srcContent":"<"}'><</span></p>
4841 External links: tricky Parsoid html2html case
4843 parsoid=wt2html,wt2wt,html2html
4845 http://example.com/url_with_entity&amp;
4847 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4850 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4854 External links: Free with trailing quotes (T113666)
4856 '''News:''' Stuff here
4860 <p><b>News:</b> Stuff here
4861 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4864 <p><b>News:</b> Stuff here</p>
4865 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4869 External links: with entity
4871 [http:// www.librarieswithoutborders.org Libraries without borders]
4873 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4876 <p><a rel="mw:ExtLink" href="http://+www.librarieswithoutborders.org" data-parsoid='{"a":{"href":"http://+www.librarieswithoutborders.org"},"sa":{"href":"http://&#x20;www.librarieswithoutborders.org"}}'>Libraries without borders</a></p>
4880 External links: Lone protocols are never linked (T105697)
4899 External links: No preceding word characters allowed (T67278)
4901 NOPEhttp://example.com
4902 N0http://example.com
4903 ok:http://example.com
4904 ok-http://example.com
4906 <p>NOPEhttp://example.com
4907 N0http://example.com
4908 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4909 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4914 External links: nofollow domain exception
4916 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4918 <p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>.
4925 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4927 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4932 External image from https
4934 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4936 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4941 External image (when not allowed)
4943 wgAllowExternalImages=0
4945 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4947 <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>
4952 Link to non-http image, no img tag
4954 Link to non-http image, no img tag: ftp://example.com/test.jpg
4956 <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>
4961 External links: terminating separator
4963 Terminating separator: http://example.com/thing,
4965 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4970 External links: intervening separator
4972 Intervening separator: http://example.com/1,2,3
4974 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4979 External links: old bug with URL in query
4981 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4983 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4988 External links: old URL-in-URL bug, mixed protocols
4990 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4992 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4996 # Since Parsoid is starting to emit canonical wikitext for links,
4997 # [http://example.com http://example.com] will not RT back to that
5000 External links: URL in text
5004 URL in text: [http://example.com http://example.com]
5006 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5009 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5013 External links: Clickable images
5015 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5017 <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>
5020 <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>
5024 External links: raw ampersand
5026 Old & use: http://x&y
5028 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5033 External links: encoded ampersand
5035 Old & use: http://x&y
5037 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5040 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
5044 External links: encoded equals (T8102)
5046 http://example.com/?foo=bar
5048 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5051 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5055 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5056 ## does it number them. As discussed in T55505, we can identify
5057 ## autonumbered links via CSS.
5061 External links: [raw ampersand]
5063 Old & use: [http://x&y]
5065 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5068 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5071 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5072 # mode will return the [raw ampersand] wikitext
5074 External links: [encoded ampersand]
5076 parsoid=wt2html,wt2wt,html2html
5078 Old & use: [http://x&y]
5080 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5083 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5087 External links: [raw equals]
5089 [http://example.com/?foo=bar]
5091 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5094 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5097 # note that parsoid html is identical to [raw equals] case; so html2wt
5098 # mode will return the [raw equals] wikitext
5100 External links: [encoded equals] (T8102)
5102 parsoid=wt2html,wt2wt,html2html
5104 [http://example.com/?foo=bar]
5106 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5109 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5112 # xxx parsoid strips the IDN character, so the round-trip tests will
5113 # obviously fail and are disabled. --cscott
5115 External links: [IDN ignored character reference in hostname; strip it right off]
5117 parsoid=wt2html,wt2wt,html2html
5119 [http://e‌xample.com/]
5121 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5124 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5127 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5128 # Where an external link could easily circumvent the sanitization of the text of
5129 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5130 # test demands a higher standard. That's a bit strange.
5134 # http://example.com -> [http://example.com|http://example.com]
5135 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5137 # The first example is sanitized, but the second is not. Any security benefits
5138 # from this production are trivial to circumvent. Either remove this test and
5139 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5140 # the test accordingly.
5144 # xxx parsoid strips the IDN character, so the round-trip tests will
5145 # obviously fail and are disabled. --cscott
5147 External links: IDN ignored character reference in hostname; strip it right off
5149 parsoid=wt2html,html2html
5151 http://e‌xample.com/
5153 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5156 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5160 External links: www.jpeg.org (T2554)
5164 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5168 # parsoid doesn't explicitly mark autonumbered links, see T55505
5170 External links: URL within URL (T2002)
5172 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5174 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5177 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5181 T2361: URL inside bracketed URL
5183 [http://www.example.com/foo http://www.example.com/bar]
5185 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5190 T2361: URL within URL, not bracketed
5192 http://www.example.com/foo?=http://www.example.com/bar
5194 <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>
5199 T2289: ">"-token in URL-tail
5201 http://www.example.com/<hello>
5203 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5208 T2289: literal ">"-token in URL-tail
5210 http://www.example.com/<b>html</b>
5212 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5215 <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>
5219 T2289: ">"-token in bracketed URL
5221 [http://www.example.com/<hello> stuff]
5223 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5228 T2289: literal ">"-token in bracketed URL
5230 [http://www.example.com/<b>html</b> stuff]
5232 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5237 T2289: literal double quote at end of URL
5239 http://www.example.com/"hello"
5241 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5246 T2289: literal double quote in bracketed URL
5248 [http://www.example.com/"hello" stuff]
5250 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5255 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5257 [http://www.example.com test]
5259 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5264 External links: link text with spaces
5266 [http://www.example.com a b c]
5267 [http://www.example.com ''a'' ''b'']
5269 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5270 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5275 External links: wiki links within external link (T5695)
5277 parsoid=wt2html,html2html
5279 [http://example.com [[wikilink]] embedded in ext link]
5281 <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>
5284 <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>
5288 T2787: Links with one slash after the url protocol are invalid
5292 [http:/example.com title]
5294 <p>http:/example.com
5295 </p><p>[http:/example.com title]
5300 Bracketed external links with template-generated invalid target
5302 [{{echo|http:/example.com}} title]
5304 <p>[http:/example.com title]
5308 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5310 Broken wikilinks (but not external links) prevent templates from closing
5314 [http://example.com x
5316 {{echo|[http://example.com x}}
5322 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5323 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5325 </p><p>{{echo|[[Foo}}
5328 <p>[<a rel="mw:ExtLink" href="http://example.com">http://example.com</a> x</p>
5329 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://example.com x"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://example.com">http://example.com</a> x</p>
5331 <p>{{echo|[[Foo}}</p>
5343 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5347 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5348 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5352 T4702: Mismatched <i>, <b> and <a> tags are invalid
5354 ''[http://example.com text'']
5355 [http://example.com '''text]'''
5356 ''Something [http://example.com in italic'']
5357 ''Something [http://example.com mixed''''', even bold]'''
5358 '''''Now [http://example.com both''''']
5360 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5361 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5362 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5363 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5364 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5372 http://www.example.com/?title=AT%26T
5374 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5377 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5380 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5381 # % is actually legal in HTML5. Any change in output would need testing though.
5383 T6781, T7267: %25 in URL
5385 http://www.example.com/?title=100%25_Bran
5387 <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>
5390 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5394 T6781, T7267: %28, %29 in URL
5396 http://www.example.com/?title=Ben-Hur_%281959_film%29
5398 <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>
5401 <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>
5406 T6781: %26 in autonumber URL
5408 [http://www.example.com/?title=AT%26T]
5410 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5413 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5417 T6781, T7267: %26 in autonumber URL
5419 [http://www.example.com/?title=100%25_Bran]
5421 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5424 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5428 T6781, T7267: %28, %29 in autonumber URL
5430 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5432 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5435 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5440 T6781: %26 in bracketed URL
5442 [http://www.example.com/?title=AT%26T link]
5444 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5447 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5451 T6781, T7267: %25 in bracketed URL
5453 [http://www.example.com/?title=100%25_Bran link]
5455 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5460 T6781, T7267: %28, %29 in bracketed URL
5462 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5464 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5467 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5471 External link containing a period in the anchor. (T65947)
5473 [//foo.org/bar#baz. bang]
5475 [//foo.org/bar. bang]
5477 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5478 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5481 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5482 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5486 External link containing a single quote. (T65947)
5490 [//foo.org/bar'baz bang]
5492 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5493 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5496 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5497 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5501 External link containing double-single-quotes in text '' (T6598 sanity check)
5503 Some [http://example.com/ pretty ''italics'' and stuff]!
5505 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5510 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5512 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5514 <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>
5519 External link containing double-single-quotes with no space separating the url from text in italics
5521 [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]].]
5523 <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>
5526 <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>
5528 <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>
5532 External link with comments in link text
5534 [http://www.google.com Google <!-- comment -->]
5536 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5539 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5543 External link to bare IPv4 address
5545 [http://192.168.0.1 Link]
5547 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5550 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5554 URL-encoding in URL functions (single parameter)
5556 {{localurl:Some page|amp=&}}
5558 <p>/index.php?title=Some_page&amp=&
5563 URL-encoding in URL functions (multiple parameters)
5565 {{localurl:Some page|q=?&=&}}
5567 <p>/index.php?title=Some_page&q=?&amp=&
5574 http://example.com/index.php?foozoid%5B%5D=bar
5576 http://example.com/index.php?foozoid[]=bar
5578 <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>
5579 </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>
5582 <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>
5584 <p><a rel="mw:ExtLink" href="http://example.com/index.php?foozoid%5B%5D=bar" data-parsoid='{"stx":"url","a":{"href":"http://example.com/index.php?foozoid%5B%5D=bar"},"sa":{"href":"http://example.com/index.php?foozoid&#x5B;&#x5D;=bar"}}'>http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5588 IPv6 urls, autolink format (T23261)
5590 http://[2404:130:0:1000::187:2]/index.php
5592 Examples from RFC 2373, section 2.2:
5593 * http://[1080::8:800:200C:417A]/unicast
5594 * http://[FF01::101]/multicast
5595 * http://[::1]/loopback
5596 * http://[::]/unspecified
5597 * http://[::13.1.68.3]/ipv4compat
5598 * http://[::FFFF:129.144.52.38]/ipv4compat
5600 Examples from RFC 2732, section 2:
5601 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5602 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5603 * http://[3ffe:2a00:100:7031::1]
5604 * http://[1080::8:800:200C:417A]/foo
5605 * http://[::192.9.5.5]/ipng
5606 * http://[::FFFF:129.144.52.38]:80/index.html
5607 * http://[2010:836B:4179::836B:4179]
5610 <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>
5611 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5613 <ul><li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5614 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5615 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5616 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5617 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5618 <li> <a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5619 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5621 <ul><li> <a rel="nofollow" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5622 <li> <a rel="nofollow" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5623 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5624 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5625 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5626 <li> <a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5627 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5630 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5632 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5633 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5634 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5635 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5636 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5637 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5638 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5640 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5641 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
5642 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
5643 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5644 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5645 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5646 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5647 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5651 IPv6 urls, bracketed format (T23261)
5653 [http://[2404:130:0:1000::187:2]/index.php test]
5655 Examples from RFC 2373, section 2.2:
5656 * [http://[1080::8:800:200C:417A] unicast]
5657 * [http://[FF01::101] multicast]
5658 * [http://[::1]/ loopback]
5659 * [http://[::] unspecified]
5660 * [http://[::13.1.68.3] ipv4compat]
5661 * [http://[::FFFF:129.144.52.38] ipv4compat]
5663 Examples from RFC 2732, section 2:
5664 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5665 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5666 * [http://[3ffe:2a00:100:7031::1] 3]
5667 * [http://[1080::8:800:200C:417A]/foo 4]
5668 * [http://[::192.9.5.5]/ipng 5]
5669 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5670 * [http://[2010:836B:4179::836B:4179] 7]
5673 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5674 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5676 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5677 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5678 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5679 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5680 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5681 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5682 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5684 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5685 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5686 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5687 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5688 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5689 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5690 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5693 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5695 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5696 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5697 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5698 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5699 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5700 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5701 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5703 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5704 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5705 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5706 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5707 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5708 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5709 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5710 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5714 Non-extlinks in brackets
5723 [{{echo|foo}} ''bar'']
5724 [{{echo|foo}}l's] errand
5725 [{{echo|foo}}l's errand]
5727 [url=http://example.com]
5728 [http:// bare protocols don't count]
5741 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5742 [http:// bare protocols don't count]
5750 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5751 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5752 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5753 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5754 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5755 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5756 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5757 [http:// bare protocols don't count]</p>
5761 Percent encoding in external links
5763 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5765 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5768 <p><a rel="mw:ExtLink"
5769 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5773 Use url link syntax for links where the content is equal the link target
5777 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5780 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5784 Parenthesis in external links, especially URL links
5788 http://example.com/test)
5790 http://example.com/(test)
5792 http://example.com/((test)
5794 (http://example.com/(test))
5796 (http://example.com/(test)))))
5798 http://example.com/a)b
5800 [http://example.com) foo]
5802 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5803 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5804 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5805 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5806 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5807 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5808 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5809 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5812 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5813 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5814 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5815 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5816 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5817 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5818 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5819 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5823 Parenthesis in external links, w/ transclusion or comment
5825 (http://example.com/{{echo|hi}})
5827 (http://example.com<!-- hi -->)
5829 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5830 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5833 <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='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span>"}]]}'>http://example.com/hi</a>)</p>
5835 <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>
5839 Serialize <a> tags with invalid link targets as plain text
5841 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5843 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5844 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5845 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5846 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5849 <nowiki>*</nowiki>text
5850 <nowiki>[[foo]]</nowiki>
5851 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5855 mw:ExtLink -vs- mw:WikiLink (T94723)
5859 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5860 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5861 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5862 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5864 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5865 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5870 [[wikipedia:Foo|Bar]]
5871 [[wikipedia:Foo|Bar]]
5873 [[wikipedia:European_Robin|European Robin]]
5874 [[wikipedia:European_Robin|European Robin]]
5878 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5882 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5884 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5895 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5897 Normal text. '''''Bold italic text.''''' Normal text.
5899 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5900 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5905 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5906 # parser strips. The wikitext contains just the first half of the bold
5909 Unclosed and unmatched quotes
5911 '''''Bold italic text '''with bold deactivated''' in between.'''''
5913 '''''Bold italic text ''with italic deactivated'' in between.'''''
5917 ..spanning two paragraphs (should not work).'''
5919 '''Bold tag left open
5921 ''Italic tag left open
5925 <!-- Unmatching number of opening, closing tags: -->
5926 '''This year''''s election ''should'' beat '''last year''''s.
5928 ''Tom'''s car is bigger than ''Susan'''s.
5930 Plain ''italic'''s plain
5932 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5933 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5934 </p><p><b>Bold text..</b>
5935 </p><p>..spanning two paragraphs (should not work).
5936 </p><p><b>Bold tag left open</b>
5937 </p><p><i>Italic tag left open</i>
5939 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5940 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5941 </p><p>Plain <i>italic'</i>s plain
5944 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5945 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5946 </p><p><b>Bold text..</b>
5947 </p><p>..spanning two paragraphs (should not work).<b></b>
5948 </p><p><b>Bold tag left open</b>
5949 </p><p><i>Italic tag left open</i>
5952 <!-- Unmatching number of opening, closing tags: -->
5953 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5954 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5955 </p><p>Plain <i>italic'</i>s plain
5962 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5965 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5966 # is the bare minimum required by the spec, see:
5967 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5968 # Parsoid team replies: empty table tags are legal in HTML5
5970 A table with no data.
5983 A table with stray table end tags on start tag line (wt2html)
5987 {|style="color: red;"|}
5989 {|style="color: red;" |}
5993 {|style="color: red;"|} id="foo"
5997 {|style="color: red;" |} id="foo"
6001 <table style="color: red;"></table>
6003 <table style="color: red;">
6009 <table style="color: red;" id="foo">
6015 <table style="color: red;" id="foo">
6024 A table with no data (take 2)
6032 # A table with nothing but a caption is invalid XHTML, we might want to render
6033 # this as <p>caption</p>
6034 # Parsoid team replies: table with only a caption is legal in HTML5
6036 A table with nothing but a caption
6044 </caption><tr><td></td></tr></table>
6047 <table><caption> caption</caption></table>
6051 A table with caption with default-spaced attributes and a table row
6054 |+ style="color: red;" | caption1
6060 <caption style="color: red;"> caption1
6069 A table with captions with non-default spaced attributes and a table row
6072 |+style="color: red;"|caption2
6073 |+ style="color: red;"| caption3
6079 <caption style="color: red;">caption2
6081 <caption style="color: red;"> caption3
6090 Table td-cell syntax variations
6094 | foo bar foo || baz
6095 | style='color:red;' | baz
6096 | style='color:red;' || baz
6103 <td> foo bar foo </td>
6106 <td style="color:red;"> baz
6108 <td> style='color:red;' </td>
6136 Simple table but with multiple dashes for row wikitext
6155 Multiplication table
6157 {| border="1" cellpadding="2"
6158 |+Multiplication table
6160 ! × !! 1 !! 2 !! 3
6178 <table border="1" cellpadding="2">
6179 <caption>Multiplication table
6226 Accept "||" in table headings
6241 Accept "!!" in table data
6255 <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>
6260 Accept "||" in indented table headings
6270 </th></tr></table></dd></dl>
6275 Accept "!!" in templates
6289 <tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["!a ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b!!c"}},"i":0}}]}'>a b</th><th about="#mwt1">c</th></tr>
6293 Accept "!!" in table headings after newline
6310 <p>b!!c</p></th></tr>
6315 Accept "!!" in table data of mixed wikitext / html syntax
6319 <tr><td>b!!c</td></tr>
6332 <tbody><tr><th>a</th></tr>
6333 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6338 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6355 Accept "| !" at start of line in tables (ignore !-attribute)
6359 | !style="color:red" | bar
6371 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 +/-
6375 |style='color:red;'|+1
6376 |style='color:blue;'|-1
6388 <td style="color:red;">+1
6390 <td style="color:blue;">-1
6414 |rowspan=2| Cell 2, row 1 (and 2)
6425 <td rowspan="2"> Cell 2, row 1 (and 2)
6443 {| bgcolor=#ABCDEF border=2
6448 |the original table again
6456 <table bgcolor="#ABCDEF" border="2">
6464 <td>the original table again
6470 Invalid attributes in table cell (T3830)
6484 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6488 | title="foo<nowiki>|</nowiki>" |bar
6489 | title="foo<nowiki>|</nowiki>" bar
6496 <td title="foo|">bar
6498 <td> title="foo|" bar
6503 <tbody><tr><td title="foo">bar</td>
6504 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6505 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6509 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6510 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6511 # *2wt modes will fail.
6513 Table security: embedded pipes
6515 parsoid=wt2html,html2html
6518 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6522 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6523 <td>]" onmouseover="alert(document.cookie)">test
6531 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6535 Element attributes with double ! should not be broken up by <th>
6538 ! hi <div class="!!">ha</div> ho
6543 <th> hi <div class="!!">ha</div> ho
6548 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6553 ! and || in element attributes should not be parsed as <th>/<td>
6556 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6561 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6566 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6570 # FIXME: The output seems broken. Filed as T110268.
6572 ! and || in td attributes should not be parsed as <th>/<td>
6577 | style="color: red !important;" data-contrived="put this here ||" | foo
6582 <td> style="color: red !important;" data-contrived="put this here </td>
6588 <tbody><tr><td> style="color: red !important;" data-contrived="put this here </td><td data-parsoid='{"stx_v":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'> foo</td></tr>
6593 Break on | in element attribute in template
6595 parsoid=wt2html,html2html
6597 {{echo|1=<div class="hi|ho">ha</div>}}
6599 <p>ho">ha</div>
6602 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha</div>"}},"i":0}}]}'>ho">ha</span>
6606 Break on | in element attribute name in template
6608 {{echo|<div cla|ss="hiho">ha</div>}}
6610 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"ss","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div cla"},"ss":{"wt":"\"hiho\">ha</div>"}},"i":0}}]}'><div cla</p>
6614 Don't break on | in extension attribute in template
6616 {{echo|<ref name="hi|ho">ha</ref>}}
6620 <p><span about="#mwt2" class="mw-ref" id="cite_ref-hi.7Cho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref name=\"hi|ho\">ha</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-hi.7Cho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
6622 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi.7Cho-1" id="cite_note-hi.7Cho-1"><a href="./Main_Page#cite_ref-hi.7Cho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi.7Cho-1" class="mw-reference-text">ha</span></li></ol>
6625 ## We don't support roundtripping of these attributes in Parsoid.
6626 ## Selective serialization takes care of preventing dirty diffs.
6627 ## But, on edits, we dirty-diff the invalid attribute text.
6629 Invalid text in table attributes should be discarded
6633 {| <span>boo</span> style='border:1px solid black'
6634 | <span>boo</span> style='color:blue' | 1
6635 |<span>boo</span> style='color:blue'| 2
6638 <table style="border:1px solid black">
6640 <td style="color:blue"> 1
6642 <td style="color:blue"> 2
6646 <table style="border:1px solid black">
6648 <td style="color:blue"> 1</td>
6649 <td style="color:blue"> 2</td>
6655 Invalid text in table attributes should be preserved by selective serializer
6658 "modes": ["selser"],
6660 ["td:first-child", "text", "abc"],
6661 ["td + td", "text", "xyz"]
6665 {| <span>boo</span> style='border:1px solid black'
6666 | <span>boo</span> style='color:blue' | 1
6667 |<span>boo</span> style='color:blue'| 2
6670 {| <span>boo</span> style='border:1px solid black'
6671 | <span>boo</span> style='color:blue' |abc
6672 |<span>boo</span> style='color:blue'|xyz
6677 1. Template-generated table cell attributes and cell content
6682 || {{table_attribs_5}}
6683 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6684 |align=center {{table_attribs}}
6685 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6690 <td style="color:red;">Foo
6692 <td style="color:red;">Foo
6694 <td> style="color:red;"</td>
6697 <td style="color:red;">Foo
6699 <td align="center" style="color:red;">Foo
6701 <td align="center" style="color:red;">Foo
6707 2. Template-generated table cell attributes and cell content
6710 |{{table_attribs_2}}
6715 <td style="color:red;">Foo
6723 <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>
6724 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6729 3. Template-generated table cell attributes and cell content
6732 !align=center {{table_header_cells}}
6734 |align=center {{table_cells}}
6739 <th align="center" style="color:red;">Foo</th>
6740 <th style="color:red;"><i>Bar</i></th>
6741 <th style="color:brown;"><i>Foo</i> and Baz
6744 <td align="center" style="color:red;">Foo</td>
6745 <td style="color:red;"><i>Bar</i></td>
6746 <td style="color:brown;"><i>Foo</i> and Baz
6751 <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>
6752 <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>
6757 4. Template-generated table cell attributes and cell content inside a templated table
6760 !align=center {{table_header_cells}}
6762 |align=center {{table_cells}}
6767 <th align="center" style="color:red;">Foo</th>
6768 <th style="color:red;"><i>Bar</i></th>
6769 <th style="color:brown;"><i>Foo</i> and Baz
6772 <td align="center" style="color:red;">Foo</td>
6773 <td style="color:red;"><i>Bar</i></td>
6774 <td style="color:brown;"><i>Foo</i> and Baz
6778 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":1}},"\n|-\n|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":2}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":3}}]}'>
6779 <tbody><tr><th align="center" style="color:red;">Foo</th><th style="color:red;"><i>Bar</i></th><th style="color:brown;"><i>Foo</i> and Baz</th></tr>
6781 <td align="center" style="color:red;">Foo</td><td style="color:red;"><i>Bar</i></td><td style="color:brown;"><i>Foo</i> and Baz</td></tr>
6785 ## Edge case fix to prevent future regressions
6787 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6790 |{{table_attribs_7}}
6795 <tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<span class="mw-ref" id="cite_ref-1" rel="dc:references" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></td></tr>
6797 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
6801 Table with row followed by newlines and table heading
6803 parsoid=wt2html,html2html
6821 Table with empty line following the start tag
6823 parsoid=wt2html,html2html
6841 Table attributes with empty value
6843 parsoid=wt2html,html2html
6856 <tbody><tr><td style=""> hello</td></tr>
6861 Wikitext table with a lot of comments
6884 Wikitext table comments represented in parsoid dom
6886 {|<!--c1--><!--c2-->
6897 <table><!--c1--><!--c2-->
6898 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6899 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6904 Wikitext table with double-line table cell
6921 Table cell with a single comment
6938 Table-cell after a comment-only-empty-line
6955 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6957 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6963 Build table with {{!}}
6965 {{{!}} class="wikitable"
6968 {{!}}- style="color:red;"
6969 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6972 <table class="wikitable">
6978 <tr style="color:red;">
6980 <td style="color:red;"> second data
6986 Build table with pipe as data
6988 {| class="wikitable"
6991 |- style="color:red;"
6992 | data || style="color:red;" | second data
6994 | style="color:red;" | data with | || style="color:red;" | second data with |
6996 || data with | ||| second data with |
6999 <table class="wikitable">
7005 <tr style="color:red;">
7007 <td style="color:red;"> second data
7010 <td style="color:red;"> data with | </td>
7011 <td style="color:red;"> second data with |
7014 <td> data with | </td>
7015 <td> second data with |
7021 Build table with wikilink
7023 {| class="wikitable"
7024 ! header || second header
7025 |- style="color:red;"
7026 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
7028 | data || second data [[Main Page|link|text with pipe]]
7031 <table class="wikitable">
7036 <tr style="color:red;">
7037 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
7038 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7042 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7047 # The expected HTML structure in this test is debatable. The PHP parser does
7048 # not parse this kind of table at all. The main focus for Parsoid is on
7049 # round-tripping, so this output is ok for now. TODO: revisit!
7051 Wikitext table with html-syntax row
7061 <td>foo</td></tr></tbody></table>
7065 Implicit <td> after a |-
7067 parsoid=wt2html,html2html
7082 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7083 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7085 </tr></tbody></table>
7089 Lists should be recognized in an implicit <td> context
7091 parsoid=wt2html,html2html
7108 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7109 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7111 </tr></tbody></table>
7115 Table cells not properly parsed in an implicit-td context
7119 {{table_attribs_4}} || a || b
7124 <td style="background-color:#DC241f;" width="10px"></td>
7131 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7132 <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}}," || a || b"]}'> </td><td about="#mwt1"> a </td><td about="#mwt1"> b</td></tr>
7136 Parsoid: Round-trip tables directly followed by content (T53219)
7138 parsoid=wt2html,wt2wt
7163 Parsoid: Default to a newline after tables in new content (T53219)
7168 <tr><td>foo</td></tr></tbody></table> bar
7170 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7175 <nowiki> </nowiki>bar
7183 Parsoid: newline inducing block nodes don't suppress <nowiki>
7195 Parsoid: Row-syntax table headings followed by comment & table cells
7197 parsoid=wt2html,wt2wt
7201 <!-- foo --> || baz || quux
7215 <tbody><tr><th> foo </th><th> bar
7216 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7221 Parsoid: Recover better from broken table attributes
7241 <p>foo</p></td></tr>
7246 Tables: Digest broken attributes on table and tr tag
7262 # T137406: Whitespace in the HTML
7264 1. Generate correct wikitext for tables with thead/tbody/tfoot
7269 <caption>Test</caption>
7310 <caption>Test</caption>
7330 # T137406: No whitespace in the HTML
7332 2. Generate correct wikitext for tables with thead/tbody/tfoot
7336 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7346 Testing serialization after deletion in references
7355 hi <ref><div id="x">ho</div></ref>
7365 Testing serialization after deletion of table cells
7368 "modes": ["wt2wt", "selser"],
7376 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7386 Testing selser after addition of new row before first row (T125419)
7389 "modes": ["wt2wt", "selser"],
7391 [ "tr", "before", "<tr><td>X</td></tr>" ]
7407 Serialize new table rows in a HTML table using HTML tags
7410 "modes": ["wt2wt", "selser"],
7412 [ "tr", "before", "<tr><td>X</td></tr>" ]
7416 <table><tr><td>a</td></tr></table>
7418 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7422 Serialize new table cells in a HTML row using HTML tags
7425 "modes": ["wt2wt", "selser"],
7427 [ "td", "before", "<td>X</td>" ]
7431 <table><tr><td>a</td></tr></table>
7433 <table><tr><td>X</td><td>a</td></tr></table>
7437 Wikitext tables can be nested inside HTML tables
7441 <table data-parsoid='{"stx":"html"}'>
7444 <tr><td>foo</td></tr>
7459 Serialize wikitext list items as HTML list items when embedded in a HTML list
7463 <ul data-parsoid='{"stx": "html"}'>
7464 <li data-parsoid='{}'>a</li>
7474 # SSS FIXME: Is this actually a good thing given the
7475 # odd nested list output that is generated by MW?
7476 # <ul><li>foo<ul>..</ul></li></ul> instead of
7477 # <ul><li>foo</li><ul>..</ul></ul>
7479 Wikitext lists can be nested inside HTML lists
7483 <ul data-parsoid='{"stx": "html"}'>
7484 <li data-parsoid='{"stx": "html"}'>a
7489 <ul data-parsoid='{"stx": "html"}'>
7512 Plain link, capitalized
7516 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7521 Plain link, uncapitalized
7525 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7532 [[Main Page|The Main Page]]
7534 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7539 Piped link with comment in link text
7541 [[Main Page|The Main<!--front--> Page]]
7543 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7548 Piped link with multiple pipe characters in link text
7550 [[Main Page||The|Main|Page|]]
7552 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7555 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7559 Piped link with no link text
7561 [[Thomas Bek (bishop of St David's)|]]
7563 <p>[[Thomas Bek (bishop of St David's)|]]
7566 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7570 Piped link with empty link text
7572 [[Main Page|<nowiki/>]] - empty nowiki
7573 [[Main Page| ]] - empty space
7574 [[Main Page| ]] - empty non breaking space
7576 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7577 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7578 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7581 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7582 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7583 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span></a> - empty non breaking space</p>
7591 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7596 Broken link with fragment
7598 [[Zigzagzogzagzig#zug]]
7600 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7605 Special page link with fragment
7607 [[Special:Version#anchor]]
7609 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7614 Nonexistent special page link with fragment
7616 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7618 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7625 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7627 <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>
7634 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7636 <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>!!!
7647 T45661: Piped links with identical prefixes
7649 [[prefixed article|prefixed articles with spaces]]
7651 [[prefixed article|prefixed articlesaoeu]]
7653 [[Main Page|Main Page test]]
7655 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7656 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7657 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7663 Link with HTML entity in suffix / tail
7665 [[Main Page]]", [[Main Page]]a
7667 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7670 <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>
7674 Link with 3 brackets
7685 Link with 4 brackets
7689 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7694 Piped link with 3 brackets
7696 [[[main page|the main page]]]
7698 <p>[[[main page|the main page]]]
7703 Piped link with extlink-like text
7706 [[Main Page|This is a [bar]]]
7708 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7709 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7712 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7713 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7717 Link with multiple pipes
7719 [[Main Page|The|Main|Page]]
7721 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7726 Anchor containing a #. (T65430)
7728 [[Main Page#And#Link]]
7730 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7733 <p><a rel="mw:WikiLink" href="./Main_Page#And.23Link" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#And.23Link"},"sa":{"href":"Main Page#And#Link"}}'>Main Page#And#Link</a></p>
7739 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7741 <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>
7746 Link with space in namespace
7748 [[User talk:Foo bar]]
7750 <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>
7755 MemoryAlpha:AlphaTest
7757 This is an article in the MemoryAlpha namespace
7758 (which shadows the memoryalpha interwiki link).
7762 Namespace takes precedence over interwiki link (T53680)
7764 [[MemoryAlpha:AlphaTest]]
7766 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7770 # The previous test doesn't work correctly in html2*, due to not recognizing the
7771 # link as an internal one. This one checks for the correct behavior.
7773 Link to namespace preferred over interwiki with correct rel attribute
7775 parsoid=html2wt,html2html
7777 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7779 [[MemoryAlpha:AlphaTest]]
7783 Piped link to namespace
7785 [[Meta:Disclaimers|The disclaimers]]
7787 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7794 [[Usually caused by a typo (oops}]]
7796 <p>[[Usually caused by a typo (oops}]]
7803 Just a test of an article title containing a percent.
7807 Link containing % (not as a hex sequence)
7810 [[7% Solution|7%25 Solution]]
7812 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7813 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7816 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7817 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7820 # note that the parsoid HTML is identical to the previous test output,
7821 # so the previous test ensures that the html2wt mode will generate the
7822 # "not as a hex sequence" wikitext.
7824 Link containing % as a single hex sequence interpreted to char
7826 parsoid=wt2wt,wt2html,html2html
7829 [[7%25 Solution|7%25 Solution]]
7831 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7832 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7835 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7836 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7840 Link containing % as a double hex sequence interpreted to hex sequence
7844 <p>[[7%2525 Solution]]
7848 ## Example for such a section: == < ==
7850 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7852 [[%23%3c]][[%23%3e]]
7854 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7857 <p><a rel="mw:WikiLink" href="./Main_Page#.3C" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#.3C"},"sa":{"href":"%23%3c"}}'>#<</a><a rel="mw:WikiLink" href="./Main_Page#.3E" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#.3E"},"sa":{"href":"%23%3e"}}'>#></a></p>
7861 Link containing "<#" and ">#" as a hex sequences
7863 [[%3c%23]][[%3e%23]]
7865 <p>[[%3c%23]][[%3e%23]]
7870 Link containing an equals sign
7872 [[Special:BookSources/isbn=4-00-026157-6]]
7874 <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>
7877 <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>
7883 Just a test of an article title containing a tilde.
7886 # note that links containing signatures, like [[Foo~~~~]], are
7887 # massaged by the pre-save transform (PST) and so the tildes are never
7888 # seen by the parser.
7890 Link containing a tilde
7894 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7897 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7901 Link containing double-single-quotes '' (T6598)
7903 [[Lista d''e paise d''o munno]]
7905 <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>
7908 <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>
7912 Link containing double quotes and spaces
7916 <p><a href="/index.php?title=Cool_%22Gator%22&action=edit&redlink=1" class="new" title="Cool "Gator" (page does not exist)">Cool "Gator"</a>
7919 <p><a rel="mw:WikiLink" href="./Cool_%22Gator%22" title='Cool "Gator"'>Cool "Gator"</a></p>
7923 File containing double quotes and spaces
7925 [[File:Cool "Gator".png]]
7927 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Cool_%22Gator%22.png" data-parsoid='{"a":{"href":"./File:Cool_%22Gator%22.png"},"sa":{"href":"File:Cool \"Gator\".png"}}'><img resource='./File:Cool_"Gator".png' src="./Special:FilePath/Cool_%22Gator%22.png" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Cool_\"Gator\".png","height":"220","width":"220","src":"./Special:FilePath/Cool_%22Gator%22.png"},"sa":{"resource":"File:Cool \"Gator\".png","src":"./Special:FilePath/Cool_\"Gator\".png"}}'/></a></span></p>
7931 Redirect containing double quotes and spaces
7933 #REDIRECT [[Cool "Gator"]]
7935 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7939 Link containing double-single-quotes '' in text (T6598 sanity check)
7941 Some [[Link|pretty ''italics'' and stuff]]!
7943 <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>!
7946 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7950 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
7952 ''Some [[Link|pretty ''italics'' and stuff]]!''
7954 <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>
7959 Link with double quotes in title part (literal) and alternate part (interpreted)
7961 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7965 [[''Pentecoste''|Pentecoste]]
7967 [[''Pentecoste''|''Pentecoste'']]
7969 <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>
7970 </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>
7971 </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>
7972 </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>
7975 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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>
7976 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7977 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7978 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7982 Broken image links with HTML captions (T41700)
7984 [[File:Nonexistent|<script></script>]]
7985 [[File:Nonexistent|100x100px|<script></script>]]
7986 [[File:Nonexistent|<]]
7987 [[File:Nonexistent|a<i>b</i>c]]
7989 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7990 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7991 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7992 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7995 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7996 <span typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"100","width":"100"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7997 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[107,111,null,null]}'>&lt;</span>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
7998 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"a<i data-parsoid='{\"stx\":\"html\",\"dsr\":[134,142,3,4]}'>b</i>c"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span></p>
8004 [[http://www.example.com]]
8006 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8009 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
8013 Plain link to URL with link text
8015 [[http://www.example.com Link text]]
8017 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8022 Plain link to protocol-relative URL
8024 [[//www.example.com]]
8026 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8029 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
8033 Plain link to protocol-relative URL with link text
8035 [[//www.example.com Link text]]
8037 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8042 Plain link to page with question mark in title
8048 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8049 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8054 # I'm fairly sure the expected result here is wrong.
8055 # We want these to be URL links, not pseudo-pages with URLs for titles....
8056 # However the current output is also pretty screwy.
8059 # I'm changing it to match the current output--it arguably makes more
8060 # sense in the light of the test above. Old expected result was:
8061 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8063 # But I think this test is bordering on "garbage in, garbage out" anyway.
8068 Piped link to URL: [[http://www.example.com|an example URL]]
8070 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8073 <p>Piped link to URL: [<a rel="mw:ExtLink" href="http://www.example.com%7Can" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
8077 T2002: [[page|http://url/]] should link to page, not http://url/
8079 [[Main Page|http://url/]]
8081 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8084 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8087 # Parsoid does not mark self-links, by design.
8089 T2337: Escaped self-links should be bold
8093 [[Bug462]] [[Bug462]]
8095 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8098 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a></p>
8100 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8104 Self-link to section should not be bold
8108 [[Main Page#section]]
8110 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8121 Self-link to numeric title
8127 <p><a class="mw-selflink selflink">0</a>
8132 Link to numeric-equivalent title
8138 <p><a href="/wiki/00" title="00">00</a>
8143 <nowiki> inside a link
8145 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8147 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8152 Non-breaking spaces in title
8154 [[ Main Page ]]
8156 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8161 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8167 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8172 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8178 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8183 Internal link with en linktrail: no apostrophes (T29473)
8189 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8194 Internal link with ca linktrail with apostrophes (T29473)
8200 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8205 Internal link with kaa linktrail with apostrophes (T29473)
8211 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8216 Link with multiple ":" in a subpage-supporting namespace (T65636)
8218 [[User:Foo/Test/63636:Bar|Test]]
8220 <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>
8223 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8226 ## Mainly a sanity check for Parsoid
8228 Handle title parsing for subpages
8248 Link to a subpage from a namespace other than main
8255 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8258 <p><a rel="mw:WikiLink" href="./User:Test/123" title="User:Test/123" data-parsoid='{"stx":"simple","a":{"href":"./User:Test/123"},"sa":{"href":"/123"}}'>/123</a></p>
8262 Ensure that transclusion titles are not url-decoded
8264 subpage title=[[Test]]
8267 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8269 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8272 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8276 Purely hash wikilink
8278 title=[[User:Test/123]]
8283 <p><a href="#a">b</a>
8286 <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>
8290 1. Interaction of linktrail and template encapsulation
8294 <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>
8298 2. Interaction of linktrail and template encapsulation
8302 {{echo|Some [[Fool]]}}s
8304 <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"}]]}'>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>
8308 3. Interaction of linktrail and template encapsulation
8312 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8314 <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"}]]}'>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>
8324 Internal link with is link prefix
8328 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8330 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8341 Internal link with is link trail and link prefix
8345 [[mótmælendatrú|xxx]]ar
8347 mótmælenda[[söfnuður]]
8348 mótmælenda[[söfnuður|söfnuðir]]
8349 mótmælenda[[söfnuður|söfnuðir]]xxx
8351 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8352 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8353 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8354 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8355 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8360 Parsoid link trail escaping
8362 parsoid=html2wt,html2html
8364 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8370 Parsoid link prefix escaping
8373 parsoid=html2wt,html2html
8375 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8377 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8381 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8389 [http://wp.org ''foo'']
8391 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8392 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8393 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8394 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8399 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8401 [[Foo|{{echo|a}} b {{echo|c}}]]
8403 <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>
8407 Link with angle bracket after anchor
8411 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8414 <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>
8418 ### Interwiki links (see maintenance/interwiki.sql)
8422 Inline interwiki link
8424 parsoid=wt2html,wt2wt,html2html
8426 [[MeatBall:SoftSecurity]]
8428 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8431 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8435 Inline interwiki link with empty title (T4372)
8437 parsoid=wt2html,wt2wt,html2html
8441 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8444 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8448 Interwiki link encoding conversion (T3636)
8450 *[[Wikipedia:ro:Olteniţa]]
8451 *[[Wikipedia:ro:Olteniţa]]
8453 <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>
8454 <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>
8458 <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>
8459 <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>
8464 Interwiki link with fragment (T4130)
8466 [[MeatBall:SoftSecurity#foo]]
8468 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8473 Link scenarios with escaped fragments
8476 [[Foo#Is this great?]]
8477 [[meatball:Foo#Is this great?]]
8479 <p><a href="#Is_this_great.3F">#Is this great?</a>
8480 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8481 <a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
8484 <p><a rel="mw:WikiLink" href="./Main_Page#Is_this_great.3F" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Is_this_great.3F"},"sa":{"href":"#Is this great?"}}'>#Is this great?</a>
8485 <a rel="mw:WikiLink" href="./Foo#Is_this_great.3F" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#Is_this_great.3F"},"sa":{"href":"Foo#Is this great?"}}'>Foo#Is this great?</a>
8486 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
8489 # Ideally the wikipedia: prefix here should be proto-relative too
8490 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8491 # define the 'en' prefix, and originally the test used 'wikipedia',
8492 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8495 Different interwiki prefixes mapping to the same URL
8503 [[:wikipedia:Foo|Foo]]
8505 [[wikipedia:en:Foo]]
8507 [[:wikipedia:en:Foo]]
8511 <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>
8513 <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>
8515 <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>
8517 <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>
8519 <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>
8521 <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>
8523 <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>
8527 Interwiki links that cannot be represented in wiki syntax
8530 [[meatball:ok#foo|ok with fragment]]
8531 [[meatball:ok_as_well?|ok ending with ? mark]]
8532 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8533 [http://de.wikipedia.org/wiki/#foo is just fragment]
8536 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8537 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8538 <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>
8539 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8540 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8543 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8544 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8545 <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>
8546 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8547 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8551 Interwiki links: trail
8553 [[wikipedia:Foo|Ba]]r
8555 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8558 <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>
8562 Local interwiki link
8564 parsoid=wt2html,wt2wt,html2html
8566 [[local:Template:Foo]]
8568 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8571 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8574 # Parsoid does not mark self-links, by design.
8576 Local interwiki link: self-link to current page
8579 parsoid=wt2html,wt2wt,html2html
8583 <p><a class="mw-selflink selflink">local:Main Page</a>
8586 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8590 Local interwiki link: prefix only (T66167)
8592 parsoid=wt2html,wt2wt,html2html
8596 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8599 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8603 Local interwiki link: with additional interwiki prefix (T63357)
8605 parsoid=wt2html,wt2wt,html2html
8607 [[local:meatball:Hello]]
8609 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8612 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8616 Multiple local interwiki link prefixes
8618 [[local:local:local:local:mi:local:Foo]]
8620 parsoid=wt2html,wt2wt,html2html
8622 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8625 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8629 ### Interlanguage links
8630 ### Language links (so that searching for '### language' matches..)
8642 <p>Blah blah blah</p>
8643 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8646 ## parsoid html2wt will lose the space variations
8648 Interlanguage link with spacing
8650 parsoid=wt2html,wt2wt,html2html
8658 <p>Blah blah blah</p>
8659 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8663 Double interlanguage link
8672 <p>Blah blah blah</p>
8673 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8674 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8677 ## parsoid html2wt will lose the space variations
8679 Interlanguage link variations
8681 parsoid=wt2html,wt2wt,html2html
8691 <p>Blah blah blah</p>
8692 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8693 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8694 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8698 Escaping of interlanguage links (T129218, T156308)
8702 [[ : zh : Chinese ]]
8705 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8706 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8710 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8711 <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8714 ## parsoid html2wt will normalize the space to _
8716 Space and question mark encoding in interlanguage links (T95473)
8718 parsoid=wt2html,wt2wt,html2html
8726 <p>Blah blah blah</p>
8727 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8731 Interlanguage link, with prefix links
8741 <p>Blah blah blah</p>
8742 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8746 Double interlanguage link, with prefix links (T10897)
8757 <p>Blah blah blah</p>
8758 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8759 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8763 "Extra" interlanguage links (T34189 / gerrit 111390)
8771 <p>Blah blah blah</p>
8772 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8775 ## PHP parser tests script needs an update
8776 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8778 Language links render as inline links if $wgInterwikiMagic=false
8780 wgInterwikiMagic=false
8781 parsoid=wt2html,wt2wt,html2html
8786 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8789 ## PHP parser tests script needs an update
8790 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8792 Language links render as inline links in the Talk namespace
8795 parsoid=wt2html,wt2wt,html2html
8800 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8804 Parsoid-specific test: Wikilinks with should RT properly
8810 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8815 Parsoid T55221: Wikilinks should be properly entity-escaped
8817 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8819 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8820 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8822 He&nbsp;llo [[Foo|He&nbsp;llo]]
8824 He&nbsp;llo He&nbsp;llo
8826 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8827 </p><p>He&nbsp;llo He&nbsp;llo
8831 # html2wt will fail because of title normalization without data-parsoid
8833 Parsoid: handle constructor well
8835 parsoid=wt2html,wt2wt
8841 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8842 </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>
8845 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8847 <p><a rel="mw:WikiLink" href="./Constructor:foo" title="Constructor:foo" data-parsoid='{"stx":"simple","a":{"href":"./Constructor:foo"},"sa":{"href":"constructor:foo"}}'>constructor:foo</a></p>
8856 # Note that `ko` isn't a known interlanguage prefix
8858 Parsoid: recognize interlanguage links without a target page
8868 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8870 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8873 # Note that `ko` isn't a known interwiki prefix
8875 Parsoid: recognize interwiki links without a target page
8877 parsoid=wt2html,wt2wt,html2html
8883 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8884 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8887 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8888 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8892 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
8896 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8899 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8903 Interlanguage link with preceding local interwiki link (T70085)
8905 parsoid=wt2html,wt2wt,html2html
8908 [[local:es:Spanish]]
8911 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8915 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8919 Looks like an interlanguage link, but is actually a local interwiki
8921 parsoid=wt2html,wt2wt,html2html
8927 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8931 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8935 ### Redirects, Parsoid-only
8939 1. Simple redirect to page
8941 #REDIRECT [[Main Page]]
8943 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8947 2. Other redirect variants
8949 #REDIRECT [[Main_Page]]
8951 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8954 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8955 # This tests the Parsoid bail-out code.
8957 3. Other redirect variants
8959 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8961 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8965 4. Redirect to a templated destination
8967 #REDIRECT [[{{echo|Foo}}bar]]
8969 <link about="#mwt2" typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-parsoid='{"a":{"href":"./Foobar"},"sa":{"href":"{{echo|Foo}}bar"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,24,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span>bar"}]]}'/>
8975 parsoid=wt2html,wt2wt
8980 <li>REDIRECT [[]]</li></ol>
8984 Optional colon in #REDIRECT
8986 # the colon is archaic syntax. we support it for wt2html, but we
8987 # don't care that it roundtrips back to the modern syntax.
8988 parsoid=wt2html,html2html
8990 #REDIRECT:[[Main Page]]
8992 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8996 Whitespace in #REDIRECT with optional colon
8998 # the colon and gratuitous whitespace is archaic syntax. we support
8999 # it for wt2html, but we don't care that it roundtrips back to the
9000 # modern syntax (without extra whitespace)
9001 parsoid=wt2html,html2html
9008 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9012 Piped link in #REDIRECT
9014 # content after piped link is ignored. we support this syntax,
9015 # but don't care that the piped link is lost when we roundtrip this.
9018 #REDIRECT [[Main Page|bar]]
9020 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9024 Redirect to category (T104502)
9026 parsoid=wt2html,wt2wt
9028 #REDIRECT [[Category:Foo]]
9030 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9034 Redirect to category with URL encoding (T104502)
9038 #REDIRECT [[Category%3AFoo]]
9040 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9044 Redirect to category page
9046 #REDIRECT [[:Category:Foo]]
9048 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9052 Redirect to image page (1)
9054 #REDIRECT [[File:Wiki.png]]
9056 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9060 Redirect to image page (2)
9062 #REDIRECT [[Image:Wiki.png]]
9064 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9067 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9068 # Next test confirms this.
9070 Redirect to language (1) (T104918)
9072 parsoid=wt2html,wt2wt,html2html
9074 #REDIRECT [[en:File:Wiki.png]]
9076 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9080 Redirect to language (2) (T104918)
9082 #REDIRECT [[:en:File:Wiki.png]]
9084 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9088 Redirect to interwiki (T104918)
9090 #REDIRECT [[meatball:File:Wiki.png]]
9092 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9096 Non-English #REDIRECT
9100 #TILVÍSUN [[Main Page]]
9102 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9106 Redirect syntax under text isn't considered a redirect
9109 #redirect [[Main Page]]
9112 <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>
9115 # FIXME: Should hoist the redirect to the top of the page and ensure there
9122 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9142 Broken br tag sanitization
9150 # TODO: Fix html2html mode (T53055)!
9152 Parsoid: Broken br tag recognition
9165 Incorrecly removing closing slashes from correctly formed XHTML
9167 <br style="clear:both;" />
9169 <p><br style="clear:both;" />
9174 Failing to transform badly formed HTML into correct XHTML
9176 <br style="clear: left;">
9177 <br style="clear: right;">
9178 <br style="clear: both;">
9180 <p><br style="clear: left;" />
9181 <br style="clear: right;" />
9182 <br style="clear: both;" />
9186 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9187 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9189 Handling html with a div self-closing tag
9198 <p><div title />
9202 <p><div title=bar />
9203 <div title=bar/>
9205 <div title="bar/"></div>
9209 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9210 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9211 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9212 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9213 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9214 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9218 Handling html with a br self-closing tag
9245 Horizontal ruler (should it add that extra space?)
9260 Horizontal ruler -- 4+ dashes render hr
9269 Horizontal ruler -- eats additional dashes on the same line
9278 Horizontal ruler -- does not collapse dashes on consecutive lines
9289 Horizontal ruler -- <4 dashes render as plain text
9298 Horizontal ruler -- Supports content following dashes on same line
9310 ### Block-level elements
9319 <ul><li>Common list</li>
9321 <li>item 3</li></ul>
9332 <ol><li>Numbered list</li>
9334 <li> item 3</li></ol>
9348 ***#Number on level 4
9350 **#Number on level 3
9351 **#Number on level 3
9355 #** Level 3, but ordered
9358 <ol><li> with numbers</li></ol>
9359 <ul><li> and bullets</li></ul>
9360 <ol><li> and numbers</li></ol></li>
9362 <ul><li>bullet level 2
9363 <ul><li>bullet level 3
9364 <ol><li>Number on level 4</li></ol></li></ul></li>
9366 <ol><li>Number on level 3</li>
9367 <li>Number on level 3</li></ol></li></ul>
9368 <ol><li>number level 2</li></ol></li>
9370 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9371 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9376 1. Nested mixed wikitext and html list
9379 * <ul><li>ho</li></ul>
9384 <li> <ul><li>ho</li></ul></li>
9386 <ul><li> ho</li></ul></li></ul>
9390 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9392 <ul><li> ho</li></ul></li></ul>
9396 2. Nested mixed wikitext and html list (incompatible)
9399 : {{echo|<li>ho</li>}}
9402 <dd> <li>ho</li></dd></dl>
9406 <dd> <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>ho</li>"}},"i":0}}]}'>ho</li></dd></dl>
9416 <ul><li>bar</li></ul></li></ul>
9426 <ul><li><ul><li>foo</li></ul></li>
9432 Nested lists 3 (first element empty)
9438 <ul><li>bar</li></ul></li></ul>
9443 Nested lists 4 (first element empty)
9448 <ul><li><ul><li></li></ul></li>
9454 Nested lists 5 (both elements empty)
9459 <ul><li><ul><li></li></ul></li>
9465 Nested lists 6 (both elements empty)
9471 <ul><li></li></ul></li></ul>
9476 Nested lists 7 (skip initial nesting levels)
9480 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9485 Nested lists 8 (multiple nesting transitions)
9493 <ul><li><ul><li> bar</li></ul></li>
9494 <li> baz</li></ul></li>
9500 Nested lists 9 (extension interaction)
9506 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9510 1. Lists with start-of-line-transparent tokens before bullets: Comments
9523 2. Lists with start-of-line-transparent tokens before bullets: Template close
9528 <ul><li>foo bar</li>
9534 List items are not parsed correctly following a <pre> block (T2785)
9540 <ul><li> <pre>foo</pre></li>
9541 <li> <pre>bar</pre></li>
9545 <ul><li> <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9546 <li> <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9551 List items from template
9562 * notSOL{{inner list}}
9565 <ul><li> item 1</li>
9566 <li> item 2</li></ul>
9567 <ul><li> item 0</li>
9569 <li> item 2</li></ul>
9570 <ul><li> item 0</li>
9573 <li> item 2</li></ul>
9578 List interrupted by empty line or heading
9586 <ul><li> foo</li></ul>
9587 <ul><li><ul><li> bar</li></ul></li></ul>
9588 <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>
9589 <ul><li> Another list item</li></ul>
9594 Multiple list tags generated by templates
9615 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9618 <!--This line will NOT split the list-->
9620 <!--This line will NOT split the list either-->
9622 <!--foo--> <!----> <!--This line NOT split the list either-->
9633 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9636 <!--This line will NOT split the list-->
9638 <!--This line will NOT split the list either-->
9640 <!--foo--> <!----> <!--This line NOT split the list
9653 (The PHP parser relies on Tidy for the hack)
9655 parsoid=wt2html,wt2wt
9659 * {{echo|<li>templated li-hack}}
9660 * <!--foo--> <li> unsupported li-hack with preceding comments
9663 <li><li>not a li-hack
9670 <li>templated li-hack</li>
9671 <li>unsupported li-hack with preceding comments</li>
9674 <li>not a li-hack</li>
9679 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9706 Parsoid: Test of whitespace serialization with Templated bullets
9713 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9717 # ------------------------------------------------------------------------
9718 # The next set of tests are about Parsoid's ability to handle badly nested
9719 # tags (parse, minimize scope of fixup, and roundtrip back)
9720 # ------------------------------------------------------------------------
9723 Unbalanced closing block tags break a list
9724 (php parser relies on Tidy to fix up)
9742 # Parsoid fails this test, but it might be tricky to support properly.
9745 Unbalanced closing non-block tags don't break a list
9746 (php parser relies on Tidy to fix up)
9753 <li><span>a</span></li>
9754 <li><span>b</span></li>
9768 Unclosed formatting tags that straddle lists are closed and reopened
9769 (php parser relies on Tidy to fix up)
9771 parsoid=wt2html,wt2wt,html2html
9781 <ol><li> <s> a</s></li>
9782 <li><s> b </s></li></ol>
9787 1. List embedded in a formatting tag
9794 <li><small>foo</small></li>
9804 ## Ugly Parsoid output here
9805 ## Not sure what the right output is.
9807 2. List embedded in a formatting tag
9814 <li><small>a</small></li>
9815 <li><small>b</small></li>
9822 <li><small>b</small></li>
9826 # Ugly Parsoid and PHP parser output here
9827 # Not sure if we want to make this a test!
9830 ## 3. Unclosed formatting tags in list elements
9836 ## <li><small>a</small></li>
9837 ## <li><small><small>b</small></small></li>
9841 ## <li><small>a</small></li>
9843 ## <li><small>b</small></li>
9847 # This is a bug in the PHP parser + tidy combination.
9848 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9849 # and then fostered out of the table by tidy.)
9850 # We believe the Parsoid output to be correct.
9852 Table with missing opening <tr> tag
9854 parsoid=wt2html,wt2wt
9872 # Note that the current date is hard-coded as
9873 # 1970-01-01T00:02:03Z (a Thursday)
9874 # when running parser tests. The timezone is also fixed to GMT, so
9875 # local date will be identical to current date.
9878 Magic Word: {{CURRENTDAY}}
9887 Magic Word: {{CURRENTDAY2}}
9896 Magic Word: {{CURRENTDAYNAME}}
9905 Magic Word: {{CURRENTDOW}}
9914 Magic Word: {{CURRENTMONTH}}
9923 Magic Word: {{CURRENTMONTH1}}
9932 Magic Word: {{CURRENTMONTHABBREV}}
9934 {{CURRENTMONTHABBREV}}
9941 Magic Word: {{CURRENTMONTHNAME}}
9943 {{CURRENTMONTHNAME}}
9950 Magic Word: {{CURRENTMONTHNAMEGEN}}
9952 {{CURRENTMONTHNAMEGEN}}
9959 Magic Word: {{CURRENTTIME}}
9968 Magic Word: {{CURRENTHOUR}}
9977 Magic Word: {{CURRENTWEEK}} (T6594)
9986 Magic Word: {{CURRENTYEAR}}
9995 Magic Word: {{CURRENTTIMESTAMP}}
9997 {{CURRENTTIMESTAMP}}
10004 Magic Words LOCAL (UTC)
10008 * {{LOCALMONTHNAME}}
10009 * {{LOCALMONTHNAMEGEN}}
10010 * {{LOCALMONTHABBREV}}
10019 * {{LOCALTIMESTAMP}}
10034 <li> 19700101000203</li></ul>
10039 Magic Word: {{FULLPAGENAME}}
10041 title=[[User:Ævar Arnfjörð Bjarmason]]
10042 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10046 <p>User:Ævar Arnfjörð Bjarmason
10051 Magic Word: {{FULLPAGENAMEE}}
10053 title=[[User:Ævar Arnfjörð Bjarmason]]
10054 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10058 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10063 Magic Word: {{TALKSPACE}}
10065 title=[[User:Ævar Arnfjörð Bjarmason]]
10066 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10075 Magic Word: {{TALKSPACE}}, same namespace
10077 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10078 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10087 Magic Word: {{TALKSPACE}}, main namespace
10089 title=[[Parser Test]]
10090 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10099 Magic Word: {{TALKSPACEE}}
10101 title=[[User:Ævar Arnfjörð Bjarmason]]
10102 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10111 Magic Word: {{SUBJECTSPACE}}
10113 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10114 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10123 Magic Word: {{SUBJECTSPACE}}, same namespace
10125 title=[[User:Ævar Arnfjörð Bjarmason]]
10126 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10135 Magic Word: {{SUBJECTSPACE}}, main namespace
10137 title=[[Parser Test]]
10138 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10146 Magic Word: {{SUBJECTSPACEE}}
10148 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10149 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10158 Magic Word: {{NAMESPACE}}
10160 title=[[User:Ævar Arnfjörð Bjarmason]]
10161 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10170 Magic Word: {{NAMESPACEE}}
10172 title=[[User:Ævar Arnfjörð Bjarmason]]
10173 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10182 Magic Word: {{NAMESPACENUMBER}}
10184 title=[[User:Ævar Arnfjörð Bjarmason]]
10185 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10187 {{NAMESPACENUMBER}}
10194 Magic Word: {{SUBPAGENAME}}
10196 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10197 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10206 Magic Word: {{SUBPAGENAMEE}}
10208 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10209 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10218 Magic Word: {{ROOTPAGENAME}}
10220 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10221 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10225 <p>Ævar Arnfjörð Bjarmason
10230 Magic Word: {{ROOTPAGENAMEE}}
10232 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10233 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10237 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10242 Magic Word: {{BASEPAGENAME}}
10244 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10245 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10249 <p>Ævar Arnfjörð Bjarmason
10254 Magic Word: {{BASEPAGENAMEE}}
10256 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10257 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10261 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10266 Magic Word: {{TALKPAGENAME}}
10268 title=[[User:Ævar Arnfjörð Bjarmason]]
10269 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10273 <p>User talk:Ævar Arnfjörð Bjarmason
10278 Magic Word: {{TALKPAGENAMEE}}
10280 title=[[User:Ævar Arnfjörð Bjarmason]]
10281 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10285 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10290 Magic Word: {{SUBJECTPAGENAME}}
10292 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10293 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10295 {{SUBJECTPAGENAME}}
10297 <p>User:Ævar Arnfjörð Bjarmason
10302 Magic Word: {{SUBJECTPAGENAMEE}}
10304 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10305 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10307 {{SUBJECTPAGENAMEE}}
10309 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10314 Magic Word: {{NUMBEROFFILES}}
10316 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10325 Magic Word: {{PAGENAME}}
10327 title=[[User:Ævar Arnfjörð Bjarmason]]
10328 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10332 <p>Ævar Arnfjörð Bjarmason
10337 Magic Word: {{PAGENAME}} with metacharacters
10339 title=[['foo & bar = baz']]
10340 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10344 <p><i>'foo & bar = baz'</i>
10347 <p><i>'foo & bar = baz'</i></p>
10351 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10353 title=[[*RFC 1234 http://example.com/]]
10354 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10358 <p>*RFC 1234 http://example.com/
10361 <p>*RFC 1234 http://example.com/</p>
10365 Magic Word: {{PAGENAMEE}}
10367 title=[[User:Ævar Arnfjörð Bjarmason]]
10368 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10372 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10377 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10379 title=[[*RFC 1234 http://example.com/]]
10380 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10384 <p>*RFC_1234_http://example.com/
10387 <p>*RFC_1234_http://example.com/</p>
10391 Magic Word: {{REVISIONID}}
10393 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10402 Magic Word: {{SCRIPTPATH}}
10404 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10412 Magic Word: {{STYLEPATH}}
10414 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10423 Magic Word: {{SERVER}}
10425 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10429 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10434 Magic Word: {{SERVERNAME}}
10436 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10445 Magic Word: {{SITENAME}}
10447 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10456 Magic Word: {{PAGELANGUAGE}}
10459 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10468 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10470 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10479 Case-sensitive magic words, when cased differently, should just be template transclusions
10486 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10487 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10488 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10489 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10494 Case-insensitive magic words should still work with weird casing.
10504 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10508 # From plwiki:PLOS_ONE
10510 Parsoid: Page property magic word with magic word contents
10512 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10514 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"DISPLAYTITLE:<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Main Page</span></i>"}]]}'/>
10517 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10518 # But, this is a limitation of our representation and is documented in
10519 # TemplateHandler.js in processSpecialMagicWord
10521 Parsoid: Template-generated DISPLAYTITLE
10523 {{{{echo|DISPLAYTITLE}}:Foo}}
10527 wgAllowDisplayTitle=true
10528 wgRestrictDisplayTitle=false
10533 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:ExpandedAttrs" data-parsoid='{"pi":[[]]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DISPLAYTITLE\"}},\"i\":0}}]}'>DISPLAYTITLE</span>:Foo"}]]}'/>
10537 Namespace 1 {{ns:1}}
10546 Namespace 1 {{ns:01}}
10555 Namespace 0 {{ns:0}} (T6783)
10563 Namespace 0 {{ns:00}} (T6783)
10571 Namespace -1 {{ns:-1}}
10580 Namespace User {{ns:User}}
10589 Namespace User talk {{ns:User_talk}}
10598 Namespace User talk {{ns:uSeR tAlK}}
10607 Namespace File {{ns:File}}
10616 Namespace File {{ns:Image}}
10625 Namespace (lang=de) Benutzer {{ns:User}}
10636 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10642 <p>Benutzer Diskussion
10649 {{urlencode:hi world?!}}
10650 {{urlencode:hi world?!|WIKI}}
10651 {{urlencode:hi world?!|PATH}}
10652 {{urlencode:hi world?!|QUERY}}
10662 Magic Word: prioritize type info over data-parsoid
10666 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10672 Magic Word: serialize on separate line (parsoid)
10674 parsoid=wt2wt,html2wt
10680 foo<meta property="mw:PageProp/notoc"/>bar
10684 Magic Word: rt non-english wikis
10691 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10695 __proto__ is treated as normal wikitext (T105997)
10707 Magic links: internal link to RFC (T2479)
10711 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10714 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10718 Magic links: RFC (T2479)
10722 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10725 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10729 Magic links: RFC (T67278)
10731 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10733 <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.
10736 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10740 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10742 RFC      822
10746 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10751 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 822</a>
10757 Magic links: ISBN (T3937)
10761 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10764 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10768 Magic links: ISBN (T67278)
10770 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10772 <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.
10775 <p>This is <a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
10779 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
10781 ISBN      978 0 316 09811 3
10787 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10794 <p><a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 978<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>0<span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>316<span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span>09811<span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>3</a>
10802 Magic links: PMID incorrectly converts space to underscore
10806 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10809 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10813 Magic links: PMID (T67278)
10815 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10817 <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.
10820 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
10824 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
10826 PMID      1234
10830 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10835 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 1234</a>
10840 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10841 # since these are ExtLinkText, not MagicLinkText
10843 Magic links: use appropriate serialization for "almost" magic links.
10845 X[[Special:BookSources/0978739256|foo]]
10847 X[//tools.ietf.org/html/rfc1234 foo]
10849 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10850 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10853 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10854 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10858 Magic links: All disabled (T47942)
10860 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10866 <p>ISBN 0-306-40615-2
10877 Nonexistent template
10879 {{thistemplatedoesnotexist}}
10881 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10886 Template with invalid target containing tags
10888 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10890 <p>{{a<b>b</b>|foo|a=b|a = b}}
10895 Template with invalid target containing unclosed tag
10897 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10899 <p>{{a<b>|foo|a=b|a = b}}</b>
10904 Template with invalid target containing wikilink
10908 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10911 <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>
10915 Template with just whitespace in it, T70421
10919 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</p>
10925 This is a test template
10933 <p>This is a test template
10938 Template with explicit namespace
10942 <p>This is a test template
10950 This is a test template with parameter {{{param}}}
10956 {{paramtest|param=foo}}
10958 <p>This is a test template with parameter foo
10963 Template:paramtestnum
10965 [[{{{1}}}|{{{2}}}]]
10969 Template unnamed parameter
10971 {{paramtestnum|Main Page|the main page}}
10973 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10978 Template:templatesimple
10984 Template:templateredirect
10986 #redirect [[Template:templatesimple]]
10990 Template:templateasargtestnum
10996 Template:templateasargtest
10998 {{template{{{templ}}}}}
11002 Template:templateasargtest2
11008 Template with template name as unnamed argument
11010 {{templateasargtestnum|templatesimple}}
11017 Template with template name as argument
11019 {{templateasargtest|templ=simple}}
11026 Template with template name as argument (2)
11028 {{templateasargtest2|templ=templatesimple}}
11035 Template:templateasargtestdefault
11037 {{{{{templ|templatesimple}}}}}
11047 Template with default value
11049 {{templateasargtestdefault}}
11056 Template with default value (value set)
11058 {{templateasargtestdefault|templ=templa}}
11067 {{templateredirect}}
11072 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11076 Template with argument in separate line
11078 {{ templateasargtest |
11086 Template with complex template as argument
11089 param ={{ templateasargtest |
11090 templ = simple }}}}
11092 <p>This is a test template with parameter (test)
11097 Templates with templated name
11099 {{{{echo|echo}}|foo}}
11100 {{{{echo|inner list}} }}
11104 <ul><li> item 1</li></ul>
11107 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|echo}}","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
11108 <ul about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|inner list}} ","href":"./Template:Inner_list"},"params":{},"i":0}}]}'><li> item 1</li></ul>
11111 # Parsoid markup is deliberate "broken". This is an edge case.
11112 # See long comment in TemplateHandler.js:convertAttribsToString.
11114 Templates with invalid templated targets
11125 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11130 Template with thumb image (with link in description)
11132 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11134 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>
11137 <p>This is a test template with parameter</p>
11138 <div class="thumb tright">
11139 <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>
11140 <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>
11144 <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":"apierror-filedoesnotexist","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>
11148 Template:complextemplate
11150 {{{1}}} {{paramtest|
11151 param ={{{param}}}}}
11155 Template with complex arguments
11158 param ={{ templateasargtest |
11159 templ = simple }}|[[Template:complextemplate|link]]}}
11161 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11166 T2553: link with two variables in a piped link
11169 |[[{{{1}}}|{{{2}}}]]
11174 <td>[[{{{1}}}|{{{2}}}]]
11179 <tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{},"i":0}}]}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"2"},"params":{},"i":0}}]}'>{{{2}}}</span>]]</td></tr>
11185 Abort table cell attribute parsing on wikilink
11188 | testing [[one|two]] | three || four
11189 | testing one two | three || four
11190 | testing="[[one|two]]" | three || four
11195 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11201 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11207 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> | three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td>
11208 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'> three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td>
11209 <td> testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" | three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td></tr>
11214 Don't abort table cell attribute parsing if wikilink is found in template arg
11217 | Test {{#tag:ref|One two "[[three]]" four}}
11221 <tbody><tr><td> Test <ref about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:ref","function":"#tag"},"params":{"1":{"wt":"One two \"[[three]]\" four"}},"i":0}}]}'>One two "<a rel="mw:WikiLink" href="./Three" title="Three">three</a>" four</ref></td></tr>
11226 Magic variable as template parameter
11228 {{paramtest|param={{SITENAME}}}}
11230 <p>This is a test template with parameter MediaWiki
11237 [[{{{param}}}|link]]
11241 Template parameter as link source
11243 {{linktest|param=Main Page}}
11245 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11250 Template:paramtest2
11252 including another template, {{paramtest|param={{{arg}}}}}
11256 Template passing argument to another template
11258 {{paramtest2|arg='hmm'}}
11260 <p>including another template, This is a test template with parameter 'hmm'
11271 Template as link source
11275 [[{{linktest2}}|Main Page]]
11277 [[{{linktest2}}]]Page
11279 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11280 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11281 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11299 Template infinite loop
11303 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11308 Template from main namespace
11327 T2529: Template with table, not included at beginning of line
11346 T2523: Template shouldn't eat newline (or add an extra one before table)
11366 T2041: Template parameters shown as broken links
11375 Template with targets containing wikilinks
11381 {{[[{{echo|foo}}]]}}
11383 {{{{echo|[[foo}}]]}}
11385 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11386 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11390 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11391 <p>{{<a typeof="mw:ExpandedAttrs" rel="mw:WikiLink" href="./Foo" title="Foo" data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>"}]]}'>foo</a>}}</p>
11392 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11402 Templates: Double quotes as template target
11409 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11413 ## This test is about making sure Parsoid's data-mw is well formed in the
11414 ## face of multiple templates with intersecting and overlapping ranges. The
11415 ## wikitext itself is wretched.
11417 Templates with intersecting and overlapping ranges
11442 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]],"firstWikitextNode":"table"}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ha</p>"}},"i":0}},"\n","{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n<p>ho</p>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}}hi"}},"i":2}},"\n|}"]}'>ha</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11444 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11446 <tbody><tr><td>hi</td></tr>
11451 Template:MSGNW test
11453 ''None'' of '''this''' should be
11455 but rather passed unmodified
11463 # hmm, fix this or just deprecate msgnw and document its behavior?
11467 {{msgnw:MSGNW test}}
11469 <p>''None'' of '''this''' should be
11471  but rather passed unmodified
11472 {{test}}
11476 <!-- comment -->
11483 {{int:youhavenewmessages|lots of money|not!}}
11485 <p>You have lots of money (not!).
11490 int keyword - non-existing message
11501 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11505 <includeonly> and <noinclude> being included
11516 <onlyinclude>Foo</onlyinclude>bar
11520 <onlyinclude> being included
11532 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11536 <onlyinclude> and <includeonly> being included
11545 <includeonly> and <noinclude> on a page
11547 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11554 Un-closed <noinclude>
11561 <onlyinclude> on a page
11563 <onlyinclude>Foo</onlyinclude>bar
11570 Un-closed <onlyinclude>
11577 Self-closed noinclude, includeonly, onlyinclude tags
11588 Unbalanced includeonly and noinclude tags
11592 |b</noinclude></noinclude>
11593 |c</noinclude></includeonly>
11594 |d</includeonly></includeonly>
11603 <td>c</includeonly>
11605 <td>d</includeonly></includeonly>
11611 Template:Includeonly section
11614 ==Includeonly section==
11620 T8563: Edit link generation for section shown by <includeonly>
11622 {{includeonly section}}
11624 <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>
11625 <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>
11629 # Uses same input as the contents of [[Template:Includeonly section]]
11631 T8563: Section extraction for section shown by <includeonly>
11636 ==Includeonly section==
11644 T8563: Edit link generation for section suppressed by <includeonly>
11647 ==Includeonly section==
11651 <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>
11656 T8563: Section extraction for section suppressed by <includeonly>
11661 ==Includeonly section==
11669 Un-closed <includeonly>
11674 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11677 ## We used to, but no longer wt2wt this test since the default serializer
11678 ## will normalize the include directives to serialize on their own line.
11679 ## Selser will take care of preserving formatting in scenarios where they
11680 ## intermingled with other wikitext.
11682 Includes and comments at SOL
11684 parsoid=wt2html,html2html
11686 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11690 </noinclude>* stuff
11693 <includeonly>can have stuff</includeonly>=== here ===
11696 <h2><span class="mw-headline" id="hu">hu</span></h2>
11699 <ul><li> stuff</li>
11700 <li> here</li></ul>
11701 <h3><span class="mw-headline" id="here">here</span></h3>
11704 <!-- 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>
11706 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11708 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11709 <li> here</li></ul>
11711 <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>
11715 # TODO: test with DOM fragment reuse!
11717 Parsoid: DOM fragment reuse
11719 parsoid=wt2wt,wt2html
11721 a{{echo|b<table></table>c}}d
11733 <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"}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
11735 <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"}]]}'>ab</p><span about="#mwt2">
11736 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11737 </span><p about="#mwt2">cd</p>
11739 <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"}]]}'>a</p><span about="#mwt3">
11741 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11743 </span><p about="#mwt3">b</p>
11747 Parsoid: Merge double tds (T52603)
11752 |{{echo|{{!}} foo}}
11756 <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>
11761 Parsoid: Merge double tds in nested transclusion content (T52603)
11767 |{{echo|{{!}} foo}}
11771 <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}}]}'>
11773 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11779 ### <includeonly> and <noinclude> in attributes
11782 0. includeonly around the entire attribute
11784 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11786 <p><span id="v2">bar</span>
11791 1. includeonly in html attr key
11793 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11795 <p><span id="foo">bar</span>
11800 2. includeonly in html attr value
11802 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11803 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11805 <p><span id="v1">bar</span>
11806 <span id="v1">bar</span>
11811 3. includeonly in part of an attr value
11813 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11815 <p><span style="color:red;">bar</span>
11820 4. includeonly in table attributes
11844 ### Token Stream Patcher tests
11846 ### These tests won't always pass wt2wt and other modes because
11847 ### on serialization, the table will be output on a new line.
11848 ### For now, we are blacklisting them, and using this to test selser.
11852 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11854 parsoid=wt2html,wt2wt
11856 {{echo|}}{| width = '100%'
11860 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11861 <tbody><tr><td>foo</td></tr>
11865 ## We used to, but no longer wt2wt this test since the default serializer
11866 ## will normalize the include directives to serialize on their own line.
11867 ## Selser will take care of preserving formatting in scenarios where they
11868 ## intermingled with other wikitext.
11870 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11874 <includeonly>a</includeonly>{| {{{b}}}
11878 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>a</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[31,38,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"b\"},\"params\":{},\"i\":0}}]}'>{{{b}}}</span>"},{"html":""}]]}'>
11879 <tbody><tr><td>c</td></tr>
11884 Table wikitext syntax outside wiki-tables
11888 ! not a table heading
11891 | class="foo bar" | baz
11899 ! not a table heading
11902 | class="foo bar" | baz
11911 ### Testing parsing of templates where a template arg
11912 ### has the same name as the template itself.
11918 {{{quote|{{{1}}}}}}
11922 Templates: Template Name/Arg clash: 1. Use of positional param
11931 Templates: Template Name/Arg clash: 2. Use of named param
11933 {{quote|quote=foo}}
11940 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11949 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11953 Templates: 1. Simple use
11962 Templates: 2. Inside a block tag
11964 <div>{{echo|Foo}}</div>
11965 <blockquote>{{echo|Foo}}</blockquote>
11968 <blockquote>Foo</blockquote>
11978 Templates: P-wrapping: 1a. Templates on consecutive lines
11989 Templates: P-wrapping: 1b. Templates on consecutive lines
12003 Templates: P-wrapping: 1c. Templates on consecutive lines
12006 {{echo|bar}} <div>baz</div>
12019 Templates: P-wrapping: 1d. Template preceded by comment-only line
12028 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12032 Templates: Inline Text: 1. Multiple template uses
12034 {{echo|Foo}}bar{{echo|baz}}
12041 Templates: Inline Text: 2. Back-to-back template uses
12043 {{echo|Foo}}{{echo|bar}}
12050 Templates: Block Tags: 1. Multiple template uses
12052 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12054 <div>Foo</div><div>bar</div><div>baz</div>
12059 Templates: Block Tags: 2. Back-to-back template uses
12061 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12063 <div>Foo</div><div>bar</div>
12067 # This is an edge case relating to paragraph wrapping.
12069 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12074 <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
12079 Templates: Links: 1. Simple example
12081 {{echo|[[Foo|bar]]}}
12083 <p><a href="/wiki/Foo" title="Foo">bar</a>
12088 Templates: Links: 2. Generation of link href
12090 [[{{echo|Foo}}|bar]]
12092 <p><a href="/wiki/Foo" title="Foo">bar</a>
12097 Templates: Links: 3. Generation of part of a link href
12099 [[Fo{{echo|o}}|bar]]
12101 [[Foo{{echo|bar}}]]
12103 [[Foo{{echo|bar}}baz]]
12105 [[Foo{{echo|bar}}|bar]]
12107 [[:Foo{{echo|bar}}]]
12109 [[:Foo{{echo|bar}}|bar]]
12111 <p><a href="/wiki/Foo" title="Foo">bar</a>
12112 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12113 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12114 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12115 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12116 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12121 Templates: Links: 4. Multiple templates generating link href
12123 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12125 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12130 Templates: Links: 5. Generation of link text
12132 [[Foo|{{echo|bar}}]]
12134 <p><a href="/wiki/Foo" title="Foo">bar</a>
12139 Templates: Links: 5. Nested templates (only outermost template should be marked)
12141 {{echo|[[{{echo|Foo}}|bar]]}}
12143 <p><a href="/wiki/Foo" title="Foo">bar</a>
12148 Templates: HTML Tag: 1. Generation of HTML attr. key
12150 <div {{echo|style}}="color:red;">foo</div>
12152 <div style="color:red;">foo</div>
12157 Templates: HTML Tag: 2. Generation of HTML attr. value
12159 <div style={{echo|'color:red;'}}>foo</div>
12161 <div style="color:red;">foo</div>
12166 Templates: HTML Tag: 3. Generation of HTML attr key and value
12168 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12170 <div style="color:red;">foo</div>
12175 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12177 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12179 <div title="This is a long title with just one piece templated">foo</div>
12184 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12186 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12188 <div title="This is a long title with just one piece templated">foo</div>
12193 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12195 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12197 <div title="This is a long title with just one piece templated">foo</div>
12201 # SSS FIXME: While it is great we added support for all this,
12202 # do we want to make this part of the spec? Maybe we want to
12203 # deprecate this kind of usage in the future?
12205 Templates: HTML Tag: 7. Generation of partial attribute key string
12207 <div st{{echo|yle}}="color:red;">foo</div>
12209 <div style="color:red;">foo</div>
12214 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12216 <div {{echo|1=id="v1"}}>bar</div>
12218 <div id="v1">bar</div>
12223 Templates: HTML Tag: 9. Multiple template-generated attributes
12225 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12227 <div id="v1" title="foo">bar</div>
12232 Templates: Support for templates generating attributes and content
12234 {| {{mixed_attr_content_template}}
12239 <table style="color:red;" title="T48811">
12249 <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|}"]}'>
12258 1. Entities and nowikis inside templated attributes should be handled correctly
12260 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12262 <div style="background:#f9f9f9;">foo</div>
12265 <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='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[5,49,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"style{{=}}\\\"background:&amp;#35;f9f9f9;\\\"\"}},\"i\":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='{\"src\":\"&amp;#35;\",\"srcContent\":\"#\"}'>#</span><span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"</span>"},{"html":""}]]}'>foo</div>
12269 2. Entities and nowikis inside templated attributes should be handled correctly
12272 |{{table_attribs_3}}
12277 <td style="background:#f9f9f9;">Foo
12282 <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>
12287 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12290 |{{table_attribs_3}}
12295 <td style="background:#f9f9f9;">Foo
12299 <table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":1}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":2}}]}'>
12300 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12306 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12309 | {{table_attribs_6}} hi
12314 <td style="background: red;"> hi
12319 <tbody><tr><td style="background: red;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["| ",{"template":{"target":{"wt":"table_attribs_6","href":"./Template:Table_attribs_6"},"params":{},"i":0}}," hi"]}'> hi</td></tr>
12324 Templates: HTML Tables: 1. Generating start of a HTML table
12326 {{echo|<table><tr><td>foo</td>}}</tr></table>
12328 <table><tr><td>foo</td></tr></table>
12333 Templates: HTML Tables: 2a. Generating middle of a HTML table
12335 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12337 <table><tr><td>foo</td></tr></table>
12342 Templates: HTML Tables: 2b. Generating middle of a HTML table
12344 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12346 <table><tr><td>foo</td></tr></table>
12351 Templates: HTML Tables: 3. Generating end of a HTML table
12353 <table><tr>{{echo|<td>foo</td></tr></table>}}
12355 <table><tr><td>foo</td></tr></table>
12360 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12362 {{echo|<table>}}<tr><td>foo</td></tr></table>
12364 <table><tr><td>foo</td></tr></table>
12369 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12371 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12373 <table><tr><td>foo</td></tr></table>
12378 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12380 <table><tr>{{echo|<td>}}foo</td></tr></table>
12382 <table><tr><td>foo</td></tr></table>
12387 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12389 <table><tr><td>foo{{echo|</td>}}</tr></table>
12391 <table><tr><td>foo</td></tr></table>
12396 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12398 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12400 <table><tr><td>foo</td></tr></table>
12405 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12407 <table><tr><td>foo</td></tr>{{echo|</table>}}
12409 <table><tr><td>foo</td></tr></table>
12414 Templates: HTML Tables: 5. Proper fostering of categories from inside
12416 parsoid=wt2html,wt2wt
12418 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12419 <!--Two categories (T52330)-->
12420 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12422 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12423 <!--Two categories (T52330)-->
12424 <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>
12428 Templates: Wiki Tables: 1a. Fostering of entire template content
12436 <tr><td></td></tr></table>
12448 Templates: Wiki Tables: 1b. Fostering of entire template content
12461 <tr><td></td></tr></table>
12475 Templates: Wiki Tables: 2. Fostering of partial template content
12485 <tr><td></td></tr></table>
12498 Templates: Wiki Tables: 3. td-content via multiple templates
12501 {{echo|{{pipe}}a}}{{echo|b}}
12512 Templates: Wiki Tables: 4. Templated tags, no content
12518 <tr><td></td></tr></table>
12523 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12537 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12550 ## This test case is very specific to Parsoid's internals
12551 ## and is hence only tested for Parsoid's code. Parsoid uses
12552 ## a <meta> marker tag for <ref> tags and they are expanded
12553 ## much later. We are verifying that this <meta> tag usage
12554 ## doesn't prevent foster parenting.
12556 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12558 {{PartialTable}}<ref>foo</ref>
12563 <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"<ref>foo</ref>\n|}"]}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span><table about="#mwt2">
12567 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
12571 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12581 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n{{{!}}\n{{!}}-"}},"i":0}},"\n<onlyinclude>\n|foo\n</onlyinclude>\n{{!}}}"]}'>
12582 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12586 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12591 Templates: Lists: Multi-line list-items via templates
12593 *{{echo|a {{nonexistent|
12595 *{{echo|b {{nonexistent|
12598 <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>
12599 <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>
12604 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12606 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12608 <p><i>ab</i>c<i>d</i>e
12613 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12614 (PHP parser generates misnested html)
12616 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12618 <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>
12622 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12623 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12625 parsoid=wt2html,wt2wt
12627 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12629 <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>
12630 <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>
12631 <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>
12635 Templates: Ugly nesting: 4. Divs opened/closed across templates
12637 a<div>b{{echo|c</div>d}}e
12648 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12654 |{{echo|foo</table>}}
12658 <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|}"]}'>
12662 <td>foo</td></tr></tbody></table><span about="#mwt1">
12663 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12668 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12678 <td>1. {{echo|foo </table>}}</td>
12680 <td>2. {{echo|baz </table>}}</td>
12693 <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>"]}'>
12698 <td>1. foo </td></tr></tbody></table></td>
12700 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12701 </span><span about="#mwt2">
12702 </span><span about="#mwt2">
12703 </span><span about="#mwt2">abc</span><span about="#mwt2">
12704 </span><span about="#mwt2">
12705 </span><span about="#mwt2">
12706 </span><span about="#mwt2">
12707 </span><span about="#mwt2">
12708 </span><span about="#mwt2">
12709 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12710 </span><span about="#mwt2">
12715 Templates: Ugly templates: 3. newline-only template parameter
12724 # This looks like a bug: a single newline triggers p/br for some reason.
12726 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12735 # T66017 -- ugly wikitext with fostered content generates two template ranges that
12736 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12738 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12744 <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"}],[{"k":"1"}],[{"k":"1"}]]}'>foo
12745 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12749 # T66017 -- ugly wikitext with fostered content generates two template ranges
12750 # that are "identical" and generate nesting cycles in the algorithm
12752 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12754 {{echo|<table><tr><td><table>}}
12758 <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"}],[{"k":"1"}],[{"k":"1"}]]}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>
12759 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12760 </table></td></tr></tbody></table>
12764 Templates: Parameters substituted at the top-level
12766 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12770 <p><i>who</i> me? <b>never!</b>
12774 <p about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"''who'' {{echo|me}}? '''never!'''"}},"i":0}}]}'><i>who</i> me? <b>never!</b></p>
12776 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
12780 Parser Functions: 1. Simple example
12789 Parser Functions: 2. Nested use (only outermost should be marked up)
12798 ### Pre-save transform tests
12801 pre-save transform: subst:
12807 This is a test template
12811 pre-save transform: normal template
12821 pre-save transform: nonexistent template
12825 {{thistemplatedoesnotexist}}
12827 {{thistemplatedoesnotexist}}
12831 pre-save transform: subst magic variables
12840 # This is T2089, which I fixed. -- wtm
12842 pre-save transform: subst: templates with parameters
12846 {{subst:paramtest|param="something else"}}
12848 This is a test template with parameter "something else"
12852 Template:nowikitest
12854 <nowiki>'''not wiki'''</nowiki>
12858 pre-save transform: nowiki in subst (T3188)
12862 {{subst:nowikitest}}
12864 <nowiki>'''not wiki'''</nowiki>
12868 Template:commenttest
12870 This template has <!-- a comment --> in it.
12874 pre-save transform: comment in subst (T3936)
12878 {{subst:commenttest}}
12880 This template has <!-- a comment --> in it.
12884 pre-save transform: unclosed tag
12888 <nowiki>'''not wiki'''
12890 <nowiki>'''not wiki'''
12894 pre-save transform: mixed tag case
12898 <NOwiki>'''not wiki'''</noWIKI>
12900 <NOwiki>'''not wiki'''</noWIKI>
12904 pre-save transform: unclosed comment in <nowiki>
12908 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12910 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12913 # Leading @ in this template definition works around a limitation
12914 # in parsoid's parserTests which otherwise strips the <span> from the
12915 # result (confusing it for a template wrapper)
12919 @<span onmouseover="alert('crap')">Oh no</span>
12923 (confirming safety of fix for subst T3936)
12925 {{Template:dangerous}}
12927 <p>@<span>Oh no</span>
12932 pre-save transform: comment containing gallery (T7024)
12936 <!-- <gallery>data</gallery> -->
12938 <!-- <gallery>data</gallery> -->
12942 pre-save transform: comment containing extension
12946 <!-- <tag>data</tag> -->
12948 <!-- <tag>data</tag> -->
12952 pre-save transform: comment containing nowiki
12956 <!-- <nowiki>data</nowiki> -->
12958 <!-- <nowiki>data</nowiki> -->
12962 pre-save transform: <noinclude> in subst (T5298)
12972 pre-save transform: <onlyinclude> in subst (T5298)
12976 {{subst:Includes2}}
12984 {{<includeonly>subst:</includeonly>Includes}}
12988 Template:SafeSubstTest
12990 {{<includeonly>safesubst:</includeonly>Includes}}
12994 T24297: safesubst: works during PST
12998 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13004 T24297: safesubst: works during normal parse
13013 subst: does not work during normal parse
13017 <p>{{subst:Includes}}
13022 pre-save transform: context links ("pipe trick")
13026 [[Article (context)|]]
13029 [[Bar:Article (context)|]]
13030 [[:Bar:Article (context)|]]
13032 [[|Article (context)]]
13036 [[Article (context)|Article]]
13037 [[Bar:Article|Article]]
13038 [[:Bar:Article|Article]]
13039 [[Bar:Article (context)|Article]]
13040 [[:Bar:Article (context)|Article]]
13042 [[Article (context)]]
13043 [[Bar:X (Y) Z|X (Y) Z]]
13044 [[:Bar:X (Y) Z|X (Y) Z]]
13048 pre-save transform: context links ("pipe trick") with interwiki prefix
13052 [[interwiki:Article|]]
13053 [[:interwiki:Article|]]
13054 [[interwiki:Bar:Article|]]
13055 [[:interwiki:Bar:Article|]]
13057 [[interwiki:Article|Article]]
13058 [[:interwiki:Article|Article]]
13059 [[interwiki:Bar:Article|Bar:Article]]
13060 [[:interwiki:Bar:Article|Bar:Article]]
13064 pre-save transform: context links ("pipe trick") with parens in title
13066 pst title=[[Somearticle (context)]]
13070 [[Article (context)|Article]]
13074 pre-save transform: context links ("pipe trick") with comma in title
13076 pst title=[[Someplace, Somewhere]]
13079 [[Otherplace, Elsewhere|]]
13080 [[Otherplace, Elsewhere, Anywhere|]]
13082 [[Otherplace, Somewhere|Otherplace]]
13083 [[Otherplace, Elsewhere|Otherplace]]
13084 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13088 pre-save transform: context links ("pipe trick") with parens and comma
13090 pst title=[[Someplace (IGNORED), Somewhere]]
13093 [[Otherplace (place), Elsewhere|]]
13095 [[Otherplace, Somewhere|Otherplace]]
13096 [[Otherplace (place), Elsewhere|Otherplace]]
13100 pre-save transform: context links ("pipe trick") with comma and parens
13102 pst title=[[Who, me? (context)]]
13105 [[Me, Myself, and I (1937 song)|]]
13107 [[Yes, you. (context)|Yes, you.]]
13108 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13112 pre-save transform: context links ("pipe trick") with namespace
13114 pst title=[[Ns:Somearticle]]
13118 [[Ns:Article|Article]]
13122 pre-save transform: context links ("pipe trick") with namespace and parens
13124 pst title=[[Ns:Somearticle (context)]]
13128 [[Ns:Article (context)|Article]]
13132 pre-save transform: context links ("pipe trick") with namespace and comma
13134 pst title=[[Ns:Somearticle, Context, Whatever]]
13138 [[Ns:Article, Context, Whatever|Article]]
13142 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13144 pst title=[[Ns:Somearticle, Context (context)]]
13148 [[Ns:Article (context)|Article]]
13152 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13154 pst title=[[Ns:Somearticle (IGNORED), Context]]
13158 [[Ns:Article, Context|Article]]
13162 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13166 [[Article(context)|]]
13167 [[Bar:Article(context)|]]
13168 [[:Bar:Article(context)|]]
13169 [[|Article(context)]]
13173 [[Article(context)|Article]]
13174 [[Bar:Article(context)|Article]]
13175 [[:Bar:Article(context)|Article]]
13176 [[Article(context)]]
13177 [[Bar:X(Y)Z|X(Y)Z]]
13178 [[:Bar:X(Y)Z|X(Y)Z]]
13182 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13186 [[Article (context)|]]
13187 [[Bar:Article (context)|]]
13188 [[:Bar:Article (context)|]]
13189 [[|Article (context)]]
13193 [[Article (context)|Article]]
13194 [[Bar:Article (context)|Article]]
13195 [[:Bar:Article (context)|Article]]
13196 [[Article (context)]]
13197 [[Bar:X (Y) Z|X (Y) Z]]
13198 [[:Bar:X (Y) Z|X (Y) Z]]
13202 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13206 [[Article(context)|]]
13207 [[Bar:Article(context)|]]
13208 [[:Bar:Article(context)|]]
13209 [[|Article(context)]]
13213 [[Article(context)|Article]]
13214 [[Bar:Article(context)|Article]]
13215 [[:Bar:Article(context)|Article]]
13216 [[Article(context)]]
13217 [[Bar:X(Y)Z|X(Y)Z]]
13218 [[:Bar:X(Y)Z|X(Y)Z]]
13222 pre-save transform: context links ("pipe trick") with commas (T23660)
13226 [[Article (context), context|]]
13227 [[Article (context),context|]]
13228 [[Bar:Article (context), context|]]
13229 [[Bar:Article (context),context|]]
13230 [[:Bar:Article (context), context|]]
13231 [[:Bar:Article (context),context|]]
13233 [[Article (context), context|Article]]
13234 [[Article (context),context|Article]]
13235 [[Bar:Article (context), context|Article]]
13236 [[Bar:Article (context),context|Article]]
13237 [[:Bar:Article (context), context|Article]]
13238 [[:Bar:Article (context),context|Article]]
13242 Parsoid: backwards pipe trick
13249 <p>[[|<b>bar</b>]]</p>
13253 pre-save transform: trim trailing empty lines
13257 Empty lines are trimmed
13263 Empty lines are trimmed
13267 pre-save transform: Signature expansion
13272 * <noinclude>~~~</noinclude>
13273 * <includeonly>~~~</includeonly>
13274 * <onlyinclude>~~~</onlyinclude>
13276 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13277 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13278 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13279 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13284 pre-save transform: Signature expansion in nowiki tags (T2093)
13290 <nowiki>~~~~</nowiki>
13292 <includeonly><nowiki>~~~~</nowiki></includeonly>
13294 <noinclude><nowiki>~~~~</nowiki></noinclude>
13296 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13298 {{subst:Foo}} shall be converted to FOO
13300 As well as inside noinclude/onlyinclude
13301 <noinclude>{{subst:Foo}}</noinclude>
13302 <onlyinclude>{{subst:Foo}}</onlyinclude>
13304 But not inside includeonly
13305 <includeonly>{{subst:Foo}}</includeonly>
13309 <nowiki>~~~~</nowiki>
13311 <includeonly><nowiki>~~~~</nowiki></includeonly>
13313 <noinclude><nowiki>~~~~</nowiki></noinclude>
13315 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13317 FOO shall be converted to FOO
13319 As well as inside noinclude/onlyinclude
13320 <noinclude>FOO</noinclude>
13321 <onlyinclude>FOO</onlyinclude>
13323 But not inside includeonly
13324 <includeonly>{{subst:Foo}}</includeonly>
13328 Parsoid: Recognize nowiki with trailing space in tags
13332 <nowiki ><div>[[foo]]</nowiki >
13340 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13347 Parsoid: Recognize nowiki with odd capitalization
13351 <noWikI ><div>[[foo]]</Nowiki >
13353 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13358 Parsoid: Escape nowiki with trailing space in tags
13362 <p><nowiki > foo </nowiki ></p>
13363 <p>a<nowiki />b</p>
13364 <p>c<nowiki/ >d</p>
13366 <nowiki > foo </nowiki >
13374 Parsoid: Escape weird noWikI capitalizations
13378 <p><noWikI > foo </NoWikI ></p>
13380 <noWikI > foo </NoWikI >
13384 ### Message transform tests
13387 message transform: magic variables
13397 message transform: should not transform wiki markup
13407 message transform: <noinclude> in transcluded template (T6926)
13417 message transform: <onlyinclude> in transcluded template (T6926)
13427 {{#special:}} page name, known
13431 {{#special:Recentchanges}}
13433 Special:RecentChanges
13437 {{#special:}} page name with subpage, known
13441 {{#special:Recentchanges/param}}
13443 Special:RecentChanges/param
13447 {{#special:}} page name, unknown
13451 {{#special:foobar nonexistent}}
13453 Special:Foobar nonexistent
13457 {{#speciale:}} page name, known
13461 {{#speciale:Recentchanges}}
13463 Special:RecentChanges
13467 {{#speciale:}} page name with subpage, known
13471 {{#speciale:Recentchanges/param}}
13473 Special:RecentChanges/param
13477 {{#speciale:}} page name, unknown
13481 {{#speciale:foobar nonexistent}}
13483 Special:Foobar_nonexistent
13489 ### For Parsoid-specific tests, see
13490 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13495 parsoid=wt2html,wt2wt,html2html
13497 [[Image:foobar.jpg]]
13499 <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>
13502 <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>
13506 Simple image (using File: namespace, now canonical)
13508 [[File:Foobar.jpg]]
13510 <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>
13513 <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>
13517 Right-aligned image
13519 [[File:Foobar.jpg|right]]
13521 <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>
13524 <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>
13530 [[File:Foobar.jpg|right|Caption text]]
13532 <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>
13535 <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>
13539 Image with caption, T55312 #1
13541 [[File:Foobar.jpg|right|Caption page stuff]]
13543 <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>
13546 <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>
13550 Image with caption, T55312 #2
13552 [[File:Foobar.jpg|right|Caption page=]]
13554 <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>
13557 <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>
13561 Image with caption, T55312 #3
13563 [[File:Foobar.jpg|right|Caption page=stuff]]
13565 <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>
13568 <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>
13572 Allow empty links in image captions (T62753)
13576 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13581 <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>
13584 <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>
13586 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13587 </figcaption></figure>
13591 Titles in unlinked images (T23454)
13593 [[File:Foobar.jpg|link=|stuff]]
13595 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13600 Link with empty target
13609 Image with link trail
13611 Linktrails should not work for images: [[File:Foobar.jpg]]s
13613 <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
13616 <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>
13620 Image with empty attribute
13622 parsoid=wt2html,wt2wt,html2html
13624 [[File:Foobar.jpg|right||Caption text]]
13626 <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>
13629 <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>
13633 1. Block image with individual attributes from templates
13635 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13637 <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>
13640 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,38,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</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/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
13644 2. Block Image with individual attributes from templates
13646 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13648 <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>
13651 <figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"{{echo|thumb}}"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,32,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"thumb\"}},\"i\":0}}]}'>thumb</span>"}],["width",{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[33,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}'>137px</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/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
13655 3. Inline image with individual attributes from templates
13657 [[File:Foobar.jpg|{{echo|50px}}]]
13659 <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>
13662 <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='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"50px\"}},\"i\":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" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
13665 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13666 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13668 Image with multiple attributes from the same template
13670 [[File:Foobar.jpg|{{image_attribs}}]]
13672 <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>
13675 <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>
13679 Image with link tails
13683 123[[File:Foobar.jpg]]456
13684 123[[File:Foobar.jpg|right]]456
13685 123[[File:Foobar.jpg|thumb]]456
13687 <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
13689 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
13690 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
13693 <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>
13695 <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>
13697 <div class="thumb tright">
13698 <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>
13699 <div class="thumbcaption">
13700 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13706 <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>
13707 <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>
13708 <p>123</p><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure><p>456</p>
13712 Image with multiple captions -- only last one is accepted
13714 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13716 <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>
13719 <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>
13723 Image with multiple widths -- use last
13725 [[File:Foobar.jpg|200px|300px|caption]]
13727 <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>
13730 <p><span typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></span></p>
13734 Image with multiple alignments -- use first (T50664)
13738 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13740 [[File:Foobar.jpg|middle|text-top|caption]]
13742 <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>
13743 <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>
13746 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
13747 <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>
13751 Image with width attribute at different positions
13753 [[File:Foobar.jpg|200px|right|Caption]]
13754 [[File:Foobar.jpg|right|200px|Caption]]
13755 [[File:Foobar.jpg|right|Caption|200px]]
13757 <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>
13758 <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>
13759 <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>
13762 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
13763 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
13764 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
13767 # a sad bit of backward-compatibility
13769 Image with size specified with pxpx (T15500, T53628)
13771 parsoid=wt2html,wt2wt,html2html
13773 [[File:Foobar.jpg|20pxpx]]
13774 [[File:Foobar.jpg|200x20pxpx]]
13776 <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>
13777 <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>
13780 <p><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></span> <span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="20" width="177"/></a></span></p>
13784 Image with link parameter, wiki target
13786 [[File:Foobar.jpg|link=Main Page]]
13788 <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>
13791 <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>
13794 # parsoid T51293 (part 1)
13796 Image with link parameter, URL target
13798 [[File:Foobar.jpg|link=http://example.com/]]
13800 <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>
13803 <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>
13806 # parsoid T51293 (part 2)
13808 Image with link parameter, protocol-less URL target
13810 [[File:Foobar.jpg|link=//example.com/]]
13812 <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>
13815 <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>
13819 Escaping non-block captions (T107435)
13822 "modes": ["wt2wt"],
13824 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13828 [[Image:Foobar.jpg|caption]]
13830 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13833 # wgExternalLinkTarget not supported by Parsoid
13835 Image with link parameter, wgExternalLinkTarget
13837 [[Image:foobar.jpg|link=http://example.com/]]
13839 wgExternalLinkTarget='foobar'
13841 <p><a href="http://example.com/" target="foobar" rel="nofollow noreferrer noopener"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13846 Image with link parameter, wgNoFollowLinks set to false
13848 [[Image:foobar.jpg|link=http://example.com/]]
13850 wgNoFollowLinks=false
13852 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13857 Image with link parameter, wgNoFollowDomainExceptions
13859 [[Image:foobar.jpg|link=http://example.com/]]
13861 wgNoFollowDomainExceptions='example.com'
13863 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13867 # wgExternalLinkTarget not supported by Parsoid
13869 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13871 [[Image:foobar.jpg|link=http://example.com/|Title]]
13873 wgExternalLinkTarget='foobar'
13875 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow noreferrer noopener"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13880 Image with empty link parameter
13882 [[File:Foobar.jpg|link=]]
13884 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13887 <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>
13891 Image with link parameter (wiki target) and unnamed parameter
13893 [[File:Foobar.jpg|link=Main_Page|Title]]
13895 <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>
13898 <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>
13902 Image with link parameter (URL target) and unnamed parameter
13904 [[File:Foobar.jpg|link=http://example.com/|Title]]
13906 <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>
13909 <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>
13913 Thumbnail image with link parameter
13916 parsoid=wt2html,wt2wt,html2html
13918 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13920 <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>
13923 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Title</figcaption></figure>
13927 Manually-specified thumbnail image
13931 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
13933 <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>
13936 <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>
13940 Manually-specified thumbnail image with explicit link to wiki page
13943 parsoid=wt2html,wt2wt,html2html
13945 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13947 <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>
13950 <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>
13954 Manually-specified thumbnail image with explicit link to url
13957 parsoid=wt2html,wt2wt,html2html
13959 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13961 <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>
13964 <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>
13968 Manually-specified thumbnail image with explicit no link
13971 parsoid=wt2html,wt2wt,html2html
13973 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13975 <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>
13978 <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>
13982 Manually-specified thumbnail image with explicit link and alt text
13985 parsoid=wt2html,wt2wt,html2html
13987 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13989 <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>
13992 <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>
13996 Image with frame and link
13998 parsoid=wt2html,wt2wt,html2html
14000 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14002 <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>
14005 <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>
14009 Image with frame and link and explicit alt
14011 parsoid=wt2html,wt2wt,html2html
14013 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14015 <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>
14018 <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>
14022 Image with wiki markup in implicit alt
14024 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14026 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14028 <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>
14029 </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>
14032 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"testing '''bold''' in alt"}]}' data-mw='{"caption":"testing <b data-parsoid='{\"dsr\":[27,37,3,3]}'>bold</b> in alt"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></span></p>
14034 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=testing '''bold''' in alt"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"testing bold in alt","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=testing '''bold''' in alt","resource":"Image:Foobar.jpg"}}'/></a></span></p>
14038 Alt image option should handle most kinds of wikitext without barfing
14040 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14042 <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>
14045 <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='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[65,73,2,2]}'>link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[80,106,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&#39;&#39;bold template&#39;&#39;\"}},\"i\":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>
14048 ###################
14049 # Conflicting image format options.
14050 # First option specified should 'win'.
14051 # All three cases in each test should be identical.
14054 Image with 'frameless' first.
14056 parsoid=wt2html,wt2wt,html2html
14058 [[File:Foobar.jpg|frameless|caption]]
14060 [[File:Foobar.jpg|frameless|frame|caption]]
14062 [[File:Foobar.jpg|frameless|thumb|caption]]
14064 <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>
14065 </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>
14066 </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>
14069 <p><span class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
14070 <p><span class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
14071 <p><span class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
14075 Image with 'frame' first.
14077 parsoid=wt2html,wt2wt,html2html
14079 [[File:Foobar.jpg|frame|caption]]
14080 [[File:Foobar.jpg|frame|frameless|caption]]
14081 [[File:Foobar.jpg|frame|thumb|caption]]
14083 <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>
14084 <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>
14085 <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>
14088 <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>
14089 <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>
14090 <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>
14094 Image with 'thumb' first.
14096 parsoid=wt2html,wt2wt,html2html
14098 [[File:Foobar.jpg|thumb|caption]]
14099 [[File:Foobar.jpg|thumb|frameless|caption]]
14100 [[File:Foobar.jpg|thumb|frame|caption]]
14102 <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>
14103 <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>
14104 <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>
14107 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14108 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14109 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14112 ###################
14114 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14115 # and https://phabricator.wikimedia.org/T64258
14116 # Foobar has actual size of 1941x220
14117 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14118 # a scalable format.
14119 # 2. Framed images always ignore size options; always render at default size.
14120 # 3. "Unspecified format" and border are the only types which can be
14124 Image: "unspecified format" and border enlarge
14126 parsoid=wt2html,wt2wt,html2html
14128 [[File:Foobar.jpg|2000px]]
14130 [[File:Foobar.jpg|border|2000px]]
14132 <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>
14133 </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>
14136 <p><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></span></p>
14137 <p><span class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></span></p>
14141 Image: "unspecified format" and border reduce
14143 parsoid=wt2html,wt2wt,html2html
14145 [[File:Foobar.jpg|1000px]]
14147 [[File:Foobar.jpg|border|1000px]]
14149 <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>
14150 </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>
14153 <p><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></span></p>
14154 <p><span class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></span></p>
14158 Image: thumbs reduce
14160 parsoid=wt2html,wt2wt,html2html
14162 [[File:Foobar.jpg|thumb|50px]]
14164 <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>
14167 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure>
14171 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14173 parsoid=wt2html,wt2wt,html2html
14175 [[File:Foobar.jpg|thumb|2000px]]
14177 [[File:Foobar.svg|thumb|2000px]]
14179 <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>
14180 <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>
14183 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
14184 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure>
14188 Image: frameless can reduce in size
14190 parsoid=wt2html,wt2wt,html2html
14192 [[File:Foobar.jpg|frameless|50px]]
14194 <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>
14197 <p><span typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
14201 Image: bitmap frameless can't be enlarged past original size, but vector can
14203 parsoid=wt2html,wt2wt,html2html
14205 [[File:Foobar.jpg|frameless|2000px]]
14207 [[File:Foobar.svg|frameless|2000px]]
14209 <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>
14210 </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>
14213 <p><span typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1941px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
14214 <p><span typeof="mw:Image/Frameless"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/240px-Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></span></p>
14218 Image: framed images are always unscaled.
14220 parsoid=wt2html,wt2wt,html2html
14222 [[File:Foobar.jpg|frame]]
14224 [[File:Foobar.jpg|frame|50px]]
14226 [[File:Foobar.jpg|frame|50x50px]]
14228 [[File:Foobar.jpg|frame|2000px]]
14230 <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>
14231 <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>
14232 <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>
14233 <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>
14236 <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>
14237 <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>
14238 <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>
14239 <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>
14242 ###################
14245 Link to image page- image page normally doesn't exists, hence edit link
14246 Add test with existing image page
14247 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14251 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14256 T20784 Link to non-existent image page with caption should use caption as link text
14258 [[:Image:test|caption]]
14260 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14265 Frameless image caption with a free URL
14267 [[File:Foobar.jpg|http://example.com]]
14269 <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>
14272 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"http://example.com"}]}' data-mw='{"caption":"<a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid='{\"stx\":\"url\",\"dsr\":[18,36,0,0]}'>http://example.com</a>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14276 Thumbnail image caption with a free URL
14280 [[File:Foobar.jpg|thumb|http://example.com]]
14282 <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>
14285 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
14289 Thumbnail image caption with a free URL and explicit alt
14292 parsoid=wt2html,wt2wt,html2html
14294 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14296 <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>
14299 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img alt="Alteration" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
14303 SVG thumbnails with no language set
14306 [[File:Foobar.svg|thumb|caption]]
14308 <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>
14311 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
14315 SVG thumbnails with language de
14317 parsoid=wt2html,wt2wt,html2html
14319 [[File:Foobar.svg|thumb|caption|lang=de]]
14321 <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>
14324 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
14328 SVG thumbnails with invalid language code
14330 parsoid=wt2html,wt2wt,html2html
14332 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
14334 <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>
14337 <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>
14341 T3887: A ISBN with a thumbnail
14343 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
14345 <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>
14348 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/1235467890" rel="mw:WikiLink">ISBN 1235467890</a></figcaption></figure>
14352 T3887: A RFC with a thumbnail
14354 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14356 <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>
14359 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is <a href="//tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
14363 T3887: A mailto link with a thumbnail
14365 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14367 <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>
14370 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Please <a rel="mw:ExtLink" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
14373 # Pending resolution to T2368
14375 T2648: Frameless image caption with a link
14377 [[File:Foobar.jpg|text with a [[link]] in it]]
14379 <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>
14382 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,38,2,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14386 T2648: Frameless image caption with a link (suffix)
14388 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14390 <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>
14393 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]]foo in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,41,2,5],\"tail\":\"foo\"}'>linkfoo</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14397 T2648: Frameless image caption with an interwiki link
14399 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14401 <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>
14404 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,47,2,2]}'>MeatBall:Link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14408 T2648: Frameless image caption with a piped interwiki link
14410 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14412 <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>
14415 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link|link]] in it"}]}' data-mw='{"caption":"text with a <a rel=\"mw:ExtLink\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,52,16,2]}'>link</a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14419 T107474: Frameless image caption with <nowiki>
14421 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14423 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>"}]}' data-mw='{"caption":"<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[18,75,8,9]}'>text with a [[MeatBall:Link|link]] in it</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14427 Escape HTML special chars in image alt text
14429 [[File:Foobar.jpg|& < > "]]
14431 <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>
14434 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"& < > \""}]}' data-mw='{"caption":"&amp; &lt; > \""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14438 Escape HTML special chars in image alt text with LanguageConverter
14442 [[File:Foobar.jpg|& < > "]]
14444 <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>
14447 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"& < > \""}]}' data-mw='{"caption":"&amp; &lt; > \""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14451 Entities in file name and attributes
14453 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14455 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14458 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"manualthumb=7%25 solution.gif"},{"ck":"link","ak":"link=7%25 solution"},{"ck":"caption","ak":"[[7%25 solution]]"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./7%25_solution\" title=\"7% solution\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./7%25_solution\"},\"sa\":{\"href\":\"7%25 solution\"},\"dsr\":[74,91,2,2]}'>7% solution</a>"}'><a href="./7%25_solution" data-parsoid='{"a":{"href":"./7%25_solution"},"sa":{"href":"link=7%25 solution"}}'><img resource="./File:7%25_solution.gif" src="./Special:FilePath/7%25_solution.gif" height="220" width="220" data-parsoid='{"a":{"resource":"./File:7%25_solution.gif","height":"220","width":"220"},"sa":{"resource":"File:7%25 solution.gif"}}'/></a></span></p>
14462 T2499: Alt text should have Ӓ, not &1234;
14464 [[File:Foobar.jpg|♀]]
14466 <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>
14469 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&#9792;"}]}' data-mw='{"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#9792;\",\"srcContent\":\"♀\",\"dsr\":[18,25,null,null]}'>♀</span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14473 Broken image caption with link
14475 parsoid=wt2html,wt2wt,html2html
14477 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14479 <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.
14482 <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>
14486 Image caption containing another image
14488 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14490 <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>
14493 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is a caption with another <span class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"image"}'><a href="./File:Thumb.png"><img resource="./File:Thumb.png" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a></span> inside it!</figcaption></figure>
14497 Image: caption containing a newline
14499 [[File:Foobar.jpg|This
14502 <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>
14505 <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>
14509 Image: caption containing leading space
14510 (The leading space should not trigger nowiki escaping in wt2wt mode)
14512 [[File:Foobar.jpg|thumb| bar]]
14514 <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>
14517 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> bar</figcaption></figure>
14521 Image: caption containing a table
14523 parsoid=wt2html,wt2wt,html2html
14525 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14531 and some more text.]]
14533 <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>
14536 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This is an example image thumbnail caption with a table
14539 <tr><th>Foo </th><th>Bar</th></tr>
14542 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14546 T5090: External links other than http: in image captions
14548 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14550 <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>
14553 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has <a rel="mw:ExtLink" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
14559 parsoid=wt2html,wt2wt,html2html
14561 [[Image:foobar.jpg|a|class=b]]
14563 <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>
14566 <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>
14570 Localized image handling (1).
14572 parsoid=wt2html,wt2wt,html2html
14575 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14577 <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>
14580 <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>
14584 Localized image handling (2).
14587 parsoid=wt2html,wt2wt,html2html
14590 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14592 <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>
14595 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./Foo"><img resource="./Archivo:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14599 Localized image handling (3).
14604 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure>
14606 [[File:Foobar.jpg|بندانگشتی]]
14610 "border", "frameless" and "class" attributes on an image.
14613 parsoid=wt2html,wt2wt,html2html
14615 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14617 <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>
14620 <p><span class="mw-default-size mw-image-border extra" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></span></p>
14623 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14625 Invalid image attributes (T64500)
14628 parsoid=wt2html,wt2wt,html2html
14630 [[File:Foobar.jpg|thumb|float|left|caption]]
14632 [[File:Foobar.jpg|thumb|righ|caption]]
14634 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14636 <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>
14637 <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>
14638 <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>
14641 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14642 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14643 <figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14649 #REDIRECT [[File:Barfoo.jpg]]
14652 # FIXME: Parsoid should run this test -- but we'd need to teach the
14653 # mockAPI about the redirected Barfoo.jpg image.
14657 [[Image:Barfoo.jpg]]
14659 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14664 Missing image with uploads disabled
14668 [[File:Foobaz.jpg]]
14670 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14673 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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>
14676 # Parsoid-specific testing for images
14677 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14678 # Currently imperfect due to a flaw in the Parsoid testrunner
14680 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14684 Parsoid-specific image handling - simple image with size and middle alignment
14686 [[File:Foobar.jpg|middle|50px]]
14688 <p><span class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
14692 Parsoid-specific image handling - simple image with size, middle alignment,
14693 non-standard namespace alias
14695 parsoid=wt2wt,wt2html,html2html
14697 [[Image:Foobar.jpg|middle|50px]]
14699 <p><span class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
14703 Parsoid-specific image handling - simple image with size and middle alignment
14706 [[File:Foobar.jpg|50px|middle]]
14708 <p><span class="mw-valign-middle" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"50px"},{"ck":"middle","ak":"middle"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14712 Parsoid-specific image handling - simple image with size and middle alignment
14713 and non-standard namespace name
14715 parsoid=wt2html,wt2wt,html2html
14717 [[Image:Foobar.jpg|50px|middle]]
14719 <p><span class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></span></p>
14723 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14725 [[File:Foobar.jpg|500x10px|baseline|caption]]
14727 <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>
14731 Parsoid-specific image handling - simple image with border and size spec
14733 [[File:Foobar.jpg|50px|border|caption]]
14735 <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>
14739 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14741 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14743 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption content</figcaption></figure>
14747 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14750 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14752 <figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"left","ak":"left"},{"ck":"baseline","ak":"baseline"},{"ck":"caption","ak":"caption content"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>caption content</figcaption></figure>
14756 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14758 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14760 <figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a><figcaption>caption</figcaption></figure>
14764 Parsoid-specific image handling - thumbnail with specific size, halign,
14765 valign, and caption (existing content)
14767 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14769 <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>
14773 Parsoid-specific image handling - framed image with specific size and caption
14776 parsoid=wt2html,wt2wt,html2html
14778 [[File:Foobar.jpg|frame|500x50px|caption]]
14780 <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>
14784 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14787 parsoid=wt2html,wt2wt,html2html
14789 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14791 <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>
14795 Parsoid-specific image handling - frameless image with specific size, border, and caption
14797 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14799 <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>
14803 Parsoid-specific image handling - simple image with a formatted caption
14805 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14807 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>"}]}' data-mw='{"caption":"<table data-parsoid='{\"stx\":\"html\",\"dsr\":[18,81,7,8]}'><tbody data-parsoid='{\"dsr\":[25,73,0,0]}'><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[25,54,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[29,39,4,5]}'>a</td><td data-parsoid='{\"stx\":\"html\",\"dsr\":[39,49,4,5]}'>b</td></tr><tr data-parsoid='{\"stx\":\"html\",\"dsr\":[54,73,4,5]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[58,68,4,5]}'>c</td></tr></tbody></table>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14811 Parsoid-specific image handling - caption with a template in it
14813 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14815 <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>
14819 Parsoid-specific image handling - caption with unbalanced tags in it
14821 parsoid=wt2html,wt2wt,html2html
14824 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14828 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has a <center>unbalanced tag in it.</center></figcaption></figure>
14833 Parsoid-specific image handling - empty caption (1)
14835 parsoid=wt2html,wt2wt
14837 [[File:Foobar.jpg|thumb|]]
14839 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption></figcaption></figure>
14842 # empty captions don't get serialized unless we're in the "round trip" case
14844 Parsoid-specific image handling - empty caption (2)
14848 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14849 <a href="./File:Foobar.jpg">
14850 <img resource="./File:Foobar.jpg"
14851 src="//example.com/images/3/3a/Foobar.jpg"
14852 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14853 height="25" width="220"/>
14855 <figcaption></figcaption>
14858 [[File:Foobar.jpg|thumb]]
14862 Parsoid-specific image handling - whitespace caption
14864 [[File:Foobar.jpg|thumb| ]]
14866 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> </figcaption></figure>
14870 Parsoid-specific image handling - lang option
14873 [[File:Foobar.svg|lang=de|caption]]
14877 <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>
14881 ## Edge case bugs in Parsoid from T93580
14883 T93580: 1. Templated <ref> inside block images
14885 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14889 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|<ref>foo</ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <span about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<ref>foo</ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></figcaption></figure>
14891 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14895 T93580: 2. <ref> inside inline images
14897 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14901 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,78,5,6]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14903 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14907 T93580: 3. Templated <ref> inside inline images
14909 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14913 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Transclusion mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
14915 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
14922 Subpage test/subpage
14930 subpage title=[[Subpage test]]
14934 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14939 Subpage noslash link
14941 subpage title=[[Subpage test]]
14945 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14950 Subpage test/1/2/subpage
14956 Relative subpage noslash link
14958 parsoid=wt2wt,wt2html,html2html
14959 subpage title=[[Subpage test/1/2/3/4]]
14965 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14966 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14969 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14970 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14974 Parsoid: dot-slash prefixed wikilinks
14984 </p><p>[[././baz/]]
14989 </p><p>[[././baz/]]
14994 Render invalid page names as plain text (T53090)
15006 [[foo[http://example.com]xyz]]
15008 [[{{echo|./../foo}}|bar]]
15009 [[{{echo|foo/.}}|bar]]
15010 [[{{echo|foo/..}}|bar]]
15011 [[{{echo|foo~~~~bar}}]]
15012 [[{{echo|foo>bar}}]]
15013 [[{{echo|foo././bar}}]]
15014 [[{{echo|foo{bar}}]]
15015 [[{{echo|foo}bar}}]]
15016 [[{{echo|foo[bar}}]]
15017 [[{{echo|foo]bar}}]]
15018 [[{{echo|foo<bar}}]]
15020 <p>[[./../foo|bar]]
15030 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15031 </p><p>[[./../foo|bar]]
15044 <p>[[./../foo|bar]]
15054 [[foo<a rel="mw:ExtLink" href="http://example.com"></a>xyz]]</p>
15056 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15057 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15058 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15059 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15060 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15061 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15062 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15063 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15064 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15065 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15066 [[<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>
15074 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15079 T2561: {{/Subpage}}
15081 subpage title=[[Page]]
15085 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15093 Category:MediaWiki User's Guide
15101 [[:Category:MediaWiki User's Guide]]
15103 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15112 [[Category:MediaWiki User's Guide]]
15114 cat=MediaWiki_User's_Guide sort=
15116 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide" data-parsoid='{"stx":"simple","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
15120 PAGESINCATEGORY invalid title fatal (r33546 fix)
15122 {{PAGESINCATEGORY:<bogus>}}
15129 Category with different sort key
15133 [[Category:MediaWiki User's Guide|Foo]]
15135 cat=MediaWiki_User's_Guide sort=Foo
15137 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#Foo" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
15141 Category with identical sort key
15145 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15147 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15149 <link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#MediaWiki%20User's%20Guide" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User's_Guide"},"sa":{"href":"Category:MediaWiki User's Guide"}}'/>
15153 Category with empty sort key
15158 [[Category:MediaWiki User's Guide|]]
15160 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15164 Category with empty sort key and parentheses
15169 [[Category:Foo (bar)|]]
15171 [[Category:Foo (bar)|Foo]]
15175 Category with link tail
15180 123[[Category:Foo]]456
15182 123[[Category:Foo]]456
15186 Category with template
15191 [[Category:{{echo|Foo}}]]
15193 [[Category:{{echo|Foo}}]]
15197 Category with template in sort key
15202 [[Category:Foo|{{echo|Bar}}]]
15204 [[Category:Foo|{{echo|Bar}}]]
15208 Category with template in sort key and title
15213 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15215 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15218 ## We used to, but no longer wt2wt this test since the default serializer
15219 ## will normalize all categories to serialize on their own line.
15220 ## This wikitext usage is going to be fairly uncommon in production and
15221 ## selser will take care of preserving formatting in those scenarios.
15223 Category / paragraph interactions
15227 Foo [[Category:Baz]] Bar
15229 Foo [[Category:Baz]]
15237 [[Category:Baz]] Bar
15250 {{echo|[[Category:Baz]]}}
15263 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15264 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15265 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15266 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15267 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Baz]]"}},"i":0}}]}'/></p>
15268 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15271 ## We used to, but no longer wt2wt this test since the default serializer
15272 ## will normalize all categories to serialize on their own line.
15273 ## This wikitext usage is going to be fairly uncommon in production and
15274 ## selser will take care of preserving formatting in those scenarios.
15276 ## The whitespace on the empty line is part of the test. Please do not delete
15278 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15284 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15286 {{echo|[[Category:Foo]] and so should this!}}
15288 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15293 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15295 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]] and so should this!"}},"i":0}}]}'/><span about="#mwt1"> and so should this!</span></p>
15298 ## Parsoid will not try to wt2wt this while preserving newlines because
15299 ## it suppresses excess newlines within list items -- and we don't want to
15300 ## introduce a special case just for categories, which is, in reality somewhat
15301 ## odd behavior -- categories are unlikely to be used in list items like this
15302 ## in top-level pages and are only likely to show up in template-generated
15303 ## list items where this RT-ing is a non-issue.
15305 ## The whitespace on the empty line is part of the test. Please do not delete
15307 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15313 [[Category:Foo]] and this should be part of the same list item
15316 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15318 <ul><li>This and this should be part of the same list item</li>
15319 <li>So should this and this should be part of the same list item</li></ul>
15322 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15323 <li>So should this <link rel="mw:PageProp/Category" href="./Category:Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]] and this should be part of the same list item"}},"i":0}}]}'/><span> and this should be part of the same list item</span></li>
15327 ## Newlines and categories that follow the last item of a list
15328 ## are treated differently because this (list followed by categories)
15329 ## is an extremely common pattern on wikis.
15331 3. Categories and newlines: newline suppression for last list item should RT properly
15344 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15346 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15347 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15351 4. Categories and newlines: newline suppression for last list item should RT properly
15359 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15361 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15364 ## only wt2html for this to make sure the algo only applies to the rightmost path
15366 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15379 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15381 <ul><li> d</li></ul></li></ul>
15382 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15385 ## We used to, but no longer wt2wt this test since the default serializer
15386 ## will normalize all categories to serialize on their own line.
15387 ## This wikitext usage is going to be fairly uncommon in production and
15388 ## selser will take care of preserving formatting in those scenarios.
15390 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15394 * a [[Category:Foo]]
15396 <ul><li>a <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul>
15399 # This test also demonstrates because of newline+category tunneling
15400 # through the list hander, template wrapping doesn't expand to the
15401 # containing list when the list item swallows the category.
15403 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15408 <ul><li> <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n[[Category:Foo]]"}},"i":0}}]}'>a
15409 </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul>
15413 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15417 {{echo|[[Category:Foo]]
15421 <ul><li> a</li></ul>
15423 <link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]\n[[Category:Bar]]"}},"i":0}}]}'/><span about="#mwt1">
15424 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15425 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15429 Category links with multiple namespaces
15431 [[Category:Project:Foo]]
15433 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15437 Parsoid: Serialize link to category page with colon escape
15443 [[:Category:Foo|Bar]]
15446 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15447 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15451 # We used to, but no longer wt2wt this test since the default serializer
15452 # will normalize all categories to serialize on their own line.
15453 # This wikitext usage is going to be fairly uncommon in production and
15454 # selser will take care of preventing whitespace insertion if this
15455 # occurs in an article.
15457 # html2html disabled for the same reason (whitespace insertion between
15460 # html2wt disabled because it localizes the "Category" namespace.
15462 Link prefix/suffixes aren't applied to category links
15472 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15476 Parsoid: Serialize link to file page with colon escape
15482 [[:File:Foo.png|Bar]]
15485 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15486 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15491 Parsoid: Serialize a genuine category link without colon escape
15496 [[Category:Foo|Bar]]
15498 <link rel="mw:PageProp/Category" href="./Category:Foo">
15499 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15503 Normalize hrefs properly before testing for invalid link targets (T72894)
15507 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15509 [[Category:Toxine bactérienne]]
15513 Parsoid: Defaultsort
15515 {{DEFAULTSORT:Foo}}
15517 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15520 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
15521 # But, this is a limitation of our representation and is documented in
15522 # TemplateHandler.js in processSpecialMagicWord
15524 Parsoid: Defaultsort (template-generated)
15526 {{{{echo|DEFAULTSORT}}:Foo}}
15528 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{{{echo|DEFAULTSORT}}:Foo}}","dsr":[0,26,null,null]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,22,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DEFAULTSORT\"}},\"i\":0}}]}'>DEFAULTSORT</span>:Foo"}]]}'/>
15532 ### Inter-language links
15535 Interlanguage links
15543 es:Alimento fr:Nourriture zh:食品
15545 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15546 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15547 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15551 Duplicate interlanguage links (T26502)
15562 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15563 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15564 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15565 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15572 Basic section headings
15579 ===Smaller headline===
15582 <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>
15585 <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>
15588 <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>
15594 Section headings with TOC
15597 === Subheadline 1 ===
15598 ===== Skipping a level =====
15599 ====== Skipping a level ======
15603 ===Another headline===
15605 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15607 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15609 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15611 <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>
15613 <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>
15620 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15622 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15628 <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>
15629 <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>
15630 <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>
15631 <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>
15632 <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>
15635 <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>
15640 TOC anchors don't collide
15648 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15650 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15651 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15652 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15653 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15657 <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>
15658 <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>
15659 <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>
15660 <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>
15664 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15666 Handling of sections up to level 6 and beyond
15669 == Level 2 Heading==
15670 === Level 3 Heading===
15671 ==== Level 4 Heading====
15672 ===== Level 5 Heading=====
15673 ====== Level 6 Heading======
15674 ======= Level 7 Heading=======
15675 ======== Level 8 Heading========
15676 ========= Level 9 Heading=========
15677 ========== Level 10 Heading==========
15679 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15681 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15683 <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>
15685 <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>
15687 <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>
15689 <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>
15691 <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>
15692 <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>
15693 <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>
15694 <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>
15695 <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>
15709 <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>
15710 <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>
15711 <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>
15712 <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>
15713 <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>
15714 <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>
15715 <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>
15716 <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>
15717 <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>
15718 <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>
15723 TOC regression (T11764)
15727 ==== title 1.1.1 ====
15732 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15734 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15736 <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>
15738 <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>
15741 <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>
15744 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15746 <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>
15752 <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>
15753 <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>
15754 <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>
15755 <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>
15756 <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>
15757 <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>
15762 TOC for heading containing <span id="..."></span> (T96153)
15765 ==<span id="old-anchor"></span>New title==
15767 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15769 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15773 <h2><span class="mw-headline" id="New_title"><span id="old-anchor"></span>New title</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: New title">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
15778 TOC with wgMaxTocLevel=3 (T8204)
15784 ==== title 1.1.1 ====
15789 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15791 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15793 <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>
15794 <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>
15797 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15799 <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>
15805 <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>
15806 <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>
15807 <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>
15808 <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>
15809 <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>
15810 <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>
15815 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
15821 ====Section 1.1.1====
15822 ====Section 1.1.1.1====
15825 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15827 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15829 <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>
15832 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15836 <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>
15837 <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>
15838 <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>
15839 <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>
15840 <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>
15846 Resolving duplicate section names
15851 <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>
15852 <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>
15857 Resolving duplicate section names with differing case (T12721)
15862 <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>
15863 <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>
15875 Template with sections, __NOTOC__
15882 <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>
15883 <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>
15884 <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>
15885 <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>
15890 __NOEDITSECTION__ keyword
15896 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15897 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15902 Link inside a section heading
15904 ==Section with a [[Main Page|link]] in it==
15906 <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>
15911 TOC regression (T14077)
15918 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15920 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15922 <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>
15925 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15929 <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>
15930 <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>
15931 <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>
15936 T3219 URL next to image (good)
15938 http://example.com [[File:Foobar.jpg]]
15940 <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>
15943 <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>
15947 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
15950 The line above must have a trailing space!
15953 But just in case it doesn't...
15955 <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>
15956 <p>The line above must have a trailing space!
15958 <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>
15959 <p>But just in case it doesn't...
15964 Header with special characters (T27462)
15966 The tooltips shall not show entities to the user (ie. be double escaped)
15983 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15985 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15987 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15988 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15989 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15990 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15991 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15995 <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>
15998 <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>
16001 <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>
16004 <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>
16007 <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>
16013 Header with space, plus and underscore as entity
16015 Id should not contain + for spaces
16017 == Space between Text ==
16020 == Space-Entity between Text ==
16023 == Plus+between+Text ==
16026 == Plus-Entity+between+Text ==
16029 == Underscore_between_Text ==
16032 == Underscore-Entity_between_Text ==
16035 [[#Space between Text]]
16036 [[#Space-Entity between Text]]
16037 [[#Plus+between+Text]]
16038 [[#Plus-Entity+between+Text]]
16039 [[#Underscore_between_Text]]
16040 [[#Underscore-Entity_between_Text]]
16042 <p>Id should not contain + for spaces
16044 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
16046 <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>
16047 <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>
16048 <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>
16049 <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>
16050 <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>
16051 <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>
16055 <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>
16058 <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>
16061 <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>
16064 <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>
16067 <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>
16070 <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>
16072 </p><p><a href="#Space_between_Text">#Space between Text</a>
16073 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
16074 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
16075 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
16076 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
16077 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
16082 Headers with excess '=' characters
16083 (Are similar tests necessary beyond the 1st level?)
16087 =''italic'' heading==
16088 ==''italic'' heading=
16090 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
16092 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
16093 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
16094 <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>
16095 <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>
16099 <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>
16100 <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>
16101 <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>
16102 <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>
16107 HTML headers vs TOC (T25393)
16108 (__NOEDITSECTION__ for clearer output, doesn't matter here)
16120 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
16122 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
16124 <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>
16125 <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>
16128 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
16130 <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>
16131 <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>
16137 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
16138 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
16139 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
16140 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
16141 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
16142 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
16147 Single-line or multiline-comments can follow headings
16149 parsoid=wt2html,wt2wt
16157 <h2><span class="mw-headline" id="foo">foo</span></h2>
16158 <h2><span class="mw-headline" id="bar">bar</span></h2>
16159 <h2><span class="mw-headline" id="baz">baz</span></h2>
16164 T3219 URL next to image (broken)
16166 http://example.com[[File:Foobar.jpg]]
16168 <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>
16171 <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>
16175 T3186 news: in the middle of text
16177 http://en.wikinews.org/wiki/Wikinews:Workplace
16179 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
16185 Namespaced link must have a title
16194 Namespaced link must have a title (bad fragment version)
16196 [[Project:#fragment]]
16198 <p>[[Project:#fragment]]
16204 ### HTML tags and HTML attributes
16208 div with no attributes
16210 <div>HTML rocks</div>
16212 <div>HTML rocks</div>
16217 div with double-quoted attribute
16219 <div id="rock">HTML rocks</div>
16221 <div id="rock">HTML rocks</div>
16226 div with single-quoted attribute
16228 <div id='rock'>HTML rocks</div>
16230 <div id="rock">HTML rocks</div>
16235 div with unquoted attribute
16237 <div id=rock>HTML rocks</div>
16239 <div id="rock">HTML rocks</div>
16244 div with illegal double attributes
16246 <div id="a" id="b">HTML rocks</div>
16248 <div id="b">HTML rocks</div>
16253 div with empty attribute value, space before equals
16255 parsoid=wt2html,html2html
16257 <div class =>HTML rocks</div>
16259 <div class="">HTML rocks</div>
16262 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16266 div with multiple empty attribute values
16268 parsoid=wt2html,html2html
16270 <div id= title=>HTML rocks</div>
16272 <div id="title.3D">HTML rocks</div>
16275 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16279 table with multiple empty attribute values
16281 parsoid=wt2html,html2html
16287 <table title="id=">
16293 <table title="id=">
16294 <tbody><tr><td> hi</td></tr>
16299 div with braces in attribute value
16301 <div title="{}">Foo</div>
16303 <div title="{}">Foo</div>
16306 <div title="{}">Foo</div>
16310 div with empty attribute value, no space before equals
16312 parsoid=wt2html,html2html
16314 <div class=>HTML rocks</div>
16316 <div class="">HTML rocks</div>
16319 <div class="">HTML rocks</div>
16323 HTML multiple attributes correction
16325 <p class="error" class="awesome">Awesome!</p>
16327 <p class="awesome">Awesome!</p>
16332 Table multiple attributes correction
16335 !+ class="error" class="awesome"| status
16340 <th class="awesome"> status
16348 <DIV ID="x">HTML ROCKS</DIV>
16350 <div id="x">HTML ROCKS</div>
16355 Non-ASCII pseudo-tags are rendered as text
16364 Pseudo-tag with URL 'name' renders as url link
16366 <http://example.com/>
16368 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16373 text with amp in the middle of nowhere
16377 <p>Remember AT&T?
16382 text with character entity: eacute
16384 I always thought é was a cute letter.
16386 <p>I always thought é was a cute letter.
16389 <p>I always thought é was a cute letter.</p>
16393 text with entity-escaped character entity-like string: eacute
16395 I always thought &eacute; was a cute letter.
16397 <p>I always thought &eacute; was a cute letter.
16402 text with undefined character entity: xacute
16404 I always thought &xacute; was a cute letter.
16406 <p>I always thought &xacute; was a cute letter.
16413 <data value="5">five</data>
16414 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16415 <mark>This highlighted text</mark>
16417 <p><data value="5">five</data>
16418 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16419 <mark>This highlighted text</mark>
16424 HTML tag with leading space is parsed as text
16428 <p>< div>foo< /div>
16433 ### Nesting tests (see T43545, T52604, T53081)
16436 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
16437 # Note that html2wt is considerably more difficult if we use <b> in
16438 # the test case, instead of <small>
16440 Ensure that HTML adoption agency algorithm is properly implemented.
16442 <small>X<small>Y</small>Z</small>
16444 <p><small>X<small>Y</small>Z</small>
16448 # This was T43545 in the PHP parser.
16449 # Note that tidy doesn't handle this correctly.
16453 <kbd>X<kbd>Y</kbd>Z</kbd>
16455 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16459 # The following cases were T53081 in the PHP parser.
16460 # Note that there are some other nestable tags (b, i, etc) which are
16461 # not covered; see T53081 for discussion.
16463 # Note that tidy doesn't handle this correctly.
16467 <em>X<em>Y</em>Z</em>
16469 <p><em>X<em>Y</em>Z</em>
16473 # Note that tidy doesn't handle this correctly.
16475 Nesting of <strong>
16477 <strong>X<strong>Y</strong>Z</strong>
16479 <p><strong>X<strong>Y</strong>Z</strong>
16488 <p><q>X<q>Y</q>Z</q></p>
16491 # Note that tidy doesn't handle this correctly.
16495 <ruby>X<ruby>Y</ruby>Z</ruby>
16497 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16501 # Note that tidy doesn't handle this correctly.
16505 <bdo>X<bdo>Y</bdo>Z</bdo>
16507 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16519 [[Media:Foobar.jpg]]
16521 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16524 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a></p>
16528 Media link with text
16530 [[Media:Foobar.jpg|A neat file to look at]]
16532 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16535 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
16538 # FIXME: this is still bad HTML tag nesting
16539 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16541 Media link with nasty text
16543 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16545 <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>
16548 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16549 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16551 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true}'>Safe Link</a></p><div style="display:none" data-parsoid='{"stx":"html"}'><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'>" onmouseover="alert(document.cookie)" onfoo="</a></div>
16556 Media link to nonexistent file (T3702)
16558 [[Media:No such.jpg]]
16559 [[Media:No_such file.jpg]]
16561 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16562 <a href="/index.php?title=Special:Upload&wpDestFile=No_such_file.jpg" class="new" title="No such file.jpg">Media:No_such file.jpg</a>
16565 <p><a rel="mw:MediaLink" href="./Special:FilePath/No_such.jpg" title="No such.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"fileName":"No_such.jpg"},"sa":{"fileName":"No such.jpg"}}'>Media:No such.jpg</a>
16566 <a rel="mw:MediaLink" href="./Special:FilePath/No_such_file.jpg" title="No such file.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"fileName":"No_such_file.jpg"},"sa":{"fileName":"No_such file.jpg"}}'>Media:No_such file.jpg</a></p>
16570 Image link to nonexistent file (T3850 - good)
16572 [[File:No_such.jpg]]
16574 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16577 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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>
16581 :Image link to nonexistent file (T3850 - bad)
16583 [[:Image:No such.jpg]]
16585 <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>
16588 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16594 Character reference normalization in link text (T3938)
16596 [[Main Page|this&that]]
16598 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16605 Test for unicode normalization
16607 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16611 (T21451) Links should refer to the normalized form.
16619 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16620 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16621 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16622 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16623 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16628 Empty attribute crash test (T4067)
16630 <font color="">foo</font>
16632 <p><font color="">foo</font>
16637 Empty attribute crash test single-quotes (T4067)
16639 <font color=''>foo</font>
16641 <p><font color="">foo</font>
16646 Attribute test: equals, then nothing
16648 parsoid=wt2html,html2html
16650 <font color=>foo</font>
16652 <p><font color="">foo</font>
16655 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16659 Attribute test: unquoted value
16661 parsoid=wt2html,html2html
16663 <font color=x>foo</font>
16665 <p><font color="x">foo</font>
16668 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16672 Attribute test: unquoted but illegal value (hash)
16674 <font color=#x>foo</font>
16676 <p><font color="#x">foo</font>
16680 # Parsoid does not serialize to empty attribute syntax,
16681 # so wt2wt and html2wt cases are skipped
16683 Attribute test: no value (T54330)
16685 parsoid=wt2html,html2html
16687 <font color>foo</font>
16689 <p><font color="">foo</font>
16692 <p><font color="">foo</font></p>
16696 T4095: link with three closing brackets
16700 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16703 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16707 T4095: link with pipe and three closing brackets
16709 [[Main Page|link]]]
16711 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16714 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16718 T4095: link with pipe and three closing brackets, version 2
16720 [[Main Page|[http://example.com/]]]
16722 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16725 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16734 Template:Dangerous attribute
16736 " onmouseover="alert(document.cookie)
16740 Template:Dangerous style attribute
16742 border-size: expression(alert(document.cookie))
16748 <div style="float: right; {{{1}}}">Magic div</div>
16752 T4304: HTML attribute safety (safe template; regression T4309)
16754 <div title="{{test}}"></div>
16756 <div title="This is a test template"></div>
16759 <div title="This is a test template" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"This is a test template"},"sa":{"title":"{{test}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,20,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"test\",\"href\":\"./Template:Test\"},\"params\":{},\"i\":0}}]}'>This is a test template</span>"}]]}'></div>
16762 # Parsoid has enough context to handle this case
16764 T4304: HTML attribute safety (dangerous template; 2309)
16766 <div title="{{dangerous attribute}}"></div>
16768 <div title=""></div>
16771 <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='{\"pi\":[[]],\"dsr\":[12,35,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous attribute\",\"href\":\"./Template:Dangerous_attribute\"},\"params\":{},\"i\":0}}]}'>\" onmouseover=\"alert(document.cookie)</span>"}]]}'></div>
16775 T4304: HTML attribute safety (dangerous style template; 2309)
16777 <div style="{{dangerous style attribute}}"></div>
16779 <div style="/* insecure input */"></div>
16782 <div style="/* insecure input */" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"{{dangerous style attribute}}"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[12,41,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous style attribute\",\"href\":\"./Template:Dangerous_style_attribute\"},\"params\":{},\"i\":0}}]}'>border-size: expression(alert(document.cookie))</span>"}]]}'></div>
16786 T4304: HTML attribute safety (safe parameter; 2309)
16788 {{div style|width: 200px}}
16790 <div style="float: right; width: 200px">Magic div</div>
16793 <div style="float: right; width: 200px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"float: right; width: 200px"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: 200px"}},"i":0}}]}'>Magic div</div>
16797 T4304: HTML attribute safety (unsafe parameter; 2309)
16799 {{div style|width: expression(alert(document.cookie))}}
16801 <div style="/* insecure input */">Magic div</div>
16804 <div style="/* insecure input */" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: expression(alert(document.cookie))"}},"i":0}}]}'>Magic div</div>
16807 ## Parsoid output here differs; needs investigation.
16809 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
16811 {{div style|"><script>alert(document.cookie)</script>}}
16813 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16817 ## Parsoid output here differs; needs investigation.
16819 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16821 {{div style|" ><script>alert(document.cookie)</script>}}
16823 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16828 T4304: HTML attribute safety (link)
16830 <div title="[[Main Page]]"></div>
16832 <div title="[[Main Page]]"></div>
16837 T4304: HTML attribute safety (italics)
16839 <div title="''foobar''"></div>
16841 <div title="''foobar''"></div>
16846 T4304: HTML attribute safety (bold)
16848 <div title="'''foobar'''"></div>
16850 <div title="'''foobar'''"></div>
16855 T4304: HTML attribute safety (ISBN)
16857 <div title="ISBN 1234567890"></div>
16859 <div title="ISBN 1234567890"></div>
16864 T4304: HTML attribute safety (RFC)
16866 <div title="RFC 1234"></div>
16868 <div title="RFC 1234"></div>
16873 T4304: HTML attribute safety (PMID)
16875 <div title="PMID 1234567890"></div>
16877 <div title="PMID 1234567890"></div>
16882 T4304: HTML attribute safety (web link)
16884 <div title="http://example.com/"></div>
16886 <div title="http://example.com/"></div>
16891 T4304: HTML attribute safety (named web link)
16893 <div title="[http://example.com/ link]"></div>
16895 <div title="[http://example.com/ link]"></div>
16900 T5244: HTML attribute safety (extension; safe)
16902 <div style="<nowiki>background:blue</nowiki>"></div>
16904 <div style="background:blue"></div>
16907 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
16911 T5244: HTML attribute safety (extension; unsafe)
16913 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16915 <div style="/* insecure input */"></div>
16918 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
16921 # More MSIE fun discovered by Tom Gilder
16924 MSIE CSS safety test: spurious slash
16926 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16928 <div style="/* insecure input */">evil</div>
16931 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
16935 MSIE CSS safety test: hex code
16937 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16939 <div style="/* insecure input */">evil</div>
16942 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
16946 MSIE CSS safety test: comment in url
16948 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16950 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16953 <div style="background-image:u rl(javascript:alert('boo'))" data-parsoid='{"stx":"html","a":{"style":"background-image:u rl(javascript:alert('boo'))"},"sa":{"style":"background-image:u/**/rl(javascript:alert('boo'))"}}'>evil</div>
16957 MSIE CSS safety test: comment in expression
16959 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16961 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16964 <div style="background-image:expres sion(alert('boo4'))" data-parsoid='{"stx":"html","a":{"style":"background-image:expres sion(alert('boo4'))"},"sa":{"style":"background-image:expres/**/sion(alert('boo4'))"}}'>evil4</div>
16968 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
16970 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16972 <p style="/* invalid control char */">A</p>
16975 <p style="/* invalid control char */" data-parsoid='{"stx":"html","a":{"style":"/* invalid control char */"},"sa":{"style":"font-size: 100px; background-image:url\\b(https://www.google.com/images/srpr/logo6w.png)"}}'>A</p>
16979 MSIE 6 CSS safety test: Fullwidth (T57332)
16981 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16982 <div style="top:EXPRESSION(alert())">B</div>
16984 <p style="/* insecure input */">A</p>
16985 <div style="/* insecure input */">B</div>
16988 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
16989 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
16993 MSIE 6 CSS safety test: IPA extensions (T57332)
16995 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16996 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16998 <div style="/* insecure input */">A</div>
16999 <p style="/* insecure input */">B</p>
17002 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
17003 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')"}}'>B</p>
17007 MSIE 6 CSS safety test: sup/sub script (T57332)
17009 <div style="background-image:url⁽javascript:alert())">A</div>
17010 <div style="background-image:url₍javascript:alert())">B</div>
17011 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
17013 <div style="/* insecure input */">A</div>
17014 <div style="/* insecure input */">B</div>
17015 <p style="/* insecure input */">C</p>
17018 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
17019 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
17020 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
17026 parsoid=wt2html,html2html
17029 title="data:text/html,<img src=1 onerror=alert(1)>"
17030 style="-o-link:attr(title);-o-link-source:current">X</div>
17032 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
17035 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */" data-parsoid='{"stx":"html","a":{"title":"data:text/html,<img src=1 onerror=alert(1)>","style":"/* insecure input */"},"sa":{"title":"&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;","style":"-o-link:attr(title);-o-link-source:current"}}'>X</div>
17039 MSIE 6 CSS safety test: Repetition markers (T57332)
17041 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
17042 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
17043 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
17044 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
17045 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
17046 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
17047 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
17049 <p style="/* insecure input */">A</p>
17050 <p style="/* insecure input */">B</p>
17051 <p style="/* insecure input */">C</p>
17052 <p style="/* insecure input */">D</p>
17053 <p style="/* insecure input */">E</p>
17054 <p style="/* insecure input */">F</p>
17055 <p style="/* insecure input */">G</p>
17058 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expres〱ion((title='XSSed'),'red')"}}'>A</p>
17059 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresゝion((title='XSSed'),'red')"}}'>B</p>
17060 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title='XSSed'),'red')"}}'>C</p>
17061 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresヽion((title='XSSed'),'red')"}}'>D</p>
17062 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹽion((title='XSSed'),'red')"}}'>E</p>
17063 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹼion((title='XSSed'),'red')"}}'>F</p>
17064 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title='XSSed'),'red')"}}'>G</p>
17068 Table attribute legitimate extension
17071 !+ style="<nowiki>color:blue</nowiki>"| status
17076 <th style="color:blue"> status
17082 Table attribute safety
17085 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
17090 <th style="/* insecure input */"> status
17096 CSS line continuation 1
17098 <div style="background-image: u\ rl(test.jpg);"></div>
17100 <div style="/* insecure input */"></div>
17105 CSS line continuation 2
17107 <div style="background-image: u\ rl(test.jpg); "></div>
17109 <div style="/* invalid control char */"></div>
17120 Expansion of multi-line templates in attribute values (T8255)
17122 <div style="background: {{identity|#00FF00}}">-</div>
17124 <div style="background: #00FF00">-</div>
17129 Expansion of multi-line templates in attribute values (T8255 sanity check)
17131 <div style="background:
17134 <div style="background: #00FF00">-</div>
17137 <div style="background:
17142 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
17144 <div style="background: #00FF00">-</div>
17146 <div style="background: #00FF00">-</div>
17151 Tags which are hidden from Tidy cannot pass through the Sanitizer
17153 <mw:toc><script>alert();</script></mw:toc>
17155 <p><mw:toc><script>alert();</script></mw:toc></p>
17159 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
17163 Parser hook: empty input
17174 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17177 ## Don't expect parsoid to rt this form.
17179 Parser hook: empty input using terminated empty elements
17181 parsoid=wt2html,html2html
17192 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17196 Parser hook: empty input using terminated empty elements (space before)
17207 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17211 Parser hook: basic input
17222 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17225 ## Don't expect parsoid to rt this form.
17227 Parser hook: case insensitive
17229 parsoid=wt2html,html2html
17240 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17243 ## Don't expect parsoid to rt this form.
17245 Parser hook: case insensitive, redux
17247 parsoid=wt2html,html2html
17258 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17262 Parser hook: nested tags
17264 <tag><tag></tag></tag>
17273 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
17277 Parser hook: basic arguments
17279 <tag width="200" height="100" depth="50" square=""></tag>
17292 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17295 ## Don't expect parsoid to rt this form.
17297 Parser hook: basic arguments, variations
17299 parsoid=wt2html,html2html
17301 <tag width=200 height = "100" depth = '50' square></tag>
17314 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17318 Parser hook: argument containing a forward slash (T7344)
17320 <tag filename="/tmp/bla"></tag>
17325 'filename' => '/tmp/bla',
17330 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17333 ## Don't expect parsoid to rt this form.
17335 Parser hook: empty input using terminated empty elements (T4374)
17337 parsoid=wt2html,html2html
17349 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
17352 ## </tag> should be output literally since there is no matching tag that begins it
17353 ## Don't expect parsoid to rt this form.
17355 Parser hook: basic arguments using terminated empty elements (T4374)
17359 <tag width=200 height = "100" depth = '50' square/>
17376 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":null}' about="#mwt2"></pre><p>other stuff
17380 ## Don't expect parsoid to rt this form.
17382 Parser hook: Don't allow unclosed extension tags
17388 this is a '''test'''
17390 <p>test <tag>123
17391 </p><p>this is a <b>test</b>
17394 <p>test <tag>123</p>
17396 <p>this is a <b>test</b></p>
17400 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
17404 Parser hook: static parser hook not inside a comment
17406 <statictag>hello, world</statictag>
17408 <statictag action="flush" />
17414 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
17415 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17419 Parser hook: static parser hook inside a comment
17421 <!-- <statictag>hello, world</statictag> -->
17422 <statictag action="flush" />
17427 <!-- <statictag>hello, world</statictag> -->
17428 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17431 # Nested template calls; this case was broken by Parser.php rev 1.506,
17435 Template:One-parameter
17437 (My parameter is: {{{1}}})
17441 Template:Map-one-parameter
17443 {{{{{1}}}|{{{2}}}}}
17447 Nested template calls
17449 {{Map-one-parameter|One-parameter|param}}
17451 <p>(My parameter is: param)
17460 # HTML+Tidy effectively strips out the empty tags completely
17461 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17462 # which Tidy would have done for the PHP parser had there been content inside it.
17464 Sanitizer: Closing of open tags
17466 <s></s><table></table>
17468 <s></s><table></table>
17471 <p><s></s></p><table></table>
17475 Sanitizer: Closing of open but not closed tags
17484 Sanitizer: Closing of closed but not open tags
17494 Sanitizer: Closing of closed but not open table tags
17498 Table not started</td></tr></table>
17500 <p>Table not started</p>
17502 <p>Table not started</p>
17506 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17508 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17510 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17513 <p><span id=".C3.A6:_v" data-parsoid='{"stx":"html","a":{"id":".C3.A6:_v"},"sa":{"id":"æ: v"}}'>byte</span><a rel="mw:WikiLink" href="./Main_Page#.C3.A6:_v" data-parsoid='{"stx":"piped","a":{"href":"./Main_Page#.C3.A6:_v"},"sa":{"href":"#æ: v"}}'>backlink</a></p>
17516 # In HTML5, the restrictions are that id must contain at least one character,
17517 # and must not contain any space characters.
17519 Sanitizer: Validating the contents of the id attribute (T6515)
17523 <br id="" /><br id="a space" />
17528 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17530 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
17534 <br id="foo" /><br id="foo" />
17536 Something need to be done. foo-2 ?
17540 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17543 <meta itemprop="hello" content="world">
17544 <meta http-equiv="refresh" content="5">
17545 <meta itemprop="hello" http-equiv="refresh" content="5">
17546 <link itemprop="hello" href="{{SERVER}}">
17547 <link rel="stylesheet" href="{{SERVER}}">
17548 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17552 <p> <meta itemprop="hello" content="world" />
17553 <meta http-equiv="refresh" content="5">
17554 <meta itemprop="hello" content="5" />
17555 <link itemprop="hello" href="http://example.org" />
17556 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17557 <link itemprop="hello" href="http://example.org" />
17564 Language converter: output gets cut off unexpectedly (T7757)
17568 this bit is safe: }-
17570 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17572 then we get cut off here: }-
17574 all additional text is vanished
17576 <p>this bit is safe: }-
17577 </p><p>but if we add a conversion instance: xxx
17578 </p><p>then we get cut off here: }-
17579 </p><p>all additional text is vanished
17584 Self closed html pairs (T7487)
17586 <center><font id="bug" />Centered text</center>
17587 <div><font id="bug2" />In div text</div>
17589 <center><font id="bug"></font>Centered text</center>
17590 <div><font id="bug2"></font>In div text</div>
17598 Punctuation: nbsp before exclamation
17602 <p>C'est grave !
17607 Punctuation: CSS !important (T13874)
17609 <div style="width:50% !important">important</div>
17611 <div style="width:50% !important">important</div>
17616 Punctuation: CSS ! important (T13874; with space after)
17618 <div style="width:50% ! important">important</div>
17620 <div style="width:50% ! important">important</div>
17625 HTML bullet list, closed tags (T7497)
17638 <ul data-parsoid='{"stx":"html"}'>
17639 <li data-parsoid='{"stx":"html"}'>One</li>
17640 <li data-parsoid='{"stx":"html"}'>Two</li>
17646 HTML bullet list, unclosed tags (T7497)
17658 <ul data-parsoid='{"stx":"html"}'>
17659 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17660 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17666 HTML ordered list, closed tags (T7497)
17679 <ol data-parsoid='{"stx":"html"}'>
17680 <li data-parsoid='{"stx":"html"}'>One</li>
17681 <li data-parsoid='{"stx":"html"}'>Two</li>
17687 HTML ordered list, unclosed tags (T7497)
17700 <ol data-parsoid='{"stx":"html"}'>
17701 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17702 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17708 HTML nested bullet list, closed tags (T7497)
17731 <ul data-parsoid='{"stx":"html"}'>
17732 <li data-parsoid='{"stx":"html"}'>One</li>
17733 <li data-parsoid='{"stx":"html"}'>Two:
17734 <ul data-parsoid='{"stx":"html"}'>
17735 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17736 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17743 HTML nested bullet list, open tags (T7497)
17780 HTML nested ordered list, closed tags (T7497)
17805 HTML nested ordered list, open tags (T7497)
17842 HTML ordered list item with parameters oddity
17844 <ol><li id="fragment">One</li>
17847 <ol><li id="fragment">One</li>
17852 # parsoid doesn't explicitly mark autonumbered links, see T55505
17854 T7918: autonumbering
17856 [http://first/] [http://second] [ftp://ftp]
17860 [mailto:enclosed@mail.tld With target]
17862 [mailto:enclosed@mail.tld]
17864 mailto:inline@mail.tld
17866 <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>
17867 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17868 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17869 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17870 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17873 <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>
17874 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17875 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17876 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17877 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17882 # Security and HTML correctness
17883 # From Nick Jenkins' fuzz testing
17887 Fuzz testing: Parser13
17902 Fuzz testing: Parser14
17907 <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>
17908 http://<div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
17910 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17916 <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>
17918 <div id="toc" class="toc">
17919 <div id="toctitle" class="toctitle">
17923 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17930 Fuzz testing: Parser14-table
17932 parsoid=wt2html,html2html
17937 <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>
17938 <table style="__TOC__">
17943 <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>
17944 <table style="__TOC__">
17951 <table style="__TOC__"></table>
17954 # Known to produce bogus xml (extra </td>)
17956 Fuzz testing: Parser16
17983 Fuzz testing: Parser21
17986 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17991 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
18001 Fuzz testing: Parser22
18003 http://===r:::https://b
18007 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
18015 # Known to produce bad XML for now
18017 Fuzz testing: Parser24
18024 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
18025 <br style="onmouseover='alert(document.cookie);' " />
18027 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18032 <u class="|">}}}} >
18033 <br style="onmouseover='alert(document.cookie);'" />
18035 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18043 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
18044 <u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true}'><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>}}}} >
18045 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/></u></p><p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true,"autoInsertedStart":true}'>MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p><table data-parsoid='{"autoInsertedEnd":true}'>
18049 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
18052 # Note: the current result listed for this is not what the original one was,
18053 # but the original bug was JavaScript injection, which is fixed in any case.
18054 # It's not clear that the original result listed was any more correct than the
18055 # current one. Original result:
18058 # <li class="||">
18059 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18061 Fuzz testing: Parser25 (T8055)
18067 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
18069 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18072 <span about="#mwt1" typeof="mw:Param" data-parsoid='{"pi":[[{"k":"1"},{"k":"2"},{"k":"3"}]]}' data-mw='{"parts":[{"templatearg":{"target":{"wt":"\n"},"params":{"1":{"wt":" \n<LI CLASS="},"2":{"wt":""},"3":{"wt":"\n >\n"}},"i":0}},"blah\" onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE CURSOR OVER HERE"]}'>
18073 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
18077 Fuzz testing: URL adjacent extension (with space, clean)
18079 http://example.com <nowiki>junk</nowiki>
18081 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
18084 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
18088 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
18090 http://example.com<nowiki>junk</nowiki>
18092 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
18095 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
18099 Fuzz testing: URL adjacent extension (no space, dirty; pre)
18101 http://example.com<pre>junk</pre>
18103 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
18106 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
18111 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"junk"}}'>junk</pre>
18115 Fuzz testing: image with bogus manual thumbnail
18117 [[Image:foobar.jpg|thumbnail= ]]
18119 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
18122 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' data-mw='{"errors":[{"key":"apierror-invalidtitle","message":"Invalid thumbnail title.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"Image:foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/Foobar.jpg" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
18126 Fuzz testing: encoded newline in generated HTML replacements (T8577)
18128 <pre dir=" "></pre>
18130 <pre dir=" "></pre>
18133 <pre typeof="mw:Extension/pre" about="#mwt2" dir="&#10;" data-mw='{"name":"pre","attrs":{"dir":"&#10;"},"body":{"extsrc":""}}'></pre>
18137 Parsing optional HTML elements (T8171)
18142 <td> Some tabular data</td>
18143 <td> More tabular data ...
18144 <td> And yet som tabular data</td>
18150 <td> Some tabular data</td>
18151 <td> More tabular data ...
18152 </td><td> And yet som tabular data</td>
18159 Correct handling of <td>, <tr> (T8171)
18164 <td> Some tabular data</td>
18165 <td> More tabular data ...</td>
18166 <td> And yet som tabular data</td>
18172 <td> Some tabular data</td>
18173 <td> More tabular data ...</td>
18174 <td> And yet som tabular data</td>
18182 Parsing crashing regression (fr:JavaScript)
18186 <p></body></x>
18191 Inline wiki vs wiki block nesting
18197 <p><b>Bold paragraph</b>
18198 </p><p>New wiki paragraph
18202 # FIXME: The current php output is documented
18203 # and desired output is the parsoid target.
18205 Inline HTML vs wiki block nesting
18211 <p><b>Bold paragraph
18212 </p><p>New wiki paragraph</b>
18215 <p><b>Bold paragraph</b>
18216 </p><p>New wiki paragraph
18220 # Original result was this:
18221 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
18223 # While that might be marginally more intuitive, maybe, the six-apostrophe
18224 # construct is clearly pathological and the result stated here (which is what
18225 # the parser actually does) is about as reasonable as anything.
18227 Mixing markup for italics and bold
18230 '''bold''''''bold''bolditalics'''''
18232 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
18240 Article for special page transclusion test
18244 Special page transclusion
18247 {{Special:Prefixindex/Xyzzyx}}
18249 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18255 Special page transclusion twice (T7021)
18258 {{Special:Prefixindex/Xyzzyx}}
18259 {{Special:Prefixindex/Xyzzyx}}
18261 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18263 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18269 Transclusion of default MediaWiki message
18271 {{MediaWiki:Mainpage}}
18278 Transclusion of nonexistent MediaWiki message
18280 {{MediaWiki:Mainpagexxx}}
18282 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
18287 Transclusion of MediaWiki message with underscore
18289 {{MediaWiki:history_short}}
18296 Transclusion of MediaWiki message with space
18298 {{MediaWiki:history short}}
18305 Invalid header with following text
18315 Section extraction test (section 0)
18335 Section extraction test (section 1)
18357 Section extraction test (section 2)
18378 Section extraction test (section 3)
18398 Section extraction test (section 4)
18422 Section extraction test (section 5)
18442 Section extraction test (section 6)
18463 Section extraction test (section 7)
18483 Section extraction test (section 8)
18503 Section extraction test (section 9)
18524 Section extraction test (section 10)
18544 Section extraction test (nonexistent section 11)
18563 Section extraction test with bogus heading (section 1)
18568 ==bogus== not a legal section
18572 ==bogus== not a legal section
18576 Section extraction test with bogus heading (section 2)
18581 ==bogus== not a legal section
18588 Section extraction test with comment after heading (section 1)
18600 Section extraction test with comment after heading (section 2)
18612 Section extraction test with bogus <nowiki> heading (section 1)
18617 ==bogus== <nowiki>not a legal section</nowiki>
18621 ==bogus== <nowiki>not a legal section</nowiki>
18625 Section extraction test with bogus <nowiki> heading (section 2)
18630 ==bogus== <nowiki>not a legal section</nowiki>
18636 # Formerly testing for T4587, now resolved by the use of unmarked sections
18637 # instead of respecting commented sections
18639 Section extraction prefixed by comment (section 1)
18650 Section extraction prefixed by comment (section 2)
18660 # Formerly testing for T4607, now resolved by the use of unmarked sections
18661 # instead of respecting HTML-style headings
18663 Section extraction, mixed wiki and html (section 1)
18679 Section extraction, mixed wiki and html (section 2)
18695 # Formerly testing for T5342
18697 Section extraction, heading surrounded by <noinclude>
18701 <noinclude>==unmarked==</noinclude>
18707 # Test behavior of T21910
18709 Sectiion with all-equals
18714 The line above must have a trailing space
18717 But just in case it doesn't...
18721 But just in case it doesn't...
18725 Section replacement test (section 0)
18756 Section replacement test (section 1)
18785 Section replacement test (section 2)
18815 Section replacement test (section 3)
18846 Section replacement test (section 4)
18873 Section replacement test (section 5)
18904 Section replacement test (section 6)
18934 Section replacement test (section 7)
18965 Section replacement test (section 8)
18996 Section replacement test (section 9)
19025 Section replacement test (section 10)
19055 Section replacement test with initial whitespace (T15728)
19059 Preformatted initial line
19063 Preformatted initial line
19070 Section extraction, heading followed by pre with 20 spaces (T8398)
19082 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
19095 Section extraction, <pre> around bogus header (T12309)
19112 Section replacement, <pre> around bogus header (T12309)
19133 Handling of 
 in URLs
19137 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19140 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&#x0A;a"}}'>irc://%0Aa</a></li></ul></li></ul>
19144 Handling of %0A in URLs
19148 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19151 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19154 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
19156 5 quotes, code coverage +1 line
19163 <p><b><i></i></b></p>
19166 # same html as previous, but wikitext adjusted to match parsoid html2wt
19167 # note that wt2html and html2html will put the <i> before the <b>
19169 5 quotes, code coverage +1 line w/ nowiki (1)
19171 parsoid=wt2wt,html2wt
19173 '''''<nowiki/>'''''
19178 <p><b><i></i></b></p>
19181 # same as previous, just swapping the <i> and <b>
19183 5 quotes, code coverage +1 line w/ nowiki (2)
19185 '''''<nowiki/>'''''
19190 <p><i><b></b></i></p>
19194 Special:Search page linking.
19198 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
19203 {{!}} is a magic word
19205 {{!}} is a magic word there and {{!}} is still a magic word here
19206 | is not a magic word here but {{!}} is still a magic word here
19208 <p>| is a magic word there and | is still a magic word here
19209 | is not a magic word here but | is still a magic word here
19212 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
19213 | is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
19220 title=[[Parser test]]
19225 * {{FULLPAGENAMEE}}
19227 * {{BASEPAGENAMEE}}
19231 * {{ROOTPAGENAMEE}}
19233 * {{TALKPAGENAMEE}}
19234 * {{SUBJECTPAGENAME}}
19235 * {{SUBJECTPAGENAMEE}}
19238 * {{NAMESPACENUMBER}}
19242 * {{SUBJECTSPACEE}}
19243 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
19245 <ul><li> Parser test</li>
19246 <li> Parser_test</li>
19247 <li> Parser test</li>
19248 <li> Parser_test</li>
19249 <li> Parser test</li>
19250 <li> Parser_test</li>
19251 <li> Parser test</li>
19252 <li> Parser_test</li>
19253 <li> Parser test</li>
19254 <li> Parser_test</li>
19255 <li> Talk:Parser test</li>
19256 <li> Talk:Parser_test</li>
19257 <li> Parser test</li>
19258 <li> Parser_test</li>
19266 <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>
19269 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
19272 Gallery with valid attributes
19274 <gallery type="123" summary="345">
19275 File:File:Foobar.jpg
19278 <ul class="gallery mw-gallery-traditional" type="123">
19279 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19280 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
19281 <div class="gallerytext">
19287 <ul class="gallery mw-gallery-traditional" type="123" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"type":"123","summary":"345"},"body":{"extsrc":"\nFile:File:Foobar.jpg\n"}}'>
19288 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:File:Foobar.jpg</span></div><div class="gallerytext"></div></li>
19292 ## Parsoid thinks the "centre" here is a property, not a caption.
19297 "modes": ["wt2html"],
19298 "nativeGallery": true
19306 image4 |300px| centre
19307 image5.svg| http://///////
19312 <ul class="gallery mw-gallery-traditional">
19313 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19314 <div class="thumb" style="height: 150px;">Image1.png</div>
19315 <div class="gallerytext">
19318 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19319 <div class="thumb" style="height: 150px;">Image2.gif</div>
19320 <div class="gallerytext">
19323 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19324 <div class="thumb" style="height: 150px;">Image3</div>
19325 <div class="gallerytext">
19328 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19329 <div class="thumb" style="height: 150px;">Image4</div>
19330 <div class="gallerytext">
19335 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19336 <div class="thumb" style="height: 150px;">Image5.svg</div>
19337 <div class="gallerytext">
19338 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
19342 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19343 <div class="thumb" style="height: 150px;">* image6</div>
19344 <div class="gallerytext">
19350 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19351 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">image1.png </span></div><div class="gallerytext"></div></li>
19352 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">image2.gif</span></div><div class="gallerytext"></div></li>
19353 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">image3</span></div><div class="gallerytext"></div></li>
19354 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">image4 </span></div><div class="gallerytext"></div></li>
19355 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;"> image5.svg</span></div><div class="gallerytext"> <a rel="mw:ExtLink" href="http://///////">http://///////</a></div></li>
19356 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">* image6</span></div><div class="gallerytext"></div></li>
19361 Gallery (with options, html)
19364 "modes": ["wt2html", "html2html"],
19365 "nativeGallery": true
19368 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19369 File:Nonexistent.jpg|caption
19370 File:Nonexistent.jpg
19371 image:foobar.jpg|some '''caption''' [[Main Page]]
19373 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19376 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19377 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19378 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19379 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19380 <div class="gallerytext">
19385 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19386 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19387 <div class="gallerytext">
19390 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19391 <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>
19392 <div class="gallerytext">
19393 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19397 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19398 <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>
19399 <div class="gallerytext">
19402 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19403 <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>
19404 <div class="gallerytext">
19412 <ul class="gallery mw-gallery-traditional" style="max-width: 226px; _width: 226px;" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"widths":"70px","heights":"40px","perrow":"2"},"body":{}}'>
19413 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19414 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext">caption</div></li>
19415 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext"></div></li>
19416 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></span></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
19417 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></span></div><div class="gallerytext"></div></li>
19418 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img alt="This is a foo-bar." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></span></div><div class="gallerytext">blabla.</div></li>
19423 Gallery (with options, extsrc)
19426 "nativeGallery": false
19429 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19430 File:Nonexistent.jpg|caption
19431 File:Nonexistent.jpg
19432 image:foobar.jpg|some '''caption''' [[Main Page]]
19434 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19437 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19438 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19439 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19440 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19441 <div class="gallerytext">
19446 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19447 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19448 <div class="gallerytext">
19451 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19452 <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>
19453 <div class="gallerytext">
19454 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19458 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19459 <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>
19460 <div class="gallerytext">
19463 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19464 <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>
19465 <div class="gallerytext">
19473 <ul class="gallery mw-gallery-traditional" style="max-width: 226px; _width: 226px;" typeof="mw:Extension/gallery" about="#mwt3" data-parsoid='{}' data-mw='{"name":"gallery","attrs":{"widths":"70px","heights":"40px","perrow":"2","caption":"Foo [[Main Page]]"},"body":{"extsrc":"\nFile:Nonexistent.jpg|caption\nFile:Nonexistent.jpg\nimage:foobar.jpg|some '''caption''' [[Main Page]]\nimage:foobar.jpg\nimage:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.\n"}}'>
19474 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19475 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext">caption</div></li>
19476 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext"></div></li>
19477 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></span></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
19478 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></span></div><div class="gallerytext"></div></li>
19479 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img alt="This is a foo-bar." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></span></div><div class="gallerytext">blabla.</div></li>
19484 Gallery with link that has fragment
19487 "modes": ["wt2html", "html2html"],
19488 "nativeGallery": true
19492 image:foobar.jpg|link=Main_Page
19493 image:foobar.jpg|link=Main_Page#section
19494 image:foobar.jpg|link=Main Page#section|caption
19497 <ul class="gallery mw-gallery-traditional">
19498 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19499 <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>
19500 <div class="gallerytext">
19503 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19504 <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>
19505 <div class="gallerytext">
19508 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19509 <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>
19510 <div class="gallerytext">
19518 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19519 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19520 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./Main_Page#section"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19521 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./Main_Page#section"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext">caption</div></li>
19525 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
19527 Gallery with template inside caption
19530 "nativeGallery": true
19533 <gallery caption="{{echo|hi}}">
19534 File:Foobar.jpg|{{echo|ho}}
19537 <ul class="gallery mw-gallery-traditional">
19538 <li class='gallerycaption'>{{echo|hi}}</li>
19539 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19540 <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>
19541 <div class="gallerytext">
19549 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19550 <li class="gallerycaption"><span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span></li>
19551 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"><span about="#mwt5" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho"}},"i":0}}]}'>ho</span></div></li>
19556 Gallery with wikitext inside caption
19559 "nativeGallery": true
19563 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
19564 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
19567 <ul class="gallery mw-gallery-traditional">
19568 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19569 <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>
19570 <div class="gallerytext">
19571 <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>
19575 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19576 <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>
19577 <div class="gallerytext">
19578 <p>This is a test template
19585 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19586 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"><span typeof="mw:Image" data-mw='{"caption":"desc"}'><a href="./File:Foobar.jpg"><img alt="inneralt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></span></div></li>
19587 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"><span about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Test","href":"./Template:Test"},"params":{"1":{"wt":"unamedParam"},"alt":{"wt":"param"}},"i":0}}]}'>This is a test template</span></div></li>
19592 Gallery (with showfilename option)
19595 "nativeGallery": true
19598 <gallery showfilename="">
19599 File:Nonexistent.jpg|caption
19600 File:Nonexistent.jpg
19601 File:Foobar.jpg|some '''caption''' [[Main Page]]
19605 <ul class="gallery mw-gallery-traditional">
19606 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19607 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19608 <div class="gallerytext">
19609 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19614 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19615 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19616 <div class="gallerytext">
19617 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19621 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19622 <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>
19623 <div class="gallerytext">
19624 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19625 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19629 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19630 <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>
19631 <div class="gallerytext">
19632 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19639 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
19640 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a>caption</div></li>
19641 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a></div></li>
19642 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a>some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
19643 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a></div></li>
19647 ## Should Parsoid be preserving these variations?
19649 Gallery (with namespace-less filenames)
19652 "modes": ["wt2html", "html2html"],
19653 "nativeGallery": true
19657 File:Nonexistent.jpg
19663 <ul class="gallery mw-gallery-traditional">
19664 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19665 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19666 <div class="gallerytext">
19669 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19670 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19671 <div class="gallerytext">
19674 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19675 <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>
19676 <div class="gallerytext">
19679 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19680 <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>
19681 <div class="gallerytext">
19687 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19688 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext"></div></li>
19689 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">Nonexistent.jpg</span></div><div class="gallerytext"></div></li>
19690 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19691 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19696 Gallery override link with WikiLink (T36852)
19699 "nativeGallery": true
19703 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
19706 <ul class="gallery mw-gallery-traditional">
19707 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19708 <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>
19709 <div class="gallerytext">
19715 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-parsoid='{"dsr":[0,70,2,2]}' data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19716 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./InterWikiLink"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19721 Gallery override link with absolute external link (T36852)
19724 "nativeGallery": true
19728 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
19731 <ul class="gallery mw-gallery-traditional">
19732 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19733 <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>
19734 <div class="gallerytext">
19740 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19741 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="http://www.example.org"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19746 Gallery override link with absolute external link with LanguageConverter
19751 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19754 <ul class="gallery mw-gallery-traditional">
19755 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19756 <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>
19757 <div class="gallerytext">
19767 Gallery override link with malicious javascript (T36852)
19770 "modes": ["wt2html", "html2html"],
19771 "nativeGallery": true
19775 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19778 <ul class="gallery mw-gallery-traditional">
19779 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19780 <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>
19781 <div class="gallerytext">
19787 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19788 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./%22_onclick=%22alert('malicious_javascript_code!');"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19793 Gallery with invalid title as link (T45964)
19796 "modes": ["wt2html", "html2html"],
19797 "nativeGallery": true
19801 File:Foobar.jpg|link=<
19804 <ul class="gallery mw-gallery-traditional">
19805 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19806 <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>
19807 <div class="gallerytext">
19813 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19814 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext">link=<</div></li>
19819 Serialize gallery without attrs in data-mw
19822 "modes": ["html2wt"],
19823 "nativeGallery": true
19826 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
19827 <li class="gallerycaption">123</li>
19828 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:Test.png</span></div><div class="gallerytext"></div></li>
19831 <gallery caption="123">
19837 Gallery with class and style attributes
19840 "nativeGallery": true
19843 <gallery class="center" style="text-align: center;">
19847 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
19848 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19849 <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>
19850 <div class="gallerytext">
19856 <ul class="gallery mw-gallery-traditional center" style="text-align: center;" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"class":"center","style":"text-align: center;"},"body":{}}'>
19857 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span typeof="mw:Image" style="vertical-align: middle; display: inline-block;"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19862 Gallery in slideshow mode
19865 "nativeGallery": true
19868 <gallery mode="slideshow" showthumbnails="">
19872 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
19873 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19874 <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>
19875 <div class="gallerytext">
19881 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
19882 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px;"><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></span></div><div class="gallerytext"></div></li>
19887 HTML Hex character encoding (spells the word "JavaScript")
19889 parsoid=wt2html,wt2wt,html2html
19891 JavaScript
19893 <p>JavaScript
19898 <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>
19902 HTML Hex character encoding bogus encoding (T28437 regression check)
19906 <p>&#xsee;&#XSEE;
19909 <p>&#xsee;&#XSEE;</p>
19913 HTML Hex character encoding mixed case
19915 parsoid=wt2html,wt2wt,html2html
19924 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19927 # See: https://www.w3.org/TR/html5/syntax.html#character-references
19928 # Note that U+000C (form feed) is not a valid XML character, so
19929 # it is banned even though allowed in HTML5.
19931 Illegal character references (T106578)
19936 ; Control (low): 
19937 ; Control (high):  Ÿ
19938 ; Surrogate: ��
19939 ; This is an okay astral character: 💩
19948 <dt>Control (low)</dt>
19950 <dt>Control (high)</dt>
19951 <dd>&#x7F; &#x9F;</dd>
19953 <dd>&#xD83D;&#xDCA9;</dd>
19954 <dt>This is an okay astral character</dt>
19960 __FORCETOC__ override
19972 ISBN 978-0-1234-56 789
19974 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19977 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19979 <p><a href="./Special:BookSources/9780123456" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>789</p>
19983 ISBN followed by 5 spaces
19994 ISBN ISBN 1234567890
19996 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19999 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
20002 # Uppercase X and lowercase x as well
20013 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
20014 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
20015 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
20016 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
20017 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
20018 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
20021 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
20022 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
20023 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
20024 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
20025 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
20026 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
20030 ISBN with empty prefix (parsoid test)
20034 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20037 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
20041 T24905: <abbr> followed by ISBN followed by </a>
20043 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
20045 <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>
20048 <p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" href="http://www.example.com">example.com</a></p>
20056 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
20061 Double RFC with a wiki link
20065 <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>
20074 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
20077 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
20081 Centre-aligned image
20083 [[Image:foobar.jpg|centre]]
20085 <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>
20092 [[Image:foobar.jpg|none]]
20094 <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>
20099 Width + Height sized image (using px) (height is ignored)
20101 [[Image:foobar.jpg|640x480px]]
20103 <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>
20108 Width-sized image (using px, no following whitespace)
20110 [[Image:foobar.jpg|640px]]
20112 <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>
20117 Width-sized image (using px, with following whitespace - test regression from r39467)
20119 [[Image:foobar.jpg|640px ]]
20121 <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>
20126 Width-sized image (using px, with preceding whitespace - test regression from r39467)
20128 [[Image:foobar.jpg| 640px]]
20130 <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>
20135 Image with page parameter
20139 [[File:LoremIpsum.djvu|page=2]]
20141 <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>
20144 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"page","ak":"page=2"}]}' data-mw='{"page":"2"}'><a href="./File:LoremIpsum.djvu" data-parsoid='{"a":{"href":"./File:LoremIpsum.djvu"},"sa":{"href":"File:LoremIpsum.djvu"}}'><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>
20148 Another italics / bold test
20156 # FIXME: The php output seems broken. It's interleaving some open/close tags.
20162 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
20165 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
20169 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
20171 Images with the "|" character in the comment
20173 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
20175 <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>
20178 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>An <a rel="mw:ExtLink" href="http://test/?param1=%7Cleft%7C&param2=%7Cx" data-parsoid='{"a":{"href":"http://test/?param1=%7Cleft%7C&param2=%7Cx"},"sa":{"href":"http://test/?param1=|left|&param2=|x"}}'>external</a> URL</figcaption></figure>
20182 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
20184 <html><script>alert(1);</script></html>
20186 <p><html><script>alert(1);</script></html>
20191 HTML with raw HTML ($wgRawHtml==true)
20195 <html><script>alert(1);</script></html>
20197 <p><script>alert(1);</script>
20202 Parents of subpages, one level up
20204 subpage title=[[Subpage test/L1/L2/L3]]
20208 <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>
20214 Parents of subpages, one level up, not named
20216 subpage title=[[Subpage test/L1/L2/L3]]
20220 <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>
20227 Parents of subpages, two levels up
20229 subpage title=[[Subpage test/L1/L2/L3]]
20235 <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
20236 </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>
20241 Parents of subpages, two levels up, without trailing slash or name.
20243 subpage title=[[Subpage test/L1/L2/L3]]
20252 Parents of subpages, two levels up, with lots of extra trailing slashes.
20254 subpage title=[[Subpage test/L1/L2/L3]]
20258 <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>
20263 Subpage test/L1/L2/L3Sibling
20269 Transclusion of a sibling page (one level up)
20271 subpage title=[[Subpage test/L1/L2/L3]]
20280 Transclusion of a child page
20282 subpage title=[[Subpage test/L1/L2]]
20290 # This is wt2html only in Parsoid because we add <nowiki>
20291 # because of {{..}} and we don't expect to fix that to
20292 # eliminate the nowikis selective for {{..}} markup.
20294 Non-transclusion because of too many up levels
20296 subpage title=[[Subpage test/L1/L2/L3]]
20299 {{../../../../More than parent}}
20301 <p>{{../../../../More than parent}}
20304 <p>{{../../../../More than parent}}</p>
20308 Definition list code coverage
20314 <dl><dt> title  </dt>
20316 <dt> title </dt>
20322 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20323 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20324 <dt>title</dt><dd> def</dd></dl>
20328 Don't fall for the self-closing div
20330 <div>hello world</div/>
20332 <div>hello world</div>
20341 <p>[[:Template:Msg]]
20350 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
20354 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
20356 Always escape literal '>' in output, not just after '<'
20370 <p>This is a test template
20371 This is a test template
20383 Inclusion of !userCanEdit() content
20387 <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>
20393 Out-of-order TOC heading levels
20402 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
20404 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
20406 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
20407 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
20410 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
20412 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
20413 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
20419 <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>
20420 <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>
20421 <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>
20422 <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>
20423 <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>
20424 <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>
20430 ISBN with a dummy number
20440 ISBN with space-delimited number
20444 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
20447 <p data-parsoid='{"dsr":[0,18,0,0]}'><a href="./Special:BookSources/9290170328" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink","dsr":[0,18,2,2]}'>ISBN 92 9017 032 8</a></p>
20452 ISBN with multiple spaces, no number
20471 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20472 </p><p>ISBN 12345678901
20475 <p>ISBN 123456789</p>
20477 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
20479 <p>ISBN 12345678901</p>
20484 ISBN with trailing year (T9110)
20486 ISBN 1-234-56789-0 - 2006
20488 ISBN 1 234 56789 0 - 2006
20490 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
20491 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
20494 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
20496 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
20503 {{anchorencode:foo bar©#%n}}
20505 <p>foo_bar.C2.A9.23.25n
20510 anchorencode trims spaces
20512 {{anchorencode: __pretty__please__}}
20519 anchorencode deals with links
20521 {{anchorencode: [[hello|world]] [[hi]]}}
20528 anchorencode deals with templates
20530 {{anchorencode: {{Foo}} }}
20537 anchorencode encodes like the TOC generator: (T20431)
20539 === _ +:.3A%3A&&]] ===
20540 {{anchorencode: _ +:.3A%3A&&]] }}
20543 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
20544 <p>.2B:.3A.253A.26.26.5D.5D
20549 T8200: blockquotes and paragraph formatting
20570 T10293: Use of center tag ruins paragraph formatting
20591 Parsing of overlapping (improperly nested) inline html tags
20593 <span><s>x</span></s>
20595 <p><span><s>x</span></s></span>
20598 <p><span><s>x</s></span>
20603 ### Language variants related tests
20606 Self-link in language variants
20608 title=[[Dunav]] language=sr
20610 Both [[Dunav]] and [[Дунав]] are names for this river.
20612 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
20623 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
20625 title=[[Duna]] language=sr
20627 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
20629 <p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <a class="mw-selflink selflink">Duna</a> and <a class="mw-selflink selflink">Dуна</a> are still self-links.
20634 Link to a section of a variant of this title shouldn't be parsed as self-link
20636 title=[[Duna]] language=sr
20638 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
20640 <p><a class="mw-selflink selflink">Dуна</a> 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.
20645 Link to pages in language variants
20649 Main Page can be written as [[Маин Паге]]
20651 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
20657 Multiple links to pages in language variants
20661 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
20663 <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>.
20669 Simple template in language variants
20675 <p>This is a test template
20681 Template with explicit namespace in language variants
20687 <p>This is a test template
20693 Basic test for template parameter in language variants
20697 {{парамтест|param=foo}}
20699 <p>This is a test template with parameter foo
20704 Simple category in language variants
20708 [[Category:МедиаWики Усер'с Гуиде]]
20710 cat=МедиаWики_Усер'с_Гуиде sort=
20712 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
20727 ## We used to, but no longer wt2wt this test since the default serializer
20728 ## will normalize all categories to serialize on their own line.
20729 ## This wikitext usage is going to be fairly uncommon in production and
20730 ## selser will take care of preserving formatting in those scenarios.
20732 Don't convert blue categorylinks to another variant (T35210)
20738 [[A]][[Category:分类]]
20742 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
20743 <link rel="mw:PageProp/Category" href="./Category:分类"/>
20747 Stripping -{}- tags (language variants)
20751 Latin proverb: -{Ne nuntium necare}-
20753 <p>Latin proverb: Ne nuntium necare
20759 Prevent conversion with -{}- tags (language variants)
20761 language=sr variant=sr-ec
20763 Latinski: -{Ne nuntium necare}-
20765 <p>Латински: Ne nuntium necare
20771 Prevent conversion of text with -{}- tags (language variants)
20773 language=sr variant=sr-ec
20775 Latinski: -{Ne nuntium necare}-
20777 <p>Латински: Ne nuntium necare
20783 Prevent conversion of links with -{}- tags (language variants)
20785 language=sr variant=sr-ec
20789 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20795 -{}- tags within headlines (within html for parserConvert())
20797 language=sr variant=sr-ec
20801 <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>
20807 Explicit definition of language variant alternatives
20809 language=zh variant=zh-tw
20811 -{zh:China;zh-tw:Taiwan}-, not China
20813 <p>Taiwan, not China
20819 Conversion around HTML tags
20821 language=sr variant=sr-ec
20823 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
20824 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
20827 <span title="ЛаCтин">ски</span>
20833 Explicit session-wise language variant mapping (A flag and - flag)
20835 language=zh variant=zh-tw
20837 Taiwan is not China.
20838 But -{A|zh:China;zh-tw:Taiwan}- is China,
20839 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20840 and -{China}- is China.
20842 <p>Taiwan is not China.
20843 But Taiwan is Taiwan,
20844 (This should be stripped!)
20845 and China is China.
20850 Explicit session-wise language variant mapping (H flag for hide)
20852 language=zh variant=zh-tw
20854 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20857 <p>(This should be stripped!)
20863 Adding explicit conversion rule for title (T flag)
20865 language=zh variant=zh-tw showtitle
20867 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20870 <p>Should be stripped!
20875 Testing that changing the language variant here in the tests actually works
20877 language=zh variant=zh showtitle
20879 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20882 <p>Should be stripped!
20887 Recursive conversion of alt and title attrs shouldn't clear converter state
20889 language=zh variant=zh-cn showtitle
20891 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20892 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20896 Should be stripped<span title="Exclamation">!</span>
20901 T26072: more test on conversion rule for title
20903 language=zh variant=zh-tw showtitle
20905 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20906 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20909 <p>This should be stripped!
20910 This won't take interferes with the title rule.
20915 Partly disable title conversion if variant == main language code
20917 language=zh variant=zh title=[[ZH]] showtitle
20919 -{T|zh-cn:CN;zh-tw:TW}-
20927 Partly disable title conversion if variant == main language code, more
20929 language=zh variant=zh title=[[ZH]] showtitle
20939 Raw output of variant escape tags (R flag)
20941 language=zh variant=zh-tw
20943 Raw: -{R|zh:China;zh-tw:Taiwan}-
20945 <p>Raw: zh:China;zh-tw:Taiwan
20950 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20952 language=zh variant=zh-cn
20954 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20961 Conversion rules from [numeric-only string] to [something else] (T48634)
20963 language=zh variant=zh-cn
20965 -{H|0=>zh-cn:B}--{H|0=>zh-cn:C;0=>zh-cn:D}--{H|0=>zh-hans:A}-012345-{A|zh-tw:0;zh-cn:E;}-012345
20972 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20974 language=zh variant=zh-cn
20976 -{H|zh-cn:foo;zh-tw:;}-foobar
20983 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20985 language=zh variant=zh-cn
20987 -{H|=>zh-cn:foo;}-foobar
20994 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20996 language=zh variant=zh-cn
21005 Nested using of manual convert syntax
21007 language=zh variant=zh-hk
21009 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
21011 <p>Nested: Hello Hong Kong!
21016 HTML markups with conversion syntax in attribs, nested in other conversion blocks
21018 language=zh variant=zh-cn
21020 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
21022 <p><span title="X">A</span>
21027 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet)
21029 language=zh variant=zh-cn disabled
21031 -{<span title="-{X}-">A</span>}-
21033 <p><span title="X">A</span>
21037 # Since Parsoid is starting to emit canonical wikitext for links,
21038 # [http://example.com http://example.com] will not RT back to that
21041 Proper conversion of text in external links
21043 language=sr variant=sr-ec
21046 http://www.google.com
21047 gopher://www.google.com
21048 [http://www.google.com http://www.google.com]
21049 [gopher://www.google.com gopher://www.google.com]
21050 [https://www.google.com irc://www.google.com]
21051 [ftp://www.google.com www.google.com/ftp://dir]
21052 [//www.google.com www.google.com]
21054 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
21055 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
21056 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
21057 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
21058 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
21059 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
21060 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
21063 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
21064 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
21065 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
21066 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
21067 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
21068 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
21069 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
21073 Do not convert roman numbers to language variants
21075 language=sr variant=sr-ec
21079 <p>Фридрих IV је цар.
21084 Unclosed language converter markup "-{"
21095 Don't convert raw rule "-{R|=>}-" to "=>"
21106 Don't break link parsing if language converter markup is in the caption.
21108 language=sr variant=sr-ec
21110 [[Main Page|-{R|main page}-]]
21112 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
21116 # FIXME: This test is currently broken in the PHP parser T153761
21118 T146304: Don't break template parsing if language converter markup is in the parameter.
21120 language=sr variant=sr-ec
21130 T146305: Don't break image parsing if language converter markup is in the caption.
21134 [[File:Foobar.jpg|thumb|-{R|caption:}-]]
21136 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0: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/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="internal" title="Повећај"></a></div>caption:</div></div></div>
21139 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./Датотека:Foobar.jpg"><img resource="./Датотека:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><span typeof="mw:LanguageVariant" data-mw='{"disabled":true,"show":true,"text":"caption:"}'></span></figcaption></figure>
21143 T146305: Don't break image parsing if nested language converter markup is in the caption.
21145 language=zh variant=zh-cn
21147 [[File:Foobar.jpg|thumb|-{zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
21149 <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="放大"></a></div>blog (hk: WEBJOURNAL, tw: WEBLOG)</div></div></div>
21152 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><span typeof="mw:LanguageVariant" data-mw='{"bidir":[{"l":"zh-cn","t":"blog (hk: <span typeof=\"mw:LanguageVariant\" data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[42,64,null,2]}' data-mw='{\"filter\":[\"zh-hans\"],\"text\":\"WEBJOURNAL\"}'></span>, tw: <span typeof=\"mw:LanguageVariant\" data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[70,88,null,2]}' data-mw='{\"filter\":[\"zh-hans\"],\"text\":\"WEBLOG\"}'></span>)"}],"show":true}'></span></figcaption></figure>
21156 Don't break gallery if language converter markup is inside.
21161 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
21162 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
21165 <ul class="gallery mw-gallery-traditional">
21166 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21167 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="bat" 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>
21168 <div class="gallerytext">
21169 <p><a href="/wiki/File:Foobar.jpg" class="image" title="bar"><img alt="foo" 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>
21173 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21174 <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>
21175 <div class="gallerytext">
21176 <p>This is a test template
21185 T153135: Don't break list handling if language converter markup is in the item.
21187 language=zh variant=zh-cn
21189 ;-{zh-cn:AAA;zh-tw:BBB}-
21193 <dt>foo:bar</dt></dl>
21197 <dt><span typeof="mw:LanguageVariant" data-mw='{"bidir":[{"l":"zh-cn","t":"AAA"},{"l":"zh-tw","t":"BBB"}],"show":true}'></span></dt>
21198 <dt><span typeof="mw:LanguageVariant" data-mw='{"disabled":true,"show":true,"text":"foo:bar"}'></span></dt>
21202 // Note that parsoid does not protect colons unless language converter
21203 // markup is properly nested, because it is a backtracking parser.
21205 T153135: Unclosed markup in definition list (code coverage)
21207 language=zh variant=zh-cn
21212 <dl><dt><b>foo:bar</dt>
21213 <dt>-{zh-cn:AAA</b></dt></dl>
21217 <dt><b>foo:bar</b></dt>
21225 T153135: Nested language converter markup in definition list (code coverage)
21227 language=zh variant=zh-cn
21229 ;-{zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
21231 <dl><dt>AAA foo:bar bat:baz</dt>
21236 <dt><span typeof="mw:LanguageVariant" data-mw='{"bidir":[{"l":"zh-cn","t":"AAA <span typeof=\"mw:LanguageVariant\" data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[13,32,null,2]}' data-mw='{\"filter\":[\"zh-hans\"],\"text\":\"bar\"}'></span> <span typeof=\"mw:LanguageVariant\" data-parsoid='{\"fl\":[\"R\"],\"dsr\":[33,46,null,2]}' data-mw='{\"disabled\":true,\"show\":true,\"text\":\"bat:baz\"}'></span>"}],"show":true}'></span></dt>
21242 T153140: Don't break table handling if language converter markup is in the cell.
21244 language=sr variant=sr-ec
21267 T2529: Uncovered bullet
21276 # Plain MediaWiki does not remove empty lists, but tidy actually does.
21277 # Templates in Wikipedia rely on this behavior, as tidy has always been
21278 # enabled there. These tests are normally run *without* tidy, so specify the
21279 # full output here.
21280 # To test realistic parsing behavior, apply a tidy-like transformation to both
21281 # the expected output and your parser's output.
21283 T2529: Uncovered bullet leaving empty list, normally removed by tidy
21285 ******* Foo {{bullet}}
21287 <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>
21293 T2529: Uncovered table already at line-start
21316 T2529: Uncovered bullet in parser function result
21318 * Foo {{lc:{{bullet}} }}
21326 T7678: Double-parsed template argument
21328 {{lc:{{{1}}}|hello}}
21335 T7678: Double-parsed template invocation
21337 {{lc:{{paramtest {{!}} param = hello }} }}
21339 <p>{{paramtest | param = hello }}
21344 Case insensitivity of parser functions for non-ASCII characters (T10143)
21347 title=[[Main Page]]
21349 {{PRVNÍVELKÉ:ěščř}}
21350 {{prvnívelké:ěščř}}
21370 Morwen/13: Unclosed link followed by heading
21377 <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>
21382 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
21389 <h1><span class="mw-headline" id="heading">heading</span></h1>
21394 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
21401 <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>
21416 Paragraphs inside divs (no extra line breaks)
21428 Paragraphs inside divs (extra line break on open)
21443 Paragraphs inside divs (extra line break on close)
21458 Paragraphs inside divs (extra line break on open and close)
21475 Nesting tags, paragraphs on lines which begin with <div>
21477 <div></div><strong>A
21480 <p><strong>A</strong></p>
21481 <p><strong>B</strong></p>
21489 # T8200: <blockquote> should behave like <div> with respect to line breaks
21491 T8200: paragraphs inside blockquotes (no extra line breaks)
21493 <blockquote>Line one
21495 Line two</blockquote>
21497 <blockquote>Line one
21498 Line two</blockquote>
21502 <p>Line one Line two</p>
21507 T8200: paragraphs inside blockquotes (extra line break on open)
21512 Line two</blockquote>
21517 Line two</blockquote>
21522 Line two</blockquote>
21526 T8200: paragraphs inside blockquotes (extra line break on close)
21528 <blockquote>Line one
21533 <blockquote>Line one
21546 T8200: paragraphs inside blockquotes (extra line break on open and close)
21568 Paragraphs inside blockquotes/divs (no extra line breaks)
21570 <blockquote><div>Line one
21572 Line two</div></blockquote>
21574 <blockquote><div>Line one
21575 Line two</div></blockquote>
21580 Paragraphs inside blockquotes/divs (extra line break on open)
21585 Line two</div></blockquote>
21590 Line two</div></blockquote>
21595 Paragraphs inside blockquotes/divs (extra line break on close)
21597 <blockquote><div>Line one
21600 </div></blockquote>
21602 <blockquote><div>Line one
21605 </div></blockquote>
21610 Paragraphs inside blockquotes/divs (extra line break on open and close)
21616 </div></blockquote>
21622 </div></blockquote>
21627 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
21629 wgLinkHolderBatchSize=0
21635 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
21636 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
21637 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
21642 Free external link invading image caption
21644 [[Image:Foobar.jpg|thumb|http://x|hello]]
21646 <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>
21651 T17196: localised external link numbers
21655 [http://en.wikipedia.org/]
21657 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
21660 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
21664 Multibyte character in padleft
21666 {{padleft:-Hello|7|Æ}}
21673 Multibyte character in padright
21675 {{padright:Hello-|7|Æ}}
21682 formatdate parser function
21684 {{#formatdate:2009-03-24}}
21686 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
21691 formatdate parser function, with default format
21693 {{#formatdate:2009-03-24|mdy}}
21695 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
21700 Spacing of numbers in formatted dates
21702 {{#formatdate:January 15}}
21704 <p><span class="mw-formatted-date" title="01-15">January 15</span>
21709 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
21711 language=nl title=[[MediaWiki:Common.css]]
21713 {{#formatdate:2009-03-24|dmy}}
21715 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
21728 Edit comment with link
21732 I like the [[Main Page]] a lot
21734 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
21738 Edit comment with link and link text
21742 I like the [[Main Page|best pages]] a lot
21744 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21748 Edit comment with link and link text with suffix
21752 I like the [[Main Page|best page]]s a lot
21754 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21758 Edit comment with section link (non-local, eg in history list)
21760 comment title=[[Main Page]]
21762 /* External links */ removed bogus entries
21764 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21768 Edit comment with section link and text before it (non-local, eg in history list)
21770 comment title=[[Main Page]]
21772 pre-comment text /* External links */ removed bogus entries
21774 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>
21778 Edit comment with section link (local, eg in diff view)
21780 comment local title=[[Main Page]]
21782 /* External links */ removed bogus entries
21784 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21788 Edit comment with subpage link (T16080)
21792 title=[[Subpage test]]
21794 Poked at a [[/subpage]] here...
21796 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
21800 Edit comment with subpage link and link text (T16080)
21804 title=[[Subpage test]]
21806 Poked at a [[/subpage|neat little page]] here...
21808 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
21812 Edit comment with bogus subpage link in non-subpage NS (T16080)
21815 title=[[Subpage test]]
21817 Poked at a [[/subpage]] here...
21819 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
21823 Edit comment with bare anchor link (local, as on diff)
21827 title=[[Main Page]]
21831 <a href="#section">#section</a>
21835 Edit comment with bare anchor link (non-local, as on history)
21838 title=[[Main Page]]
21842 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
21846 Anchor starting with underscore
21852 <p><a href="#_ref">One</a>
21855 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
21859 Id starting with underscore
21861 <div id="_ref"></div>
21863 <div id="_ref"></div>
21868 Edit comment with link with more than one pipe (T99346)
21872 [[Main Page|Many|pipes]]
21874 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
21878 Complex edit comment with link with more than one pipe (T99346)
21882 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
21884 Created page with "<noinclude><a href="/index.php?title=Category:Requests_for_permissions/Bot&action=edit&redlink=1" class="new" title="Category:Requests for permissions/Bot (page does not exist)">{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}</a></noinclude> === <a href="/index.php?title=User:MineoBot&action=edit&redlink=1" class="new" title="User:MineoBot (page does not exist)">User:MineoBot</a> 8=== {{Request for permissions/links|Mineo..."
21888 Space normalisation on autocomment (T24784)
21891 title=[[Main Page]]
21893 /* __hello__world__ */
21895 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
21899 percent-encoding and + signs in comments (T28410)
21903 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
21905 <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>
21908 # Parsoid doesn't support this yet: see T75581
21909 # but it *should* omit the 'src' attribute if the image is bad.
21910 # PHP side of tests was disabled in
21911 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
21912 # because of issues in the PHP parserTests infrastructure
21913 # (but the output below is indeed what the PHP side emits)
21915 Bad images - basic functionality
21918 !! DISABLED/html/php
21920 <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>
21924 Bad images - T18039: text after bad image disappears
21929 !! DISABLED/html/php
21935 <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>
21940 Verify that displaytitle works (T24501) no displaytitle
21944 wgAllowDisplayTitle=true
21945 wgRestrictDisplayTitle=false
21947 this is not the the title
21950 <p>this is not the the title
21955 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
21960 wgAllowDisplayTitle=true
21961 wgRestrictDisplayTitle=false
21963 this is not the the title
21964 {{DISPLAYTITLE:whatever}}
21967 <p>this is not the the title
21972 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
21977 wgAllowDisplayTitle=true
21978 wgRestrictDisplayTitle=true
21980 this is not the the title
21981 {{DISPLAYTITLE:whatever}}
21984 <p>this is not the the title
21989 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
21994 wgAllowDisplayTitle=true
21995 wgRestrictDisplayTitle=true
21997 this is not the the title
21998 {{DISPLAYTITLE:screen}}
22001 <p>this is not the the title
22006 Verify that displaytitle works (T24501) AllowDisplayTitle=false
22011 wgAllowDisplayTitle=false
22013 this is not the the title
22014 {{DISPLAYTITLE:screen}}
22017 <p>this is not the the title
22018 <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>
22023 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
22028 wgAllowDisplayTitle=false
22030 this is not the the title
22033 <p>this is not the the title
22038 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
22043 wgAllowDisplayTitle=true
22044 wgRestrictDisplayTitle=true
22046 this is not the the title
22047 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
22049 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
22050 <p>this is not the the title
22055 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
22060 wgAllowDisplayTitle=true
22061 wgRestrictDisplayTitle=true
22063 this is not the the title
22064 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
22066 <span style="color: red;">s</span>creen
22067 <p>this is not the the title
22072 Page status indicators: Empty name is invalid
22076 <indicator name=" "></indicator>
22077 <indicator></indicator>
22079 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
22080 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
22085 Page status indicators: Weird syntaxes that are okay
22089 <indicator name="empty" />
22090 <indicator name="name"></indicator>
22099 Page status indicators: Torture test
22103 <indicator name="01">hello world</indicator>
22104 <indicator name="02">[[Main Page]]</indicator>
22105 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
22106 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
22107 <indicator name="05">* foo
22109 <indicator name="06"><nowiki>foo</nowiki></indicator>
22110 <indicator name="07"> Preformatted</indicator>
22111 <indicator name="08"><div>Broken tag</indicator>
22112 <indicator name="09">{| class=wikitable
22115 <indicator name="10">Two
22117 paragraphs</indicator>
22120 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22121 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" />
22122 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>
22123 05=<ul><li> foo</li>
22127 07=<pre>Preformatted
22129 08=<div>Broken tag</div>
22131 09=<table class="wikitable">
22148 preload: check <noinclude> and <includeonly>
22152 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
22158 preload: check <onlyinclude>
22162 Goodbye <onlyinclude>Hello world</onlyinclude>
22168 preload: can pass tags through if we want to
22172 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
22174 <includeonly>Hello world</includeonly>
22178 preload: check that it doesn't try to do tricks
22182 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
22184 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
22188 Play a bit with r67090 and T5158
22190 <div style="width:50% !important"> </div>
22191 <div style="width:50% !important"> </div>
22192 <div style="width:50% !important"> </div>
22193 <div style="border : solid;"> </div>
22195 <div style="width:50% !important"> </div>
22196 <div style="width:50% !important"> </div>
22197 <div style="width:50% !important"> </div>
22198 <div style="border : solid;"> </div>
22201 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
22202 <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>
22203 <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>
22204 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
22209 HTML5 data attributes
22211 <span data-foo="bar">Baz</span>
22212 <p data-abc-def_hij="">Quuz</p>
22214 <p><span data-foo="bar">Baz</span>
22216 <p data-abc-def_hij="">Quuz</p>
22219 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
22220 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
22224 Strip reserved data attributes
22226 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
22228 <div data-ok="fred">d</div>
22231 <div data-x-data-mw="foo" data-x-data-parsoid="bar" data-x-data-mw-someext="baz" data-ok="fred" data-parsoid='{"stx":"html","a":{"data-ooui":null,"data-bad:ns":null},"sa":{"data-ooui":"xyzzy","data-bad:ns":"ns"}}'>d</div>
22235 percent-encoding and + signs in internal links (T28410)
22237 [[User:+%]] [[Page+title%]]
22238 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
22239 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
22240 [[%33%45]] [[%33%45+]]
22242 <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>
22243 <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>
22244 <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>
22245 <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>
22248 <p><a rel="mw:WikiLink" href="./User:+%25" title="User:+%" data-parsoid='{"stx":"simple","a":{"href":"./User:+%25"},"sa":{"href":"User:+%"}}'>User:+%</a> <a rel="mw:WikiLink" href="./Page+title%25" title="Page+title%" data-parsoid='{"stx":"simple","a":{"href":"./Page+title%25"},"sa":{"href":"Page+title%"}}'>Page+title%</a>
22249 <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%+</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"piped","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%20</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+ "}}'>%+ </a> <a rel="mw:WikiLink" href="./%25+r" title="%+r" data-parsoid='{"stx":"simple","a":{"href":"./%25+r"},"sa":{"href":"%+r"}}'>%+r</a>
22250 <a rel="mw:WikiLink" href="./%25" title="%" data-parsoid='{"stx":"simple","a":{"href":"./%25"},"sa":{"href":"%"}}'>%</a> <a rel="mw:WikiLink" href="./+" title="+" data-parsoid='{"stx":"simple","a":{"href":"./+"},"sa":{"href":"+"}}'>+</a> <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./Bar\" title=\"Bar\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Bar\"},\"sa\":{\"href\":\"bar\"},\"dsr\":[94,101,2,2]}'>bar</a>"}'><a href="./File:%25+abc9" data-parsoid='{"a":{"href":"./File:%25+abc9"},"sa":{}}'><img resource="./File:%25+abc9" src="./Special:FilePath/%25+abc9" height="220" width="220" data-parsoid='{"a":{"resource":"./File:%25+abc9","height":"220","width":"220"},"sa":{"resource":"File:%+abc%39"}}'/></a></span>
22251 <a rel="mw:WikiLink" href="./3E" title="3E" data-parsoid='{"stx":"simple","a":{"href":"./3E"},"sa":{"href":"%33%45"}}'>3E</a> <a rel="mw:WikiLink" href="./3E+" title="3E+" data-parsoid='{"stx":"simple","a":{"href":"./3E+"},"sa":{"href":"%33%45+"}}'>3E+</a></p>
22255 Special characters in embedded file links (T29679)
22257 [[File:Contains & ampersand.jpg]]
22258 [[File:Does not exist.jpg|Title with & ampersand]]
22260 <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>
22261 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
22264 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","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>
22265 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"Title with &amp; ampersand"}'><a href="./File:Does_not_exist.jpg"><img resource="./File:Does_not_exist.jpg" src="./Special:FilePath/Does_not_exist.jpg" height="220" width="220"/></a></span></p>
22269 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
22271 Text's been normalized?
22273 <p>Text's been normalized?
22278 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
22280 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
22282 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
22287 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
22289 [http://www.example.org/ ideograms]
22291 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
22296 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
22298 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
22300 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
22324 T33098 Template which includes system messages which includes the template
22328 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22329 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22334 T33490 Turkish: ucfirst 'blah'
22345 T33490 Turkish: ucfirst 'ix'
22356 T33490 Turkish: lcfirst 'BLAH'
22367 T33490 Turkish: ucfırst (with a dotless i)
22373 <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>
22378 T33490 ucfırst (with a dotless i) with English language
22384 <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>
22388 # Note that Parsoid doesn't emit an explicit TOC.
22389 # Note also that the html2wt direction tends to emit an extra newline
22390 # between the __TOC__ magicword and the first heading unless *both*
22391 # the <meta> and the <h2> have a data-parsoid attribute set (even if
22395 T28375: TOC with italics
22397 title=[[Main Page]]
22400 == ''Lost'' episodes ==
22402 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22404 <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>
22408 <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>
22411 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22412 <h2 data-parsoid='{}'> <i>Lost</i> episodes </h2>
22416 T28375: TOC with bold
22418 title=[[Main Page]]
22421 == '''should be bold''' then normal text ==
22423 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22425 <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>
22429 <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>
22432 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22433 <h2 data-parsoid='{}'> <b>should be bold</b> then normal text </h2>
22437 T35845: Headings become cursive in TOC when they contain an image
22439 title=[[Main Page]]
22442 == Image [[Image:foobar.jpg]] ==
22444 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22446 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
22450 <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>
22453 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22454 <h2 data-parsoid='{}'> Image <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" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></span> </h2>
22458 T35845 (2): Headings become bold in TOC when they contain a blockquote
22460 title=[[Main Page]]
22463 == <blockquote>Quote</blockquote> ==
22465 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22467 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22471 <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>
22475 <div id="toc" class="toc">
22476 <div id="toctitle" class="toctitle">
22480 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22484 <h2><span class="mw-headline" id="Quote"></span></h2>
22486 <p><span class="mw-headline" id="Quote">Quote</span></p>
22488 <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>
22490 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22491 <h2 data-parsoid='{}'> <blockquote>Quote</blockquote> </h2>
22495 Unclosed tags in TOC
22497 title=[[Main Page]]
22501 <small>Hanc marginis exiguitas non caperet.</small>
22504 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22506 <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>
22510 <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>
22511 <p><small>Hanc marginis exiguitas non caperet.</small>
22515 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22516 <h2 data-parsoid='{}'> Proof: 2 < 3 </h2>
22517 <p><small>Hanc marginis exiguitas non caperet.</small>
22522 Multiple tags in TOC
22525 == <i>Foo</i> <b>Bar</b> ==
22527 == <i>Foo</i> <blockquote>Bar</blockquote> ==
22529 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22531 <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>
22532 <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>
22536 <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>
22537 <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>
22541 <div id="toc" class="toc">
22542 <div id="toctitle" class="toctitle">
22546 <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>
22547 <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>
22551 <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>
22552 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
22554 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
22556 <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>
22558 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22559 <h2 data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b> </h2>
22560 <h2> <i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote> </h2>
22563 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
22564 # html5 tag parsing.
22566 Tags with parameters in TOC
22571 == <sup class="in-h2">Hello</sup> ==
22573 == <sup class="a > b">Evilbye</sup> ==
22575 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22577 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
22578 <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>
22582 <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>
22583 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup class="a"> b">Evilbye</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">Evilbye">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22586 <meta property="mw:PageProp/toc" />
22587 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
22589 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
22593 span tags with directionality in TOC
22596 == <span dir="ltr">C++</span> ==
22598 == <span dir="rtl">זבנג!</span> ==
22600 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
22602 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
22604 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
22606 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22608 <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>
22609 <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>
22610 <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>
22611 <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>
22612 <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>
22616 <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>
22617 <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>
22618 <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>
22619 <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>
22620 <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>
22623 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22624 <h2 data-parsoid='{}'> <span dir="ltr">C++</span> </h2>
22625 <h2> <span dir="rtl">זבנג!</span> </h2>
22626 <h2> <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> </h2>
22627 <h2> <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> </h2>
22628 <h2> <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> </h2>
22632 T74884: bdi element in ToC
22635 == <bdi>test</bdi> ==
22637 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22639 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
22643 <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>
22646 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22647 <h2 data-parsoid='{}'> <bdi>test</bdi> </h2>
22651 T35715: s/strike element in ToC
22654 == <s>test</s> test <strike>test</strike> ==
22656 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22658 <li class="toclevel-1 tocsection-1"><a href="#test_test_test"><span class="tocnumber">1</span> <span class="toctext"><s>test</s> test <strike>test</strike></span></a></li>
22662 <h2><span class="mw-headline" id="test_test_test"><s>test</s> test <strike>test</strike></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 test test">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
22665 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22666 <h2 data-parsoid='{}'> <s>test</s> test <strike>test</strike> </h2>
22669 # Note that the html output does not have the <p></p>, but the
22670 # html+tidy output *does*. This is because the empty <p></p> is
22671 # removed by the sanitizer, but only when tidy is *not* enabled (!).
22673 Empty <p> tag in TOC, removed by Sanitizer (T92892)
22678 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22680 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22684 <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>
22688 <div id="toc" class="toc">
22689 <div id="toctitle" class="toctitle">
22693 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22697 <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>
22699 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22700 <h2 data-parsoid='{}'> x </h2>
22706 == {{int:headline_sample}} ==
22710 T34057: Title needed when expanding <h> nodes.
22712 title=[[Main Page]]
22716 <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>
22721 Strip marker in urlencode
22723 {{urlencode:x<nowiki/>y}}
22724 {{urlencode:x<nowiki/>y|wiki}}
22725 {{urlencode:x<nowiki/>y|path}}
22726 {{urlencode:x<pre id="one">two</pre>y}}
22754 Strip marker in formatNum
22756 {{formatnum:1<nowiki/>2}}
22757 {{formatnum:1<nowiki/>2|R}}
22765 Check noCommafy in formatNum
22769 {{formatnum:123456.78}}
22770 {{formatnum:123456.78|NOSEP}}
22778 Wrong option for formatNum (T58199)
22780 {{formatnum:1,234.56|Random}}
22781 {{formatnum:1,234.56|EVERYTHING}}
22782 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
22791 Strip marker in grammar
22795 {{grammar:elative|foo<nowiki/>bar}}
22802 Strip marker in padleft
22804 {{padleft:|2|x<nowiki/>y}}
22811 Strip marker in padright
22813 {{padright:|2|x<nowiki/>y}}
22820 Strip marker in anchorencode
22822 {{anchorencode:x<nowiki/>y}}
22829 nowiki inside link inside heading (T20295)
22831 ==[[foo|x<nowiki>y</nowiki>z]]==
22833 <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>
22838 new support for bdi element (T33817)
22840 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22842 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22847 Ignore pipe between table row attributes
22851 |- id=foo | style='color: red'
22859 <tr id="foo" style="color: red">
22866 Language parser function
22875 Padleft and padright as substr
22877 {{padleft:|3|abcde}}
22878 {{padright:|3|abcde}}
22886 Special parser function
22888 {{#special:RandomPage}}
22889 {{#special:BaDtItLe}}
22890 {{#special:Foobar}}
22899 T36939 - Case insensitive link parsing ([HttP://])
22901 [HttP://MediaWiki.Org/]
22903 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
22906 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
22910 T36939 - Case insensitive link parsing ([HttP:// title])
22912 [HttP://MediaWiki.Org/ MediaWiki]
22914 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
22919 T36939 - Case insensitive link parsing (HttP://)
22921 HttP://MediaWiki.Org/
22923 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22926 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22944 <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>
22945 <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>
22946 <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>
22947 <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>
22948 <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>
22954 ### Parsoid-specific tests
22955 ### Parsoid-PHP parser incompatibilities
22958 1. SOL-sensitive wikitext tokens as template-args
22960 parsoid=wt2html,wt2wt
22966 <span about="#mwt1" typeof="mw:Transclusion">
22967 </span><ul about="#mwt1"><li>a</li>
22969 <span about="#mwt2" typeof="mw:Transclusion">
22970 </span><ol about="#mwt2"><li>a</li>
22972 <span about="#mwt3" typeof="mw:Transclusion">
22973 </span><dl about="#mwt3"><dd>a</dd>
22977 #### -----------------------------------------------------------------
22978 #### Parsoid-specific functionality tests
22979 #### -----------------------------------------------------------------
22981 # T65642/T68749: Formatting elt fixup around images is cleaned up.
22982 # We know wt2wt will fail, but we expect selser to pass.
22983 # Due to the nature of our testing, wt2wt and selser tests will enter the
22984 # blacklist and we'll catch selser regressions based on changes to the
22985 # blacklist entries for selser tests.
22987 1. Bad treebuilder fixup of formatting elt is cleaned up
22989 parsoid=wt2html,wt2wt
22994 [[Image:Foobar.jpg|right|Test]]
23001 <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>
23008 2. Bad treebuilder fixup of formatting elt is cleaned up
23010 parsoid=wt2html,wt2wt
23012 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
23014 <small>[[Image:Foobar.jpg|right|300px]]</small>
23018 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><b>caption</b></figcaption></figure>
23020 <small><figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure></small>
23024 3. Bad treebuilder fixup of formatting elt is cleaned up
23026 parsoid=wt2html,wt2wt
23028 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
23030 <p><small><b>foo</b></small></p>
23031 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><small><b>caption</b></small></figcaption></figure>
23032 <p><small><b>bar</b></small></p>
23036 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
23038 parsoid=wt2html,wt2wt
23040 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
23042 <p><b><small></small></b></p>
23043 <figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure>
23047 #### ----------------------------------------------------------------
23048 #### Parsoid-only testing of Parsoid's impl of LST
23049 #### Not implemented yet, see
23050 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
23051 #### ----------------------------------------------------------------
23053 ## We still need to support serializing the older format while content is stored.
23055 LST Sections: Backwards compatibility
23058 "suppressErrors": true,
23059 "modes": ["html2wt"]
23062 <section begin="2011-05-16" />
23063 <section end="2014-04-10 (MW 1.23wmf22)" />
23065 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
23066 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
23069 ## The unconventional output is the result of `usePHPPreProcessor` being
23070 ## disabled in parserTests.js. This test is mainly just to show <section> is
23071 ## recognized as an extension tag w/o a native handler.
23073 LST Sections: Newfangled approach
23075 <section begin="2011-05-16" />
23076 <section end="2014-04-10 (MW 1.23wmf22)" />
23078 <p><span typeof="mw:Error mw:Extension/section" about="#mwt1" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null,"errors":[{"key":"mw-api-extexpand-error","message":"Could not expand extension source."}]}'><section begin="2011-05-16" /></span>
23079 <span typeof="mw:Error mw:Extension/section" about="#mwt2" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null,"errors":[{"key":"mw-api-extexpand-error","message":"Could not expand extension source."}]}'><section end="2014-04-10 (MW 1.23wmf22)" /></span></p>
23082 #--------- Test stripping of empty nodes in template content ----------
23084 Empty LI and TR nodes should be stripped from template content
23089 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
23093 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
23106 Empty LI and TR nodes should not be stripped from top-level content
23133 Empty TR nodes should not be stripped if they have any attributes set
23135 {{EmptyTRWithHTMLAttrTest}}
23137 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
23138 <tr align="center"></tr>
23139 <tr><td>foo</td></tr>
23140 <tr align="center"></tr>
23141 <tr><td>bar</td></tr>
23145 #### ----------------------------------------------------------------
23146 #### The following section of tests are primarily to test
23147 #### wikitext escaping capabilities of Parsoid. Given that
23148 #### escaping can be done any number of ways, the wikitext (input)
23149 #### is always adjusted to reflect how Parsoid adds nowiki
23152 #### We are marking several tests as parsoid-only since the
23153 #### HTML in the result section is different from what the
23154 #### PHP parser generates for it.
23155 #### ----------------------------------------------------------------
23158 #### --------------- Headings ---------------
23160 #### 1. Nested inside html <h1>=foo=</h1>
23161 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
23162 #### 3. Nested inside html with wikitext split by html tags
23163 #### 4. No escape needed
23164 #### 5. Empty headings <h1></h1>
23165 #### 6. Heading chars in SOL context
23166 #### ----------------------------------------
23168 Headings: 0. Unnested
23178 <p>=foo<i>a</i>=</p>
23180 <nowiki>=foo=</nowiki>
23182 <nowiki> </nowiki>=foo=
23184 <nowiki>=foo=</nowiki>
23186 =foo''a''<nowiki>=</nowiki>
23189 # New headings and existing headings are handled differently
23191 Headings: 1. Nested inside html
23199 <h1 data-parsoid=''>=foo=</h1>
23200 <h2 data-parsoid=''>=foo=</h2>
23201 <h3 data-parsoid=''>=foo=</h3>
23202 <h4 data-parsoid=''>=foo=</h4>
23203 <h5 data-parsoid=''>=foo=</h5>
23204 <h6 data-parsoid=''>=foo=</h6>
23212 =<nowiki>=foo=</nowiki>=
23213 ==<nowiki>=foo=</nowiki>==
23214 ===<nowiki>=foo=</nowiki>===
23215 ====<nowiki>=foo=</nowiki>====
23216 =====<nowiki>=foo=</nowiki>=====
23217 ======<nowiki>=foo=</nowiki>======
23222 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
23231 <nowiki>*</nowiki>bar
23237 <nowiki>=bar=</nowiki>
23241 Headings: 3. Nested inside html with wikitext split by html tags
23245 <h1>=<b>bold</b>foo=</h1>
23247 = ='''bold'''foo= =
23251 Headings: 4a. No escaping needed (testing just h1 and h2)
23262 <h1><i>=</i>foo=</h1>
23282 Headings: 4b. No escaping needed (inside p-tags)
23297 Headings: 5. Empty headings
23301 <h1 data-parsoid='{}'></h1>
23303 <h2 data-parsoid='{}'></h2>
23305 <h3 data-parsoid='{}'></h3>
23307 <h4 data-parsoid='{}'></h4>
23309 <h5 data-parsoid='{}'></h5>
23311 <h6 data-parsoid='{}'></h6>
23321 =====<nowiki/>=====
23323 ======<nowiki/>======
23327 Headings: 6a. Heading chars in SOL context (with trailing spaces)
23337 <nowiki>=a=</nowiki>
23339 <nowiki>=a=</nowiki>
23341 <nowiki>=a=</nowiki>
23345 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23358 <nowiki>=a=</nowiki>
23361 <nowiki>=a=</nowiki>
23364 <nowiki>=a=</nowiki>
23369 Headings: 6c. Heading chars in SOL context (leading newline break)
23377 <nowiki>=b=</nowiki>
23381 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23385 <!--c0--><p>=a=</p>
23387 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23389 <!--c0--><nowiki>=a=</nowiki>
23391 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23395 Headings: 6d. Heading chars in SOL context (No escaping needed)
23405 Headings: 7. Insert a newline between new content and headings
23411 <h2 data-parsoid='{}'>A</h2>
23412 <p data-parsoid='{}'>a</p>
23422 #### --------------- Lists ---------------
23423 #### 0. Outside nests (*foo, etc.)
23424 #### 1. Nested inside html <ul><li>*foo</li></ul>
23425 #### 2. Inside definition lists
23426 #### 3. Only bullets at start should be escaped
23427 #### 4. No escapes needed
23428 #### 5. No unnecessary escapes
23429 #### 6. Escape bullets in SOL position
23430 #### 7. Escape bullets in a multi-line context
23431 #### ----------------------------------------
23434 Lists: 0. Outside nests
23444 <nowiki>*</nowiki>foo
23446 <nowiki>#</nowiki>foo
23448 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23451 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23452 ## to test wikitext escaping, and insignificant whitespace diffs
23453 ## cause PHP parser tests to barf
23455 Lists: 1. Nested inside html (No unnecessary escapes)
23464 <li data-parsoid='{}'>*foo</li>
23465 <li data-parsoid='{}'>#foo</li>
23466 <li data-parsoid='{}'>:foo</li>
23467 <li data-parsoid='{}'>;foo</li>
23475 <li data-parsoid='{}'>*foo</li>
23476 <li data-parsoid='{}'>#foo</li>
23477 <li data-parsoid='{}'>:foo</li>
23478 <li data-parsoid='{}'>;foo</li>
23485 *<nowiki>*foo</nowiki>
23486 *<nowiki>#foo</nowiki>
23487 *<nowiki>:foo</nowiki>
23488 *<nowiki>;foo</nowiki>
23494 #<nowiki>*foo</nowiki>
23495 #<nowiki>#foo</nowiki>
23496 #<nowiki>:foo</nowiki>
23497 #<nowiki>;foo</nowiki>
23501 Lists: 2. Inside definition lists
23505 <dl><dt>;foo</dt></dl>
23506 <dl><dt>:foo</dt></dl>
23509 <dl><dd>:foo</dd></dl>
23513 ; <nowiki>:foo</nowiki>
23515 ; <nowiki>:foo</nowiki>
23522 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23528 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23532 *<nowiki>*foo</nowiki>''it''*bar
23536 Lists: 4. No escapes needed
23549 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23553 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23567 Lists: 5. No unnecessary escapes
23571 <ul><li> bar <span>[[foo]]</span></li></ul>
23572 <ul><li> =bar <span>[[foo]]</span></li></ul>
23573 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23574 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23575 <ul><li> =bar <span>foo]]</span>=</li></ul>
23576 <ul><li> <s></s>: a</li></ul>
23577 <ul><li> <i>* foo</i></li></ul>
23580 * bar <span><nowiki>[[foo]]</nowiki></span>
23582 * =bar <span><nowiki>[[foo]]</nowiki></span>
23584 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23586 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23588 * =bar <span>foo]]</span>=
23596 Lists: 6. Escape bullets in SOL position
23600 <p><!--cmt-->*foo</p>
23602 <!--cmt--><nowiki>*</nowiki>foo
23606 Lists: 7. Escape bullets in a multi-line context
23615 <nowiki>*</nowiki>b
23619 Lists: 8. Escape colons only if not present in tags
23623 <dl><dt>a:b<i>c:d</i></dt></dl>
23625 ; <nowiki>a:b</nowiki>''c:d''
23628 #### --------------- HRs ---------------
23629 #### 1. Single line
23630 #### -----------------------------------
23633 HRs: 1. Single line
23641 ----<nowiki>----</nowiki>
23646 #### --------------- Tables ---------------
23647 #### 1a. Simple example
23648 #### 1b. No escaping needed (!foo)
23649 #### 1c. No escaping needed (|foo)
23650 #### 1d. No escaping needed (|}foo)
23652 #### 2a. Nested in td (<td>foo|bar</td>)
23653 #### 2b. Nested in td (<td>foo||bar</td>)
23654 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23656 #### 3a. Nested in th (<th>foo!bar</th>)
23657 #### 3b. Nested in th (<th>foo!!bar</th>)
23658 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23662 #### 4c. No escaping needed
23663 #### --------------------------------------
23666 Tables: 1a. Simple example
23674 <nowiki>{|</nowiki>
23679 Tables: 1b. No escaping needed
23690 Tables: 1c. No escaping needed
23701 Tables: 1d. No escaping needed
23712 Tables: 2a. Nested in td
23717 <td>foo|bar</td></tr>
23718 <tr><td>x<div>a|b</div></td>
23722 |<nowiki>foo|bar</nowiki>
23724 |x<div><nowiki>a|b</nowiki></div>
23740 Tables: 2b. Nested in td
23746 <td>a<i>b||c</i></td>
23747 <td>a<i><div>b||c</div></i></td>
23748 </tr></tbody></table>
23751 |<nowiki>foo||bar</nowiki>
23752 |a''<nowiki>b||c</nowiki>''
23753 |a''<div><nowiki>b||c</nowiki></div>''
23762 <td>a<i><div>b||c</div></i>
23768 Tables: 2c. Nested in td -- no escaping needed
23784 Tables: 3a. Nested in th
23800 Tables: 3b. Nested in th
23805 <tr><th>foo!!bar</th>
23806 <th><i>foo|bar</i></th>
23807 <th><i>foo!!bar</i></th>
23808 <th><i><span>foo!!bar</span></i></th>
23809 </tr></tbody></table>
23812 !<nowiki>foo!!bar</nowiki>
23813 !''<nowiki>foo|bar</nowiki>''
23814 !''<nowiki>foo!!bar</nowiki>''
23815 !''<span><nowiki>foo!!bar</nowiki></span>''
23824 <th><i>foo!!bar</i>
23826 <th><i><span>foo!!bar</span></i>
23832 Tables: 3c. Nested in th
23837 <tr><th>foo||bar</th>
23838 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23839 </tr></tbody></table>
23842 !<nowiki>foo||bar</nowiki>
23843 !<nowiki>foo||bar</nowiki>
23856 Tables: 4a. Escape -
23872 |<nowiki>-bar</nowiki>
23877 Tables: 4b. Escape +
23893 |<nowiki>+bar</nowiki>
23898 Tables: 4c. No escaping needed
23903 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23904 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23910 <div>a|b</div></td>
23955 Tables: 4d. No escaping needed
23960 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23961 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23962 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23973 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23983 T97430: Don't emit empty nowiki pairs around marker meta tags
23987 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23988 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23990 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23991 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23995 Unclosed xmlish element in table line shouldn't eat end delimiters
24000 <tbody><tr><td> <foo</td>
24001 <td> bar></td></tr>
24018 #### --------------- Links ----------------
24019 #### 1. Quote marks in link text
24020 #### 2. Wikilinks: Escapes needed
24021 #### 3. Wikilinks: No escapes needed
24022 #### 4. Extlinks: Escapes needed
24023 #### 5. Extlinks: No escapes needed
24024 #### --------------------------------------
24026 Links 1. WikiLinks: No escapes needed
24030 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
24031 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
24032 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
24036 [[Foo|x [Foobar] x]]
24038 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
24039 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
24040 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
24045 Links 2. WikiLinks: Escapes needed
24049 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
24050 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
24051 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
24052 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
24053 <a href="Foo" rel="mw:WikiLink">|Bar</a>
24054 <a href="Foo" rel="mw:WikiLink">]]bar</a>
24055 <a href="Foo" rel="mw:WikiLink">[[bar</a>
24056 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
24057 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
24058 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
24060 [[Foo|<nowiki>Foobar]</nowiki>]]
24061 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
24062 [[Foo|<nowiki>[[Bar]]</nowiki>]]
24063 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
24064 [[Foo|<nowiki>|Bar</nowiki>]]
24065 [[Foo|<nowiki>]]bar</nowiki>]]
24066 [[Foo|<nowiki>[[bar</nowiki>]]
24067 [[Foo|<nowiki>x [[ y</nowiki>]]
24068 [[Foo|<nowiki>x ]] y</nowiki>]]
24069 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
24071 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
24072 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
24073 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
24074 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
24075 <a href="/wiki/Foo" title="Foo">|Bar</a>
24076 <a href="/wiki/Foo" title="Foo">]]bar</a>
24077 <a href="/wiki/Foo" title="Foo">[[bar</a>
24078 <a href="/wiki/Foo" title="Foo">x [[ y</a>
24079 <a href="/wiki/Foo" title="Foo">x ]] y</a>
24080 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
24085 Links 3. WikiLinks: No escapes needed
24089 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
24090 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
24095 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
24096 <a href="/wiki/Foo" title="Foo">foo|bar</a>
24101 Links 4. ExtLinks: Escapes needed
24105 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
24106 <a rel="mw:ExtLink" href="http://google.com">google]</a>
24107 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
24108 <p>[http://google.com]</p>
24109 <p>[http://google.com google]</p>
24110 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
24111 <p>[<a rel="mw:ExtLink" href="http://google.com" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://google.com"}},"i":0}}]}'>http://google.com</a>]</p>
24113 [http://google.com <nowiki>[google]</nowiki>]
24114 [http://google.com <nowiki>google]</nowiki>]
24115 [http://google.com <nowiki>goog] le</nowiki>]
24117 <nowiki>[http://google.com]</nowiki>
24119 <nowiki>[http://google.com google]</nowiki>
24121 [http://google.com<nowiki>]</nowiki>
24123 [{{echo|http://google.com}}<nowiki>]</nowiki>
24125 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
24126 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
24127 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
24128 </p><p>[http://google.com]
24129 </p><p>[http://google.com google]
24130 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24131 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24136 Links 5. ExtLinks: No escapes needed
24140 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
24141 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
24143 [http://google.com [google]
24145 [[http://google.com]]
24147 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
24148 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
24153 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
24157 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
24158 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
24159 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
24160 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
24161 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
24162 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
24163 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24164 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
24165 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24166 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
24167 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
24168 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
24169 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
24172 x<nowiki/>http://example.com<nowiki/>y
24173 http://example.com<nowiki/>?x
24174 http://example.com<nowiki/>&x
24175 http://example.com<nowiki/>'x
24176 http://example.com<nowiki/>,x
24177 http://example.com<nowiki/>.x
24178 http://example.com<nowiki/>;x
24179 http://example.com<nowiki/>:x
24180 http://example.com<nowiki/>;x
24181 http://example.com<nowiki/>!x
24182 http://example.com<nowiki/>=x
24183 http://example.com<nowiki/>(x)
24184 http://example.com(x<nowiki/>)
24188 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
24193 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
24195 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
24196 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
24197 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
24198 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
24199 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
24205 "http://example.com"
24206 (http://example.com)
24207 (http://example.com) foo
24208 http://example.com,
24209 http://example.com, foo
24212 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
24214 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
24215 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
24216 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
24217 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
24218 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
24223 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
24227 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
24228 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
24230 http://example.com.,;:!?\
24231 -http://example.com:
24233 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
24234 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
24239 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
24243 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
24244 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
24245 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
24249 X<nowiki/>RFC 123<nowiki/>y
24253 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
24257 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
24258 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
24259 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
24266 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
24267 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
24268 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
24273 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
24277 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
24278 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24279 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24283 X<nowiki/>PMID 123<nowiki/>y
24287 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
24291 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
24292 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
24293 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
24300 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
24301 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
24302 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
24307 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
24311 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
24312 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
24313 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
24316 ISBN 1234567890<nowiki/>1
24317 ISBN 1234567890<nowiki/>x
24318 a<nowiki/>ISBN 1234567890<nowiki/>b
24322 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
24326 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
24330 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
24335 Links 14. Protect link-like plain text. (Parsoid bug T78425)
24339 <p>this is not a link: http://example.com
24342 this is not a link: <nowiki>http://example.com</nowiki>
24346 Links 15. Link trails can't become link prefixes.
24351 <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>
24353 [[Söfnuður]]-[[00]]
24355 <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>
24359 #### --------------- Quotes ---------------
24360 #### 1. Quotes inside <b> and <i>
24361 #### 2. Link fragments separated by <i> and <b> tags
24362 #### 3. Link fragments inside <i> and <b>
24363 #### 4. No escaping needed
24364 #### --------------------------------------
24366 1a. Quotes inside <b> and <i>
24377 <b>foo'<i>bar'</i>baz</b>
24386 <i>fools'<span> errand</span></i>
24387 <i><span>fool</span>'s errand</i>
24388 '<i>foo</i> bar '<i>baz</i>
24389 a|!*#-:;+-~[]{}b'<i>x</i>
24393 ''<nowiki>''foo''</nowiki>''
24394 ''<nowiki>'''foo'''</nowiki>''
24396 '''<nowiki/>'foo''''
24397 '''<nowiki>''foo''</nowiki>'''
24398 '''<nowiki>'''foo'''</nowiki>'''
24399 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24400 '''foo'''<nowiki/>'s
24406 '''foo'''<nowiki/>'
24407 ''''foo'''<nowiki/>'
24408 ''fools'<span> errand</span>''
24409 ''<span>fool</span>'s errand''
24410 '<nowiki/>''foo'' bar '''baz''
24411 a|!*#-:;+-~[]{}b'''x''
24415 1b. Quotes inside <b> and <i> with other tags on same line
24419 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24420 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24421 <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>
24422 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24423 '<i>foo</i> <span class="mw-ref" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
24424 '<i>foo</i> <div title="name">test</div>
24425 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24426 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24427 <li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">test</span></li>
24430 '''a'' foo ''[[bar]]''
24431 ''a''' foo ''[[bar]]''
24432 ''a''' foo '''{{echo|[[bar]]}}'''
24433 [[foo]] x'''[[bar]]''
24434 '''foo'' <ref>test</ref>
24435 '''foo'' <div title="name">test</div>
24436 '''foo'' and <br> bar
24441 2. Link fragments separated by <i> and <b> tags
24445 <p>[[<i>foo</i>hello]]</p>
24446 <p>[[<b>foo</b>hello]]</p>
24448 [[''foo''<nowiki>hello]]</nowiki>
24450 [['''foo'''<nowiki>hello]]</nowiki>
24453 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24454 # this is one of the shortcomings of this format
24456 3. Link fragments inside <i> and <b>
24460 <p><i>[[foo</i>]]</p>
24461 <p><b>[[foo</b>]]</p>
24463 ''[[foo''<nowiki>]]</nowiki>
24465 '''[[foo'''<nowiki>]]</nowiki>
24469 4. No escaping needed
24473 <p>'<span><i>bar</i></span>'
24474 '<span><b>bar</b></span>'
24478 '<span>''bar''</span>'
24479 '<span>'''bar'''</span>'
24483 #### ----------- Paragraphs ---------------
24484 #### 1. No unnecessary escapes
24485 #### --------------------------------------
24488 1. No unnecessary escapes
24492 <p>bar <span>[[foo]]</span>
24493 </p><p>=bar <span>[[foo]]</span>
24494 </p><p>[[bar <span>[[foo]]</span>
24495 </p><p>]]bar <span>[[foo]]</span>
24496 </p><p>=bar <span>foo]]</span>=
24499 bar <span><nowiki>[[foo]]</nowiki></span>
24501 =bar <span><nowiki>[[foo]]</nowiki></span>
24503 [[bar <span><nowiki>[[foo]]</nowiki></span>
24505 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24507 =bar <span>foo]]</span><nowiki>=</nowiki>
24510 #### ----------------------- PRE --------------------------
24511 #### 1. Leading whitespace in SOL context should be escaped
24512 #### ------------------------------------------------------
24514 1. Leading whitespace in SOL context should be escaped
24537 <nowiki> </nowiki>a
24539 <nowiki> </nowiki> a
24543 <nowiki> </nowiki> a
24545 <nowiki> </nowiki>a
24548 <nowiki> </nowiki>b
24571 2. Leading whitespace in non-indent-pre contexts should not be escaped
24575 <p>foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
24576 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24577 <li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><i>a</i>
24587 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24606 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24610 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
24612 [[File:Foobar.jpg|thumb|caption]]
24616 5. Nowiki escaping should account for indent-pres
24626 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24639 #### --------------- Behavior Switches --------------------
24642 1. Valid behavior switches should be escaped
24649 <nowiki>__TOC__</nowiki>
24650 ''<nowiki>__TOC__</nowiki>''
24654 2. Invalid behavior switches should not be escaped
24665 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24667 Behavior switches should be SOL-transparent
24671 <meta property="mw:PageProp/toc" />
24673 <!-- this one's bogus -->
24676 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24678 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24682 <!-- this one's bogus -->
24691 #### --------------- HTML tags ---------------
24694 #### 3. multi-line html tag
24695 #### 4. extension tags
24696 #### -----------------------------------------
24702 <a href="http://google.com">google</a>
24704 <a href="http://google.com">google</a>
24712 <ul><li> <div>foo</div></li>
24713 <li> <div style="color:red">foo</div></li>
24714 <li> <td></li></ul>
24717 * <nowiki><div>foo</div></nowiki>
24718 * <nowiki><div style="color:red">foo</div></nowiki>
24719 * <nowiki><td></nowiki>
24723 3. multi-line html tag
24742 <p><ref>foo</ref>
24743 </p><p><ref>bar
24744 </p><p>baz</ref>
24747 <nowiki><ref>foo</ref></nowiki>
24749 <nowiki><ref>bar</nowiki>
24751 baz<nowiki></ref></nowiki>
24754 #### --------------- Others ---------------
24760 <p><nowiki>foo</nowiki>
24763 <nowiki>foo</nowiki>
24766 ## The quote-char in the input is necessary for triggering the bug
24768 (T54035) Nowiki-escaping should not get tripped by " :" in text
24777 #----------- End of wikitext escaping tests --------------
24781 Tag-like HTML structures are passed through as text
24803 </p><p>1<d e>f
24808 HTML tag with necessary entities in attributes
24810 <span title="&amp;">foo</span>
24812 <p><span title="&amp;">foo</span>
24817 HTML tag with 'unnecessary' entity encoding in attributes
24819 <span title="&">foo</span>
24821 <p><span title="&">foo</span>
24826 HTML tag with broken attribute value quoting
24828 parsoid=wt2html,html2html
24830 <span title="Hello world>Foo</span>
24832 <p><span title="Hello world">Foo</span>
24835 <p><span title="Hello world">Foo</span></p>
24839 Self-closed tag with broken attribute value quoting
24841 parsoid=wt2html,html2html
24843 <div title="Hello world />Foo
24845 <div title="Hello world"></div>
24848 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24852 Table with broken attribute value quoting
24854 parsoid=wt2html,html2html
24857 | title="Hello world|Foo
24862 <td title="Hello world">Foo
24868 <td title="Hello world">Foo
24874 Table with broken attribute value quoting on consecutive lines
24876 parsoid=wt2html,html2html
24879 | title="Hello world|Foo
24880 | style="color:red|Bar
24885 <td title="Hello world">Foo
24887 <td style="color:red">Bar
24893 <td title="Hello world">Foo
24894 </td><td style="color: red">Bar
24895 </td></tr></tbody></table>
24900 Accept empty td cell attribute
24903 | align="center" | foo || |
24908 <td align="center"> foo </td>
24915 Non-empty attributes in th-cells
24918 ! Foo !! style="color: red" | Bar
24924 <th style="color: red"> Bar
24930 Accept empty attributes in th-cells
24945 Empty table rows go away
24966 ### Parsoid-centric tests for testing RTing of inter-element separators
24967 ### Edge cases not tested by existing parser tests and specific to
24968 ### Parsoid-specific serialization strategies.
24972 RT-ed inter-element separators should be valid separators
24984 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24988 # Parsoid-only since PHP parser relies on Tidy for correct output
24990 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
25004 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
25005 <p>bar</p></small></td></tr>
25009 <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>
25013 # Note that the "style" attribute is really a template parameter here.
25014 # The = would have to be {{=}} if you wanted the literal.
25016 Empty TD followed by TD with tpl-generated attribute
25021 |{{echo|style='color:red'}}|foo
25035 Indented table with an empty td
25053 ## We have some newline diffs RT-ing this edge case
25054 ## and it is not important enough -- we seem to be emitting
25055 ## at most 2 newlines after a </tr> and this is unrelated to
25056 ## the issue from T85627 that this is testing.
25058 Indented table with blank lines in between (T85627)
25077 Indented block & table
25091 <div data-parsoid='{"stx":"html"}'>foo</div>
25093 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
25098 Indent and comment before table row
25113 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
25114 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
25118 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
25120 Empty TR followed by a template-generated TR
25126 {{echo|<tr><td>foo</td></tr>}}
25132 <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}}]}'>
25137 ## PHP and parsoid output differ for this, and since this is primarily
25138 ## for testing Parsoid's serializer, marking this Parsoid only
25140 Empty TR followed by mixed-ws-comment line should RT correctly
25156 <!--c--> </tr><!--d-->
25162 Multi-line image caption generated by templates with/without trailing newlines
25164 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
25165 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
25167 <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>
25168 <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>
25172 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
25176 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
25178 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
25180 <includeonly>foo</includeonly>
25188 ## PHP emits broken html for this, and since this is primarily
25189 ## a Parsoid serializer test, marking this Parsoid only
25191 Improperly nested inline or quotes tags with whitespace in between
25193 <span> <s>x</span> </s>
25196 <p><span> <s>x</s></span><s> </s>
25197 <b> <i>x</i></b><i> </i>
25202 Encapsulate protected attributes from wt
25204 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
25206 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
25210 <div data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">foo</div>
25212 <table data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">
25213 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
25217 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
25218 ## Having nested or stray pre tags results in the attempt to add duplicates,
25219 ## causing an assertion fail. This test tries to prevent that situation.
25221 Ensure ParagraphWrapper can deal with stray closing pre tags
25231 1. Ensure fostered text content is wrapped in element nodes
25235 <table>hi</table><table>ho</table>
25244 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
25246 parsoid=wt2html,wt2wt
25255 <tbody><tr><td> a</td></tr>
25260 Encapsulation properly handles null DSR information from foster box
25262 parsoid=wt2html,wt2wt
25264 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
25266 <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>
25270 1. Encapsulate foster-parented transclusion content
25272 parsoid=wt2wt,wt2html
25274 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
25276 <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>
25286 2. Encapsulate foster-parented transclusion content
25288 parsoid=wt2wt,wt2html
25290 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
25292 <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>
25303 3. Encapsulate foster-parented transclusion content
25305 parsoid=wt2wt,wt2html
25307 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25309 <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>"]}">
25322 4. Encapsulate foster-parented transclusion content
25324 parsoid=wt2wt,wt2html
25326 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25328 <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>"]}">
25341 5. Encapsulate foster-parented transclusion content
25343 parsoid=wt2wt,wt2html
25345 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
25347 <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>
25362 6. Encapsulate foster-parented transclusion content
25364 parsoid=wt2wt,wt2html
25366 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25368 <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>
25384 7. Encapsulate foster-parented transclusion content
25386 parsoid=wt2wt,wt2html
25388 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25390 <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>
25400 # Note that the wt is broken on purpose: the = should be {{=}} if you
25401 # don't want it to be a template parameter key.
25403 8. Encapsulate foster-parented transclusion content
25405 parsoid=wt2wt,wt2html
25408 }}{|{{echo|style='color:red'}}
25413 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25415 <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>
25426 9. Encapsulate foster-parented transclusion content
25428 parsoid=wt2wt,wt2html
25430 <table>{{echo|hi</table>hello}}
25432 <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"}]]}'>hi</p><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><p about="#mwt2">hello</p>
25436 Table in fosterable position
25447 <div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"OpenTable","href":"./Template:OpenTable"},"params":{},"i":0}},"\n<div>\n"]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[]]}'></div><span about="#mwt1">
25449 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25455 # Parsoid only for T66747
25457 Properly encapsulate empty-content transclusions in fosterable positions
25465 <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"}]]}'>
25471 Always encapsulate foster box when template range is expanded to table
25484 T115289: Unclosed table
25486 {{echo|<table>}}<!--c-->[[Category:Two]]
25488 <link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:Two"},"sa":{"href":"Category:Two"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>"}},"i":0}},"<!--c-->[[Category:Two]]"]}'/><table about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><!--c--></table>
25492 T115289: Don't migrate newlines out of tables with fostered content
25494 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25496 <link rel="mw:PageProp/Category" href="./Category:One" about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:One"},"sa":{"href":"Category:One"},"fostered":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["<table><td></td>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr>[[Category:One]]"}},"i":0}},"<!--c-->[[Category:Two]]"]}'/><link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt2"/><table about="#mwt2" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr><td></td></tr><tr><!--c--></tr></tbody></table>
25500 T73074: More fostering fun
25502 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25504 <link rel="mw:PageProp/Category" href="./Category:Two" data-parsoid='{"stx":"simple","a":{"href":"./Category:Two"},"sa":{"href":"Category:Two"},"fostered":true}'/><table data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"stx":"html"}'></td></tr><tr about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr>"}},"i":0}},"<!--c-->[[Category:Two]]"]}'><!--c--></tr></tbody></table>
25508 Support <object> element with .data attribute
25512 <object data="test.swf"></object>
25514 <object data="test.swf"></object>
25518 Don't block XML namespace declaration
25520 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25522 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25525 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25528 # -----------------------------------------------------------------
25529 # The following section of tests are primarily to spec requirements
25530 # around Parsoid's serialization (old, new, edited content)
25532 # All these tests are marked Parsoid html2wt and html2html only
25533 # ----------------------------------------------------------------
25536 Ignore rel attribute in a-tags during serialization to url-links
25540 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25541 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25542 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25544 http://en.wikipedia.org/wiki/Foobar
25545 http://en.wikipedia.org/wiki/Foobar
25546 http://en.wikipedia.org/wiki/Foobar
25549 # 'mi' is a localinterwiki prefix as well as a language
25551 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
25555 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25562 New wikilinks should be serialized properly
25566 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25567 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25568 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25569 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25570 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25574 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25575 http://en.wikipedia.org/wiki/Foo
25576 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25580 New wiki links (href variations)
25584 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25585 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25586 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25587 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25592 [[Toxine bactérienne]]
25596 New wiki links (content string variations)
25600 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25601 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25602 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25606 [[Foo_bar|./Foo_bar]]
25610 New category links (href variations)
25614 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25615 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25616 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25618 [[Category:Toxine bactérienne]]
25619 [[Category:Toxine bactérienne]]
25620 [[Category:Toxine bactérienne]]
25624 New sol transparent links don't need indent-pre nowiki protection
25629 <link rel="mw:PageProp/redirect" href="./Main_Page">
25630 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25631 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25633 #WEITERLEITUNG [[Main Page]]
25634 <!-- this is good --> [[Category:Good]]
25635 <!-- this is great --> [[Kategorie:Great]]
25639 New interlanguage links (href variations)
25643 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25644 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25645 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25647 [[es:Toxine bactérienne]]
25648 [[es:Toxine_bactérienne]]
25649 [[es:Toxine_bactérienne]]
25653 Image: Modifying size of an image (1)
25656 "modes": ["wt2wt"],
25658 ["img[height]", "attr", "height", "22"],
25659 ["img[width]", "attr", "width", "200"]
25663 [[Image:Foobar.jpg|230x230px]]
25665 [[Image:Foobar.jpg|200x200px]]
25669 Image: Modifying size of an image (2)
25672 "modes": ["wt2wt"],
25674 ["img[height]", "attr", "height", "100"],
25675 ["img[width]", "attr", "width", "500"]
25679 [[Image:Foobar.jpg|230x230px]]
25681 [[Image:Foobar.jpg|500x500px]]
25684 # Change in size is ignored so long as class='mw-default-size'
25686 Image: Modifying size of an image (3)
25689 "modes": ["wt2wt"],
25691 ["figure[class]", "removeClass", "mw-default-size"],
25692 ["figure img", "attr", "height", "19"],
25693 ["figure img", "attr", "width", "170"]
25697 [[Image:Foobar.jpg|thumb]]
25699 [[Image:Foobar.jpg|thumb|170x170px]]
25703 Image: Modifying alignment of an image (T50665)
25706 "modes": ["wt2wt"],
25708 ["figure[class]", "removeClass", "mw-halign-right"],
25709 ["figure[class]", "addClass", "mw-halign-left"]
25713 [[Image:Foobar.jpg|thumb|caption|right]]
25715 [[Image:Foobar.jpg|thumb|caption|left]]
25719 Image: Modifying mw-default-size of an frameless image (T64805)
25722 "modes": ["wt2wt"],
25724 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25728 [[Image:Foobar.jpg|frameless|right]]
25730 [[Image:Foobar.jpg|frameless|right|220x220px]]
25734 Image: Modifying valign of an image (T51221)
25737 "modes": ["wt2wt"],
25739 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25740 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25744 [[File:Foobar.jpg|20px|middle]]
25746 [[File:Foobar.jpg|20px|text-top]]
25750 Image: Modifying alt attribute of an image (T58400)
25753 "modes": ["wt2wt"],
25755 ["img[alt]", "attr", "alt", "some alternate edited text"]
25759 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25761 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25765 Image: Modifying caption of an image
25768 "modes": ["wt2wt"],
25770 ["figcaption", "text", "new caption"]
25774 [[Image:Foobar.jpg|thumb|original caption]]
25776 [[Image:Foobar.jpg|thumb|new caption]]
25780 Image: empty alt attribute (T50924)
25784 [[File:Foobar.jpg|thumb|alt=|bar]]
25786 <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>
25790 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
25796 <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>
25798 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25802 Image: Block level image should have \n before and after
25805 [[File:Foobar.jpg|right|thumb|150x150px]]
25809 <figure class="mw-halign-right" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/150px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="17" width="150"/></a></figure>
25814 Image: New block level image should have \n before and after (existing content)
25817 [[File:Foobar.jpg|right|thumb|150x150px]]
25821 <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>
25826 Image: upright option (parsoid)
25828 [[File:Foobar.jpg|thumb|upright|caption]]
25829 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25830 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25832 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/170px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="19" width="170"/></a><figcaption>caption</figcaption></figure>
25833 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/110px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="12" width="110"/></a><figcaption>caption</figcaption></figure>
25834 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/500px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="57" width="500"/></a><figcaption>caption</figcaption></figure>
25838 Image: upright option is ignored on inline and frame images (parsoid)
25840 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25842 <p><span typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/500px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="57" width="500"/></a></span></p>
25846 Image: from basic HTML (1)
25850 <span typeof="mw:Image">
25851 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25854 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25858 Image: from basic HTML (2)
25862 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25864 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25868 Image: from basic HTML (3)
25872 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25874 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25878 Image: from basic HTML (4)
25882 <img src="./File:Foobar.jpg">
25884 [[File:Foobar.jpg|link=]]
25888 Image: Invalid title as link
25890 [[File:Foobar.jpg|link=<]]
25892 <p><a href="/wiki/File:Foobar.jpg" class="image" title="link=<"><img alt="link=<" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
25895 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=<"}]}' data-mw='{"caption":"link=&lt;"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
25899 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25904 <li><p>foo</p></li>
25911 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25915 <ul> <li>foo</li></ul>
25921 Don't strip leading whitespace when handling indent-pre suppressing tags
25926 <tr><td> indented row</td></tr>
25929 <b>This is very bold of you!</b>
25932 indented cell (no pre-wrapping!)
25942 '''This is very bold of you!'''
25946 indented cell (no pre-wrapping!)
25954 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25976 <nowiki> </nowiki></span>bar2
25979 <nowiki> </nowiki><span>bar</span>
25982 <nowiki> </nowiki><span>foo</span>
25987 Lists: Dont insert newlines in a serialized list item.
25991 <ul><li>a<br>b</li><li>c</li></ul>
25998 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
26001 "modes": ["html2wt"],
26002 "scrubWikitext": false
26005 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26006 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26008 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26009 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26011 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
26013 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26015 == hello there [[Category:A1]] ==
26017 == [[Category:A2]] hi pal ==
26019 == <!--foo--> [[Category:A3]] how goes it ==
26021 == it goes well [[Category:A4]] <!--bar--> ==
26023 ==howdy [[Category:A5]]==
26029 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
26032 "modes": ["html2wt"],
26033 "scrubWikitext": true
26036 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26037 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26039 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26040 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26042 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26050 <!--foo--> [[Category:A3]]
26055 [[Category:A4]] <!--bar-->
26063 Headings: Don't hoist metas that come from templates
26066 "modes": ["html2wt"],
26067 "scrubWikitext": true
26070 <h2><span about="#mwt1" typeof="mw:Transclusion" data-parsoid="{}" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo [[Category:Foo]]"}},"i":0}}]}'>foo </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" data-parsoid="{}" /></h2>
26072 == {{echo|foo [[Category:Foo]]}} ==
26076 Headings: Category in ref isn't hoisted
26079 "modes": ["html2wt"],
26080 "scrubWikitext": true
26083 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
26085 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">bar <link rel="mw:PageProp/Category" href="./Category:Baz" /> </span></li></ol>
26088 [[Category:Baz]] </ref> ==
26094 Parsoid: Serialize positional parameters with = in them as named parameter
26098 <p about="#mwt1" typeof="mw:Transclusion"
26099 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
26101 <p about="#mwt1" typeof="mw:Transclusion"
26102 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
26104 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26105 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26106 <p data-parsoid='{"pi":[[{"k":"1"},{"k":"2"}]]}' 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>
26110 {{echo|1=f=oo|2=bar}}
26112 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26113 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26114 {{echo|<nowiki>f=oo</nowiki>|bar}}
26118 Parsoid: Serialize positional parameters with = in extlink as named parameter
26122 <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>
26124 {{echo|1=http://stuff?is=ok}}
26128 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
26132 <div>a<p>b</p></div>
26153 Substrings resembling wikitext in hrefs should not get nowiki escapes
26157 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
26163 Enforce single-line context in the serializer
26170 <h2> hi <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bogus","href":"./Template:Bogus"},"params":{"1":{"wt":"there\nyou"}},"i":0}}]}'>there</span><span about="#mwt1">
26171 </span><span about="#mwt1">you</span> </h2>
26173 <h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
26175 <ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">hello
26176 there</span></li></ol>
26188 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
26195 </tbody></table></dd></dl>
26199 == hi {{bogus|there
26210 * foo '''bar''' baz
26222 Serialize new placeholder space without spans
26226 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
26228 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
26230 <span typeof="mw:Extension/ref" data-mw="{"name":"ref","body":{"html":"foo<span typeof=\"mw:Placeholder\">&nbsp;</span>: bar"}}"><sup>[1]</sup></span>ok</p>
26236 <ref>foo : bar</ref>ok
26240 #-----------------------
26241 # Tag minimization tests
26242 #-----------------------
26245 1. I/B quote minimization: wikitext-only tags should be combined
26249 <p><i>A</i><i>B</i></p>
26250 <p><b>A</b><b>B</b></p>
26251 <p><i>A</i><b><i>B</i></b></p>
26252 <p><b>A</b><i><b>B</b></i></p>
26253 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
26254 <p><i><b>A</b></i><i><b>B</b></i></p>
26255 <p><i><b>A</b></i><b><i>B</i></b></p>
26256 <p><b><i>A</i></b><i><b>B</b></i></p>
26276 2. I/B quote minimization: wikitext and html tags should not be combined
26280 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
26281 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
26285 ''A''<nowiki/>'''<i>B</i>'''
26289 3. I/B quote minimization: templated content stops minimization
26293 <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>
26294 <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>
26296 ''A''{{echo|''B''}}
26298 ''A''{{echo|'''''B'''''}}
26302 4. I/B quote minimization: new content should be mimimized with adjacent old content
26306 <p><i>A</i><i>B</i></p>
26307 <p><b>A</b><b>B</b></p>
26308 <p><i>A</i><b><i>B</i></b></p>
26318 5a. Merge adjacent quote nodes if they've been edited
26321 "modes": ["wt2wt", "selser"],
26323 ["p", "contents", "remove", ":contains('b')"]
26333 5b. Merge adjacent quote nodes if they've been edited
26336 "modes": ["wt2wt", "selser"],
26342 ''a''<span id="x">b</span>''c''
26348 1. Merge adjacent link nodes as long as at least one element is new
26351 "modes": ["html2wt"],
26352 "scrubWikitext": true
26355 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26356 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26357 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26361 [[Football|Foot]][[Football|ball]]
26365 2. Merge adjacent link nodes and enable additional normalizations
26368 "modes": ["html2wt"],
26369 "scrubWikitext": true
26372 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26374 [[Football|''Football'']]
26378 3. Don't merge adjacent link nodes if scrubWikitext is false
26381 "modes": ["html2wt"],
26382 "scrubWikitext": false
26385 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26387 [[Football|Foot]][[Football|ball]]
26390 #------------------------------
26391 # End of tag minimization tests
26392 #------------------------------
26395 T56262: New entities
26399 <span typeof="mw:Entity"> </span>
26404 ## Note that there is no wikitext output for 'unknownproperty' ##
26405 ## Unknown magic words are silently dropped ##
26412 <meta property='mw:PageProp/toc' />
26413 <meta property='mw:PageProp/notoc' />
26414 <meta property='mw:PageProp/forcetoc' />
26415 <meta property='mw:PageProp/index' />
26416 <meta property='mw:PageProp/noindex' />
26417 <meta property='mw:PageProp/nogallery' />
26418 <meta property='mw:PageProp/noeditsection' />
26419 <meta property='mw:PageProp/notitleconvert' />
26420 <meta property='mw:PageProp/nocontentconvert' />
26421 <meta property='mw:PageProp/unknownproperty' />
26431 __NOCONTENTCONVERT__
26435 Consecutive <pre>s should not get merged
26437 parsoid=html2wt,html2html
26439 <pre>a</pre><pre>b</pre>
26467 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26471 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26473 [[Special:BookSources/1234567890|ISBN 1234567895]]
26477 Edited RFC links not serializable as RFC links should serialize as extlinks
26481 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26483 [//tools.ietf.org/html/rfc123 New RFC]
26487 Edited PMID links not serializable as PMID links should serialize as extlinks
26491 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26493 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26497 WTS of autolinks with trailing/surrounding context
26501 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26502 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26503 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26504 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26505 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26506 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26508 http://cscott.net'''foo'''
26510 http://cscott.net<b>foo</b>
26512 '''http://cscott.net'''
26514 '''http://cscott.net '''
26516 '''http://cscott.net<nowiki/>x'''
26518 http://cscott.net<nowiki/>x
26522 WTS of autolinks with nowikis (round-trip)
26524 x<nowiki/>http://cscott.net<nowiki/>x
26526 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26529 # this is the "easy" test because it leaves in place all the
26530 # data-parsoid information indicating this is an autolink
26532 WTS of autolinks with escapes (editing)
26535 "modes": ["wt2wt"],
26537 [ "span", "remove" ]
26541 x<nowiki/>http://cscott.net<nowiki/>x
26543 x<nowiki/>http://cscott.net<nowiki/>x
26547 WTS of edited autolink-like text (T103364)
26550 "modes": ["wt2wt"],
26552 [ "span[typeof]", "removeAttr", "typeof" ]
26556 Not a link: <nowiki>http://example.com</nowiki>.
26558 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26562 WTS of newly-authored autolink-like text (T103364)
26566 <p>http://example.com is not a link.</p>
26568 <nowiki>http://example.com</nowiki> is not a link.
26572 WTS of autolink-like text after an autolink (T108563)
26576 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26578 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26582 Magic links inside links (not autolinked)
26584 [[Foo|http://example.com]]
26587 [[Foo|ISBN 123456789x]]
26589 [http://foo.com http://example.com]
26590 [http://foo.com RFC 1234]
26591 [http://foo.com PMID 1234]
26592 [http://foo.com ISBN 123456789x]
26594 <p><a href="/wiki/Foo" title="Foo">http://example.com</a> <a href="/wiki/Foo" title="Foo">RFC 1234</a> <a href="/wiki/Foo" title="Foo">PMID 1234</a> <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a></p>
26595 <p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a> <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a> <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
26597 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26598 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26599 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26600 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26602 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26603 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26604 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26605 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26609 Magic links inside image captions (autolinked)
26611 [[File:Foobar.jpg|thumb|http://example.com]]
26612 [[File:Foobar.jpg|thumb|RFC 1234]]
26613 [[File:Foobar.jpg|thumb|PMID 1234]]
26614 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26616 <div class="thumb tright">
26617 <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>
26618 <div class="thumbcaption">
26619 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26620 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26623 <div class="thumb tright">
26624 <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>
26625 <div class="thumbcaption">
26626 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26627 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26630 <div class="thumb tright">
26631 <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>
26632 <div class="thumbcaption">
26633 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26634 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26637 <div class="thumb tright">
26638 <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>
26639 <div class="thumbcaption">
26640 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26641 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26645 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></figcaption></figure>
26646 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//tools.ietf.org/html/rfc1234" rel="mw:ExtLink">RFC 1234</a></figcaption></figure>
26647 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></figcaption></figure>
26648 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/123456789X" rel="mw:WikiLink">ISBN 123456789x</a></figcaption></figure>
26652 WTS of magic word text (T109371)
26657 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26658 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26660 <nowiki>RFC 1234</nowiki>
26662 [http://foo.com RFC 1234]
26668 Edited Redirect link should emit a non-piped wikitext link
26672 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26678 T75121: Infer extension name from typeOf if data-mw is not present
26680 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26682 <div typeOf="mw:Extension/foo"></div>
26687 # Note that the <p> wrapping isn't present in PHP parser output
26688 # The important thing for this test is that P-wrapping doesn't
26689 # interfere with the <nowiki> protection for leading - in <td>
26690 # (which isn't necessary for <th>).
26692 T88318: p-wrapped dash in table.
26694 parsoid=html2wt,wt2wt
26697 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26698 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26699 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26706 |<nowiki>-</nowiki>
26707 |<nowiki>- </nowiki>
26726 <td><small>-</small></td>
26738 T149209: WTS: Handle newlines in table cells properly
26746 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
26748 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
26754 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
26756 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
26778 T149209: Selser: Handle newlines in table cells properly
26781 "modes": ["selser"],
26783 [ "#h1", "html", "a\nb\n" ],
26784 [ "#h2", "html", "a\nb\n" ],
26785 [ "#c1", "html", "a\nb\n" ],
26786 [ "#c2", "html", "<p>a</p>" ],
26787 [ "#c3", "html", "<p>a</p>" ],
26788 [ "#c4", "html", "edit-me<p>a</p>" ]
26793 ! id="h1" |edit-me!!1
26795 ! id="h2" |edit-me||2
26797 | id="c1" |edit-me||3
26799 | id="c2" |edit-me||4
26801 | id="c3" |edit-me||p||q||r
26803 | id="c4" |edit-me||p||q||r
26832 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26837 <td id='mwAc'>foo</td>
26838 <td id='serialize-this'>bar</td>
26843 | id="serialize-this" |bar
26848 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26852 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26854 <div id="hello">ok</div>
26861 "modes": ["wt2wt"],
26863 [ "#xyz", "before", "<b>before</b> stuff " ],
26864 [ "#xyz", "after", " stuff <i>after</i>" ],
26865 [ "#xyz", "html", "x <b>y</b> z" ]
26869 <span id="xyz">hello</span>
26871 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26875 Never serialize a-tag as html, regardless of what data-parsoid has to say
26877 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26879 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26884 ## SSS FIXME: This is broken output nevertheless.
26885 ## What might be a reasonable non-broken output for this?
26886 ## This is an edge case unlikely to be seen in production
26887 ## that I am not wasting more time on this right now.
26889 Never serialize a-tag as html, no matter what attributes it has
26891 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26893 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26895 [http://boo.org http://boohoo.org]
26898 # Misnested is an indication that selser can reuse the source but these have
26899 # shown to sneak through on occasion. See T101768.
26900 # The original wikitext here is: [http://test.com [[one]] two three]
26902 Strip span tags added to mark misnested links
26906 <p data-parsoid='{}'><a rel="mw:ExtLink" href="http://test.com" data-parsoid='{"targetOff":17,"contentOffsets":[17,34]}'></a><a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"simple","a":{"href":"./One"},"sa":{"href":"one"},"misnested":true}'>one</a><span data-parsoid='{"misnested":true}'> two three</span></p>
26908 [http://test.com][[one]] two three
26912 Catch regression when unpacking misnested links
26916 {{echo|hi}}[http://example.com [[ho]]]
26918 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span><a rel="mw:ExtLink" href="http://example.com"></a><a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"misnested":true}'>ho</a></p>
26922 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26926 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span><table about="#mwt2" typeof="mw:Transclusion mw:ExpandedAttrs" data-parsoid='{"a":{"{{echo|c\n{{!}}d\n}}":null},"sa":{"{{echo|c\n{{!}}d\n}}":""},"firstWikitextNode":"table","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c\n{{!}}d\n"}},"i":0}},"\n|}"]}'>
26938 ## This test verifies the presence and computation of this attribute indirectly
26939 ## by making an edit and ensuring that the serialization is correct (which it would be
26940 ## only if firstWikitextNode is properly set).
26942 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26945 "modes": ["wt2wt"],
26947 [ "div#x", "remove" ],
26948 [ "div", "before", "<div>new</div>" ]
26952 <div id="x">foo</div>
26954 {{echo|<div>boo</div>
26962 {{echo|<div>boo</div>
26968 # --------------------------------------------
26969 # Tests spec'ing wikitext serialization norms |
26970 # --------------------------------------------
26973 Serialize multi-line indent-pre starting with wikitext syntax
26987 1. Categories should always be serialized on their own line
26991 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26999 2. Categories that are part of templates should not introduce a line break
27001 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
27003 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span>bar</span> [[Category:baz]]"}},"i":0}}]}'>bar</span><span about="#mwt1"> </span><link rel="mw:PageProp/Category" href="./Category:Baz" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:baz"}}'/> bar</p>
27006 # Careful while editing these next 2 tests. There are \u200f characters
27007 # before and after the <link> tags in the HTML and following some
27008 # of the categories in wikitext
27009 # Do not remove these characters in edits.
27011 # As part of the serialization, these bidi characters will get stripped.
27013 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
27016 "modes": ["html2wt"],
27017 "scrubWikitext": true
27020 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
27021 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
27024 [[קטגוריה: שיטות משפט]]
27028 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
27031 "modes": ["html2wt"],
27032 "scrubWikitext": true
27035 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
27042 Lists: Add space after bullets
27049 <li><span> baz</span></li>
27054 * <span> baz</span>
27058 1. Headings: Add space before/after == (T53744)
27065 <h2><span> baz</span></h2>
27073 == <span> baz</span> ==
27077 2. Headings: Add space before/after == even after hoisted content
27080 "modes": ["html2wt"],
27081 "scrubWikitext": true
27084 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
27092 1. Headings: suppress newly created empty headings
27095 "modes": ["html2wt"],
27096 "scrubWikitext": true
27104 2. Headings: don't suppress empty headings if scrubWikitext is false
27114 3. Headings: suppress empty headings on edits
27117 "modes": ["selser"],
27118 "scrubWikitext": true,
27124 ==<span id="x">foo</span>==
27129 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
27132 "modes": ["html2wt"],
27133 "scrubWikitext": true
27136 <h2>foo<br/>bar</h2>
27137 <h2>foo <span><br/>bar</span> baz</h2>
27141 == foo <span> bar</span> baz ==
27145 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
27148 "modes": ["html2wt"],
27149 "scrubWikitext": false
27152 <h2>foo<br/>bar</h2>
27158 1. WT Quote Tags: suppress newly created empty style tags
27161 "modes": ["html2wt"],
27162 "scrubWikitext": true
27170 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
27176 ''<nowiki/>'''''<nowiki/>'''
27180 3. WT Quote Tags: suppress empty style tags on edits
27183 "modes": ["selser"],
27184 "scrubWikitext": true,
27190 '''<span id="x">foo</span>'''
27195 1. Anchors: suppress newly created empty anchors
27198 "modes": ["html2wt"],
27199 "scrubWikitext": true
27202 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27207 2. Anchors: don't suppress empty anchors if scrubWikitext is false
27210 "modes": ["html2wt"],
27211 "scrubWikitext": false
27214 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27220 3. Anchors: suppress empty anchors on edits
27223 "modes": ["selser"],
27224 "scrubWikitext": true,
27230 [[Test|<span id="x">foo</span>]]
27235 3a. Anchors: do not suppress numbered extlinks
27238 "modes": ["wt2wt"],
27239 "scrubWikitext": true
27244 <a rel="mw:ExtLink" href="http://foo.com"></a>
27248 3b. Anchors: do not suppress numbered extlinks
27251 "modes": ["wt2wt"],
27252 "scrubWikitext": true,
27258 [http://foo.com <span id="x">foo</span>]
27264 Normalizations should be restricted to edited content
27267 "modes": ["selser"],
27268 "scrubWikitext": true,
27270 [ "h1", "before", "<i></i>"]
27284 1. Multiple normalizations (html2wt)
27287 "modes": ["html2wt"],
27288 "scrubWikitext": true
27292 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
27293 </a><b><i></i></b>x</p>
27302 2. Multiple normalizations (selser)
27305 "modes": ["selser"],
27306 "scrubWikitext": true,
27308 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
27312 <span id="x">foo</span>
27314 <span id="x">foo</span>
27320 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
27323 "modes": ["html2wt"],
27324 "scrubWikitext": true
27336 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
27343 <nowiki> </nowiki>hi
27345 <nowiki> </nowiki> hello
27349 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
27352 "modes": ["html2wt"],
27353 "scrubWikitext": true
27362 baz bang</td></tr></table>
27368 bar<span>boo</span></p>
27384 bar<span>boo</span>
27388 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
27391 "modes": ["selser"],
27392 "scrubWikitext": true,
27394 [ "p", "html", " a\n b" ]
27405 1. New links that end in spaces
27408 "modes": ["html2wt"],
27409 "scrubWikitext": false
27412 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27413 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27414 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27416 [[Berlin ]]<nowiki/>is the capital of Germany.
27420 [[Boston ]] is a city.
27424 2. New links that end in spaces
27427 "modes": ["html2wt"],
27428 "scrubWikitext": true
27431 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27432 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27433 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27435 [[Berlin]] is the capital of Germany.
27439 [[Boston]] is a city.
27443 1. Table cells with escapable prefixes
27446 "modes": ["html2wt"],
27447 "scrubWikitext": false
27451 <tr><td>a</td></tr>
27452 <tr><td>-</td></tr>
27453 <tr><td>+</td></tr>
27459 |<nowiki>-</nowiki>
27461 |<nowiki>+</nowiki>
27466 2. Table cells with escapable prefixes
27469 "modes": ["html2wt"],
27470 "scrubWikitext": true
27474 <tr><td>a</td></tr>
27475 <tr><td>-</td></tr>
27476 <tr><td>+</td></tr>
27489 3a. Table cells with escapable prefixes after edits
27492 "modes": ["selser"],
27493 "scrubWikitext": true,
27495 [ "table tbody tr:first-child td:first-child", "remove"]
27509 3b. Table cells with escapable prefixes after edits
27512 "modes": ["selser"],
27513 "scrubWikitext": true,
27515 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27522 |<span id="x">foo</span>+
27531 # FIXME: This test will fail because
27532 # normalization doesn't realize that the id attribute
27533 # will eliminate the escapable scenario
27535 4a. Table cells without escapable prefixes after edits
27538 "modes": ["selser"],
27539 "scrubWikitext": true,
27541 [ "#x", "html", "-" ]
27554 ## This tests normalizer's ability to discriminate between
27555 ## cells having identical content.
27557 4b. Table cells without escapable prefixes after edits
27560 "modes": ["selser"],
27561 "scrubWikitext": true,
27563 [ "td", "html", "-" ]
27576 ## This tests normalizer's ability to not be tripped by
27577 ## comments (and whitespace)
27579 4c. Table cells without escapable prefixes after edits
27582 "modes": ["selser"],
27583 "scrubWikitext": true,
27585 [ "table tbody tr td:first-child", "remove" ]
27600 ## This tests normalizer's ability to handle HTML cells
27602 4d. Table cells without escapable prefixes after edits
27605 "modes": ["selser"],
27606 "scrubWikitext": true,
27608 [ "td", "html", "-" ]
27613 <tr><td>a</td></tr>
27617 <tr><td>-</td></tr>
27621 ## T111151 Remove font elements without attributes
27623 5a. font tags without attributes should be dropped in scrubWikitext mode
27626 "modes": ["html2wt"],
27627 "scrubWikitext": true
27631 <font><font>bar</font></font>
27632 <font class="x">boo</font>
27636 <font class="x">boo</font>
27640 5b. font tags should not be dropped without scrubWikitext being enabled
27643 "modes": ["html2wt"],
27644 "scrubWikitext": false
27653 Escape nowiki DOM elements
27657 <nowiki><i>foo</i></nowiki>
27659 <nowiki>''foo''</nowiki>
27662 # This is meant to be an interim fix while we go about figuring out
27663 # how to not introduce these trailing <nowiki/>s in the first place.
27665 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27669 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27671 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
27672 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki/>"}},"i":0}}]}'></span></p>
27685 # ---------------------------------------------------
27686 # End of tests spec'ing wikitext serialization norms |
27687 # ---------------------------------------------------
27691 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27699 <td><b>c</b><p>d</p></td>
27718 Anchor without href scenarios
27720 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
27723 <a class="no">dice</a>
27728 <span name="foo"></span>
27731 # -----------------------------------------------------------------
27732 # End of section for Parsoid-only html2wt tests for serialization
27734 # -----------------------------------------------------------------
27736 # -----------------------------------------------------------------
27737 # The following section of tests are primarily to spec behavior of
27738 # the selective serializer. All these tests have manual selser
27739 # changes. The automated selser changes for all tests handle the
27740 # wide variation of changes, but these tests here capture specs
27741 # deterministically.
27742 # ----------------------------------------------------------------
27746 Selser: New comments should not be lost
27749 "modes": ["selser"],
27751 [ "#a", "after", "<!--c1-->" ],
27752 [ "#b", "before", "<!--c2-->" ]
27756 <span id="a">a</span>
27758 <span id="b">b</span>
27760 <span id="a">a</span><!--c1-->
27762 <!--c2--><span id="b">b</span>
27767 Selser: Check for validity of DSR before using it
27770 "modes": ["selser"],
27772 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27776 <span id="a">a</span>
27778 {{DISPLAYTITLE:foo}}
27779 <span id="a">a</span>
27783 1. DOMDiff: Changes to <ref> content should be looked up using id
27786 "modes": ["selser"],
27788 ["#X", "after", "bar"],
27789 ["#Y", "after", "baz"]
27793 X <ref><span id="X">foo</span></ref>
27796 <ref name="a"><span id="Y">foo</span></ref>
27799 X <ref><span id="X">foo</span>bar</ref>
27802 <ref name="a"><span id="Y">foo</span>baz</ref>
27807 2. DOMDiff: Changes to <ref> content should be looked up using id
27810 "modes": ["selser"],
27812 ["#Z", "after", "bar"]
27816 A <ref>foo bar for a</ref>
27817 B <ref group="X" name="b" />
27821 <references group="X">
27822 <ref name="b"><span id="Z">foo</span></ref>
27825 A <ref>foo bar for a</ref>
27826 B <ref group="X" name="b" />
27830 <references group="X">
27831 <ref name="b"><span id="Z">foo</span>bar</ref>
27836 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27839 "modes": ["selser"],
27841 [ "div:first-child", "text", "bar" ]
27845 <div style="{{1x|color:red;}}%">foo</div>
27847 <div style="{{1x|color:red;}}%">bar</div>
27860 <li class="mw-empty-elt"></li>
27861 <li class="mw-empty-elt"></li>
27869 [[File:Thumb.png|thumb]]
27871 <div class="thumb tright">
27872 <div class="thumbinner" style="width:137px;"><a href="/wiki/File:Thumb.png" class="image"><img alt="Thumb.png" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a>
27873 <div class="thumbcaption">
27874 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27881 unclosed internal link XSS (T137264)
27883 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27885 <p>[[#<script>alert(1)</script>|
27888 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>