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>
5335 Wikilinks with embedded newlines are not broken
5346 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[ Foo\nB\nC]]"}},"i":0}}]}'>[[ Foo B C]]</p>
5358 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5362 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5363 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5367 T4702: Mismatched <i>, <b> and <a> tags are invalid
5369 ''[http://example.com text'']
5370 [http://example.com '''text]'''
5371 ''Something [http://example.com in italic'']
5372 ''Something [http://example.com mixed''''', even bold]'''
5373 '''''Now [http://example.com both''''']
5375 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5376 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5377 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5378 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5379 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5387 http://www.example.com/?title=AT%26T
5389 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5392 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5395 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5396 # % is actually legal in HTML5. Any change in output would need testing though.
5398 T6781, T7267: %25 in URL
5400 http://www.example.com/?title=100%25_Bran
5402 <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>
5405 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5409 T6781, T7267: %28, %29 in URL
5411 http://www.example.com/?title=Ben-Hur_%281959_film%29
5413 <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>
5416 <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>
5421 T6781: %26 in autonumber URL
5423 [http://www.example.com/?title=AT%26T]
5425 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5428 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5432 T6781, T7267: %26 in autonumber URL
5434 [http://www.example.com/?title=100%25_Bran]
5436 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5439 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5443 T6781, T7267: %28, %29 in autonumber URL
5445 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5447 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5450 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5455 T6781: %26 in bracketed URL
5457 [http://www.example.com/?title=AT%26T link]
5459 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5462 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5466 T6781, T7267: %25 in bracketed URL
5468 [http://www.example.com/?title=100%25_Bran link]
5470 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5475 T6781, T7267: %28, %29 in bracketed URL
5477 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5479 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5482 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5486 External link containing a period in the anchor. (T65947)
5488 [//foo.org/bar#baz. bang]
5490 [//foo.org/bar. bang]
5492 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5493 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5496 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5497 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5501 External link containing a single quote. (T65947)
5505 [//foo.org/bar'baz bang]
5507 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5508 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5511 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5512 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5516 External link containing double-single-quotes in text '' (T6598 sanity check)
5518 Some [http://example.com/ pretty ''italics'' and stuff]!
5520 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5525 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5527 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5529 <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>
5534 External link containing double-single-quotes with no space separating the url from text in italics
5536 [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]].]
5538 <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>
5541 <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>
5543 <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>
5547 External link with comments in link text
5549 [http://www.google.com Google <!-- comment -->]
5551 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5554 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5558 External link to bare IPv4 address
5560 [http://192.168.0.1 Link]
5562 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5565 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5569 URL-encoding in URL functions (single parameter)
5571 {{localurl:Some page|amp=&}}
5573 <p>/index.php?title=Some_page&amp=&
5578 URL-encoding in URL functions (multiple parameters)
5580 {{localurl:Some page|q=?&=&}}
5582 <p>/index.php?title=Some_page&q=?&amp=&
5589 http://example.com/index.php?foozoid%5B%5D=bar
5591 http://example.com/index.php?foozoid[]=bar
5593 <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>
5594 </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>
5597 <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>
5599 <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>
5603 IPv6 urls, autolink format (T23261)
5605 http://[2404:130:0:1000::187:2]/index.php
5607 Examples from RFC 2373, section 2.2:
5608 * http://[1080::8:800:200C:417A]/unicast
5609 * http://[FF01::101]/multicast
5610 * http://[::1]/loopback
5611 * http://[::]/unspecified
5612 * http://[::13.1.68.3]/ipv4compat
5613 * http://[::FFFF:129.144.52.38]/ipv4compat
5615 Examples from RFC 2732, section 2:
5616 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5617 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5618 * http://[3ffe:2a00:100:7031::1]
5619 * http://[1080::8:800:200C:417A]/foo
5620 * http://[::192.9.5.5]/ipng
5621 * http://[::FFFF:129.144.52.38]:80/index.html
5622 * http://[2010:836B:4179::836B:4179]
5625 <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>
5626 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5628 <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>
5629 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5630 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5631 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5632 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5633 <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>
5634 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5636 <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>
5637 <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>
5638 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5639 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5640 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5641 <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>
5642 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5645 <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>
5647 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5648 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5649 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5650 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5651 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5652 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5653 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5655 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5656 <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>
5657 <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>
5658 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5659 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5660 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5661 <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>
5662 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5666 IPv6 urls, bracketed format (T23261)
5668 [http://[2404:130:0:1000::187:2]/index.php test]
5670 Examples from RFC 2373, section 2.2:
5671 * [http://[1080::8:800:200C:417A] unicast]
5672 * [http://[FF01::101] multicast]
5673 * [http://[::1]/ loopback]
5674 * [http://[::] unspecified]
5675 * [http://[::13.1.68.3] ipv4compat]
5676 * [http://[::FFFF:129.144.52.38] ipv4compat]
5678 Examples from RFC 2732, section 2:
5679 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5680 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5681 * [http://[3ffe:2a00:100:7031::1] 3]
5682 * [http://[1080::8:800:200C:417A]/foo 4]
5683 * [http://[::192.9.5.5]/ipng 5]
5684 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5685 * [http://[2010:836B:4179::836B:4179] 7]
5688 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5689 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5691 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5692 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5693 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5694 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5695 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5696 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5697 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5699 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5700 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5701 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5702 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5703 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5704 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5705 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5708 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5710 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5711 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5712 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5713 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5714 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5715 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5716 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5718 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5719 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5720 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5721 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5722 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5723 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5724 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5725 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5729 Non-extlinks in brackets
5738 [{{echo|foo}} ''bar'']
5739 [{{echo|foo}}l's] errand
5740 [{{echo|foo}}l's errand]
5742 [url=http://example.com]
5743 [http:// bare protocols don't count]
5756 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5757 [http:// bare protocols don't count]
5765 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5766 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5767 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5768 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5769 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5770 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5771 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5772 [http:// bare protocols don't count]</p>
5776 Percent encoding in external links
5778 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5780 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5783 <p><a rel="mw:ExtLink"
5784 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5788 Use url link syntax for links where the content is equal the link target
5792 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5795 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5799 Parenthesis in external links, especially URL links
5803 http://example.com/test)
5805 http://example.com/(test)
5807 http://example.com/((test)
5809 (http://example.com/(test))
5811 (http://example.com/(test)))))
5813 http://example.com/a)b
5815 [http://example.com) foo]
5817 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5818 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5819 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5820 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5821 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5822 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5823 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5824 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5827 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5828 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5829 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5830 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5831 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5832 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5833 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5834 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5838 Parenthesis in external links, w/ transclusion or comment
5840 (http://example.com/{{echo|hi}})
5842 (http://example.com<!-- hi -->)
5844 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5845 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5848 <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>
5850 <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>
5854 Serialize <a> tags with invalid link targets as plain text
5856 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5858 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5859 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5860 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5861 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5864 <nowiki>*</nowiki>text
5865 <nowiki>[[foo]]</nowiki>
5866 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5870 mw:ExtLink -vs- mw:WikiLink (T94723)
5874 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5875 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5876 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5877 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5879 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5880 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5885 [[wikipedia:Foo|Bar]]
5886 [[wikipedia:Foo|Bar]]
5888 [[wikipedia:European_Robin|European Robin]]
5889 [[wikipedia:European_Robin|European Robin]]
5893 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5897 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5899 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5910 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5912 Normal text. '''''Bold italic text.''''' Normal text.
5914 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5915 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5920 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5921 # parser strips. The wikitext contains just the first half of the bold
5924 Unclosed and unmatched quotes
5926 '''''Bold italic text '''with bold deactivated''' in between.'''''
5928 '''''Bold italic text ''with italic deactivated'' in between.'''''
5932 ..spanning two paragraphs (should not work).'''
5934 '''Bold tag left open
5936 ''Italic tag left open
5940 <!-- Unmatching number of opening, closing tags: -->
5941 '''This year''''s election ''should'' beat '''last year''''s.
5943 ''Tom'''s car is bigger than ''Susan'''s.
5945 Plain ''italic'''s plain
5947 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5948 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5949 </p><p><b>Bold text..</b>
5950 </p><p>..spanning two paragraphs (should not work).
5951 </p><p><b>Bold tag left open</b>
5952 </p><p><i>Italic tag left open</i>
5954 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5955 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5956 </p><p>Plain <i>italic'</i>s plain
5959 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5960 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5961 </p><p><b>Bold text..</b>
5962 </p><p>..spanning two paragraphs (should not work).<b></b>
5963 </p><p><b>Bold tag left open</b>
5964 </p><p><i>Italic tag left open</i>
5967 <!-- Unmatching number of opening, closing tags: -->
5968 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5969 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5970 </p><p>Plain <i>italic'</i>s plain
5977 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5980 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5981 # is the bare minimum required by the spec, see:
5982 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5983 # Parsoid team replies: empty table tags are legal in HTML5
5985 A table with no data.
5998 A table with stray table end tags on start tag line (wt2html)
6002 {|style="color: red;"|}
6004 {|style="color: red;" |}
6008 {|style="color: red;"|} id="foo"
6012 {|style="color: red;" |} id="foo"
6016 <table style="color: red;"></table>
6018 <table style="color: red;">
6024 <table style="color: red;" id="foo">
6030 <table style="color: red;" id="foo">
6039 A table with no data (take 2)
6047 # A table with nothing but a caption is invalid XHTML, we might want to render
6048 # this as <p>caption</p>
6049 # Parsoid team replies: table with only a caption is legal in HTML5
6051 A table with nothing but a caption
6059 </caption><tr><td></td></tr></table>
6062 <table><caption> caption</caption></table>
6066 A table with caption with default-spaced attributes and a table row
6069 |+ style="color: red;" | caption1
6075 <caption style="color: red;"> caption1
6084 A table with captions with non-default spaced attributes and a table row
6087 |+style="color: red;"|caption2
6088 |+ style="color: red;"| caption3
6094 <caption style="color: red;">caption2
6096 <caption style="color: red;"> caption3
6105 Table td-cell syntax variations
6109 | foo bar foo || baz
6110 | style='color:red;' | baz
6111 | style='color:red;' || baz
6118 <td> foo bar foo </td>
6121 <td style="color:red;"> baz
6123 <td> style='color:red;' </td>
6151 Simple table but with multiple dashes for row wikitext
6170 Multiplication table
6172 {| border="1" cellpadding="2"
6173 |+Multiplication table
6175 ! × !! 1 !! 2 !! 3
6193 <table border="1" cellpadding="2">
6194 <caption>Multiplication table
6241 Accept "||" in table headings
6256 Accept "!!" in table data
6270 <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>
6275 Accept "||" in indented table headings
6285 </th></tr></table></dd></dl>
6290 Accept "!!" in templates
6304 <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>
6308 Accept "!!" in table headings after newline
6325 <p>b!!c</p></th></tr>
6330 Accept "!!" in table data of mixed wikitext / html syntax
6334 <tr><td>b!!c</td></tr>
6347 <tbody><tr><th>a</th></tr>
6348 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6353 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6370 Accept "| !" at start of line in tables (ignore !-attribute)
6374 | !style="color:red" | bar
6386 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 +/-
6390 |style='color:red;'|+1
6391 |style='color:blue;'|-1
6403 <td style="color:red;">+1
6405 <td style="color:blue;">-1
6429 |rowspan=2| Cell 2, row 1 (and 2)
6440 <td rowspan="2"> Cell 2, row 1 (and 2)
6458 {| bgcolor=#ABCDEF border=2
6463 |the original table again
6471 <table bgcolor="#ABCDEF" border="2">
6479 <td>the original table again
6485 Invalid attributes in table cell (T3830)
6499 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6503 | title="foo<nowiki>|</nowiki>" |bar
6504 | title="foo<nowiki>|</nowiki>" bar
6511 <td title="foo|">bar
6513 <td> title="foo|" bar
6518 <tbody><tr><td title="foo">bar</td>
6519 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6520 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6524 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6525 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6526 # *2wt modes will fail.
6528 Table security: embedded pipes
6530 parsoid=wt2html,html2html
6533 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6537 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6538 <td>]" onmouseover="alert(document.cookie)">test
6546 <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>
6550 Element attributes with double ! should not be broken up by <th>
6553 ! hi <div class="!!">ha</div> ho
6558 <th> hi <div class="!!">ha</div> ho
6563 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6568 ! and || in element attributes should not be parsed as <th>/<td>
6571 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6576 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6581 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6585 # FIXME: The output seems broken. Filed as T110268.
6587 ! and || in td attributes should not be parsed as <th>/<td>
6592 | style="color: red !important;" data-contrived="put this here ||" | foo
6597 <td> style="color: red !important;" data-contrived="put this here </td>
6603 <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>
6608 Break on | in element attribute in template
6610 parsoid=wt2html,html2html
6612 {{echo|1=<div class="hi|ho">ha</div>}}
6614 <p>ho">ha</div>
6617 <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>
6621 Break on | in element attribute name in template
6623 {{echo|<div cla|ss="hiho">ha</div>}}
6625 <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>
6629 Don't break on | in extension attribute in template
6631 {{echo|<ref name="hi|ho">ha</ref>}}
6635 <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>
6637 <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>
6640 ## We don't support roundtripping of these attributes in Parsoid.
6641 ## Selective serialization takes care of preventing dirty diffs.
6642 ## But, on edits, we dirty-diff the invalid attribute text.
6644 Invalid text in table attributes should be discarded
6648 {| <span>boo</span> style='border:1px solid black'
6649 | <span>boo</span> style='color:blue' | 1
6650 |<span>boo</span> style='color:blue'| 2
6653 <table style="border:1px solid black">
6655 <td style="color:blue"> 1
6657 <td style="color:blue"> 2
6661 <table style="border:1px solid black">
6663 <td style="color:blue"> 1</td>
6664 <td style="color:blue"> 2</td>
6670 Invalid text in table attributes should be preserved by selective serializer
6673 "modes": ["selser"],
6675 ["td:first-child", "text", "abc"],
6676 ["td + td", "text", "xyz"]
6680 {| <span>boo</span> style='border:1px solid black'
6681 | <span>boo</span> style='color:blue' | 1
6682 |<span>boo</span> style='color:blue'| 2
6685 {| <span>boo</span> style='border:1px solid black'
6686 | <span>boo</span> style='color:blue' |abc
6687 |<span>boo</span> style='color:blue'|xyz
6692 1. Template-generated table cell attributes and cell content
6697 || {{table_attribs_5}}
6698 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6699 |align=center {{table_attribs}}
6700 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6705 <td style="color:red;">Foo
6707 <td style="color:red;">Foo
6709 <td> style="color:red;"</td>
6712 <td style="color:red;">Foo
6714 <td align="center" style="color:red;">Foo
6716 <td align="center" style="color:red;">Foo
6722 2. Template-generated table cell attributes and cell content
6725 |{{table_attribs_2}}
6730 <td style="color:red;">Foo
6738 <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>
6739 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6744 3. Template-generated table cell attributes and cell content
6747 !align=center {{table_header_cells}}
6749 |align=center {{table_cells}}
6754 <th align="center" style="color:red;">Foo</th>
6755 <th style="color:red;"><i>Bar</i></th>
6756 <th style="color:brown;"><i>Foo</i> and Baz
6759 <td align="center" style="color:red;">Foo</td>
6760 <td style="color:red;"><i>Bar</i></td>
6761 <td style="color:brown;"><i>Foo</i> and Baz
6766 <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>
6767 <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>
6772 4. Template-generated table cell attributes and cell content inside a templated table
6775 !align=center {{table_header_cells}}
6777 |align=center {{table_cells}}
6782 <th align="center" style="color:red;">Foo</th>
6783 <th style="color:red;"><i>Bar</i></th>
6784 <th style="color:brown;"><i>Foo</i> and Baz
6787 <td align="center" style="color:red;">Foo</td>
6788 <td style="color:red;"><i>Bar</i></td>
6789 <td style="color:brown;"><i>Foo</i> and Baz
6793 <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}}]}'>
6794 <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>
6796 <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>
6800 ## Edge case fix to prevent future regressions
6802 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6805 |{{table_attribs_7}}
6810 <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>
6812 <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>
6816 Table with row followed by newlines and table heading
6818 parsoid=wt2html,html2html
6836 Table with empty line following the start tag
6838 parsoid=wt2html,html2html
6856 Table attributes with empty value
6858 parsoid=wt2html,html2html
6871 <tbody><tr><td style=""> hello</td></tr>
6876 Wikitext table with a lot of comments
6899 Wikitext table comments represented in parsoid dom
6901 {|<!--c1--><!--c2-->
6912 <table><!--c1--><!--c2-->
6913 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6914 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6919 Wikitext table with double-line table cell
6936 Table cell with a single comment
6953 Table-cell after a comment-only-empty-line
6970 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6972 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6978 Build table with {{!}}
6980 {{{!}} class="wikitable"
6983 {{!}}- style="color:red;"
6984 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6987 <table class="wikitable">
6993 <tr style="color:red;">
6995 <td style="color:red;"> second data
7001 Build table with pipe as data
7003 {| class="wikitable"
7006 |- style="color:red;"
7007 | data || style="color:red;" | second data
7009 | style="color:red;" | data with | || style="color:red;" | second data with |
7011 || data with | ||| second data with |
7014 <table class="wikitable">
7020 <tr style="color:red;">
7022 <td style="color:red;"> second data
7025 <td style="color:red;"> data with | </td>
7026 <td style="color:red;"> second data with |
7029 <td> data with | </td>
7030 <td> second data with |
7036 Build table with wikilink
7038 {| class="wikitable"
7039 ! header || second header
7040 |- style="color:red;"
7041 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
7043 | data || second data [[Main Page|link|text with pipe]]
7046 <table class="wikitable">
7051 <tr style="color:red;">
7052 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
7053 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7057 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7062 # The expected HTML structure in this test is debatable. The PHP parser does
7063 # not parse this kind of table at all. The main focus for Parsoid is on
7064 # round-tripping, so this output is ok for now. TODO: revisit!
7066 Wikitext table with html-syntax row
7076 <td>foo</td></tr></tbody></table>
7080 Implicit <td> after a |-
7082 parsoid=wt2html,html2html
7097 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7098 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7100 </tr></tbody></table>
7104 Lists should be recognized in an implicit <td> context
7106 parsoid=wt2html,html2html
7123 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7124 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7126 </tr></tbody></table>
7130 Table cells not properly parsed in an implicit-td context
7134 {{table_attribs_4}} || a || b
7139 <td style="background-color:#DC241f;" width="10px"></td>
7146 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7147 <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>
7151 Parsoid: Round-trip tables directly followed by content (T53219)
7153 parsoid=wt2html,wt2wt
7178 Parsoid: Default to a newline after tables in new content (T53219)
7183 <tr><td>foo</td></tr></tbody></table> bar
7185 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7190 <nowiki> </nowiki>bar
7198 Parsoid: newline inducing block nodes don't suppress <nowiki>
7210 Parsoid: Row-syntax table headings followed by comment & table cells
7212 parsoid=wt2html,wt2wt
7216 <!-- foo --> || baz || quux
7230 <tbody><tr><th> foo </th><th> bar
7231 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7236 Parsoid: Recover better from broken table attributes
7256 <p>foo</p></td></tr>
7261 Tables: Digest broken attributes on table and tr tag
7277 # T137406: Whitespace in the HTML
7279 1. Generate correct wikitext for tables with thead/tbody/tfoot
7284 <caption>Test</caption>
7325 <caption>Test</caption>
7345 # T137406: No whitespace in the HTML
7347 2. Generate correct wikitext for tables with thead/tbody/tfoot
7351 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7361 Testing serialization after deletion in references
7370 hi <ref><div id="x">ho</div></ref>
7380 Testing serialization after deletion of table cells
7383 "modes": ["wt2wt", "selser"],
7391 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7401 Testing selser after addition of new row before first row (T125419)
7404 "modes": ["wt2wt", "selser"],
7406 [ "tr", "before", "<tr><td>X</td></tr>" ]
7422 Serialize new table rows in a HTML table using HTML tags
7425 "modes": ["wt2wt", "selser"],
7427 [ "tr", "before", "<tr><td>X</td></tr>" ]
7431 <table><tr><td>a</td></tr></table>
7433 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7437 Serialize new table cells in a HTML row using HTML tags
7440 "modes": ["wt2wt", "selser"],
7442 [ "td", "before", "<td>X</td>" ]
7446 <table><tr><td>a</td></tr></table>
7448 <table><tr><td>X</td><td>a</td></tr></table>
7452 Wikitext tables can be nested inside HTML tables
7456 <table data-parsoid='{"stx":"html"}'>
7459 <tr><td>foo</td></tr>
7474 Serialize wikitext list items as HTML list items when embedded in a HTML list
7478 <ul data-parsoid='{"stx": "html"}'>
7479 <li data-parsoid='{}'>a</li>
7489 # SSS FIXME: Is this actually a good thing given the
7490 # odd nested list output that is generated by MW?
7491 # <ul><li>foo<ul>..</ul></li></ul> instead of
7492 # <ul><li>foo</li><ul>..</ul></ul>
7494 Wikitext lists can be nested inside HTML lists
7498 <ul data-parsoid='{"stx": "html"}'>
7499 <li data-parsoid='{"stx": "html"}'>a
7504 <ul data-parsoid='{"stx": "html"}'>
7527 Plain link, capitalized
7531 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7536 Plain link, uncapitalized
7540 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7547 [[Main Page|The Main Page]]
7549 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7554 Piped link with comment in link text
7556 [[Main Page|The Main<!--front--> Page]]
7558 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7563 Piped link with multiple pipe characters in link text
7565 [[Main Page||The|Main|Page|]]
7567 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7570 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7574 Piped link with no link text
7576 [[Thomas Bek (bishop of St David's)|]]
7578 <p>[[Thomas Bek (bishop of St David's)|]]
7581 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7585 Piped link with empty link text
7587 [[Main Page|<nowiki/>]] - empty nowiki
7588 [[Main Page| ]] - empty space
7589 [[Main Page| ]] - empty non breaking space
7591 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7592 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7593 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7596 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7597 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7598 <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>
7606 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7611 Broken link with fragment
7613 [[Zigzagzogzagzig#zug]]
7615 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7620 Special page link with fragment
7622 [[Special:Version#anchor]]
7624 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7629 Nonexistent special page link with fragment
7631 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7633 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7640 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7642 <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>
7649 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7651 <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>!!!
7662 T45661: Piped links with identical prefixes
7664 [[prefixed article|prefixed articles with spaces]]
7666 [[prefixed article|prefixed articlesaoeu]]
7668 [[Main Page|Main Page test]]
7670 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7671 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7672 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7678 Link with HTML entity in suffix / tail
7680 [[Main Page]]", [[Main Page]]a
7682 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7685 <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>
7689 Link with 3 brackets
7700 Link with 4 brackets
7704 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7709 Piped link with 3 brackets
7711 [[[main page|the main page]]]
7713 <p>[[[main page|the main page]]]
7718 Piped link with extlink-like text
7721 [[Main Page|This is a [bar]]]
7723 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7724 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7727 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7728 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7732 Link with multiple pipes
7734 [[Main Page|The|Main|Page]]
7736 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7741 Anchor containing a #. (T65430)
7743 [[Main Page#And#Link]]
7745 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7748 <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>
7754 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7756 <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>
7761 Link with space in namespace
7763 [[User talk:Foo bar]]
7765 <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>
7770 MemoryAlpha:AlphaTest
7772 This is an article in the MemoryAlpha namespace
7773 (which shadows the memoryalpha interwiki link).
7777 Namespace takes precedence over interwiki link (T53680)
7779 [[MemoryAlpha:AlphaTest]]
7781 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7785 # The previous test doesn't work correctly in html2*, due to not recognizing the
7786 # link as an internal one. This one checks for the correct behavior.
7788 Link to namespace preferred over interwiki with correct rel attribute
7790 parsoid=html2wt,html2html
7792 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7794 [[MemoryAlpha:AlphaTest]]
7798 Piped link to namespace
7800 [[Meta:Disclaimers|The disclaimers]]
7802 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7809 [[Usually caused by a typo (oops}]]
7811 <p>[[Usually caused by a typo (oops}]]
7818 Just a test of an article title containing a percent.
7822 Link containing % (not as a hex sequence)
7825 [[7% Solution|7%25 Solution]]
7827 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7828 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7831 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7832 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7835 # note that the parsoid HTML is identical to the previous test output,
7836 # so the previous test ensures that the html2wt mode will generate the
7837 # "not as a hex sequence" wikitext.
7839 Link containing % as a single hex sequence interpreted to char
7841 parsoid=wt2wt,wt2html,html2html
7844 [[7%25 Solution|7%25 Solution]]
7846 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7847 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7850 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7851 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7855 Link containing % as a double hex sequence interpreted to hex sequence
7859 <p>[[7%2525 Solution]]
7863 ## Example for such a section: == < ==
7865 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7867 [[%23%3c]][[%23%3e]]
7869 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7872 <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>
7876 Link containing "<#" and ">#" as a hex sequences
7878 [[%3c%23]][[%3e%23]]
7880 <p>[[%3c%23]][[%3e%23]]
7885 Link containing an equals sign
7887 [[Special:BookSources/isbn=4-00-026157-6]]
7889 <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>
7892 <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>
7898 Just a test of an article title containing a tilde.
7901 # note that links containing signatures, like [[Foo~~~~]], are
7902 # massaged by the pre-save transform (PST) and so the tildes are never
7903 # seen by the parser.
7905 Link containing a tilde
7909 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7912 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7916 Link containing double-single-quotes '' (T6598)
7918 [[Lista d''e paise d''o munno]]
7920 <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>
7923 <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>
7927 Link containing double quotes and spaces
7931 <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>
7934 <p><a rel="mw:WikiLink" href="./Cool_%22Gator%22" title='Cool "Gator"'>Cool "Gator"</a></p>
7938 File containing double quotes and spaces
7940 [[File:Cool "Gator".png]]
7942 <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>
7946 Redirect containing double quotes and spaces
7948 #REDIRECT [[Cool "Gator"]]
7950 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7954 Link containing double-single-quotes '' in text (T6598 sanity check)
7956 Some [[Link|pretty ''italics'' and stuff]]!
7958 <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>!
7961 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7965 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
7967 ''Some [[Link|pretty ''italics'' and stuff]]!''
7969 <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>
7974 Link with double quotes in title part (literal) and alternate part (interpreted)
7976 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7980 [[''Pentecoste''|Pentecoste]]
7982 [[''Pentecoste''|''Pentecoste'']]
7984 <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>
7985 </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>
7986 </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>
7987 </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>
7990 <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>
7991 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7992 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7993 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7997 Broken image links with HTML captions (T41700)
7999 [[File:Nonexistent|<script></script>]]
8000 [[File:Nonexistent|100x100px|<script></script>]]
8001 [[File:Nonexistent|<]]
8002 [[File:Nonexistent|a<i>b</i>c]]
8004 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8005 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8006 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8007 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8010 <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>
8011 <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>
8012 <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>
8013 <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>
8019 [[http://www.example.com]]
8021 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8024 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
8028 Plain link to URL with link text
8030 [[http://www.example.com Link text]]
8032 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8037 Plain link to protocol-relative URL
8039 [[//www.example.com]]
8041 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8044 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
8048 Plain link to protocol-relative URL with link text
8050 [[//www.example.com Link text]]
8052 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8057 Plain link to page with question mark in title
8063 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8064 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8069 # I'm fairly sure the expected result here is wrong.
8070 # We want these to be URL links, not pseudo-pages with URLs for titles....
8071 # However the current output is also pretty screwy.
8074 # I'm changing it to match the current output--it arguably makes more
8075 # sense in the light of the test above. Old expected result was:
8076 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8078 # But I think this test is bordering on "garbage in, garbage out" anyway.
8083 Piped link to URL: [[http://www.example.com|an example URL]]
8085 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8088 <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>
8092 T2002: [[page|http://url/]] should link to page, not http://url/
8094 [[Main Page|http://url/]]
8096 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8099 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8102 # Parsoid does not mark self-links, by design.
8104 T2337: Escaped self-links should be bold
8108 [[Bug462]] [[Bug462]]
8110 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8113 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a></p>
8115 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8119 Self-link to section should not be bold
8123 [[Main Page#section]]
8125 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8136 Self-link to numeric title
8142 <p><a class="mw-selflink selflink">0</a>
8147 Link to numeric-equivalent title
8153 <p><a href="/wiki/00" title="00">00</a>
8158 <nowiki> inside a link
8160 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8162 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8167 Non-breaking spaces in title
8169 [[ Main Page ]]
8171 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8176 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8182 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8187 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8193 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8198 Internal link with en linktrail: no apostrophes (T29473)
8204 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8209 Internal link with ca linktrail with apostrophes (T29473)
8215 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8220 Internal link with kaa linktrail with apostrophes (T29473)
8226 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8231 Link with multiple ":" in a subpage-supporting namespace (T65636)
8233 [[User:Foo/Test/63636:Bar|Test]]
8235 <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>
8238 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8241 ## Mainly a sanity check for Parsoid
8243 Handle title parsing for subpages
8263 Link to a subpage from a namespace other than main
8270 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8273 <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>
8277 Ensure that transclusion titles are not url-decoded
8279 subpage title=[[Test]]
8282 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8284 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8287 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8291 Purely hash wikilink
8293 title=[[User:Test/123]]
8298 <p><a href="#a">b</a>
8301 <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>
8305 Serialization of purely hash wikilink
8307 title=[[User:Test/123]]
8311 <p><a href="#a">[[</a></p>
8313 [[#a|<nowiki>[[</nowiki>]]
8315 <p><a href="#a">[[</a>
8320 1. Interaction of linktrail and template encapsulation
8324 <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>
8328 2. Interaction of linktrail and template encapsulation
8332 {{echo|Some [[Fool]]}}s
8334 <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>
8338 3. Interaction of linktrail and template encapsulation
8342 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8344 <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>
8354 Internal link with is link prefix
8358 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8360 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8371 Internal link with is link trail and link prefix
8375 [[mótmælendatrú|xxx]]ar
8377 mótmælenda[[söfnuður]]
8378 mótmælenda[[söfnuður|söfnuðir]]
8379 mótmælenda[[söfnuður|söfnuðir]]xxx
8381 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8382 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8383 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8384 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8385 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8390 Parsoid link trail escaping
8392 parsoid=html2wt,html2html
8394 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8400 Parsoid link prefix escaping
8403 parsoid=html2wt,html2html
8405 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8407 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8411 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8419 [http://wp.org ''foo'']
8421 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8422 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8423 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8424 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8429 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8431 [[Foo|{{echo|a}} b {{echo|c}}]]
8433 <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>
8437 Link with angle bracket after anchor
8441 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8444 <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>
8448 ### Interwiki links (see maintenance/interwiki.sql)
8452 Inline interwiki link
8454 parsoid=wt2html,wt2wt,html2html
8456 [[MeatBall:SoftSecurity]]
8458 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8461 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8465 Inline interwiki link with empty title (T4372)
8467 parsoid=wt2html,wt2wt,html2html
8471 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8474 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8478 Interwiki link encoding conversion (T3636)
8480 *[[Wikipedia:ro:Olteniţa]]
8481 *[[Wikipedia:ro:Olteniţa]]
8483 <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>
8484 <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>
8488 <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>
8489 <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>
8494 Interwiki link with fragment (T4130)
8496 [[MeatBall:SoftSecurity#foo]]
8498 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8503 Link scenarios with escaped fragments
8506 [[Foo#Is this great?]]
8507 [[meatball:Foo#Is this great?]]
8509 <p><a href="#Is_this_great.3F">#Is this great?</a>
8510 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8511 <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>
8514 <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>
8515 <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>
8516 <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>
8519 # Ideally the wikipedia: prefix here should be proto-relative too
8520 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8521 # define the 'en' prefix, and originally the test used 'wikipedia',
8522 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8525 Different interwiki prefixes mapping to the same URL
8533 [[:wikipedia:Foo|Foo]]
8535 [[wikipedia:en:Foo]]
8537 [[:wikipedia:en:Foo]]
8541 <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>
8543 <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>
8545 <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>
8547 <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>
8549 <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>
8551 <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>
8553 <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>
8557 Interwiki links that cannot be represented in wiki syntax
8560 [[meatball:ok#foo|ok with fragment]]
8561 [[meatball:ok_as_well?|ok ending with ? mark]]
8562 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8563 [http://de.wikipedia.org/wiki/#foo is just fragment]
8566 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8567 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8568 <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>
8569 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8570 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8573 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8574 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8575 <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>
8576 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8577 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8581 Interwiki links: trail
8583 [[wikipedia:Foo|Ba]]r
8585 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8588 <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>
8592 Local interwiki link
8594 parsoid=wt2html,wt2wt,html2html
8596 [[local:Template:Foo]]
8598 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8601 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8604 # Parsoid does not mark self-links, by design.
8606 Local interwiki link: self-link to current page
8609 parsoid=wt2html,wt2wt,html2html
8613 <p><a class="mw-selflink selflink">local:Main Page</a>
8616 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8620 Local interwiki link: prefix only (T66167)
8622 parsoid=wt2html,wt2wt,html2html
8626 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8629 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8633 Local interwiki link: with additional interwiki prefix (T63357)
8635 parsoid=wt2html,wt2wt,html2html
8637 [[local:meatball:Hello]]
8639 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8642 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8646 Multiple local interwiki link prefixes
8648 [[local:local:local:local:mi:local:Foo]]
8650 parsoid=wt2html,wt2wt,html2html
8652 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8655 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8659 ### Interlanguage links
8660 ### Language links (so that searching for '### language' matches..)
8672 <p>Blah blah blah</p>
8673 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8676 ## parsoid html2wt will lose the space variations
8678 Interlanguage link with spacing
8680 parsoid=wt2html,wt2wt,html2html
8688 <p>Blah blah blah</p>
8689 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8693 Double interlanguage link
8702 <p>Blah blah blah</p>
8703 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8704 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8707 ## parsoid html2wt will lose the space variations
8709 Interlanguage link variations
8711 parsoid=wt2html,wt2wt,html2html
8721 <p>Blah blah blah</p>
8722 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8723 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8724 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8728 Escaping of interlanguage links (T129218, T156308)
8732 [[ : zh : Chinese ]]
8735 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8736 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8740 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8741 <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8745 Multiple colons escaping interlanguage links
8751 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8757 ## parsoid html2wt will normalize the space to _
8759 Space and question mark encoding in interlanguage links (T95473)
8761 parsoid=wt2html,wt2wt,html2html
8769 <p>Blah blah blah</p>
8770 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8774 Interlanguage link, with prefix links
8784 <p>Blah blah blah</p>
8785 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8789 Double interlanguage link, with prefix links (T10897)
8800 <p>Blah blah blah</p>
8801 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8802 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8806 "Extra" interlanguage links (T34189 / gerrit 111390)
8814 <p>Blah blah blah</p>
8815 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8818 ## PHP parser tests script needs an update
8819 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8821 Language links render as inline links if $wgInterwikiMagic=false
8823 wgInterwikiMagic=false
8824 parsoid=wt2html,wt2wt,html2html
8829 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8832 ## PHP parser tests script needs an update
8833 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8835 Language links render as inline links in the Talk namespace
8838 parsoid=wt2html,wt2wt,html2html
8843 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8847 Parsoid-specific test: Wikilinks with should RT properly
8853 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8858 Parsoid T55221: Wikilinks should be properly entity-escaped
8860 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8862 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8863 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8865 He&nbsp;llo [[Foo|He&nbsp;llo]]
8867 He&nbsp;llo He&nbsp;llo
8869 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8870 </p><p>He&nbsp;llo He&nbsp;llo
8874 # html2wt will fail because of title normalization without data-parsoid
8876 Parsoid: handle constructor well
8878 parsoid=wt2html,wt2wt
8884 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8885 </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>
8888 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8890 <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>
8899 # Note that `ko` isn't a known interlanguage prefix
8901 Parsoid: recognize interlanguage links without a target page
8911 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8913 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8916 # Note that `ko` isn't a known interwiki prefix
8918 Parsoid: recognize interwiki links without a target page
8920 parsoid=wt2html,wt2wt,html2html
8926 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8927 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8930 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8931 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8935 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
8939 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8942 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8946 Interlanguage link with preceding local interwiki link (T70085)
8948 parsoid=wt2html,wt2wt,html2html
8951 [[local:es:Spanish]]
8954 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8958 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8962 Looks like an interlanguage link, but is actually a local interwiki
8964 parsoid=wt2html,wt2wt,html2html
8970 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8974 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8978 ### Redirects, Parsoid-only
8982 1. Simple redirect to page
8984 #REDIRECT [[Main Page]]
8986 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8990 2. Other redirect variants
8992 #REDIRECT [[Main_Page]]
8994 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8997 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8998 # This tests the Parsoid bail-out code.
9000 3. Other redirect variants
9002 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9004 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
9008 4. Redirect to a templated destination
9010 #REDIRECT [[{{echo|Foo}}bar]]
9012 <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"}]]}'/>
9018 parsoid=wt2html,wt2wt
9023 <li>REDIRECT [[]]</li></ol>
9027 Optional colon in #REDIRECT
9029 # the colon is archaic syntax. we support it for wt2html, but we
9030 # don't care that it roundtrips back to the modern syntax.
9031 parsoid=wt2html,html2html
9033 #REDIRECT:[[Main Page]]
9035 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9039 Whitespace in #REDIRECT with optional colon
9041 # the colon and gratuitous whitespace is archaic syntax. we support
9042 # it for wt2html, but we don't care that it roundtrips back to the
9043 # modern syntax (without extra whitespace)
9044 parsoid=wt2html,html2html
9051 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9055 Piped link in #REDIRECT
9057 # content after piped link is ignored. we support this syntax,
9058 # but don't care that the piped link is lost when we roundtrip this.
9061 #REDIRECT [[Main Page|bar]]
9063 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9067 Redirect to category (T104502)
9069 parsoid=wt2html,wt2wt
9071 #REDIRECT [[Category:Foo]]
9073 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9077 Redirect to category with URL encoding (T104502)
9081 #REDIRECT [[Category%3AFoo]]
9083 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9087 Redirect to category page
9089 #REDIRECT [[:Category:Foo]]
9091 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9095 Redirect to image page (1)
9097 #REDIRECT [[File:Wiki.png]]
9099 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9103 Redirect to image page (2)
9105 #REDIRECT [[Image:Wiki.png]]
9107 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9110 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9111 # Next test confirms this.
9113 Redirect to language (1) (T104918)
9115 parsoid=wt2html,wt2wt,html2html
9117 #REDIRECT [[en:File:Wiki.png]]
9119 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9123 Redirect to language (2) (T104918)
9125 #REDIRECT [[:en:File:Wiki.png]]
9127 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9131 Redirect to interwiki (T104918)
9133 #REDIRECT [[meatball:File:Wiki.png]]
9135 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9139 Non-English #REDIRECT
9143 #TILVÍSUN [[Main Page]]
9145 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9149 Redirect syntax under text isn't considered a redirect
9152 #redirect [[Main Page]]
9155 <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>
9158 # FIXME: Should hoist the redirect to the top of the page and ensure there
9165 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9185 Broken br tag sanitization
9193 # TODO: Fix html2html mode (T53055)!
9195 Parsoid: Broken br tag recognition
9208 Incorrecly removing closing slashes from correctly formed XHTML
9210 <br style="clear:both;" />
9212 <p><br style="clear:both;" />
9217 Failing to transform badly formed HTML into correct XHTML
9219 <br style="clear: left;">
9220 <br style="clear: right;">
9221 <br style="clear: both;">
9223 <p><br style="clear: left;" />
9224 <br style="clear: right;" />
9225 <br style="clear: both;" />
9229 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9230 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9232 Handling html with a div self-closing tag
9241 <p><div title />
9245 <p><div title=bar />
9246 <div title=bar/>
9248 <div title="bar/"></div>
9252 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9253 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9254 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9255 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9256 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9257 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9261 Handling html with a br self-closing tag
9288 Horizontal ruler (should it add that extra space?)
9303 Horizontal ruler -- 4+ dashes render hr
9312 Horizontal ruler -- eats additional dashes on the same line
9321 Horizontal ruler -- does not collapse dashes on consecutive lines
9332 Horizontal ruler -- <4 dashes render as plain text
9341 Horizontal ruler -- Supports content following dashes on same line
9353 ### Block-level elements
9362 <ul><li>Common list</li>
9364 <li>item 3</li></ul>
9375 <ol><li>Numbered list</li>
9377 <li> item 3</li></ol>
9391 ***#Number on level 4
9393 **#Number on level 3
9394 **#Number on level 3
9398 #** Level 3, but ordered
9401 <ol><li> with numbers</li></ol>
9402 <ul><li> and bullets</li></ul>
9403 <ol><li> and numbers</li></ol></li>
9405 <ul><li>bullet level 2
9406 <ul><li>bullet level 3
9407 <ol><li>Number on level 4</li></ol></li></ul></li>
9409 <ol><li>Number on level 3</li>
9410 <li>Number on level 3</li></ol></li></ul>
9411 <ol><li>number level 2</li></ol></li>
9413 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9414 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9419 1. Nested mixed wikitext and html list
9422 * <ul><li>ho</li></ul>
9427 <li> <ul><li>ho</li></ul></li>
9429 <ul><li> ho</li></ul></li></ul>
9433 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9435 <ul><li> ho</li></ul></li></ul>
9439 2. Nested mixed wikitext and html list (incompatible)
9442 : {{echo|<li>ho</li>}}
9445 <dd> <li>ho</li></dd></dl>
9449 <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>
9459 <ul><li>bar</li></ul></li></ul>
9469 <ul><li><ul><li>foo</li></ul></li>
9475 Nested lists 3 (first element empty)
9481 <ul><li>bar</li></ul></li></ul>
9486 Nested lists 4 (first element empty)
9491 <ul><li><ul><li></li></ul></li>
9497 Nested lists 5 (both elements empty)
9502 <ul><li><ul><li></li></ul></li>
9508 Nested lists 6 (both elements empty)
9514 <ul><li></li></ul></li></ul>
9519 Nested lists 7 (skip initial nesting levels)
9523 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9528 Nested lists 8 (multiple nesting transitions)
9536 <ul><li><ul><li> bar</li></ul></li>
9537 <li> baz</li></ul></li>
9543 Nested lists 9 (extension interaction)
9549 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9553 1. Lists with start-of-line-transparent tokens before bullets: Comments
9566 2. Lists with start-of-line-transparent tokens before bullets: Template close
9571 <ul><li>foo bar</li>
9577 List items are not parsed correctly following a <pre> block (T2785)
9583 <ul><li> <pre>foo</pre></li>
9584 <li> <pre>bar</pre></li>
9588 <ul><li> <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9589 <li> <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9594 List items from template
9605 * notSOL{{inner list}}
9608 <ul><li> item 1</li>
9609 <li> item 2</li></ul>
9610 <ul><li> item 0</li>
9612 <li> item 2</li></ul>
9613 <ul><li> item 0</li>
9616 <li> item 2</li></ul>
9621 List interrupted by empty line or heading
9629 <ul><li> foo</li></ul>
9630 <ul><li><ul><li> bar</li></ul></li></ul>
9631 <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>
9632 <ul><li> Another list item</li></ul>
9637 Multiple list tags generated by templates
9658 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9661 <!--This line will NOT split the list-->
9663 <!--This line will NOT split the list either-->
9665 <!--foo--> <!----> <!--This line NOT split the list either-->
9676 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9679 <!--This line will NOT split the list-->
9681 <!--This line will NOT split the list either-->
9683 <!--foo--> <!----> <!--This line NOT split the list
9696 (The PHP parser relies on Tidy for the hack)
9698 parsoid=wt2html,wt2wt
9702 * {{echo|<li>templated li-hack}}
9703 * <!--foo--> <li> unsupported li-hack with preceding comments
9706 <li><li>not a li-hack
9713 <li>templated li-hack</li>
9714 <li>unsupported li-hack with preceding comments</li>
9717 <li>not a li-hack</li>
9722 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9749 Parsoid: Test of whitespace serialization with Templated bullets
9756 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9760 # ------------------------------------------------------------------------
9761 # The next set of tests are about Parsoid's ability to handle badly nested
9762 # tags (parse, minimize scope of fixup, and roundtrip back)
9763 # ------------------------------------------------------------------------
9766 Unbalanced closing block tags break a list
9767 (php parser relies on Tidy to fix up)
9785 # Parsoid fails this test, but it might be tricky to support properly.
9788 Unbalanced closing non-block tags don't break a list
9789 (php parser relies on Tidy to fix up)
9796 <li><span>a</span></li>
9797 <li><span>b</span></li>
9811 Unclosed formatting tags that straddle lists are closed and reopened
9812 (php parser relies on Tidy to fix up)
9814 parsoid=wt2html,wt2wt,html2html
9824 <ol><li> <s> a</s></li>
9825 <li><s> b </s></li></ol>
9830 1. List embedded in a formatting tag
9837 <li><small>foo</small></li>
9847 ## Ugly Parsoid output here
9848 ## Not sure what the right output is.
9850 2. List embedded in a formatting tag
9857 <li><small>a</small></li>
9858 <li><small>b</small></li>
9865 <li><small>b</small></li>
9869 # Ugly Parsoid and PHP parser output here
9870 # Not sure if we want to make this a test!
9873 ## 3. Unclosed formatting tags in list elements
9879 ## <li><small>a</small></li>
9880 ## <li><small><small>b</small></small></li>
9884 ## <li><small>a</small></li>
9886 ## <li><small>b</small></li>
9890 # This is a bug in the PHP parser + tidy combination.
9891 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9892 # and then fostered out of the table by tidy.)
9893 # We believe the Parsoid output to be correct.
9895 Table with missing opening <tr> tag
9897 parsoid=wt2html,wt2wt
9915 # Note that the current date is hard-coded as
9916 # 1970-01-01T00:02:03Z (a Thursday)
9917 # when running parser tests. The timezone is also fixed to GMT, so
9918 # local date will be identical to current date.
9921 Magic Word: {{CURRENTDAY}}
9930 Magic Word: {{CURRENTDAY2}}
9939 Magic Word: {{CURRENTDAYNAME}}
9948 Magic Word: {{CURRENTDOW}}
9957 Magic Word: {{CURRENTMONTH}}
9966 Magic Word: {{CURRENTMONTH1}}
9975 Magic Word: {{CURRENTMONTHABBREV}}
9977 {{CURRENTMONTHABBREV}}
9984 Magic Word: {{CURRENTMONTHNAME}}
9986 {{CURRENTMONTHNAME}}
9993 Magic Word: {{CURRENTMONTHNAMEGEN}}
9995 {{CURRENTMONTHNAMEGEN}}
10002 Magic Word: {{CURRENTTIME}}
10011 Magic Word: {{CURRENTHOUR}}
10020 Magic Word: {{CURRENTWEEK}} (T6594)
10029 Magic Word: {{CURRENTYEAR}}
10038 Magic Word: {{CURRENTTIMESTAMP}}
10040 {{CURRENTTIMESTAMP}}
10047 Magic Words LOCAL (UTC)
10051 * {{LOCALMONTHNAME}}
10052 * {{LOCALMONTHNAMEGEN}}
10053 * {{LOCALMONTHABBREV}}
10062 * {{LOCALTIMESTAMP}}
10077 <li> 19700101000203</li></ul>
10082 Magic Word: {{FULLPAGENAME}}
10084 title=[[User:Ævar Arnfjörð Bjarmason]]
10085 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10089 <p>User:Ævar Arnfjörð Bjarmason
10094 Magic Word: {{FULLPAGENAMEE}}
10096 title=[[User:Ævar Arnfjörð Bjarmason]]
10097 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10101 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10106 Magic Word: {{TALKSPACE}}
10108 title=[[User:Ævar Arnfjörð Bjarmason]]
10109 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10118 Magic Word: {{TALKSPACE}}, same namespace
10120 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10121 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10130 Magic Word: {{TALKSPACE}}, main namespace
10132 title=[[Parser Test]]
10133 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10142 Magic Word: {{TALKSPACEE}}
10144 title=[[User:Ævar Arnfjörð Bjarmason]]
10145 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10154 Magic Word: {{SUBJECTSPACE}}
10156 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10157 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10166 Magic Word: {{SUBJECTSPACE}}, same namespace
10168 title=[[User:Ævar Arnfjörð Bjarmason]]
10169 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10178 Magic Word: {{SUBJECTSPACE}}, main namespace
10180 title=[[Parser Test]]
10181 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10189 Magic Word: {{SUBJECTSPACEE}}
10191 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10192 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10201 Magic Word: {{NAMESPACE}}
10203 title=[[User:Ævar Arnfjörð Bjarmason]]
10204 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10213 Magic Word: {{NAMESPACEE}}
10215 title=[[User:Ævar Arnfjörð Bjarmason]]
10216 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10225 Magic Word: {{NAMESPACENUMBER}}
10227 title=[[User:Ævar Arnfjörð Bjarmason]]
10228 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10230 {{NAMESPACENUMBER}}
10237 Magic Word: {{SUBPAGENAME}}
10239 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10240 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10249 Magic Word: {{SUBPAGENAMEE}}
10251 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10252 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10261 Magic Word: {{ROOTPAGENAME}}
10263 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10264 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10268 <p>Ævar Arnfjörð Bjarmason
10273 Magic Word: {{ROOTPAGENAMEE}}
10275 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10276 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10280 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10285 Magic Word: {{BASEPAGENAME}}
10287 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10288 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10292 <p>Ævar Arnfjörð Bjarmason
10297 Magic Word: {{BASEPAGENAMEE}}
10299 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10300 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10304 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10309 Magic Word: {{TALKPAGENAME}}
10311 title=[[User:Ævar Arnfjörð Bjarmason]]
10312 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10316 <p>User talk:Ævar Arnfjörð Bjarmason
10321 Magic Word: {{TALKPAGENAMEE}}
10323 title=[[User:Ævar Arnfjörð Bjarmason]]
10324 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10328 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10333 Magic Word: {{SUBJECTPAGENAME}}
10335 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10336 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10338 {{SUBJECTPAGENAME}}
10340 <p>User:Ævar Arnfjörð Bjarmason
10345 Magic Word: {{SUBJECTPAGENAMEE}}
10347 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10348 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10350 {{SUBJECTPAGENAMEE}}
10352 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10357 Magic Word: {{NUMBEROFFILES}}
10359 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10368 Magic Word: {{PAGENAME}}
10370 title=[[User:Ævar Arnfjörð Bjarmason]]
10371 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10375 <p>Ævar Arnfjörð Bjarmason
10380 Magic Word: {{PAGENAME}} with metacharacters
10382 title=[['foo & bar = baz']]
10383 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10387 <p><i>'foo & bar = baz'</i>
10390 <p><i>'foo & bar = baz'</i></p>
10394 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10396 title=[[*RFC 1234 http://example.com/]]
10397 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10401 <p>*RFC 1234 http://example.com/
10404 <p>*RFC 1234 http://example.com/</p>
10408 Magic Word: {{PAGENAMEE}}
10410 title=[[User:Ævar Arnfjörð Bjarmason]]
10411 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10415 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10420 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10422 title=[[*RFC 1234 http://example.com/]]
10423 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10427 <p>*RFC_1234_http://example.com/
10430 <p>*RFC_1234_http://example.com/</p>
10434 Magic Word: {{REVISIONID}}
10436 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10445 Magic Word: {{SCRIPTPATH}}
10447 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10455 Magic Word: {{STYLEPATH}}
10457 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10466 Magic Word: {{SERVER}}
10468 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10472 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10477 Magic Word: {{SERVERNAME}}
10479 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10488 Magic Word: {{SITENAME}}
10490 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10499 Magic Word: {{PAGELANGUAGE}}
10502 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10511 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10513 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10522 Case-sensitive magic words, when cased differently, should just be template transclusions
10529 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10530 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10531 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10532 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10537 Case-insensitive magic words should still work with weird casing.
10547 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10551 # From plwiki:PLOS_ONE
10553 Parsoid: Page property magic word with magic word contents
10555 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10557 <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>"}]]}'/>
10560 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10561 # But, this is a limitation of our representation and is documented in
10562 # TemplateHandler.js in processSpecialMagicWord
10564 Parsoid: Template-generated DISPLAYTITLE
10566 {{{{echo|DISPLAYTITLE}}:Foo}}
10570 wgAllowDisplayTitle=true
10571 wgRestrictDisplayTitle=false
10576 <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"}]]}'/>
10580 Namespace 1 {{ns:1}}
10589 Namespace 1 {{ns:01}}
10598 Namespace 0 {{ns:0}} (T6783)
10606 Namespace 0 {{ns:00}} (T6783)
10614 Namespace -1 {{ns:-1}}
10623 Namespace User {{ns:User}}
10632 Namespace User talk {{ns:User_talk}}
10641 Namespace User talk {{ns:uSeR tAlK}}
10650 Namespace File {{ns:File}}
10659 Namespace File {{ns:Image}}
10668 Namespace (lang=de) Benutzer {{ns:User}}
10679 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10685 <p>Benutzer Diskussion
10692 {{urlencode:hi world?!}}
10693 {{urlencode:hi world?!|WIKI}}
10694 {{urlencode:hi world?!|PATH}}
10695 {{urlencode:hi world?!|QUERY}}
10705 Magic Word: prioritize type info over data-parsoid
10709 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10715 Magic Word: serialize on separate line (parsoid)
10717 parsoid=wt2wt,html2wt
10723 foo<meta property="mw:PageProp/notoc"/>bar
10727 Magic Word: rt non-english wikis
10734 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10738 __proto__ is treated as normal wikitext (T105997)
10750 Magic links: internal link to RFC (T2479)
10754 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10757 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10761 Magic links: RFC (T2479)
10765 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10768 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10772 Magic links: RFC (T67278)
10774 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10776 <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.
10779 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10783 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10785 RFC      822
10789 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10794 <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>
10800 Magic links: ISBN (T3937)
10804 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10807 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10811 Magic links: ISBN (T67278)
10813 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10815 <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.
10818 <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>
10822 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
10824 ISBN      978 0 316 09811 3
10830 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10837 <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>
10845 Magic links: PMID incorrectly converts space to underscore
10849 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10852 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10856 Magic links: PMID (T67278)
10858 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10860 <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.
10863 <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>
10867 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
10869 PMID      1234
10873 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10878 <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>
10883 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10884 # since these are ExtLinkText, not MagicLinkText
10886 Magic links: use appropriate serialization for "almost" magic links.
10888 X[[Special:BookSources/0978739256|foo]]
10890 X[//tools.ietf.org/html/rfc1234 foo]
10892 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10893 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10896 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10897 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10901 Magic links: All disabled (T47942)
10903 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10909 <p>ISBN 0-306-40615-2
10920 Nonexistent template
10922 {{thistemplatedoesnotexist}}
10924 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10929 Template with invalid target containing tags
10931 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10933 <p>{{a<b>b</b>|foo|a=b|a = b}}
10938 Template with invalid target containing unclosed tag
10940 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10942 <p>{{a<b>|foo|a=b|a = b}}</b>
10947 Template with invalid target containing wikilink
10951 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10954 <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>
10958 Template with just whitespace in it, T70421
10962 <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>
10968 This is a test template
10976 <p>This is a test template
10981 Template with explicit namespace
10985 <p>This is a test template
10993 This is a test template with parameter {{{param}}}
10999 {{paramtest|param=foo}}
11001 <p>This is a test template with parameter foo
11006 Template:paramtestnum
11008 [[{{{1}}}|{{{2}}}]]
11012 Template unnamed parameter
11014 {{paramtestnum|Main Page|the main page}}
11016 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11021 Template:templatesimple
11027 Template:templateredirect
11029 #redirect [[Template:templatesimple]]
11033 Template:templateasargtestnum
11039 Template:templateasargtest
11041 {{template{{{templ}}}}}
11045 Template:templateasargtest2
11051 Template with template name as unnamed argument
11053 {{templateasargtestnum|templatesimple}}
11060 Template with template name as argument
11062 {{templateasargtest|templ=simple}}
11069 Template with template name as argument (2)
11071 {{templateasargtest2|templ=templatesimple}}
11078 Template:templateasargtestdefault
11080 {{{{{templ|templatesimple}}}}}
11090 Template with default value
11092 {{templateasargtestdefault}}
11099 Template with default value (value set)
11101 {{templateasargtestdefault|templ=templa}}
11110 {{templateredirect}}
11115 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11119 Template with argument in separate line
11121 {{ templateasargtest |
11129 Template with complex template as argument
11132 param ={{ templateasargtest |
11133 templ = simple }}}}
11135 <p>This is a test template with parameter (test)
11140 Templates with templated name
11142 {{{{echo|echo}}|foo}}
11143 {{{{echo|inner list}} }}
11147 <ul><li> item 1</li></ul>
11150 <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>
11151 <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>
11154 # Parsoid markup is deliberate "broken". This is an edge case.
11155 # See long comment in TemplateHandler.js:convertAttribsToString.
11157 Templates with invalid templated targets
11168 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11173 Template with thumb image (with link in description)
11175 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11177 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>
11180 <p>This is a test template with parameter</p>
11181 <div class="thumb tright">
11182 <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>
11183 <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>
11187 <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>
11191 Template:complextemplate
11193 {{{1}}} {{paramtest|
11194 param ={{{param}}}}}
11198 Template with complex arguments
11201 param ={{ templateasargtest |
11202 templ = simple }}|[[Template:complextemplate|link]]}}
11204 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11209 T2553: link with two variables in a piped link
11212 |[[{{{1}}}|{{{2}}}]]
11217 <td>[[{{{1}}}|{{{2}}}]]
11222 <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>
11228 Abort table cell attribute parsing on wikilink
11231 | testing [[one|two]] | three || four
11232 | testing one two | three || four
11233 | testing="[[one|two]]" | three || four
11238 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11244 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11250 <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>
11251 <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>
11252 <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>
11257 Don't abort table cell attribute parsing if wikilink is found in template arg
11260 | Test {{#tag:ref|One two "[[three]]" four}}
11264 <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>
11269 Magic variable as template parameter
11271 {{paramtest|param={{SITENAME}}}}
11273 <p>This is a test template with parameter MediaWiki
11280 [[{{{param}}}|link]]
11284 Template parameter as link source
11286 {{linktest|param=Main Page}}
11288 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11293 Template:paramtest2
11295 including another template, {{paramtest|param={{{arg}}}}}
11299 Template passing argument to another template
11301 {{paramtest2|arg='hmm'}}
11303 <p>including another template, This is a test template with parameter 'hmm'
11314 Template as link source
11318 [[{{linktest2}}|Main Page]]
11320 [[{{linktest2}}]]Page
11322 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11323 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11324 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11342 Template infinite loop
11346 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11351 Template from main namespace
11370 T2529: Template with table, not included at beginning of line
11389 T2523: Template shouldn't eat newline (or add an extra one before table)
11409 T2041: Template parameters shown as broken links
11418 Template with targets containing wikilinks
11424 {{[[{{echo|foo}}]]}}
11426 {{{{echo|[[foo}}]]}}
11428 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11429 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11433 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11434 <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>
11435 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11445 Templates: Double quotes as template target
11452 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11456 ## This test is about making sure Parsoid's data-mw is well formed in the
11457 ## face of multiple templates with intersecting and overlapping ranges. The
11458 ## wikitext itself is wretched.
11460 Templates with intersecting and overlapping ranges
11485 <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":""}]]}'>
11487 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11489 <tbody><tr><td>hi</td></tr>
11494 Template:MSGNW test
11496 ''None'' of '''this''' should be
11498 but rather passed unmodified
11506 # hmm, fix this or just deprecate msgnw and document its behavior?
11510 {{msgnw:MSGNW test}}
11512 <p>''None'' of '''this''' should be
11514  but rather passed unmodified
11515 {{test}}
11519 <!-- comment -->
11526 {{int:youhavenewmessages|lots of money|not!}}
11528 <p>You have lots of money (not!).
11533 int keyword - non-existing message
11544 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11548 <includeonly> and <noinclude> being included
11559 <onlyinclude>Foo</onlyinclude>bar
11563 <onlyinclude> being included
11575 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11579 <onlyinclude> and <includeonly> being included
11588 <includeonly> and <noinclude> on a page
11590 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11597 Un-closed <noinclude>
11604 <onlyinclude> on a page
11606 <onlyinclude>Foo</onlyinclude>bar
11613 Un-closed <onlyinclude>
11620 Self-closed noinclude, includeonly, onlyinclude tags
11631 Unbalanced includeonly and noinclude tags
11635 |b</noinclude></noinclude>
11636 |c</noinclude></includeonly>
11637 |d</includeonly></includeonly>
11646 <td>c</includeonly>
11648 <td>d</includeonly></includeonly>
11654 Template:Includeonly section
11657 ==Includeonly section==
11663 T8563: Edit link generation for section shown by <includeonly>
11665 {{includeonly section}}
11667 <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>
11668 <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>
11672 # Uses same input as the contents of [[Template:Includeonly section]]
11674 T8563: Section extraction for section shown by <includeonly>
11679 ==Includeonly section==
11687 T8563: Edit link generation for section suppressed by <includeonly>
11690 ==Includeonly section==
11694 <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>
11699 T8563: Section extraction for section suppressed by <includeonly>
11704 ==Includeonly section==
11712 Un-closed <includeonly>
11717 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11720 ## We used to, but no longer wt2wt this test since the default serializer
11721 ## will normalize the include directives to serialize on their own line.
11722 ## Selser will take care of preserving formatting in scenarios where they
11723 ## intermingled with other wikitext.
11725 Includes and comments at SOL
11727 parsoid=wt2html,html2html
11729 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11733 </noinclude>* stuff
11736 <includeonly>can have stuff</includeonly>=== here ===
11739 <h2><span class="mw-headline" id="hu">hu</span></h2>
11742 <ul><li> stuff</li>
11743 <li> here</li></ul>
11744 <h3><span class="mw-headline" id="here">here</span></h3>
11747 <!-- 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>
11749 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11751 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11752 <li> here</li></ul>
11754 <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>
11758 # TODO: test with DOM fragment reuse!
11760 Parsoid: DOM fragment reuse
11762 parsoid=wt2wt,wt2html
11764 a{{echo|b<table></table>c}}d
11776 <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>
11778 <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">
11779 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11780 </span><p about="#mwt2">cd</p>
11782 <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">
11784 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11786 </span><p about="#mwt3">b</p>
11790 Parsoid: Merge double tds (T52603)
11795 |{{echo|{{!}} foo}}
11799 <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>
11804 Parsoid: Merge double tds in nested transclusion content (T52603)
11810 |{{echo|{{!}} foo}}
11814 <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}}]}'>
11816 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11822 ### <includeonly> and <noinclude> in attributes
11825 0. includeonly around the entire attribute
11827 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11829 <p><span id="v2">bar</span>
11834 1. includeonly in html attr key
11836 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11838 <p><span id="foo">bar</span>
11843 2. includeonly in html attr value
11845 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11846 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11848 <p><span id="v1">bar</span>
11849 <span id="v1">bar</span>
11854 3. includeonly in part of an attr value
11856 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11858 <p><span style="color:red;">bar</span>
11863 4. includeonly in table attributes
11887 ### Preprocessor precedence tests
11888 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
11890 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
11892 Preprocessor precedence 1: link is rightmost opening
11896 But close-brace is not a valid character in a link title:
11899 However, we can still tell this was handled as a link in the preprocessor:
11900 {{echo|[[Foo}}|bar]]|bat}}
11902 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
11903 </p><p>But close-brace is not a valid character in a link title:
11905 </p><p>However, we can still tell this was handled as a link in the preprocessor:
11911 Preprocessor precedence 2: template is rightmost opening
11922 Preprocessor precedence 3: language converter is rightmost opening
11939 Preprocessor precedence 4: left-most angle bracket
11948 Template:Precedence5
11954 Preprocessor precedence 5: tplarg takes precedence over template
11956 {{Precedence5|Bullet}}
11958 <ul><li> Bar</li></ul>
11963 Preprocessor precedence 6: broken link is rightmost opening
11967 {{echo|[[Foo|bar|bat=baz}}
11970 </p><p>{{echo|[[Foo|bar|bat=baz}}
11974 # This next test exposes a difference between PHP and Parsoid:
11975 # Given [[Foo|{{echo|Bar]]x}}y]]z:
11976 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
11977 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
11978 # outer `[[Foo` extends until the `y]]`
11979 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
11980 # intermediate result (after template expansion), and link processing
11981 # happens on this intermediate result, which moves the wikilink
11982 # boundary leftward to `[[Foo|Bar]]`
11983 # 2b) Parsoid works in a single step, so it's going to keep the
11984 # wikilink as extending to the `y]]`
11985 # 3a) Then PHP does linktrail processing which slurps up the trailing
11986 # `xy` inside the link.
11987 # 3b) Parsoid will do linktrail processing to slurp up the trailing
11988 # `z` inside the link.
11989 # This is "correct" behavior. Parsoid's basic worldview is that the
11990 # `]]` inside the template shouldn't be allowed to leak out to affect
11991 # the surrounding wikilink. PHP may match Parsoid (in the future)
11992 # if you use {{#balance}} (T114445).
11995 Preprocessor precedence 7: broken template is rightmost opening
11999 [[Foo|{{echo|Bar]]-x}}-y]]-z
12001 Careful: linktrails can move the end of the wikilink:
12002 [[Foo|{{echo|y']]a}}l]]l
12004 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12005 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12006 </p><p>Careful: linktrails can move the end of the wikilink:
12007 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12012 Preprocessor precedence 8: broken language converter is rightmost opening
12023 Template:Preprocessor_precedence_9
12028 ;7: {{{{{{{4}}}}}}}
12032 Preprocessor precedence 9: groups of braces
12034 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12040 <ul><li> Bar</li></ul>
12044 <dd> {Bullet}</dd></dl>
12049 Template:Preprocessor_precedence_10
12056 ;6: -{{{{{{4}}}}}}-
12057 ;7: -{{{{{{{5}}}}}}}-
12061 Preprocessor precedence 10: groups of braces with leading dash
12065 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12071 <ul><li> Bar-</li></ul>
12078 <ul><li> Bar-</li></ul>
12082 <dd> raw2</dd></dl>
12087 Preprocessor precedence 11: found during visual diff testing
12089 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12091 {{echo|-{{echo|-{{echo|x}}}}}}
12093 {{echo|-{{echo|x}}}}
12095 <p><span>-<span>-x</span></span>
12102 Preprocessor precedence 12: broken language converter closed by brace.
12104 This form breaks the template, which is unfortunate:
12105 * {{echo|foo-{bar}bat}}
12107 But if the broken language converter markup is inside an extension
12108 tag, nothing bad happens:
12109 * <nowiki>foo-{bar}bat</nowiki>
12110 * {{echo|<nowiki>foo-{bar}bat</nowiki>}}
12111 * <pre>foo-{bar}bat</pre>
12112 * {{echo|<pre>foo-{bar}bat</pre>}}
12114 <tag>foo-{bar}bat</tag>
12115 {{echo|<tag>foo-{bar}bat</tag>}}
12118 <p>This form breaks the template, which is unfortunate:</p>
12120 <li>{{echo|foo-{bar}bat}}</li>
12122 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12124 <li>foo-{bar}bat</li>
12125 <li>foo-{bar}bat</li>
12148 Preprocessor precedence, 13: broken language converter in external link
12150 * [http://example.com/-{foo Example in URL]
12151 * [http://example.com Example in -{link} description]
12152 * {{echo|[http://example.com/-{foo Breaks template, however]}}
12155 <li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12156 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12157 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12162 Preprocessor precedence, 14: broken language converter in comment
12164 * <!--{{foo}}--> ...should be ok
12165 * <!---{{foo}}--> ...extra dashes
12166 * {{echo|foo<!-- -{bar} -->bat}} ...should be ok
12169 <li>...should be ok</li>
12170 <li>...extra dashes</li>
12171 <li>foobat ...should be ok</li>
12176 Preprocessor precedence, 15: broken brace markup in headings
12178 __NOTOC__ __NOEDITSECTION__
12187 ===5 foo{{{bar 5===
12192 <h3><span class="mw-headline" id="1_foo.5Bbar_1">1 foo[bar 1</span></h3>
12194 <h3><span class="mw-headline" id="2_foo.5B.5Bbar_2">2 foo[[bar 2</span></h3>
12196 <h3><span class="mw-headline" id="3_foo.7Bbar_3">3 foo{bar 3</span></h3>
12198 <h3><span class="mw-headline" id="4_foo.7B.7Bbar_4">4 foo{{bar 4</span></h3>
12200 <h3><span class="mw-headline" id="5_foo.7B.7B.7Bbar_5">5 foo{{{bar 5</span></h3>
12202 <h3><span class="mw-headline" id="6_foo-.7Bbar_6">6 foo-{bar 6</span></h3>
12207 ### Token Stream Patcher tests
12209 ### These tests won't always pass wt2wt and other modes because
12210 ### on serialization, the table will be output on a new line.
12211 ### For now, we are blacklisting them, and using this to test selser.
12215 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12217 parsoid=wt2html,wt2wt
12219 {{echo|}}{| width = '100%'
12223 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12224 <tbody><tr><td>foo</td></tr>
12228 ## We used to, but no longer wt2wt this test since the default serializer
12229 ## will normalize the include directives to serialize on their own line.
12230 ## Selser will take care of preserving formatting in scenarios where they
12231 ## intermingled with other wikitext.
12233 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12237 <includeonly>a</includeonly>{| {{{b}}}
12241 <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":""}]]}'>
12242 <tbody><tr><td>c</td></tr>
12247 Table wikitext syntax outside wiki-tables
12251 ! not a table heading
12254 | class="foo bar" | baz
12262 ! not a table heading
12265 | class="foo bar" | baz
12274 ### Testing parsing of templates where a template arg
12275 ### has the same name as the template itself.
12281 {{{quote|{{{1}}}}}}
12285 Templates: Template Name/Arg clash: 1. Use of positional param
12294 Templates: Template Name/Arg clash: 2. Use of named param
12296 {{quote|quote=foo}}
12303 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12312 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12316 Templates: 1. Simple use
12325 Templates: 2. Inside a block tag
12327 <div>{{echo|Foo}}</div>
12328 <blockquote>{{echo|Foo}}</blockquote>
12331 <blockquote>Foo</blockquote>
12341 Templates: P-wrapping: 1a. Templates on consecutive lines
12352 Templates: P-wrapping: 1b. Templates on consecutive lines
12366 Templates: P-wrapping: 1c. Templates on consecutive lines
12369 {{echo|bar}} <div>baz</div>
12382 Templates: P-wrapping: 1d. Template preceded by comment-only line
12391 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12395 Templates: Inline Text: 1. Multiple template uses
12397 {{echo|Foo}}bar{{echo|baz}}
12404 Templates: Inline Text: 2. Back-to-back template uses
12406 {{echo|Foo}}{{echo|bar}}
12413 Templates: Block Tags: 1. Multiple template uses
12415 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12417 <div>Foo</div><div>bar</div><div>baz</div>
12422 Templates: Block Tags: 2. Back-to-back template uses
12424 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12426 <div>Foo</div><div>bar</div>
12430 # This is an edge case relating to paragraph wrapping.
12432 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12437 <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
12442 Templates: Links: 1. Simple example
12444 {{echo|[[Foo|bar]]}}
12446 <p><a href="/wiki/Foo" title="Foo">bar</a>
12451 Templates: Links: 2. Generation of link href
12453 [[{{echo|Foo}}|bar]]
12455 <p><a href="/wiki/Foo" title="Foo">bar</a>
12460 Templates: Links: 3. Generation of part of a link href
12462 [[Fo{{echo|o}}|bar]]
12464 [[Foo{{echo|bar}}]]
12466 [[Foo{{echo|bar}}baz]]
12468 [[Foo{{echo|bar}}|bar]]
12470 [[:Foo{{echo|bar}}]]
12472 [[:Foo{{echo|bar}}|bar]]
12474 <p><a href="/wiki/Foo" title="Foo">bar</a>
12475 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12476 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12477 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12478 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12479 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12484 Templates: Links: 4. Multiple templates generating link href
12486 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12488 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12493 Templates: Links: 5. Generation of link text
12495 [[Foo|{{echo|bar}}]]
12497 <p><a href="/wiki/Foo" title="Foo">bar</a>
12502 Templates: Links: 5. Nested templates (only outermost template should be marked)
12504 {{echo|[[{{echo|Foo}}|bar]]}}
12506 <p><a href="/wiki/Foo" title="Foo">bar</a>
12511 Templates: HTML Tag: 1. Generation of HTML attr. key
12513 <div {{echo|style}}="color:red;">foo</div>
12515 <div style="color:red;">foo</div>
12520 Templates: HTML Tag: 2. Generation of HTML attr. value
12522 <div style={{echo|'color:red;'}}>foo</div>
12524 <div style="color:red;">foo</div>
12529 Templates: HTML Tag: 3. Generation of HTML attr key and value
12531 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12533 <div style="color:red;">foo</div>
12538 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12540 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12542 <div title="This is a long title with just one piece templated">foo</div>
12547 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12549 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12551 <div title="This is a long title with just one piece templated">foo</div>
12556 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12558 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12560 <div title="This is a long title with just one piece templated">foo</div>
12564 # SSS FIXME: While it is great we added support for all this,
12565 # do we want to make this part of the spec? Maybe we want to
12566 # deprecate this kind of usage in the future?
12568 Templates: HTML Tag: 7. Generation of partial attribute key string
12570 <div st{{echo|yle}}="color:red;">foo</div>
12572 <div style="color:red;">foo</div>
12577 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12579 <div {{echo|1=id="v1"}}>bar</div>
12581 <div id="v1">bar</div>
12586 Templates: HTML Tag: 9. Multiple template-generated attributes
12588 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12590 <div id="v1" title="foo">bar</div>
12595 Templates: Support for templates generating attributes and content
12597 {| {{mixed_attr_content_template}}
12602 <table style="color:red;" title="T48811">
12612 <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|}"]}'>
12621 1. Entities and nowikis inside templated attributes should be handled correctly
12623 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12625 <div style="background:#f9f9f9;">foo</div>
12628 <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>
12632 2. Entities and nowikis inside templated attributes should be handled correctly
12635 |{{table_attribs_3}}
12640 <td style="background:#f9f9f9;">Foo
12645 <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>
12650 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12653 |{{table_attribs_3}}
12658 <td style="background:#f9f9f9;">Foo
12662 <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}}]}'>
12663 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12669 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12672 | {{table_attribs_6}} hi
12677 <td style="background: red;"> hi
12682 <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>
12687 Templates: HTML Tables: 1. Generating start of a HTML table
12689 {{echo|<table><tr><td>foo</td>}}</tr></table>
12691 <table><tr><td>foo</td></tr></table>
12696 Templates: HTML Tables: 2a. Generating middle of a HTML table
12698 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12700 <table><tr><td>foo</td></tr></table>
12705 Templates: HTML Tables: 2b. Generating middle of a HTML table
12707 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12709 <table><tr><td>foo</td></tr></table>
12714 Templates: HTML Tables: 3. Generating end of a HTML table
12716 <table><tr>{{echo|<td>foo</td></tr></table>}}
12718 <table><tr><td>foo</td></tr></table>
12723 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12725 {{echo|<table>}}<tr><td>foo</td></tr></table>
12727 <table><tr><td>foo</td></tr></table>
12732 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12734 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12736 <table><tr><td>foo</td></tr></table>
12741 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12743 <table><tr>{{echo|<td>}}foo</td></tr></table>
12745 <table><tr><td>foo</td></tr></table>
12750 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12752 <table><tr><td>foo{{echo|</td>}}</tr></table>
12754 <table><tr><td>foo</td></tr></table>
12759 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12761 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12763 <table><tr><td>foo</td></tr></table>
12768 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12770 <table><tr><td>foo</td></tr>{{echo|</table>}}
12772 <table><tr><td>foo</td></tr></table>
12777 Templates: HTML Tables: 5. Proper fostering of categories from inside
12779 parsoid=wt2html,wt2wt
12781 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12782 <!--Two categories (T52330)-->
12783 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12785 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12786 <!--Two categories (T52330)-->
12787 <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>
12791 Templates: Wiki Tables: 1a. Fostering of entire template content
12799 <tr><td></td></tr></table>
12811 Templates: Wiki Tables: 1b. Fostering of entire template content
12824 <tr><td></td></tr></table>
12838 Templates: Wiki Tables: 2. Fostering of partial template content
12848 <tr><td></td></tr></table>
12861 Templates: Wiki Tables: 3. td-content via multiple templates
12864 {{echo|{{pipe}}a}}{{echo|b}}
12875 Templates: Wiki Tables: 4. Templated tags, no content
12881 <tr><td></td></tr></table>
12886 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12900 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12913 ## This test case is very specific to Parsoid's internals
12914 ## and is hence only tested for Parsoid's code. Parsoid uses
12915 ## a <meta> marker tag for <ref> tags and they are expanded
12916 ## much later. We are verifying that this <meta> tag usage
12917 ## doesn't prevent foster parenting.
12919 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12921 {{PartialTable}}<ref>foo</ref>
12926 <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">
12930 <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>
12934 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12944 <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{{!}}}"]}'>
12945 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12949 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12954 Templates: Lists: Multi-line list-items via templates
12956 *{{echo|a {{nonexistent|
12958 *{{echo|b {{nonexistent|
12961 <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>
12962 <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>
12967 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12969 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12971 <p><i>ab</i>c<i>d</i>e
12976 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12977 (PHP parser generates misnested html)
12979 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12981 <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>
12985 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12986 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12988 parsoid=wt2html,wt2wt
12990 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12992 <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>
12993 <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>
12994 <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>
12998 Templates: Ugly nesting: 4. Divs opened/closed across templates
13000 a<div>b{{echo|c</div>d}}e
13011 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
13017 |{{echo|foo</table>}}
13021 <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|}"]}'>
13025 <td>foo</td></tr></tbody></table><span about="#mwt1">
13026 </span><span about="#mwt1">|bar</span><span about="#mwt1">
13031 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
13041 <td>1. {{echo|foo </table>}}</td>
13043 <td>2. {{echo|baz </table>}}</td>
13056 <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>"]}'>
13061 <td>1. foo </td></tr></tbody></table></td>
13063 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
13064 </span><span about="#mwt2">
13065 </span><span about="#mwt2">
13066 </span><span about="#mwt2">abc</span><span about="#mwt2">
13067 </span><span about="#mwt2">
13068 </span><span about="#mwt2">
13069 </span><span about="#mwt2">
13070 </span><span about="#mwt2">
13071 </span><span about="#mwt2">
13072 </span><span about="#mwt2">xyz</span><span about="#mwt2">
13073 </span><span about="#mwt2">
13078 Templates: Ugly templates: 3. newline-only template parameter
13087 # This looks like a bug: a single newline triggers p/br for some reason.
13089 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13098 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13099 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13101 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13107 <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
13108 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13112 # T66017 -- ugly wikitext with fostered content generates two template ranges
13113 # that are "identical" and generate nesting cycles in the algorithm
13115 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13117 {{echo|<table><tr><td><table>}}
13121 <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"}'>
13122 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13123 </table></td></tr></tbody></table>
13127 Templates: Parameters substituted at the top-level
13129 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13133 <p><i>who</i> me? <b>never!</b>
13137 <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>
13139 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13143 Parser Functions: 1. Simple example
13152 Parser Functions: 2. Nested use (only outermost should be marked up)
13161 ### Pre-save transform tests
13164 pre-save transform: subst:
13170 This is a test template
13174 pre-save transform: normal template
13184 pre-save transform: nonexistent template
13188 {{thistemplatedoesnotexist}}
13190 {{thistemplatedoesnotexist}}
13194 pre-save transform: subst magic variables
13203 # This is T2089, which I fixed. -- wtm
13205 pre-save transform: subst: templates with parameters
13209 {{subst:paramtest|param="something else"}}
13211 This is a test template with parameter "something else"
13215 Template:nowikitest
13217 <nowiki>'''not wiki'''</nowiki>
13221 pre-save transform: nowiki in subst (T3188)
13225 {{subst:nowikitest}}
13227 <nowiki>'''not wiki'''</nowiki>
13231 Template:commenttest
13233 This template has <!-- a comment --> in it.
13237 pre-save transform: comment in subst (T3936)
13241 {{subst:commenttest}}
13243 This template has <!-- a comment --> in it.
13247 pre-save transform: unclosed tag
13251 <nowiki>'''not wiki'''
13253 <nowiki>'''not wiki'''
13257 pre-save transform: mixed tag case
13261 <NOwiki>'''not wiki'''</noWIKI>
13263 <NOwiki>'''not wiki'''</noWIKI>
13267 pre-save transform: unclosed comment in <nowiki>
13271 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13273 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13276 # Leading @ in this template definition works around a limitation
13277 # in parsoid's parserTests which otherwise strips the <span> from the
13278 # result (confusing it for a template wrapper)
13282 @<span onmouseover="alert('crap')">Oh no</span>
13286 (confirming safety of fix for subst T3936)
13288 {{Template:dangerous}}
13290 <p>@<span>Oh no</span>
13295 pre-save transform: comment containing gallery (T7024)
13299 <!-- <gallery>data</gallery> -->
13301 <!-- <gallery>data</gallery> -->
13305 pre-save transform: comment containing extension
13309 <!-- <tag>data</tag> -->
13311 <!-- <tag>data</tag> -->
13315 pre-save transform: comment containing nowiki
13319 <!-- <nowiki>data</nowiki> -->
13321 <!-- <nowiki>data</nowiki> -->
13325 pre-save transform: <noinclude> in subst (T5298)
13335 pre-save transform: <onlyinclude> in subst (T5298)
13339 {{subst:Includes2}}
13347 {{<includeonly>subst:</includeonly>Includes}}
13351 Template:SafeSubstTest
13353 {{<includeonly>safesubst:</includeonly>Includes}}
13357 T24297: safesubst: works during PST
13361 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13367 T24297: safesubst: works during normal parse
13376 subst: does not work during normal parse
13380 <p>{{subst:Includes}}
13385 pre-save transform: context links ("pipe trick")
13389 [[Article (context)|]]
13392 [[Bar:Article (context)|]]
13393 [[:Bar:Article (context)|]]
13395 [[|Article (context)]]
13399 [[Article (context)|Article]]
13400 [[Bar:Article|Article]]
13401 [[:Bar:Article|Article]]
13402 [[Bar:Article (context)|Article]]
13403 [[:Bar:Article (context)|Article]]
13405 [[Article (context)]]
13406 [[Bar:X (Y) Z|X (Y) Z]]
13407 [[:Bar:X (Y) Z|X (Y) Z]]
13411 pre-save transform: context links ("pipe trick") with interwiki prefix
13415 [[interwiki:Article|]]
13416 [[:interwiki:Article|]]
13417 [[interwiki:Bar:Article|]]
13418 [[:interwiki:Bar:Article|]]
13420 [[interwiki:Article|Article]]
13421 [[:interwiki:Article|Article]]
13422 [[interwiki:Bar:Article|Bar:Article]]
13423 [[:interwiki:Bar:Article|Bar:Article]]
13427 pre-save transform: context links ("pipe trick") with parens in title
13429 pst title=[[Somearticle (context)]]
13433 [[Article (context)|Article]]
13437 pre-save transform: context links ("pipe trick") with comma in title
13439 pst title=[[Someplace, Somewhere]]
13442 [[Otherplace, Elsewhere|]]
13443 [[Otherplace, Elsewhere, Anywhere|]]
13445 [[Otherplace, Somewhere|Otherplace]]
13446 [[Otherplace, Elsewhere|Otherplace]]
13447 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13451 pre-save transform: context links ("pipe trick") with parens and comma
13453 pst title=[[Someplace (IGNORED), Somewhere]]
13456 [[Otherplace (place), Elsewhere|]]
13458 [[Otherplace, Somewhere|Otherplace]]
13459 [[Otherplace (place), Elsewhere|Otherplace]]
13463 pre-save transform: context links ("pipe trick") with comma and parens
13465 pst title=[[Who, me? (context)]]
13468 [[Me, Myself, and I (1937 song)|]]
13470 [[Yes, you. (context)|Yes, you.]]
13471 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13475 pre-save transform: context links ("pipe trick") with namespace
13477 pst title=[[Ns:Somearticle]]
13481 [[Ns:Article|Article]]
13485 pre-save transform: context links ("pipe trick") with namespace and parens
13487 pst title=[[Ns:Somearticle (context)]]
13491 [[Ns:Article (context)|Article]]
13495 pre-save transform: context links ("pipe trick") with namespace and comma
13497 pst title=[[Ns:Somearticle, Context, Whatever]]
13501 [[Ns:Article, Context, Whatever|Article]]
13505 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13507 pst title=[[Ns:Somearticle, Context (context)]]
13511 [[Ns:Article (context)|Article]]
13515 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13517 pst title=[[Ns:Somearticle (IGNORED), Context]]
13521 [[Ns:Article, Context|Article]]
13525 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13529 [[Article(context)|]]
13530 [[Bar:Article(context)|]]
13531 [[:Bar:Article(context)|]]
13532 [[|Article(context)]]
13536 [[Article(context)|Article]]
13537 [[Bar:Article(context)|Article]]
13538 [[:Bar:Article(context)|Article]]
13539 [[Article(context)]]
13540 [[Bar:X(Y)Z|X(Y)Z]]
13541 [[:Bar:X(Y)Z|X(Y)Z]]
13545 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13549 [[Article (context)|]]
13550 [[Bar:Article (context)|]]
13551 [[:Bar:Article (context)|]]
13552 [[|Article (context)]]
13556 [[Article (context)|Article]]
13557 [[Bar:Article (context)|Article]]
13558 [[:Bar:Article (context)|Article]]
13559 [[Article (context)]]
13560 [[Bar:X (Y) Z|X (Y) Z]]
13561 [[:Bar:X (Y) Z|X (Y) Z]]
13565 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13569 [[Article(context)|]]
13570 [[Bar:Article(context)|]]
13571 [[:Bar:Article(context)|]]
13572 [[|Article(context)]]
13576 [[Article(context)|Article]]
13577 [[Bar:Article(context)|Article]]
13578 [[:Bar:Article(context)|Article]]
13579 [[Article(context)]]
13580 [[Bar:X(Y)Z|X(Y)Z]]
13581 [[:Bar:X(Y)Z|X(Y)Z]]
13585 pre-save transform: context links ("pipe trick") with commas (T23660)
13589 [[Article (context), context|]]
13590 [[Article (context),context|]]
13591 [[Bar:Article (context), context|]]
13592 [[Bar:Article (context),context|]]
13593 [[:Bar:Article (context), context|]]
13594 [[:Bar:Article (context),context|]]
13596 [[Article (context), context|Article]]
13597 [[Article (context),context|Article]]
13598 [[Bar:Article (context), context|Article]]
13599 [[Bar:Article (context),context|Article]]
13600 [[:Bar:Article (context), context|Article]]
13601 [[:Bar:Article (context),context|Article]]
13605 Parsoid: backwards pipe trick
13612 <p>[[|<b>bar</b>]]</p>
13616 pre-save transform: trim trailing empty lines
13620 Empty lines are trimmed
13626 Empty lines are trimmed
13630 pre-save transform: Signature expansion
13635 * <noinclude>~~~</noinclude>
13636 * <includeonly>~~~</includeonly>
13637 * <onlyinclude>~~~</onlyinclude>
13639 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13640 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13641 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13642 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13647 pre-save transform: Signature expansion in nowiki tags (T2093)
13653 <nowiki>~~~~</nowiki>
13655 <includeonly><nowiki>~~~~</nowiki></includeonly>
13657 <noinclude><nowiki>~~~~</nowiki></noinclude>
13659 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13661 {{subst:Foo}} shall be converted to FOO
13663 As well as inside noinclude/onlyinclude
13664 <noinclude>{{subst:Foo}}</noinclude>
13665 <onlyinclude>{{subst:Foo}}</onlyinclude>
13667 But not inside includeonly
13668 <includeonly>{{subst:Foo}}</includeonly>
13672 <nowiki>~~~~</nowiki>
13674 <includeonly><nowiki>~~~~</nowiki></includeonly>
13676 <noinclude><nowiki>~~~~</nowiki></noinclude>
13678 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13680 FOO shall be converted to FOO
13682 As well as inside noinclude/onlyinclude
13683 <noinclude>FOO</noinclude>
13684 <onlyinclude>FOO</onlyinclude>
13686 But not inside includeonly
13687 <includeonly>{{subst:Foo}}</includeonly>
13691 Parsoid: Recognize nowiki with trailing space in tags
13695 <nowiki ><div>[[foo]]</nowiki >
13703 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13710 Parsoid: Recognize nowiki with odd capitalization
13714 <noWikI ><div>[[foo]]</Nowiki >
13716 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13721 Parsoid: Escape nowiki with trailing space in tags
13725 <p><nowiki > foo </nowiki ></p>
13726 <p>a<nowiki />b</p>
13727 <p>c<nowiki/ >d</p>
13729 <nowiki > foo </nowiki >
13737 Parsoid: Escape weird noWikI capitalizations
13741 <p><noWikI > foo </NoWikI ></p>
13743 <noWikI > foo </NoWikI >
13747 ### Message transform tests
13750 message transform: magic variables
13760 message transform: should not transform wiki markup
13770 message transform: <noinclude> in transcluded template (T6926)
13780 message transform: <onlyinclude> in transcluded template (T6926)
13790 {{#special:}} page name, known
13794 {{#special:Recentchanges}}
13796 Special:RecentChanges
13800 {{#special:}} page name with subpage, known
13804 {{#special:Recentchanges/param}}
13806 Special:RecentChanges/param
13810 {{#special:}} page name, unknown
13814 {{#special:foobar nonexistent}}
13816 Special:Foobar nonexistent
13820 {{#speciale:}} page name, known
13824 {{#speciale:Recentchanges}}
13826 Special:RecentChanges
13830 {{#speciale:}} page name with subpage, known
13834 {{#speciale:Recentchanges/param}}
13836 Special:RecentChanges/param
13840 {{#speciale:}} page name, unknown
13844 {{#speciale:foobar nonexistent}}
13846 Special:Foobar_nonexistent
13852 ### For Parsoid-specific tests, see
13853 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13858 parsoid=wt2html,wt2wt,html2html
13860 [[Image:foobar.jpg]]
13862 <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>
13865 <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>
13869 Simple image (using File: namespace, now canonical)
13871 [[File:Foobar.jpg]]
13873 <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>
13876 <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>
13880 Right-aligned image
13882 [[File:Foobar.jpg|right]]
13884 <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>
13887 <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>
13893 [[File:Foobar.jpg|right|Caption text]]
13895 <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>
13898 <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>
13902 Image with caption, T55312 #1
13904 [[File:Foobar.jpg|right|Caption page stuff]]
13906 <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>
13909 <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>
13913 Image with caption, T55312 #2
13915 [[File:Foobar.jpg|right|Caption page=]]
13917 <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>
13920 <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>
13924 Image with caption, T55312 #3
13926 [[File:Foobar.jpg|right|Caption page=stuff]]
13928 <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>
13931 <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>
13935 Allow empty links in image captions (T62753)
13939 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13944 <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>
13947 <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>
13949 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13950 </figcaption></figure>
13954 Titles in unlinked images (T23454)
13956 [[File:Foobar.jpg|link=|stuff]]
13958 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13963 Link with empty target
13972 Image with link trail
13974 Linktrails should not work for images: [[File:Foobar.jpg]]s
13976 <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
13979 <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>
13983 Image with empty attribute
13985 parsoid=wt2html,wt2wt,html2html
13987 [[File:Foobar.jpg|right||Caption text]]
13989 <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>
13992 <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>
13996 1. Block image with individual attributes from templates
13998 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14000 <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>
14003 <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>
14007 2. Block Image with individual attributes from templates
14009 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14011 <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>
14014 <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>
14018 3. Inline image with individual attributes from templates
14020 [[File:Foobar.jpg|{{echo|50px}}]]
14022 <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>
14025 <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>
14028 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14029 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14031 Image with multiple attributes from the same template
14033 [[File:Foobar.jpg|{{image_attribs}}]]
14035 <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>
14038 <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>
14042 Image with link tails
14046 123[[File:Foobar.jpg]]456
14047 123[[File:Foobar.jpg|right]]456
14048 123[[File:Foobar.jpg|thumb]]456
14050 <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
14052 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
14053 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
14056 <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>
14058 <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>
14060 <div class="thumb tright">
14061 <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>
14062 <div class="thumbcaption">
14063 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
14069 <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>
14070 <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>
14071 <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>
14075 Image with multiple captions -- only last one is accepted
14077 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14079 <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>
14082 <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>
14086 Image with multiple widths -- use last
14088 [[File:Foobar.jpg|200px|300px|caption]]
14090 <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>
14093 <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>
14097 Image with multiple alignments -- use first (T50664)
14101 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14103 [[File:Foobar.jpg|middle|text-top|caption]]
14105 <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>
14106 <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>
14109 <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>
14110 <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>
14114 Image with width attribute at different positions
14116 [[File:Foobar.jpg|200px|right|Caption]]
14117 [[File:Foobar.jpg|right|200px|Caption]]
14118 [[File:Foobar.jpg|right|Caption|200px]]
14120 <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>
14121 <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>
14122 <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>
14125 <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>
14126 <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>
14127 <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>
14130 # a sad bit of backward-compatibility
14132 Image with size specified with pxpx (T15500, T53628)
14134 parsoid=wt2html,wt2wt,html2html
14136 [[File:Foobar.jpg|20pxpx]]
14137 [[File:Foobar.jpg|200x20pxpx]]
14139 <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>
14140 <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>
14143 <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>
14147 Image with link parameter, wiki target
14149 [[File:Foobar.jpg|link=Main Page]]
14151 <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>
14154 <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>
14157 # parsoid T51293 (part 1)
14159 Image with link parameter, URL target
14161 [[File:Foobar.jpg|link=http://example.com/]]
14163 <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>
14166 <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>
14169 # parsoid T51293 (part 2)
14171 Image with link parameter, protocol-less URL target
14173 [[File:Foobar.jpg|link=//example.com/]]
14175 <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>
14178 <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>
14182 Escaping non-block captions (T107435)
14185 "modes": ["wt2wt"],
14187 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14191 [[Image:Foobar.jpg|caption]]
14193 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14196 # wgExternalLinkTarget not supported by Parsoid
14198 Image with link parameter, wgExternalLinkTarget
14200 [[Image:foobar.jpg|link=http://example.com/]]
14202 wgExternalLinkTarget='foobar'
14204 <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>
14209 Image with link parameter, wgNoFollowLinks set to false
14211 [[Image:foobar.jpg|link=http://example.com/]]
14213 wgNoFollowLinks=false
14215 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14220 Image with link parameter, wgNoFollowDomainExceptions
14222 [[Image:foobar.jpg|link=http://example.com/]]
14224 wgNoFollowDomainExceptions='example.com'
14226 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14230 # wgExternalLinkTarget not supported by Parsoid
14232 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14234 [[Image:foobar.jpg|link=http://example.com/|Title]]
14236 wgExternalLinkTarget='foobar'
14238 <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>
14243 Image with empty link parameter
14245 [[File:Foobar.jpg|link=]]
14247 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14250 <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>
14254 Image with link parameter (wiki target) and unnamed parameter
14256 [[File:Foobar.jpg|link=Main_Page|Title]]
14258 <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>
14261 <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>
14265 Image with link parameter (URL target) and unnamed parameter
14267 [[File:Foobar.jpg|link=http://example.com/|Title]]
14269 <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>
14272 <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>
14276 Thumbnail image with link parameter
14279 parsoid=wt2html,wt2wt,html2html
14281 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14283 <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>
14286 <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>
14290 Manually-specified thumbnail image
14294 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14296 <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>
14299 <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>
14303 Manually-specified thumbnail image with explicit link to wiki page
14306 parsoid=wt2html,wt2wt,html2html
14308 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14310 <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>
14313 <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>
14317 Manually-specified thumbnail image with explicit link to url
14320 parsoid=wt2html,wt2wt,html2html
14322 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14324 <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>
14327 <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>
14331 Manually-specified thumbnail image with explicit no link
14334 parsoid=wt2html,wt2wt,html2html
14336 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14338 <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>
14341 <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>
14345 Manually-specified thumbnail image with explicit link and alt text
14348 parsoid=wt2html,wt2wt,html2html
14350 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14352 <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>
14355 <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>
14359 Image with frame and link
14361 parsoid=wt2html,wt2wt,html2html
14363 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14365 <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>
14368 <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>
14372 Image with frame and link and explicit alt
14374 parsoid=wt2html,wt2wt,html2html
14376 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14378 <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>
14381 <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>
14385 Image with wiki markup in implicit alt
14387 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14389 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14391 <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>
14392 </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>
14395 <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>
14397 <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>
14401 Alt image option should handle most kinds of wikitext without barfing
14403 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14405 <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>
14408 <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>
14411 ###################
14412 # Conflicting image format options.
14413 # First option specified should 'win'.
14414 # All three cases in each test should be identical.
14417 Image with 'frameless' first.
14419 parsoid=wt2html,wt2wt,html2html
14421 [[File:Foobar.jpg|frameless|caption]]
14423 [[File:Foobar.jpg|frameless|frame|caption]]
14425 [[File:Foobar.jpg|frameless|thumb|caption]]
14427 <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>
14428 </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>
14429 </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>
14432 <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>
14433 <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>
14434 <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>
14438 Image with 'frame' first.
14440 parsoid=wt2html,wt2wt,html2html
14442 [[File:Foobar.jpg|frame|caption]]
14443 [[File:Foobar.jpg|frame|frameless|caption]]
14444 [[File:Foobar.jpg|frame|thumb|caption]]
14446 <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>
14447 <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>
14448 <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>
14451 <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>
14452 <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>
14453 <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>
14457 Image with 'thumb' first.
14459 parsoid=wt2html,wt2wt,html2html
14461 [[File:Foobar.jpg|thumb|caption]]
14462 [[File:Foobar.jpg|thumb|frameless|caption]]
14463 [[File:Foobar.jpg|thumb|frame|caption]]
14465 <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>
14466 <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>
14467 <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>
14470 <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>
14471 <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>
14472 <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>
14475 ###################
14477 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14478 # and https://phabricator.wikimedia.org/T64258
14479 # Foobar has actual size of 1941x220
14480 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14481 # a scalable format.
14482 # 2. Framed images always ignore size options; always render at default size.
14483 # 3. "Unspecified format" and border are the only types which can be
14487 Image: "unspecified format" and border enlarge
14489 parsoid=wt2html,wt2wt,html2html
14491 [[File:Foobar.jpg|2000px]]
14493 [[File:Foobar.jpg|border|2000px]]
14495 <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>
14496 </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>
14499 <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>
14500 <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>
14504 Image: "unspecified format" and border reduce
14506 parsoid=wt2html,wt2wt,html2html
14508 [[File:Foobar.jpg|1000px]]
14510 [[File:Foobar.jpg|border|1000px]]
14512 <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>
14513 </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>
14516 <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>
14517 <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>
14521 Image: thumbs reduce
14523 parsoid=wt2html,wt2wt,html2html
14525 [[File:Foobar.jpg|thumb|50px]]
14527 <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>
14530 <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>
14534 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14536 parsoid=wt2html,wt2wt,html2html
14538 [[File:Foobar.jpg|thumb|2000px]]
14540 [[File:Foobar.svg|thumb|2000px]]
14542 <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>
14543 <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>
14546 <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>
14547 <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>
14551 Image: frameless can reduce in size
14553 parsoid=wt2html,wt2wt,html2html
14555 [[File:Foobar.jpg|frameless|50px]]
14557 <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>
14560 <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>
14564 Image: bitmap frameless can't be enlarged past original size, but vector can
14566 parsoid=wt2html,wt2wt,html2html
14568 [[File:Foobar.jpg|frameless|2000px]]
14570 [[File:Foobar.svg|frameless|2000px]]
14572 <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>
14573 </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>
14576 <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>
14577 <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>
14581 Image: framed images are always unscaled.
14583 parsoid=wt2html,wt2wt,html2html
14585 [[File:Foobar.jpg|frame]]
14587 [[File:Foobar.jpg|frame|50px]]
14589 [[File:Foobar.jpg|frame|50x50px]]
14591 [[File:Foobar.jpg|frame|2000px]]
14593 <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>
14594 <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>
14595 <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>
14596 <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>
14599 <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>
14600 <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>
14601 <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>
14602 <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>
14605 ###################
14608 Link to image page- image page normally doesn't exists, hence edit link
14609 Add test with existing image page
14610 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14614 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14619 T20784 Link to non-existent image page with caption should use caption as link text
14621 [[:Image:test|caption]]
14623 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14628 Frameless image caption with a free URL
14630 [[File:Foobar.jpg|http://example.com]]
14632 <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>
14635 <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>
14639 Thumbnail image caption with a free URL
14643 [[File:Foobar.jpg|thumb|http://example.com]]
14645 <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>
14648 <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>
14652 Thumbnail image caption with a free URL and explicit alt
14655 parsoid=wt2html,wt2wt,html2html
14657 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14659 <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>
14662 <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>
14666 SVG thumbnails with no language set
14669 [[File:Foobar.svg|thumb|caption]]
14671 <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>
14674 <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>
14678 SVG thumbnails with language de
14680 parsoid=wt2html,wt2wt,html2html
14682 [[File:Foobar.svg|thumb|caption|lang=de]]
14684 <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>
14687 <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>
14691 SVG thumbnails with invalid language code
14693 parsoid=wt2html,wt2wt,html2html
14695 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
14697 <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>
14700 <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>
14704 T3887: A ISBN with a thumbnail
14706 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
14708 <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>
14711 <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>
14715 T3887: A RFC with a thumbnail
14717 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14719 <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>
14722 <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>
14726 T3887: A mailto link with a thumbnail
14728 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14730 <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>
14733 <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>
14736 # Pending resolution to T2368
14738 T2648: Frameless image caption with a link
14740 [[File:Foobar.jpg|text with a [[link]] in it]]
14742 <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>
14745 <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>
14749 T2648: Frameless image caption with a link (suffix)
14751 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14753 <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>
14756 <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>
14760 T2648: Frameless image caption with an interwiki link
14762 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14764 <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>
14767 <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>
14771 T2648: Frameless image caption with a piped interwiki link
14773 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14775 <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>
14778 <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>
14782 T107474: Frameless image caption with <nowiki>
14784 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14786 <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>
14790 Escape HTML special chars in image alt text
14792 [[File:Foobar.jpg|& < > "]]
14794 <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>
14797 <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>
14801 Escape HTML special chars in image alt text with LanguageConverter
14805 [[File:Foobar.jpg|& < > "]]
14807 <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>
14810 <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>
14814 Entities in file name and attributes
14816 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14818 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14821 <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>
14825 T2499: Alt text should have Ӓ, not &1234;
14827 [[File:Foobar.jpg|♀]]
14829 <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>
14832 <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>
14836 Broken image caption with link
14838 parsoid=wt2html,wt2wt,html2html
14840 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14842 <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.
14845 <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>
14849 Image caption containing another image
14851 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14853 <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>
14856 <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>
14860 Image: caption containing a newline
14862 [[File:Foobar.jpg|This
14865 <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>
14868 <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>
14872 Image: caption containing leading space
14873 (The leading space should not trigger nowiki escaping in wt2wt mode)
14875 [[File:Foobar.jpg|thumb| bar]]
14877 <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>
14880 <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>
14884 Image: caption containing a table
14886 parsoid=wt2html,wt2wt,html2html
14888 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14894 and some more text.]]
14896 <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>
14899 <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
14902 <tr><th>Foo </th><th>Bar</th></tr>
14905 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14909 T5090: External links other than http: in image captions
14911 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14913 <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>
14916 <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>
14922 parsoid=wt2html,wt2wt,html2html
14924 [[Image:foobar.jpg|a|class=b]]
14926 <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>
14929 <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>
14933 Localized image handling (1).
14935 parsoid=wt2html,wt2wt,html2html
14938 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14940 <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>
14943 <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>
14947 Localized image handling (2).
14950 parsoid=wt2html,wt2wt,html2html
14953 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14955 <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>
14958 <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>
14962 Localized image handling (3).
14967 <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>
14969 [[File:Foobar.jpg|بندانگشتی]]
14973 "border", "frameless" and "class" attributes on an image.
14976 parsoid=wt2html,wt2wt,html2html
14978 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14980 <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>
14983 <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>
14986 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14988 Invalid image attributes (T64500)
14991 parsoid=wt2html,wt2wt,html2html
14993 [[File:Foobar.jpg|thumb|float|left|caption]]
14995 [[File:Foobar.jpg|thumb|righ|caption]]
14997 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14999 <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>
15000 <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>
15001 <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>
15004 <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>
15005 <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>
15006 <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>
15012 #REDIRECT [[File:Barfoo.jpg]]
15015 # FIXME: Parsoid should run this test -- but we'd need to teach the
15016 # mockAPI about the redirected Barfoo.jpg image.
15020 [[Image:Barfoo.jpg]]
15022 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15027 Missing image with uploads disabled
15031 [[File:Foobaz.jpg]]
15033 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15036 <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>
15039 # Parsoid-specific testing for images
15040 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15041 # Currently imperfect due to a flaw in the Parsoid testrunner
15043 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15047 Parsoid-specific image handling - simple image with size and middle alignment
15049 [[File:Foobar.jpg|middle|50px]]
15051 <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>
15055 Parsoid-specific image handling - simple image with size, middle alignment,
15056 non-standard namespace alias
15058 parsoid=wt2wt,wt2html,html2html
15060 [[Image:Foobar.jpg|middle|50px]]
15062 <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>
15066 Parsoid-specific image handling - simple image with size and middle alignment
15069 [[File:Foobar.jpg|50px|middle]]
15071 <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>
15075 Parsoid-specific image handling - simple image with size and middle alignment
15076 and non-standard namespace name
15078 parsoid=wt2html,wt2wt,html2html
15080 [[Image:Foobar.jpg|50px|middle]]
15082 <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>
15086 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15088 [[File:Foobar.jpg|500x10px|baseline|caption]]
15090 <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>
15094 Parsoid-specific image handling - simple image with border and size spec
15096 [[File:Foobar.jpg|50px|border|caption]]
15098 <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>
15102 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15104 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15106 <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>
15110 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15113 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15115 <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>
15119 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15121 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15123 <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>
15127 Parsoid-specific image handling - thumbnail with specific size, halign,
15128 valign, and caption (existing content)
15130 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15132 <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>
15136 Parsoid-specific image handling - framed image with specific size and caption
15139 parsoid=wt2html,wt2wt,html2html
15141 [[File:Foobar.jpg|frame|500x50px|caption]]
15143 <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>
15147 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15150 parsoid=wt2html,wt2wt,html2html
15152 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15154 <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>
15158 Parsoid-specific image handling - frameless image with specific size, border, and caption
15160 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15162 <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>
15166 Parsoid-specific image handling - simple image with a formatted caption
15168 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15170 <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>
15174 Parsoid-specific image handling - caption with a template in it
15176 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15178 <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>
15182 Parsoid-specific image handling - caption with unbalanced tags in it
15184 parsoid=wt2html,wt2wt,html2html
15187 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15191 <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>
15196 Parsoid-specific image handling - empty caption (1)
15198 parsoid=wt2html,wt2wt
15200 [[File:Foobar.jpg|thumb|]]
15202 <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>
15205 # empty captions don't get serialized unless we're in the "round trip" case
15207 Parsoid-specific image handling - empty caption (2)
15211 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15212 <a href="./File:Foobar.jpg">
15213 <img resource="./File:Foobar.jpg"
15214 src="//example.com/images/3/3a/Foobar.jpg"
15215 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15216 height="25" width="220"/>
15218 <figcaption></figcaption>
15221 [[File:Foobar.jpg|thumb]]
15225 Parsoid-specific image handling - whitespace caption
15227 [[File:Foobar.jpg|thumb| ]]
15229 <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>
15233 Parsoid-specific image handling - lang option
15236 [[File:Foobar.svg|lang=de|caption]]
15240 <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>
15244 ## Edge case bugs in Parsoid from T93580
15246 T93580: 1. Templated <ref> inside block images
15248 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15252 <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>
15254 <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>
15258 T93580: 2. <ref> inside inline images
15260 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15264 <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>
15266 <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>
15270 T93580: 3. Templated <ref> inside inline images
15272 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15276 <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>
15278 <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>
15285 Subpage test/subpage
15293 subpage title=[[Subpage test]]
15297 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15302 Subpage noslash link
15304 subpage title=[[Subpage test]]
15308 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15313 Subpage test/1/2/subpage
15319 Relative subpage noslash link
15321 parsoid=wt2wt,wt2html,html2html
15322 subpage title=[[Subpage test/1/2/3/4]]
15328 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15329 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15332 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15333 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15337 Parsoid: dot-slash prefixed wikilinks
15347 </p><p>[[././baz/]]
15352 </p><p>[[././baz/]]
15357 Render invalid page names as plain text (T53090)
15369 [[foo[http://example.com]xyz]]
15371 [[{{echo|./../foo}}|bar]]
15372 [[{{echo|foo/.}}|bar]]
15373 [[{{echo|foo/..}}|bar]]
15374 [[{{echo|foo~~~~bar}}]]
15375 [[{{echo|foo>bar}}]]
15376 [[{{echo|foo././bar}}]]
15377 [[{{echo|foo{bar}}]]
15378 [[{{echo|foo}bar}}]]
15379 [[{{echo|foo[bar}}]]
15380 [[{{echo|foo]bar}}]]
15381 [[{{echo|foo<bar}}]]
15383 <p>[[./../foo|bar]]
15393 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15394 </p><p>[[./../foo|bar]]
15407 <p>[[./../foo|bar]]
15417 [[foo<a rel="mw:ExtLink" href="http://example.com"></a>xyz]]</p>
15419 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15420 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15421 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15422 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15423 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15424 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15425 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15426 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15427 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15428 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15429 [[<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>
15437 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15442 T2561: {{/Subpage}}
15444 subpage title=[[Page]]
15448 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15456 Category:MediaWiki User's Guide
15464 [[:Category:MediaWiki User's Guide]]
15466 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15475 [[Category:MediaWiki User's Guide]]
15477 cat=MediaWiki_User's_Guide sort=
15479 <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"}}'/>
15483 PAGESINCATEGORY invalid title fatal (r33546 fix)
15485 {{PAGESINCATEGORY:<bogus>}}
15492 Category with different sort key
15496 [[Category:MediaWiki User's Guide|Foo]]
15498 cat=MediaWiki_User's_Guide sort=Foo
15500 <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"}}'/>
15504 Category with identical sort key
15508 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15510 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15512 <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"}}'/>
15516 Category with empty sort key
15521 [[Category:MediaWiki User's Guide|]]
15523 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15527 Category with empty sort key and parentheses
15532 [[Category:Foo (bar)|]]
15534 [[Category:Foo (bar)|Foo]]
15538 Category with link tail
15543 123[[Category:Foo]]456
15545 123[[Category:Foo]]456
15549 Category with template
15554 [[Category:{{echo|Foo}}]]
15556 [[Category:{{echo|Foo}}]]
15560 Category with template in sort key
15565 [[Category:Foo|{{echo|Bar}}]]
15567 [[Category:Foo|{{echo|Bar}}]]
15571 Category with template in sort key and title
15576 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15578 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15581 ## We used to, but no longer wt2wt this test since the default serializer
15582 ## will normalize all categories to serialize on their own line.
15583 ## This wikitext usage is going to be fairly uncommon in production and
15584 ## selser will take care of preserving formatting in those scenarios.
15586 Category / paragraph interactions
15590 Foo [[Category:Baz]] Bar
15592 Foo [[Category:Baz]]
15600 [[Category:Baz]] Bar
15613 {{echo|[[Category:Baz]]}}
15626 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15627 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15628 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15629 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15630 <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>
15631 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15634 ## We used to, but no longer wt2wt this test since the default serializer
15635 ## will normalize all categories to serialize on their own line.
15636 ## This wikitext usage is going to be fairly uncommon in production and
15637 ## selser will take care of preserving formatting in those scenarios.
15639 ## The whitespace on the empty line is part of the test. Please do not delete
15641 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15647 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15649 {{echo|[[Category:Foo]] and so should this!}}
15651 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15656 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15658 <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>
15661 ## Parsoid will not try to wt2wt this while preserving newlines because
15662 ## it suppresses excess newlines within list items -- and we don't want to
15663 ## introduce a special case just for categories, which is, in reality somewhat
15664 ## odd behavior -- categories are unlikely to be used in list items like this
15665 ## in top-level pages and are only likely to show up in template-generated
15666 ## list items where this RT-ing is a non-issue.
15668 ## The whitespace on the empty line is part of the test. Please do not delete
15670 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15676 [[Category:Foo]] and this should be part of the same list item
15679 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15681 <ul><li>This and this should be part of the same list item</li>
15682 <li>So should this and this should be part of the same list item</li></ul>
15685 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15686 <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>
15690 ## Newlines and categories that follow the last item of a list
15691 ## are treated differently because this (list followed by categories)
15692 ## is an extremely common pattern on wikis.
15694 3. Categories and newlines: newline suppression for last list item should RT properly
15707 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15709 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15710 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15714 4. Categories and newlines: newline suppression for last list item should RT properly
15722 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15724 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15727 ## only wt2html for this to make sure the algo only applies to the rightmost path
15729 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15742 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15744 <ul><li> d</li></ul></li></ul>
15745 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15748 ## We used to, but no longer wt2wt this test since the default serializer
15749 ## will normalize all categories to serialize on their own line.
15750 ## This wikitext usage is going to be fairly uncommon in production and
15751 ## selser will take care of preserving formatting in those scenarios.
15753 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15757 * a [[Category:Foo]]
15759 <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>
15762 # This test also demonstrates because of newline+category tunneling
15763 # through the list hander, template wrapping doesn't expand to the
15764 # containing list when the list item swallows the category.
15766 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15771 <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
15772 </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>
15776 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15780 {{echo|[[Category:Foo]]
15784 <ul><li> a</li></ul>
15786 <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">
15787 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15788 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15792 Category links with multiple namespaces
15794 [[Category:Project:Foo]]
15796 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15800 Parsoid: Serialize link to category page with colon escape
15806 [[:Category:Foo|Bar]]
15809 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15810 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15814 # We used to, but no longer wt2wt this test since the default serializer
15815 # will normalize all categories to serialize on their own line.
15816 # This wikitext usage is going to be fairly uncommon in production and
15817 # selser will take care of preventing whitespace insertion if this
15818 # occurs in an article.
15820 # html2html disabled for the same reason (whitespace insertion between
15823 # html2wt disabled because it localizes the "Category" namespace.
15825 Link prefix/suffixes aren't applied to category links
15835 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15839 Parsoid: Serialize link to file page with colon escape
15845 [[:File:Foo.png|Bar]]
15848 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15849 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15854 Parsoid: Serialize a genuine category link without colon escape
15859 [[Category:Foo|Bar]]
15861 <link rel="mw:PageProp/Category" href="./Category:Foo">
15862 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15866 Normalize hrefs properly before testing for invalid link targets (T72894)
15870 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15872 [[Category:Toxine bactérienne]]
15876 Parsoid: Defaultsort
15878 {{DEFAULTSORT:Foo}}
15880 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15883 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
15884 # But, this is a limitation of our representation and is documented in
15885 # TemplateHandler.js in processSpecialMagicWord
15887 Parsoid: Defaultsort (template-generated)
15889 {{{{echo|DEFAULTSORT}}:Foo}}
15891 <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"}]]}'/>
15895 ### Inter-language links
15898 Interlanguage links
15906 es:Alimento fr:Nourriture zh:食品
15908 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15909 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15910 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15914 Duplicate interlanguage links (T26502)
15925 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15926 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15927 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15928 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15935 Basic section headings
15942 ===Smaller headline===
15945 <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>
15948 <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>
15951 <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>
15957 Section headings with TOC
15960 === Subheadline 1 ===
15961 ===== Skipping a level =====
15962 ====== Skipping a level ======
15966 ===Another headline===
15968 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
15970 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15972 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15974 <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>
15976 <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>
15983 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15985 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15991 <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>
15992 <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>
15993 <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>
15994 <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>
15995 <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>
15998 <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>
16003 TOC anchors don't collide
16011 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16013 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16014 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16015 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16016 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16020 <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>
16021 <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>
16022 <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>
16023 <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>
16027 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16029 Handling of sections up to level 6 and beyond
16032 == Level 2 Heading==
16033 === Level 3 Heading===
16034 ==== Level 4 Heading====
16035 ===== Level 5 Heading=====
16036 ====== Level 6 Heading======
16037 ======= Level 7 Heading=======
16038 ======== Level 8 Heading========
16039 ========= Level 9 Heading=========
16040 ========== Level 10 Heading==========
16042 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16044 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16046 <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>
16048 <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>
16050 <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>
16052 <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>
16054 <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>
16055 <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>
16056 <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>
16057 <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>
16058 <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>
16072 <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>
16073 <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>
16074 <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>
16075 <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>
16076 <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>
16077 <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>
16078 <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>
16079 <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>
16080 <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>
16081 <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>
16086 TOC regression (T11764)
16090 ==== title 1.1.1 ====
16095 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16097 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16099 <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>
16101 <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>
16104 <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>
16107 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16109 <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>
16115 <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>
16116 <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>
16117 <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>
16118 <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>
16119 <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>
16120 <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>
16125 TOC for heading containing <span id="..."></span> (T96153)
16128 ==<span id="old-anchor"></span>New title==
16130 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16132 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16136 <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>
16141 TOC with wgMaxTocLevel=3 (T8204)
16147 ==== title 1.1.1 ====
16152 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16154 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16156 <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>
16157 <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>
16160 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16162 <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>
16168 <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>
16169 <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>
16170 <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>
16171 <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>
16172 <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>
16173 <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>
16178 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16184 ====Section 1.1.1====
16185 ====Section 1.1.1.1====
16188 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16190 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16192 <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>
16195 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16199 <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>
16200 <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>
16201 <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>
16202 <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>
16203 <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>
16209 Resolving duplicate section names
16214 <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>
16215 <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>
16220 Resolving duplicate section names with differing case (T12721)
16225 <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>
16226 <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>
16238 Template with sections, __NOTOC__
16245 <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>
16246 <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>
16247 <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>
16248 <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>
16253 __NOEDITSECTION__ keyword
16259 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16260 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16265 Link inside a section heading
16267 ==Section with a [[Main Page|link]] in it==
16269 <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>
16274 TOC regression (T14077)
16281 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16283 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16285 <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>
16288 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16292 <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>
16293 <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>
16294 <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>
16299 T3219 URL next to image (good)
16301 http://example.com [[File:Foobar.jpg]]
16303 <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>
16306 <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>
16310 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16313 The line above must have a trailing space!
16316 But just in case it doesn't...
16318 <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>
16319 <p>The line above must have a trailing space!
16321 <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>
16322 <p>But just in case it doesn't...
16327 Header with special characters (T27462)
16329 The tooltips shall not show entities to the user (ie. be double escaped)
16346 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16348 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16350 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16351 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16352 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16353 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16354 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16358 <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>
16361 <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>
16364 <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>
16367 <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>
16370 <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>
16376 Header with space, plus and underscore as entity
16378 Id should not contain + for spaces
16380 == Space between Text ==
16383 == Space-Entity between Text ==
16386 == Plus+between+Text ==
16389 == Plus-Entity+between+Text ==
16392 == Underscore_between_Text ==
16395 == Underscore-Entity_between_Text ==
16398 [[#Space between Text]]
16399 [[#Space-Entity between Text]]
16400 [[#Plus+between+Text]]
16401 [[#Plus-Entity+between+Text]]
16402 [[#Underscore_between_Text]]
16403 [[#Underscore-Entity_between_Text]]
16405 <p>Id should not contain + for spaces
16407 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16409 <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>
16410 <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>
16411 <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>
16412 <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>
16413 <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>
16414 <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>
16418 <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>
16421 <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>
16424 <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>
16427 <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>
16430 <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>
16433 <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>
16435 </p><p><a href="#Space_between_Text">#Space between Text</a>
16436 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
16437 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
16438 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
16439 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
16440 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
16445 Headers with excess '=' characters
16446 (Are similar tests necessary beyond the 1st level?)
16450 =''italic'' heading==
16451 ==''italic'' heading=
16453 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16455 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
16456 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
16457 <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>
16458 <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>
16462 <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>
16463 <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>
16464 <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>
16465 <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>
16470 HTML headers vs TOC (T25393)
16471 (__NOEDITSECTION__ for clearer output, doesn't matter here)
16483 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16485 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
16487 <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>
16488 <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>
16491 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
16493 <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>
16494 <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>
16500 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
16501 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
16502 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
16503 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
16504 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
16505 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
16510 Single-line or multiline-comments can follow headings
16512 parsoid=wt2html,wt2wt
16520 <h2><span class="mw-headline" id="foo">foo</span></h2>
16521 <h2><span class="mw-headline" id="bar">bar</span></h2>
16522 <h2><span class="mw-headline" id="baz">baz</span></h2>
16527 T3219 URL next to image (broken)
16529 http://example.com[[File:Foobar.jpg]]
16531 <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>
16534 <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>
16538 T3186 news: in the middle of text
16540 http://en.wikinews.org/wiki/Wikinews:Workplace
16542 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
16548 Namespaced link must have a title
16557 Namespaced link must have a title (bad fragment version)
16559 [[Project:#fragment]]
16561 <p>[[Project:#fragment]]
16567 ### HTML tags and HTML attributes
16571 div with no attributes
16573 <div>HTML rocks</div>
16575 <div>HTML rocks</div>
16580 div with double-quoted attribute
16582 <div id="rock">HTML rocks</div>
16584 <div id="rock">HTML rocks</div>
16589 div with single-quoted attribute
16591 <div id='rock'>HTML rocks</div>
16593 <div id="rock">HTML rocks</div>
16598 div with unquoted attribute
16600 <div id=rock>HTML rocks</div>
16602 <div id="rock">HTML rocks</div>
16607 div with illegal double attributes
16609 <div id="a" id="b">HTML rocks</div>
16611 <div id="b">HTML rocks</div>
16616 div with empty attribute value, space before equals
16618 parsoid=wt2html,html2html
16620 <div class =>HTML rocks</div>
16622 <div class="">HTML rocks</div>
16625 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16629 div with multiple empty attribute values
16631 parsoid=wt2html,html2html
16633 <div id= title=>HTML rocks</div>
16635 <div id="title.3D">HTML rocks</div>
16638 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16642 table with multiple empty attribute values
16644 parsoid=wt2html,html2html
16650 <table title="id=">
16656 <table title="id=">
16657 <tbody><tr><td> hi</td></tr>
16662 div with braces in attribute value
16664 <div title="{}">Foo</div>
16666 <div title="{}">Foo</div>
16669 <div title="{}">Foo</div>
16673 div with empty attribute value, no space before equals
16675 parsoid=wt2html,html2html
16677 <div class=>HTML rocks</div>
16679 <div class="">HTML rocks</div>
16682 <div class="">HTML rocks</div>
16686 HTML multiple attributes correction
16688 <p class="error" class="awesome">Awesome!</p>
16690 <p class="awesome">Awesome!</p>
16695 Table multiple attributes correction
16698 !+ class="error" class="awesome"| status
16703 <th class="awesome"> status
16711 <DIV ID="x">HTML ROCKS</DIV>
16713 <div id="x">HTML ROCKS</div>
16718 Non-ASCII pseudo-tags are rendered as text
16727 Pseudo-tag with URL 'name' renders as url link
16729 <http://example.com/>
16731 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16736 text with amp in the middle of nowhere
16740 <p>Remember AT&T?
16745 text with character entity: eacute
16747 I always thought é was a cute letter.
16749 <p>I always thought é was a cute letter.
16752 <p>I always thought é was a cute letter.</p>
16756 text with entity-escaped character entity-like string: eacute
16758 I always thought &eacute; was a cute letter.
16760 <p>I always thought &eacute; was a cute letter.
16765 text with undefined character entity: xacute
16767 I always thought &xacute; was a cute letter.
16769 <p>I always thought &xacute; was a cute letter.
16776 <data value="5">five</data>
16777 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16778 <mark>This highlighted text</mark>
16780 <p><data value="5">five</data>
16781 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16782 <mark>This highlighted text</mark>
16787 HTML tag with leading space is parsed as text
16791 <p>< div>foo< /div>
16796 ### Nesting tests (see T43545, T52604, T53081)
16799 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
16800 # Note that html2wt is considerably more difficult if we use <b> in
16801 # the test case, instead of <small>
16803 Ensure that HTML adoption agency algorithm is properly implemented.
16805 <small>X<small>Y</small>Z</small>
16807 <p><small>X<small>Y</small>Z</small>
16811 # This was T43545 in the PHP parser.
16812 # Note that tidy doesn't handle this correctly.
16816 <kbd>X<kbd>Y</kbd>Z</kbd>
16818 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16822 # The following cases were T53081 in the PHP parser.
16823 # Note that there are some other nestable tags (b, i, etc) which are
16824 # not covered; see T53081 for discussion.
16826 # Note that tidy doesn't handle this correctly.
16830 <em>X<em>Y</em>Z</em>
16832 <p><em>X<em>Y</em>Z</em>
16836 # Note that tidy doesn't handle this correctly.
16838 Nesting of <strong>
16840 <strong>X<strong>Y</strong>Z</strong>
16842 <p><strong>X<strong>Y</strong>Z</strong>
16851 <p><q>X<q>Y</q>Z</q></p>
16854 # Note that tidy doesn't handle this correctly.
16858 <ruby>X<ruby>Y</ruby>Z</ruby>
16860 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16864 # Note that tidy doesn't handle this correctly.
16868 <bdo>X<bdo>Y</bdo>Z</bdo>
16870 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16882 [[Media:Foobar.jpg]]
16884 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16887 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a></p>
16891 Media link with text
16893 [[Media:Foobar.jpg|A neat file to look at]]
16895 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16898 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
16901 # FIXME: this is still bad HTML tag nesting
16902 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16904 Media link with nasty text
16906 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16908 <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>
16911 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16912 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16914 <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>
16919 Media link to nonexistent file (T3702)
16921 [[Media:No such.jpg]]
16922 [[Media:No_such file.jpg]]
16924 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16925 <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>
16928 <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>
16929 <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>
16933 Image link to nonexistent file (T3850 - good)
16935 [[File:No_such.jpg]]
16937 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16940 <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>
16944 :Image link to nonexistent file (T3850 - bad)
16946 [[:Image:No such.jpg]]
16948 <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>
16951 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16957 Character reference normalization in link text (T3938)
16959 [[Main Page|this&that]]
16961 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16968 Test for unicode normalization
16970 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16974 (T21451) Links should refer to the normalized form.
16982 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16983 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16984 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16985 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16986 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16991 Empty attribute crash test (T4067)
16993 <font color="">foo</font>
16995 <p><font color="">foo</font>
17000 Empty attribute crash test single-quotes (T4067)
17002 <font color=''>foo</font>
17004 <p><font color="">foo</font>
17009 Attribute test: equals, then nothing
17011 parsoid=wt2html,html2html
17013 <font color=>foo</font>
17015 <p><font color="">foo</font>
17018 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17022 Attribute test: unquoted value
17024 parsoid=wt2html,html2html
17026 <font color=x>foo</font>
17028 <p><font color="x">foo</font>
17031 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17035 Attribute test: unquoted but illegal value (hash)
17037 <font color=#x>foo</font>
17039 <p><font color="#x">foo</font>
17043 # Parsoid does not serialize to empty attribute syntax,
17044 # so wt2wt and html2wt cases are skipped
17046 Attribute test: no value (T54330)
17048 parsoid=wt2html,html2html
17050 <font color>foo</font>
17052 <p><font color="">foo</font>
17055 <p><font color="">foo</font></p>
17059 T4095: link with three closing brackets
17063 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17066 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17070 T4095: link with pipe and three closing brackets
17072 [[Main Page|link]]]
17074 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17077 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17081 T4095: link with pipe and three closing brackets, version 2
17083 [[Main Page|[http://example.com/]]]
17085 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17088 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17097 Template:Dangerous attribute
17099 " onmouseover="alert(document.cookie)
17103 Template:Dangerous style attribute
17105 border-size: expression(alert(document.cookie))
17111 <div style="float: right; {{{1}}}">Magic div</div>
17115 T4304: HTML attribute safety (safe template; regression T4309)
17117 <div title="{{test}}"></div>
17119 <div title="This is a test template"></div>
17122 <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>
17125 # Parsoid has enough context to handle this case
17127 T4304: HTML attribute safety (dangerous template; 2309)
17129 <div title="{{dangerous attribute}}"></div>
17131 <div title=""></div>
17134 <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>
17138 T4304: HTML attribute safety (dangerous style template; 2309)
17140 <div style="{{dangerous style attribute}}"></div>
17142 <div style="/* insecure input */"></div>
17145 <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>
17149 T4304: HTML attribute safety (safe parameter; 2309)
17151 {{div style|width: 200px}}
17153 <div style="float: right; width: 200px">Magic div</div>
17156 <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>
17160 T4304: HTML attribute safety (unsafe parameter; 2309)
17162 {{div style|width: expression(alert(document.cookie))}}
17164 <div style="/* insecure input */">Magic div</div>
17167 <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>
17170 ## Parsoid output here differs; needs investigation.
17172 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17174 {{div style|"><script>alert(document.cookie)</script>}}
17176 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17180 ## Parsoid output here differs; needs investigation.
17182 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17184 {{div style|" ><script>alert(document.cookie)</script>}}
17186 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17191 T4304: HTML attribute safety (link)
17193 <div title="[[Main Page]]"></div>
17195 <div title="[[Main Page]]"></div>
17200 T4304: HTML attribute safety (italics)
17202 <div title="''foobar''"></div>
17204 <div title="''foobar''"></div>
17209 T4304: HTML attribute safety (bold)
17211 <div title="'''foobar'''"></div>
17213 <div title="'''foobar'''"></div>
17218 T4304: HTML attribute safety (ISBN)
17220 <div title="ISBN 1234567890"></div>
17222 <div title="ISBN 1234567890"></div>
17227 T4304: HTML attribute safety (RFC)
17229 <div title="RFC 1234"></div>
17231 <div title="RFC 1234"></div>
17236 T4304: HTML attribute safety (PMID)
17238 <div title="PMID 1234567890"></div>
17240 <div title="PMID 1234567890"></div>
17245 T4304: HTML attribute safety (web link)
17247 <div title="http://example.com/"></div>
17249 <div title="http://example.com/"></div>
17254 T4304: HTML attribute safety (named web link)
17256 <div title="[http://example.com/ link]"></div>
17258 <div title="[http://example.com/ link]"></div>
17263 T5244: HTML attribute safety (extension; safe)
17265 <div style="<nowiki>background:blue</nowiki>"></div>
17267 <div style="background:blue"></div>
17270 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17274 T5244: HTML attribute safety (extension; unsafe)
17276 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17278 <div style="/* insecure input */"></div>
17281 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17284 # More MSIE fun discovered by Tom Gilder
17287 MSIE CSS safety test: spurious slash
17289 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17291 <div style="/* insecure input */">evil</div>
17294 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
17298 MSIE CSS safety test: hex code
17300 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
17302 <div style="/* insecure input */">evil</div>
17305 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
17309 MSIE CSS safety test: comment in url
17311 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
17313 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
17316 <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>
17320 MSIE CSS safety test: comment in expression
17322 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
17324 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
17327 <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>
17331 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
17333 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
17335 <p style="/* invalid control char */">A</p>
17338 <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>
17342 MSIE 6 CSS safety test: Fullwidth (T57332)
17344 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
17345 <div style="top:EXPRESSION(alert())">B</div>
17347 <p style="/* insecure input */">A</p>
17348 <div style="/* insecure input */">B</div>
17351 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
17352 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
17356 MSIE 6 CSS safety test: IPA extensions (T57332)
17358 <div style="background-image:uʀʟ(javascript:alert())">A</div>
17359 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
17361 <div style="/* insecure input */">A</div>
17362 <p style="/* insecure input */">B</p>
17365 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
17366 <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>
17370 MSIE 6 CSS safety test: sup/sub script (T57332)
17372 <div style="background-image:url⁽javascript:alert())">A</div>
17373 <div style="background-image:url₍javascript:alert())">B</div>
17374 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
17376 <div style="/* insecure input */">A</div>
17377 <div style="/* insecure input */">B</div>
17378 <p style="/* insecure input */">C</p>
17381 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
17382 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
17383 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
17389 parsoid=wt2html,html2html
17392 title="data:text/html,<img src=1 onerror=alert(1)>"
17393 style="-o-link:attr(title);-o-link-source:current">X</div>
17395 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
17398 <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>
17402 MSIE 6 CSS safety test: Repetition markers (T57332)
17404 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
17405 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
17406 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
17407 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
17408 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
17409 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
17410 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
17412 <p style="/* insecure input */">A</p>
17413 <p style="/* insecure input */">B</p>
17414 <p style="/* insecure input */">C</p>
17415 <p style="/* insecure input */">D</p>
17416 <p style="/* insecure input */">E</p>
17417 <p style="/* insecure input */">F</p>
17418 <p style="/* insecure input */">G</p>
17421 <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>
17422 <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>
17423 <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>
17424 <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>
17425 <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>
17426 <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>
17427 <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>
17431 Table attribute legitimate extension
17434 !+ style="<nowiki>color:blue</nowiki>"| status
17439 <th style="color:blue"> status
17445 Table attribute safety
17448 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
17453 <th style="/* insecure input */"> status
17459 CSS line continuation 1
17461 <div style="background-image: u\ rl(test.jpg);"></div>
17463 <div style="/* insecure input */"></div>
17468 CSS line continuation 2
17470 <div style="background-image: u\ rl(test.jpg); "></div>
17472 <div style="/* invalid control char */"></div>
17483 Expansion of multi-line templates in attribute values (T8255)
17485 <div style="background: {{identity|#00FF00}}">-</div>
17487 <div style="background: #00FF00">-</div>
17492 Expansion of multi-line templates in attribute values (T8255 sanity check)
17494 <div style="background:
17497 <div style="background: #00FF00">-</div>
17500 <div style="background:
17505 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
17507 <div style="background: #00FF00">-</div>
17509 <div style="background: #00FF00">-</div>
17514 Tags which are hidden from Tidy cannot pass through the Sanitizer
17516 <mw:toc><script>alert();</script></mw:toc>
17518 <p><mw:toc><script>alert();</script></mw:toc></p>
17522 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
17526 Parser hook: empty input
17537 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17540 ## Don't expect parsoid to rt this form.
17542 Parser hook: empty input using terminated empty elements
17544 parsoid=wt2html,html2html
17555 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17559 Parser hook: empty input using terminated empty elements (space before)
17570 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17574 Parser hook: basic input
17585 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17588 ## Don't expect parsoid to rt this form.
17590 Parser hook: case insensitive
17592 parsoid=wt2html,html2html
17603 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17606 ## Don't expect parsoid to rt this form.
17608 Parser hook: case insensitive, redux
17610 parsoid=wt2html,html2html
17621 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17625 Parser hook: nested tags
17627 <tag><tag></tag></tag>
17636 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
17640 Parser hook: basic arguments
17642 <tag width="200" height="100" depth="50" square=""></tag>
17655 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17658 ## Don't expect parsoid to rt this form.
17660 Parser hook: basic arguments, variations
17662 parsoid=wt2html,html2html
17664 <tag width=200 height = "100" depth = '50' square></tag>
17677 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17681 Parser hook: argument containing a forward slash (T7344)
17683 <tag filename="/tmp/bla"></tag>
17688 'filename' => '/tmp/bla',
17693 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17696 ## Don't expect parsoid to rt this form.
17698 Parser hook: empty input using terminated empty elements (T4374)
17700 parsoid=wt2html,html2html
17712 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
17715 ## </tag> should be output literally since there is no matching tag that begins it
17716 ## Don't expect parsoid to rt this form.
17718 Parser hook: basic arguments using terminated empty elements (T4374)
17722 <tag width=200 height = "100" depth = '50' square/>
17739 <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
17743 ## Don't expect parsoid to rt this form.
17745 Parser hook: Don't allow unclosed extension tags
17751 this is a '''test'''
17753 <p>test <tag>123
17754 </p><p>this is a <b>test</b>
17757 <p>test <tag>123</p>
17759 <p>this is a <b>test</b></p>
17763 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
17767 Parser hook: static parser hook not inside a comment
17769 <statictag>hello, world</statictag>
17771 <statictag action="flush" />
17777 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
17778 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17782 Parser hook: static parser hook inside a comment
17784 <!-- <statictag>hello, world</statictag> -->
17785 <statictag action="flush" />
17790 <!-- <statictag>hello, world</statictag> -->
17791 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17794 # Nested template calls; this case was broken by Parser.php rev 1.506,
17798 Template:One-parameter
17800 (My parameter is: {{{1}}})
17804 Template:Map-one-parameter
17806 {{{{{1}}}|{{{2}}}}}
17810 Nested template calls
17812 {{Map-one-parameter|One-parameter|param}}
17814 <p>(My parameter is: param)
17823 # HTML+Tidy effectively strips out the empty tags completely
17824 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17825 # which Tidy would have done for the PHP parser had there been content inside it.
17827 Sanitizer: Closing of open tags
17829 <s></s><table></table>
17831 <s></s><table></table>
17834 <p><s></s></p><table></table>
17838 Sanitizer: Closing of open but not closed tags
17847 Sanitizer: Closing of closed but not open tags
17857 Sanitizer: Closing of closed but not open table tags
17861 Table not started</td></tr></table>
17863 <p>Table not started</p>
17865 <p>Table not started</p>
17869 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17871 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17873 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17876 <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>
17879 # In HTML5, the restrictions are that id must contain at least one character,
17880 # and must not contain any space characters.
17882 Sanitizer: Validating the contents of the id attribute (T6515)
17886 <br id="" /><br id="a space" />
17891 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17893 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
17897 <br id="foo" /><br id="foo" />
17899 Something need to be done. foo-2 ?
17903 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17906 <meta itemprop="hello" content="world">
17907 <meta http-equiv="refresh" content="5">
17908 <meta itemprop="hello" http-equiv="refresh" content="5">
17909 <link itemprop="hello" href="{{SERVER}}">
17910 <link rel="stylesheet" href="{{SERVER}}">
17911 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17915 <p> <meta itemprop="hello" content="world" />
17916 <meta http-equiv="refresh" content="5">
17917 <meta itemprop="hello" content="5" />
17918 <link itemprop="hello" href="http://example.org" />
17919 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17920 <link itemprop="hello" href="http://example.org" />
17927 Sanitizer: Strip comments from CSS attributes
17929 parsoid=wt2html,wt2wt
17931 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
17933 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
17936 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
17940 Language converter: output gets cut off unexpectedly (T7757)
17944 this bit is safe: }-
17946 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17948 then we get cut off here: }-
17950 all additional text is vanished
17952 <p>this bit is safe: }-
17953 </p><p>but if we add a conversion instance: xxx
17954 </p><p>then we get cut off here: }-
17955 </p><p>all additional text is vanished
17960 Self closed html pairs (T7487)
17962 <center><font id="bug" />Centered text</center>
17963 <div><font id="bug2" />In div text</div>
17965 <center><font id="bug"></font>Centered text</center>
17966 <div><font id="bug2"></font>In div text</div>
17974 Punctuation: nbsp before exclamation
17978 <p>C'est grave !
17983 Punctuation: CSS !important (T13874)
17985 <div style="width:50% !important">important</div>
17987 <div style="width:50% !important">important</div>
17992 Punctuation: CSS ! important (T13874; with space after)
17994 <div style="width:50% ! important">important</div>
17996 <div style="width:50% ! important">important</div>
18001 HTML bullet list, closed tags (T7497)
18014 <ul data-parsoid='{"stx":"html"}'>
18015 <li data-parsoid='{"stx":"html"}'>One</li>
18016 <li data-parsoid='{"stx":"html"}'>Two</li>
18022 HTML bullet list, unclosed tags (T7497)
18034 <ul data-parsoid='{"stx":"html"}'>
18035 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18036 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18042 HTML ordered list, closed tags (T7497)
18055 <ol data-parsoid='{"stx":"html"}'>
18056 <li data-parsoid='{"stx":"html"}'>One</li>
18057 <li data-parsoid='{"stx":"html"}'>Two</li>
18063 HTML ordered list, unclosed tags (T7497)
18076 <ol data-parsoid='{"stx":"html"}'>
18077 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18078 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18084 HTML nested bullet list, closed tags (T7497)
18107 <ul data-parsoid='{"stx":"html"}'>
18108 <li data-parsoid='{"stx":"html"}'>One</li>
18109 <li data-parsoid='{"stx":"html"}'>Two:
18110 <ul data-parsoid='{"stx":"html"}'>
18111 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18112 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18119 HTML nested bullet list, open tags (T7497)
18156 HTML nested ordered list, closed tags (T7497)
18181 HTML nested ordered list, open tags (T7497)
18218 HTML ordered list item with parameters oddity
18220 <ol><li id="fragment">One</li>
18223 <ol><li id="fragment">One</li>
18228 # parsoid doesn't explicitly mark autonumbered links, see T55505
18230 T7918: autonumbering
18232 [http://first/] [http://second] [ftp://ftp]
18236 [mailto:enclosed@mail.tld With target]
18238 [mailto:enclosed@mail.tld]
18240 mailto:inline@mail.tld
18242 <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>
18243 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
18244 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
18245 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
18246 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
18249 <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>
18250 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
18251 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
18252 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
18253 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
18258 # Security and HTML correctness
18259 # From Nick Jenkins' fuzz testing
18263 Fuzz testing: Parser13
18278 Fuzz testing: Parser14
18283 <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>
18284 http://<div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
18286 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18292 <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>
18294 <div id="toc" class="toc">
18295 <div class="toctitle">
18299 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18306 Fuzz testing: Parser14-table
18308 parsoid=wt2html,html2html
18313 <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>
18314 <table style="__TOC__">
18319 <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>
18320 <table style="__TOC__">
18327 <table style="__TOC__"></table>
18330 # Known to produce bogus xml (extra </td>)
18332 Fuzz testing: Parser16
18359 Fuzz testing: Parser21
18362 ! irc://{{ftp://a" onmouseover="alert('hello world');"
18367 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
18377 Fuzz testing: Parser22
18379 http://===r:::https://b
18383 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
18391 # Known to produce bad XML for now
18393 Fuzz testing: Parser24
18400 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
18401 <br style="onmouseover='alert(document.cookie);' " />
18403 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18408 <u class="|">}}}} >
18409 <br style="onmouseover='alert(document.cookie);'" />
18411 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18419 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
18420 <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>"}'/>}}}} >
18421 <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}'>
18425 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
18428 # Note: the current result listed for this is not what the original one was,
18429 # but the original bug was JavaScript injection, which is fixed in any case.
18430 # It's not clear that the original result listed was any more correct than the
18431 # current one. Original result:
18434 # <li class="||">
18435 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18437 Fuzz testing: Parser25 (T8055)
18443 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
18445 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18448 <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"]}'>
18449 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
18453 Fuzz testing: URL adjacent extension (with space, clean)
18455 http://example.com <nowiki>junk</nowiki>
18457 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
18460 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
18464 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
18466 http://example.com<nowiki>junk</nowiki>
18468 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
18471 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
18475 Fuzz testing: URL adjacent extension (no space, dirty; pre)
18477 http://example.com<pre>junk</pre>
18479 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
18482 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
18487 <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>
18491 Fuzz testing: image with bogus manual thumbnail
18493 [[Image:foobar.jpg|thumbnail= ]]
18495 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
18498 <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>
18502 Fuzz testing: encoded newline in generated HTML replacements (T8577)
18504 <pre dir=" "></pre>
18506 <pre dir=" "></pre>
18509 <pre typeof="mw:Extension/pre" about="#mwt2" dir="&#10;" data-mw='{"name":"pre","attrs":{"dir":"&#10;"},"body":{"extsrc":""}}'></pre>
18513 Parsing optional HTML elements (T8171)
18518 <td> Some tabular data</td>
18519 <td> More tabular data ...
18520 <td> And yet som tabular data</td>
18526 <td> Some tabular data</td>
18527 <td> More tabular data ...
18528 </td><td> And yet som tabular data</td>
18535 Correct handling of <td>, <tr> (T8171)
18540 <td> Some tabular data</td>
18541 <td> More tabular data ...</td>
18542 <td> And yet som tabular data</td>
18548 <td> Some tabular data</td>
18549 <td> More tabular data ...</td>
18550 <td> And yet som tabular data</td>
18558 Parsing crashing regression (fr:JavaScript)
18562 <p></body></x>
18567 Inline wiki vs wiki block nesting
18573 <p><b>Bold paragraph</b>
18574 </p><p>New wiki paragraph
18578 # FIXME: The current php output is documented
18579 # and desired output is the parsoid target.
18581 Inline HTML vs wiki block nesting
18587 <p><b>Bold paragraph
18588 </p><p>New wiki paragraph</b>
18591 <p><b>Bold paragraph</b>
18592 </p><p>New wiki paragraph
18596 # Original result was this:
18597 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
18599 # While that might be marginally more intuitive, maybe, the six-apostrophe
18600 # construct is clearly pathological and the result stated here (which is what
18601 # the parser actually does) is about as reasonable as anything.
18603 Mixing markup for italics and bold
18606 '''bold''''''bold''bolditalics'''''
18608 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
18616 Article for special page transclusion test
18620 Special page transclusion
18623 {{Special:Prefixindex/Xyzzyx}}
18625 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18631 Special page transclusion twice (T7021)
18634 {{Special:Prefixindex/Xyzzyx}}
18635 {{Special:Prefixindex/Xyzzyx}}
18637 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18639 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18645 Transclusion of default MediaWiki message
18647 {{MediaWiki:Mainpage}}
18654 Transclusion of nonexistent MediaWiki message
18656 {{MediaWiki:Mainpagexxx}}
18658 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
18663 Transclusion of MediaWiki message with underscore
18665 {{MediaWiki:history_short}}
18672 Transclusion of MediaWiki message with space
18674 {{MediaWiki:history short}}
18681 Invalid header with following text
18691 Section extraction test (section 0)
18711 Section extraction test (section 1)
18733 Section extraction test (section 2)
18754 Section extraction test (section 3)
18774 Section extraction test (section 4)
18798 Section extraction test (section 5)
18818 Section extraction test (section 6)
18839 Section extraction test (section 7)
18859 Section extraction test (section 8)
18879 Section extraction test (section 9)
18900 Section extraction test (section 10)
18920 Section extraction test (nonexistent section 11)
18939 Section extraction test with bogus heading (section 1)
18944 ==bogus== not a legal section
18948 ==bogus== not a legal section
18952 Section extraction test with bogus heading (section 2)
18957 ==bogus== not a legal section
18964 Section extraction test with comment after heading (section 1)
18976 Section extraction test with comment after heading (section 2)
18988 Section extraction test with bogus <nowiki> heading (section 1)
18993 ==bogus== <nowiki>not a legal section</nowiki>
18997 ==bogus== <nowiki>not a legal section</nowiki>
19001 Section extraction test with bogus <nowiki> heading (section 2)
19006 ==bogus== <nowiki>not a legal section</nowiki>
19012 # Formerly testing for T4587, now resolved by the use of unmarked sections
19013 # instead of respecting commented sections
19015 Section extraction prefixed by comment (section 1)
19026 Section extraction prefixed by comment (section 2)
19036 # Formerly testing for T4607, now resolved by the use of unmarked sections
19037 # instead of respecting HTML-style headings
19039 Section extraction, mixed wiki and html (section 1)
19055 Section extraction, mixed wiki and html (section 2)
19071 # Formerly testing for T5342
19073 Section extraction, heading surrounded by <noinclude>
19077 <noinclude>==unmarked==</noinclude>
19083 # Test behavior of T21910
19085 Sectiion with all-equals
19090 The line above must have a trailing space
19093 But just in case it doesn't...
19097 But just in case it doesn't...
19101 Section replacement test (section 0)
19132 Section replacement test (section 1)
19161 Section replacement test (section 2)
19191 Section replacement test (section 3)
19222 Section replacement test (section 4)
19249 Section replacement test (section 5)
19280 Section replacement test (section 6)
19310 Section replacement test (section 7)
19341 Section replacement test (section 8)
19372 Section replacement test (section 9)
19401 Section replacement test (section 10)
19431 Section replacement test with initial whitespace (T15728)
19435 Preformatted initial line
19439 Preformatted initial line
19446 Section extraction, heading followed by pre with 20 spaces (T8398)
19458 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
19471 Section extraction, <pre> around bogus header (T12309)
19488 Section replacement, <pre> around bogus header (T12309)
19509 Handling of 
 in URLs
19513 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19516 <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>
19520 Handling of %0A in URLs
19524 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19527 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19530 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
19532 5 quotes, code coverage +1 line
19539 <p><b><i></i></b></p>
19542 # same html as previous, but wikitext adjusted to match parsoid html2wt
19543 # note that wt2html and html2html will put the <i> before the <b>
19545 5 quotes, code coverage +1 line w/ nowiki (1)
19547 parsoid=wt2wt,html2wt
19549 '''''<nowiki/>'''''
19554 <p><b><i></i></b></p>
19557 # same as previous, just swapping the <i> and <b>
19559 5 quotes, code coverage +1 line w/ nowiki (2)
19561 '''''<nowiki/>'''''
19566 <p><i><b></b></i></p>
19570 Special:Search page linking.
19574 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
19579 {{!}} is a magic word
19581 {{!}} is a magic word there and {{!}} is still a magic word here
19582 | is not a magic word here but {{!}} is still a magic word here
19584 <p>| is a magic word there and | is still a magic word here
19585 | is not a magic word here but | is still a magic word here
19588 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"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":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
19589 | is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
19595 title=[[Parser test]]
19600 * {{FULLPAGENAMEE}}
19602 * {{BASEPAGENAMEE}}
19606 * {{ROOTPAGENAMEE}}
19608 * {{TALKPAGENAMEE}}
19609 * {{SUBJECTPAGENAME}}
19610 * {{SUBJECTPAGENAMEE}}
19613 * {{NAMESPACENUMBER}}
19617 * {{SUBJECTSPACEE}}
19618 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
19620 <ul><li> Parser test</li>
19621 <li> Parser_test</li>
19622 <li> Parser test</li>
19623 <li> Parser_test</li>
19624 <li> Parser test</li>
19625 <li> Parser_test</li>
19626 <li> Parser test</li>
19627 <li> Parser_test</li>
19628 <li> Parser test</li>
19629 <li> Parser_test</li>
19630 <li> Talk:Parser test</li>
19631 <li> Talk:Parser_test</li>
19632 <li> Parser test</li>
19633 <li> Parser_test</li>
19641 <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>
19644 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
19647 Gallery with valid attributes
19649 <gallery type="123" summary="345">
19650 File:File:Foobar.jpg
19653 <ul class="gallery mw-gallery-traditional" type="123">
19654 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19655 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
19656 <div class="gallerytext">
19662 <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"}}'>
19663 <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>
19667 ## Parsoid thinks the "centre" here is a property, not a caption.
19672 "modes": ["wt2html"],
19673 "nativeGallery": true
19681 image4 |300px| centre
19682 image5.svg| http://///////
19687 <ul class="gallery mw-gallery-traditional">
19688 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19689 <div class="thumb" style="height: 150px;">Image1.png</div>
19690 <div class="gallerytext">
19693 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19694 <div class="thumb" style="height: 150px;">Image2.gif</div>
19695 <div class="gallerytext">
19698 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19699 <div class="thumb" style="height: 150px;">Image3</div>
19700 <div class="gallerytext">
19703 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19704 <div class="thumb" style="height: 150px;">Image4</div>
19705 <div class="gallerytext">
19710 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19711 <div class="thumb" style="height: 150px;">Image5.svg</div>
19712 <div class="gallerytext">
19713 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
19717 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19718 <div class="thumb" style="height: 150px;">* image6</div>
19719 <div class="gallerytext">
19725 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19726 <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>
19727 <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>
19728 <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>
19729 <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>
19730 <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>
19731 <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>
19736 Gallery (with options, html)
19739 "modes": ["wt2html", "html2html"],
19740 "nativeGallery": true
19743 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19744 File:Nonexistent.jpg|caption
19745 File:Nonexistent.jpg
19746 image:foobar.jpg|some '''caption''' [[Main Page]]
19748 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19751 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19752 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19753 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19754 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19755 <div class="gallerytext">
19760 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19761 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19762 <div class="gallerytext">
19765 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19766 <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>
19767 <div class="gallerytext">
19768 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19772 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19773 <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>
19774 <div class="gallerytext">
19777 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19778 <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>
19779 <div class="gallerytext">
19787 <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":{}}'>
19788 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19789 <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>
19790 <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>
19791 <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>
19792 <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>
19793 <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>
19798 Gallery (with options, extsrc)
19801 "nativeGallery": false
19804 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19805 File:Nonexistent.jpg|caption
19806 File:Nonexistent.jpg
19807 image:foobar.jpg|some '''caption''' [[Main Page]]
19809 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19812 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19813 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19814 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19815 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19816 <div class="gallerytext">
19821 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19822 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19823 <div class="gallerytext">
19826 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19827 <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>
19828 <div class="gallerytext">
19829 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19833 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19834 <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>
19835 <div class="gallerytext">
19838 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19839 <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>
19840 <div class="gallerytext">
19848 <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"}}'>
19849 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19850 <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>
19851 <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>
19852 <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>
19853 <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>
19854 <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>
19859 Gallery with link that has fragment
19862 "modes": ["wt2html", "html2html"],
19863 "nativeGallery": true
19867 image:foobar.jpg|link=Main_Page
19868 image:foobar.jpg|link=Main_Page#section
19869 image:foobar.jpg|link=Main Page#section|caption
19872 <ul class="gallery mw-gallery-traditional">
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/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>
19875 <div class="gallerytext">
19878 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19879 <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>
19880 <div class="gallerytext">
19883 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19884 <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>
19885 <div class="gallerytext">
19893 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19894 <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>
19895 <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>
19896 <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>
19900 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
19902 Gallery with template inside caption
19905 "nativeGallery": true
19908 <gallery caption="{{echo|hi}}">
19909 File:Foobar.jpg|{{echo|ho}}
19912 <ul class="gallery mw-gallery-traditional">
19913 <li class='gallerycaption'>{{echo|hi}}</li>
19914 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19915 <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>
19916 <div class="gallerytext">
19924 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19925 <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>
19926 <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>
19931 Gallery with wikitext inside caption
19934 "nativeGallery": true
19938 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
19939 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
19942 <ul class="gallery mw-gallery-traditional">
19943 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19944 <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>
19945 <div class="gallerytext">
19946 <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>
19950 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19951 <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>
19952 <div class="gallerytext">
19953 <p>This is a test template
19960 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19961 <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>
19962 <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>
19967 Gallery (with showfilename option)
19970 "nativeGallery": true
19973 <gallery showfilename="">
19974 File:Nonexistent.jpg|caption
19975 File:Nonexistent.jpg
19976 File:Foobar.jpg|some '''caption''' [[Main Page]]
19980 <ul class="gallery mw-gallery-traditional">
19981 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19982 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19983 <div class="gallerytext">
19984 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19989 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19990 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19991 <div class="gallerytext">
19992 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19996 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19997 <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>
19998 <div class="gallerytext">
19999 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20000 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20004 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20005 <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>
20006 <div class="gallerytext">
20007 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20014 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20015 <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>
20016 <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>
20017 <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>
20018 <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>
20022 ## Should Parsoid be preserving these variations?
20024 Gallery (with namespace-less filenames)
20027 "modes": ["wt2html", "html2html"],
20028 "nativeGallery": true
20032 File:Nonexistent.jpg
20038 <ul class="gallery mw-gallery-traditional">
20039 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20040 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20041 <div class="gallerytext">
20044 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20045 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20046 <div class="gallerytext">
20049 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20050 <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>
20051 <div class="gallerytext">
20054 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20055 <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>
20056 <div class="gallerytext">
20062 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20063 <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>
20064 <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>
20065 <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>
20066 <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>
20071 Gallery override link with WikiLink (T36852)
20074 "nativeGallery": true
20078 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
20081 <ul class="gallery mw-gallery-traditional">
20082 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20083 <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>
20084 <div class="gallerytext">
20090 <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":{}}'>
20091 <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>
20096 Gallery override link with absolute external link (T36852)
20099 "nativeGallery": true
20103 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20106 <ul class="gallery mw-gallery-traditional">
20107 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20108 <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>
20109 <div class="gallerytext">
20115 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20116 <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>
20121 Gallery override link with absolute external link with LanguageConverter
20126 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20129 <ul class="gallery mw-gallery-traditional">
20130 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20131 <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>
20132 <div class="gallerytext">
20142 Gallery override link with malicious javascript (T36852)
20145 "modes": ["wt2html", "html2html"],
20146 "nativeGallery": true
20150 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20153 <ul class="gallery mw-gallery-traditional">
20154 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20155 <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>
20156 <div class="gallerytext">
20162 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20163 <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>
20168 Gallery with invalid title as link (T45964)
20171 "modes": ["wt2html", "html2html"],
20172 "nativeGallery": true
20176 File:Foobar.jpg|link=<
20179 <ul class="gallery mw-gallery-traditional">
20180 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20181 <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>
20182 <div class="gallerytext">
20188 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20189 <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>
20194 Serialize gallery without attrs in data-mw
20197 "modes": ["html2wt"],
20198 "nativeGallery": true
20201 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
20202 <li class="gallerycaption">123</li>
20203 <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>
20206 <gallery caption="123">
20212 Gallery with class and style attributes
20215 "nativeGallery": true
20218 <gallery class="center" style="text-align: center;">
20222 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
20223 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20224 <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>
20225 <div class="gallerytext">
20231 <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":{}}'>
20232 <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>
20237 Gallery in slideshow mode
20240 "nativeGallery": true
20243 <gallery mode="slideshow" showthumbnails="">
20247 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
20248 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20249 <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>
20250 <div class="gallerytext">
20256 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
20257 <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>
20262 HTML Hex character encoding (spells the word "JavaScript")
20264 parsoid=wt2html,wt2wt,html2html
20266 JavaScript
20268 <p>JavaScript
20273 <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>
20277 HTML Hex character encoding bogus encoding (T28437 regression check)
20281 <p>&#xsee;&#XSEE;
20284 <p>&#xsee;&#XSEE;</p>
20288 HTML Hex character encoding mixed case
20290 parsoid=wt2html,wt2wt,html2html
20299 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
20302 # See: https://www.w3.org/TR/html5/syntax.html#character-references
20303 # Note that U+000C (form feed) is not a valid XML character, so
20304 # it is banned even though allowed in HTML5.
20306 Illegal character references (T106578)
20311 ; Control (low): 
20312 ; Control (high):  Ÿ
20313 ; Surrogate: ��
20314 ; This is an okay astral character: 💩
20323 <dt>Control (low)</dt>
20325 <dt>Control (high)</dt>
20326 <dd>&#x7F; &#x9F;</dd>
20328 <dd>&#xD83D;&#xDCA9;</dd>
20329 <dt>This is an okay astral character</dt>
20335 __FORCETOC__ override
20347 ISBN 978-0-1234-56 789
20349 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
20352 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
20354 <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>
20358 ISBN followed by 5 spaces
20369 ISBN ISBN 1234567890
20371 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20374 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
20377 # Uppercase X and lowercase x as well
20388 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
20389 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
20390 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
20391 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
20392 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
20393 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
20396 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
20397 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
20398 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
20399 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
20400 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
20401 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
20405 ISBN with empty prefix (parsoid test)
20409 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20412 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
20416 T24905: <abbr> followed by ISBN followed by </a>
20418 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
20420 <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>
20423 <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>
20431 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
20436 Double RFC with a wiki link
20440 <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>
20449 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
20452 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
20456 Centre-aligned image
20458 [[Image:foobar.jpg|centre]]
20460 <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>
20467 [[Image:foobar.jpg|none]]
20469 <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>
20474 Width + Height sized image (using px) (height is ignored)
20476 [[Image:foobar.jpg|640x480px]]
20478 <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>
20483 Width-sized image (using px, no following whitespace)
20485 [[Image:foobar.jpg|640px]]
20487 <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>
20492 Width-sized image (using px, with following whitespace - test regression from r39467)
20494 [[Image:foobar.jpg|640px ]]
20496 <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>
20501 Width-sized image (using px, with preceding whitespace - test regression from r39467)
20503 [[Image:foobar.jpg| 640px]]
20505 <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>
20510 Image with page parameter
20514 [[File:LoremIpsum.djvu|page=2]]
20516 <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>
20519 <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>
20523 Another italics / bold test
20531 # FIXME: The php output seems broken. It's interleaving some open/close tags.
20537 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
20540 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
20544 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
20546 Images with the "|" character in the comment
20548 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
20550 <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>
20553 <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>
20557 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
20559 <html><script>alert(1);</script></html>
20561 <p><html><script>alert(1);</script></html>
20566 HTML with raw HTML ($wgRawHtml==true)
20570 <html><script>alert(1);</script></html>
20572 <p><script>alert(1);</script>
20577 Parents of subpages, one level up
20579 subpage title=[[Subpage test/L1/L2/L3]]
20583 <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>
20589 Parents of subpages, one level up, not named
20591 subpage title=[[Subpage test/L1/L2/L3]]
20595 <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>
20602 Parents of subpages, two levels up
20604 subpage title=[[Subpage test/L1/L2/L3]]
20610 <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
20611 </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>
20616 Parents of subpages, two levels up, without trailing slash or name.
20618 subpage title=[[Subpage test/L1/L2/L3]]
20627 Parents of subpages, two levels up, with lots of extra trailing slashes.
20629 subpage title=[[Subpage test/L1/L2/L3]]
20633 <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>
20638 Subpage test/L1/L2/L3Sibling
20644 Transclusion of a sibling page (one level up)
20646 subpage title=[[Subpage test/L1/L2/L3]]
20655 Transclusion of a child page
20657 subpage title=[[Subpage test/L1/L2]]
20665 # This is wt2html only in Parsoid because we add <nowiki>
20666 # because of {{..}} and we don't expect to fix that to
20667 # eliminate the nowikis selective for {{..}} markup.
20669 Non-transclusion because of too many up levels
20671 subpage title=[[Subpage test/L1/L2/L3]]
20674 {{../../../../More than parent}}
20676 <p>{{../../../../More than parent}}
20679 <p>{{../../../../More than parent}}</p>
20683 Definition list code coverage
20689 <dl><dt> title  </dt>
20691 <dt> title </dt>
20697 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20698 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20699 <dt>title</dt><dd> def</dd></dl>
20703 Don't fall for the self-closing div
20705 <div>hello world</div/>
20707 <div>hello world</div>
20716 <p>[[:Template:Msg]]
20725 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
20729 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
20731 Always escape literal '>' in output, not just after '<'
20745 <p>This is a test template
20746 This is a test template
20758 Inclusion of !userCanEdit() content
20762 <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>
20768 Out-of-order TOC heading levels
20777 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
20779 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
20781 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
20782 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
20785 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
20787 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
20788 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
20794 <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>
20795 <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>
20796 <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>
20797 <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>
20798 <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>
20799 <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>
20805 ISBN with a dummy number
20815 ISBN with space-delimited number
20819 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
20822 <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>
20827 ISBN with multiple spaces, no number
20846 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20847 </p><p>ISBN 12345678901
20850 <p>ISBN 123456789</p>
20852 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
20854 <p>ISBN 12345678901</p>
20859 ISBN with trailing year (T9110)
20861 ISBN 1-234-56789-0 - 2006
20863 ISBN 1 234 56789 0 - 2006
20865 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
20866 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
20869 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
20871 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
20878 {{anchorencode:foo bar©#%n}}
20880 <p>foo_bar.C2.A9.23.25n
20885 anchorencode trims spaces
20887 {{anchorencode: __pretty__please__}}
20894 anchorencode deals with links
20896 {{anchorencode: [[hello|world]] [[hi]]}}
20903 anchorencode deals with templates
20905 {{anchorencode: {{Foo}} }}
20912 anchorencode encodes like the TOC generator: (T20431)
20914 === _ +:.3A%3A&&]] ===
20915 {{anchorencode: _ +:.3A%3A&&]] }}
20918 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
20919 <p>.2B:.3A.253A.26.26.5D.5D
20924 T8200: blockquotes and paragraph formatting
20945 T10293: Use of center tag ruins paragraph formatting
20966 Parsing of overlapping (improperly nested) inline html tags
20968 <span><s>x</span></s>
20970 <p><span><s>x</span></s></span>
20973 <p><span><s>x</s></span>
20978 ### Language variants related tests
20981 Self-link in language variants
20983 title=[[Dunav]] language=sr
20985 Both [[Dunav]] and [[Дунав]] are names for this river.
20987 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
20998 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21000 title=[[Duna]] language=sr
21002 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21004 <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.
21009 Link to a section of a variant of this title shouldn't be parsed as self-link
21011 title=[[Duna]] language=sr
21013 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21015 <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.
21020 Link to pages in language variants
21024 Main Page can be written as [[Маин Паге]]
21026 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21032 Multiple links to pages in language variants
21036 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21038 <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>.
21044 Simple template in language variants
21050 <p>This is a test template
21056 Template with explicit namespace in language variants
21062 <p>This is a test template
21068 Basic test for template parameter in language variants
21072 {{парамтест|param=foo}}
21074 <p>This is a test template with parameter foo
21079 Simple category in language variants
21083 [[Category:МедиаWики Усер'с Гуиде]]
21085 cat=МедиаWики_Усер'с_Гуиде sort=
21087 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21102 ## We used to, but no longer wt2wt this test since the default serializer
21103 ## will normalize all categories to serialize on their own line.
21104 ## This wikitext usage is going to be fairly uncommon in production and
21105 ## selser will take care of preserving formatting in those scenarios.
21107 Don't convert blue categorylinks to another variant (T35210)
21113 [[A]][[Category:分类]]
21117 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
21118 <link rel="mw:PageProp/Category" href="./Category:分类"/>
21122 Stripping -{}- tags (language variants)
21126 Latin proverb: -{Ne nuntium necare}-
21128 <p>Latin proverb: Ne nuntium necare
21134 Prevent conversion with -{}- tags (language variants)
21136 language=sr variant=sr-ec
21138 Latinski: -{Ne nuntium necare}-
21140 <p>Латински: Ne nuntium necare
21146 Prevent conversion of text with -{}- tags (language variants)
21148 language=sr variant=sr-ec
21150 Latinski: -{Ne nuntium necare}-
21152 <p>Латински: Ne nuntium necare
21158 Prevent conversion of links with -{}- tags (language variants)
21160 language=sr variant=sr-ec
21164 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21170 -{}- tags within headlines (within html for parserConvert())
21172 language=sr variant=sr-ec
21176 <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>
21182 Explicit definition of language variant alternatives
21184 language=zh variant=zh-tw
21186 -{zh:China;zh-tw:Taiwan}-, not China
21188 <p>Taiwan, not China
21194 Conversion around HTML tags
21196 language=sr variant=sr-ec
21198 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
21199 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
21202 <span title="ЛаCтин">ски</span>
21208 Explicit session-wise language variant mapping (A flag and - flag)
21210 language=zh variant=zh-tw
21212 Taiwan is not China.
21213 But -{A|zh:China;zh-tw:Taiwan}- is China,
21214 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
21215 and -{China}- is China.
21217 <p>Taiwan is not China.
21218 But Taiwan is Taiwan,
21219 (This should be stripped!)
21220 and China is China.
21225 Explicit session-wise language variant mapping (H flag for hide)
21227 language=zh variant=zh-tw
21229 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
21232 <p>(This should be stripped!)
21238 Adding explicit conversion rule for title (T flag)
21240 language=zh variant=zh-tw showtitle
21242 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
21245 <p>Should be stripped!
21250 Testing that changing the language variant here in the tests actually works
21252 language=zh variant=zh showtitle
21254 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
21257 <p>Should be stripped!
21262 Recursive conversion of alt and title attrs shouldn't clear converter state
21264 language=zh variant=zh-cn showtitle
21266 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
21267 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
21271 Should be stripped<span title="Exclamation">!</span>
21276 T26072: more test on conversion rule for title
21278 language=zh variant=zh-tw showtitle
21280 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
21281 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
21284 <p>This should be stripped!
21285 This won't take interferes with the title rule.
21290 Partly disable title conversion if variant == main language code
21292 language=zh variant=zh title=[[ZH]] showtitle
21294 -{T|zh-cn:CN;zh-tw:TW}-
21302 Partly disable title conversion if variant == main language code, more
21304 language=zh variant=zh title=[[ZH]] showtitle
21314 Raw output of variant escape tags (R flag)
21316 language=zh variant=zh-tw
21318 Raw: -{R|zh:China;zh-tw:Taiwan}-
21320 <p>Raw: zh:China;zh-tw:Taiwan
21325 Nested markup inside raw output of variant escape tags (R flag)
21327 language=zh variant=zh-tw
21329 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
21331 <p>Nested raw: nested Taiwan nested
21336 Templates inside raw output of variant escape tags (R flag)
21338 language=zh variant=zh-tw
21340 Nested raw: -{R|nested {{echo|hi}} templates}-
21342 <p>Nested raw: nested hi templates
21347 Strings evaluating false shouldn't be ignored by Language converter (T51072)
21349 language=zh variant=zh-cn
21351 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
21358 Conversion rules from [numeric-only string] to [something else] (T48634)
21360 language=zh variant=zh-cn
21362 -{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
21369 Bidirectional converter rule entries with an empty value should be ignored (T53551)
21371 language=zh variant=zh-cn
21373 -{H|zh-cn:foo;zh-tw:;}-foobar
21380 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
21382 language=zh variant=zh-cn
21384 -{H|=>zh-cn:foo;}-foobar
21391 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
21393 language=zh variant=zh-cn
21402 Nested using of manual convert syntax
21404 language=zh variant=zh-hk
21406 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
21408 <p>Nested: Hello Hong Kong!
21413 HTML markups with conversion syntax in attribs, nested in other conversion blocks
21415 language=zh variant=zh-cn
21417 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
21419 <p><span title="X">A</span>
21424 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet)
21426 language=zh variant=zh-cn disabled
21428 -{<span title="-{X}-">A</span>}-
21430 <p><span title="X">A</span>
21434 # Since Parsoid is starting to emit canonical wikitext for links,
21435 # [http://example.com http://example.com] will not RT back to that
21438 Proper conversion of text in external links
21440 language=sr variant=sr-ec
21443 http://www.google.com
21444 gopher://www.google.com
21445 [http://www.google.com http://www.google.com]
21446 [gopher://www.google.com gopher://www.google.com]
21447 [https://www.google.com irc://www.google.com]
21448 [ftp://www.google.com www.google.com/ftp://dir]
21449 [//www.google.com www.google.com]
21451 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
21452 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
21453 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
21454 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
21455 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
21456 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
21457 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
21460 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
21461 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
21462 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
21463 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
21464 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
21465 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
21466 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
21470 Do not convert roman numbers to language variants
21472 language=sr variant=sr-ec
21476 <p>Фридрих IV је цар.
21481 Unclosed language converter markup "-{"
21492 Don't convert raw rule "-{R|=>}-" to "=>"
21503 Don't break link parsing if language converter markup is in the caption.
21505 language=sr variant=sr-ec
21507 [[Main Page|-{R|main page}-]]
21509 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
21514 T146304: Don't break template parsing if language converter markup is in the parameter.
21516 language=sr variant=sr-ec
21525 T146305: Don't break image parsing if language converter markup is in the caption.
21529 [[File:Foobar.jpg|thumb|-{R|caption:}-]]
21531 <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>
21534 <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>
21538 T146305: Don't break image parsing if nested language converter markup is in the caption.
21540 language=zh variant=zh-cn
21542 [[File:Foobar.jpg|thumb|-{zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
21544 <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>
21547 <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>
21551 Don't break gallery if language converter markup is inside.
21556 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
21557 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
21560 <ul class="gallery mw-gallery-traditional">
21561 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21562 <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>
21563 <div class="gallerytext">
21564 <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>
21568 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21569 <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>
21570 <div class="gallerytext">
21571 <p>This is a test template
21580 T153135: Don't break list handling if language converter markup is in the item.
21582 language=zh variant=zh-cn
21584 ;-{zh-cn:AAA;zh-tw:BBB}-
21588 <dt>foo:bar</dt></dl>
21592 <dt><span typeof="mw:LanguageVariant" data-mw='{"bidir":[{"l":"zh-cn","t":"AAA"},{"l":"zh-tw","t":"BBB"}],"show":true}'></span></dt>
21593 <dt><span typeof="mw:LanguageVariant" data-mw='{"disabled":true,"show":true,"text":"foo:bar"}'></span></dt>
21597 // Note that parsoid does not protect colons unless language converter
21598 // markup is properly nested, because it is a backtracking parser.
21600 T153135: Unclosed markup in definition list (code coverage)
21602 language=zh variant=zh-cn
21607 <dl><dt><b>foo:bar</dt>
21608 <dt>-{zh-cn:AAA</b></dt></dl>
21612 <dt><b>foo:bar</b></dt>
21620 T153135: Nested language converter markup in definition list (code coverage)
21622 language=zh variant=zh-cn
21624 ;-{zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
21626 <dl><dt>AAA foo:bar bat:baz</dt>
21631 <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>
21637 T153140: Don't break table handling if language converter markup is in the cell.
21639 language=sr variant=sr-ec
21662 T2529: Uncovered bullet
21671 # Plain MediaWiki does not remove empty lists, but tidy actually does.
21672 # Templates in Wikipedia rely on this behavior, as tidy has always been
21673 # enabled there. These tests are normally run *without* tidy, so specify the
21674 # full output here.
21675 # To test realistic parsing behavior, apply a tidy-like transformation to both
21676 # the expected output and your parser's output.
21678 T2529: Uncovered bullet leaving empty list, normally removed by tidy
21680 ******* Foo {{bullet}}
21682 <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>
21688 T2529: Uncovered table already at line-start
21711 T2529: Uncovered bullet in parser function result
21713 * Foo {{lc:{{bullet}} }}
21721 T7678: Double-parsed template argument
21723 {{lc:{{{1}}}|hello}}
21730 T7678: Double-parsed template invocation
21732 {{lc:{{paramtest {{!}} param = hello }} }}
21734 <p>{{paramtest | param = hello }}
21739 Case insensitivity of parser functions for non-ASCII characters (T10143)
21742 title=[[Main Page]]
21744 {{PRVNÍVELKÉ:ěščř}}
21745 {{prvnívelké:ěščř}}
21765 Morwen/13: Unclosed link followed by heading
21772 <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>
21777 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
21784 <h1><span class="mw-headline" id="heading">heading</span></h1>
21789 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
21796 <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>
21811 Paragraphs inside divs (no extra line breaks)
21823 Paragraphs inside divs (extra line break on open)
21838 Paragraphs inside divs (extra line break on close)
21853 Paragraphs inside divs (extra line break on open and close)
21870 Nesting tags, paragraphs on lines which begin with <div>
21872 <div></div><strong>A
21875 <p><strong>A</strong></p>
21876 <p><strong>B</strong></p>
21884 # T8200: <blockquote> should behave like <div> with respect to line breaks
21886 T8200: paragraphs inside blockquotes (no extra line breaks)
21888 <blockquote>Line one
21890 Line two</blockquote>
21892 <blockquote>Line one
21893 Line two</blockquote>
21897 <p>Line one Line two</p>
21902 T8200: paragraphs inside blockquotes (extra line break on open)
21907 Line two</blockquote>
21912 Line two</blockquote>
21917 Line two</blockquote>
21921 T8200: paragraphs inside blockquotes (extra line break on close)
21923 <blockquote>Line one
21928 <blockquote>Line one
21941 T8200: paragraphs inside blockquotes (extra line break on open and close)
21963 Paragraphs inside blockquotes/divs (no extra line breaks)
21965 <blockquote><div>Line one
21967 Line two</div></blockquote>
21969 <blockquote><div>Line one
21970 Line two</div></blockquote>
21975 Paragraphs inside blockquotes/divs (extra line break on open)
21980 Line two</div></blockquote>
21985 Line two</div></blockquote>
21990 Paragraphs inside blockquotes/divs (extra line break on close)
21992 <blockquote><div>Line one
21995 </div></blockquote>
21997 <blockquote><div>Line one
22000 </div></blockquote>
22005 Paragraphs inside blockquotes/divs (extra line break on open and close)
22011 </div></blockquote>
22017 </div></blockquote>
22022 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
22024 wgLinkHolderBatchSize=0
22030 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
22031 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
22032 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
22037 Free external link invading image caption
22039 [[Image:Foobar.jpg|thumb|http://x|hello]]
22041 <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>
22046 T17196: localised external link numbers
22050 [http://en.wikipedia.org/]
22052 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
22055 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
22059 Multibyte character in padleft
22061 {{padleft:-Hello|7|Æ}}
22068 Multibyte character in padright
22070 {{padright:Hello-|7|Æ}}
22077 formatdate parser function
22079 {{#formatdate:2009-03-24}}
22081 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
22086 formatdate parser function, with default format
22088 {{#formatdate:2009-03-24|mdy}}
22090 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
22095 Spacing of numbers in formatted dates
22097 {{#formatdate:January 15}}
22099 <p><span class="mw-formatted-date" title="01-15">January 15</span>
22104 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
22106 language=nl title=[[MediaWiki:Common.css]]
22108 {{#formatdate:2009-03-24|dmy}}
22110 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
22123 Edit comment with link
22127 I like the [[Main Page]] a lot
22129 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
22133 Edit comment with link and link text
22137 I like the [[Main Page|best pages]] a lot
22139 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
22143 Edit comment with link and link text with suffix
22147 I like the [[Main Page|best page]]s a lot
22149 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
22153 Edit comment with section link (non-local, eg in history list)
22155 comment title=[[Main Page]]
22157 /* External links */ removed bogus entries
22159 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
22163 Edit comment with section link and text before it (non-local, eg in history list)
22165 comment title=[[Main Page]]
22167 pre-comment text /* External links */ removed bogus entries
22169 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>
22173 Edit comment with section link (local, eg in diff view)
22175 comment local title=[[Main Page]]
22177 /* External links */ removed bogus entries
22179 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
22183 Edit comment with subpage link (T16080)
22187 title=[[Subpage test]]
22189 Poked at a [[/subpage]] here...
22191 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
22195 Edit comment with subpage link and link text (T16080)
22199 title=[[Subpage test]]
22201 Poked at a [[/subpage|neat little page]] here...
22203 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
22207 Edit comment with bogus subpage link in non-subpage NS (T16080)
22210 title=[[Subpage test]]
22212 Poked at a [[/subpage]] here...
22214 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
22218 Edit comment with bare anchor link (local, as on diff)
22222 title=[[Main Page]]
22226 <a href="#section">#section</a>
22230 Edit comment with bare anchor link (non-local, as on history)
22233 title=[[Main Page]]
22237 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
22241 Anchor starting with underscore
22247 <p><a href="#_ref">One</a>
22250 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
22254 Id starting with underscore
22256 <div id="_ref"></div>
22258 <div id="_ref"></div>
22263 Edit comment with link with more than one pipe (T99346)
22267 [[Main Page|Many|pipes]]
22269 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
22273 Complex edit comment with link with more than one pipe (T99346)
22277 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
22279 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..."
22283 Space normalisation on autocomment (T24784)
22286 title=[[Main Page]]
22288 /* __hello__world__ */
22290 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
22294 percent-encoding and + signs in comments (T28410)
22298 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
22300 <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>
22303 # Parsoid doesn't support this yet: see T75581
22304 # but it *should* omit the 'src' attribute if the image is bad.
22305 # PHP side of tests was disabled in
22306 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
22307 # because of issues in the PHP parserTests infrastructure
22308 # (but the output below is indeed what the PHP side emits)
22310 Bad images - basic functionality
22313 !! DISABLED/html/php
22315 <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>
22319 Bad images - T18039: text after bad image disappears
22324 !! DISABLED/html/php
22330 <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>
22335 Verify that displaytitle works (T24501) no displaytitle
22339 wgAllowDisplayTitle=true
22340 wgRestrictDisplayTitle=false
22342 this is not the the title
22345 <p>this is not the the title
22350 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
22355 wgAllowDisplayTitle=true
22356 wgRestrictDisplayTitle=false
22358 this is not the the title
22359 {{DISPLAYTITLE:whatever}}
22362 <p>this is not the the title
22367 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
22372 wgAllowDisplayTitle=true
22373 wgRestrictDisplayTitle=true
22375 this is not the the title
22376 {{DISPLAYTITLE:whatever}}
22379 <p>this is not the the title
22384 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
22389 wgAllowDisplayTitle=true
22390 wgRestrictDisplayTitle=true
22392 this is not the the title
22393 {{DISPLAYTITLE:screen}}
22396 <p>this is not the the title
22401 Verify that displaytitle works (T24501) AllowDisplayTitle=false
22406 wgAllowDisplayTitle=false
22408 this is not the the title
22409 {{DISPLAYTITLE:screen}}
22412 <p>this is not the the title
22413 <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>
22418 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
22423 wgAllowDisplayTitle=false
22425 this is not the the title
22428 <p>this is not the the title
22433 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
22438 wgAllowDisplayTitle=true
22439 wgRestrictDisplayTitle=true
22441 this is not the the title
22442 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
22444 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
22445 <p>this is not the the title
22450 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
22455 wgAllowDisplayTitle=true
22456 wgRestrictDisplayTitle=true
22458 this is not the the title
22459 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
22461 <span style="color: red;">s</span>creen
22462 <p>this is not the the title
22467 Page status indicators: Empty name is invalid
22471 <indicator name=" "></indicator>
22472 <indicator></indicator>
22474 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
22475 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
22480 Page status indicators: Weird syntaxes that are okay
22484 <indicator name="empty" />
22485 <indicator name="name"></indicator>
22494 Page status indicators: Torture test
22498 <indicator name="01">hello world</indicator>
22499 <indicator name="02">[[Main Page]]</indicator>
22500 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
22501 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
22502 <indicator name="05">* foo
22504 <indicator name="06"><nowiki>foo</nowiki></indicator>
22505 <indicator name="07"> Preformatted</indicator>
22506 <indicator name="08"><div>Broken tag</indicator>
22507 <indicator name="09">{| class=wikitable
22510 <indicator name="10">Two
22512 paragraphs</indicator>
22515 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22516 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" />
22517 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>
22518 05=<ul><li> foo</li>
22522 07=<pre>Preformatted
22524 08=<div>Broken tag</div>
22526 09=<table class="wikitable">
22543 preload: check <noinclude> and <includeonly>
22547 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
22553 preload: check <onlyinclude>
22557 Goodbye <onlyinclude>Hello world</onlyinclude>
22563 preload: can pass tags through if we want to
22567 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
22569 <includeonly>Hello world</includeonly>
22573 preload: check that it doesn't try to do tricks
22577 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
22579 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
22583 Play a bit with r67090 and T5158
22585 <div style="width:50% !important"> </div>
22586 <div style="width:50% !important"> </div>
22587 <div style="width:50% !important"> </div>
22588 <div style="border : solid;"> </div>
22590 <div style="width:50% !important"> </div>
22591 <div style="width:50% !important"> </div>
22592 <div style="width:50% !important"> </div>
22593 <div style="border : solid;"> </div>
22596 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
22597 <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>
22598 <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>
22599 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
22604 HTML5 data attributes
22606 <span data-foo="bar">Baz</span>
22607 <p data-abc-def_hij="">Quuz</p>
22609 <p><span data-foo="bar">Baz</span>
22611 <p data-abc-def_hij="">Quuz</p>
22614 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
22615 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
22619 Strip reserved data attributes
22621 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
22623 <div data-ok="fred">d</div>
22626 <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>
22630 percent-encoding and + signs in internal links (T28410)
22632 [[User:+%]] [[Page+title%]]
22633 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
22634 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
22635 [[%33%45]] [[%33%45+]]
22637 <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>
22638 <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>
22639 <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>
22640 <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>
22643 <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>
22644 <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>
22645 <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>
22646 <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>
22650 Special characters in embedded file links (T29679)
22652 [[File:Contains & ampersand.jpg]]
22653 [[File:Does not exist.jpg|Title with & ampersand]]
22655 <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>
22656 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
22659 <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>
22660 <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>
22664 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
22666 Text's been normalized?
22668 <p>Text's been normalized?
22673 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
22675 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
22677 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
22682 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
22684 [http://www.example.org/ ideograms]
22686 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
22691 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
22693 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
22695 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
22719 T33098 Template which includes system messages which includes the template
22723 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22724 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22729 T33490 Turkish: ucfirst 'blah'
22740 T33490 Turkish: ucfirst 'ix'
22751 T33490 Turkish: lcfirst 'BLAH'
22762 T33490 Turkish: ucfırst (with a dotless i)
22768 <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>
22773 T33490 ucfırst (with a dotless i) with English language
22779 <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>
22783 # Note that Parsoid doesn't emit an explicit TOC.
22784 # Note also that the html2wt direction tends to emit an extra newline
22785 # between the __TOC__ magicword and the first heading unless *both*
22786 # the <meta> and the <h2> have a data-parsoid attribute set (even if
22790 T28375: TOC with italics
22792 title=[[Main Page]]
22795 == ''Lost'' episodes ==
22797 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22799 <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>
22803 <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>
22806 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22807 <h2 data-parsoid='{}'> <i>Lost</i> episodes </h2>
22811 T28375: TOC with bold
22813 title=[[Main Page]]
22816 == '''should be bold''' then normal text ==
22818 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22820 <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>
22824 <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>
22827 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22828 <h2 data-parsoid='{}'> <b>should be bold</b> then normal text </h2>
22832 T35845: Headings become cursive in TOC when they contain an image
22834 title=[[Main Page]]
22837 == Image [[Image:foobar.jpg]] ==
22839 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22841 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
22845 <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>
22848 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22849 <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>
22853 T35845 (2): Headings become bold in TOC when they contain a blockquote
22855 title=[[Main Page]]
22858 == <blockquote>Quote</blockquote> ==
22860 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22862 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22866 <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>
22870 <div id="toc" class="toc">
22871 <div class="toctitle">
22875 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22879 <h2><span class="mw-headline" id="Quote"></span></h2>
22881 <p><span class="mw-headline" id="Quote">Quote</span></p>
22883 <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>
22885 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22886 <h2 data-parsoid='{}'> <blockquote>Quote</blockquote> </h2>
22890 Unclosed tags in TOC
22892 title=[[Main Page]]
22896 <small>Hanc marginis exiguitas non caperet.</small>
22899 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22901 <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>
22905 <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>
22906 <p><small>Hanc marginis exiguitas non caperet.</small>
22910 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22911 <h2 data-parsoid='{}'> Proof: 2 < 3 </h2>
22912 <p><small>Hanc marginis exiguitas non caperet.</small>
22917 Multiple tags in TOC
22920 == <i>Foo</i> <b>Bar</b> ==
22922 == <i>Foo</i> <blockquote>Bar</blockquote> ==
22924 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22926 <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>
22927 <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>
22931 <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>
22932 <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>
22936 <div id="toc" class="toc">
22937 <div class="toctitle">
22941 <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>
22942 <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>
22946 <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>
22947 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
22949 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
22951 <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>
22953 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22954 <h2 data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b> </h2>
22955 <h2> <i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote> </h2>
22958 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
22959 # html5 tag parsing.
22961 Tags with parameters in TOC
22966 == <sup class="in-h2">Hello</sup> ==
22968 == <sup class="a > b">Evilbye</sup> ==
22970 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22972 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
22973 <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>
22977 <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>
22978 <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>
22981 <meta property="mw:PageProp/toc" />
22982 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
22984 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
22988 span tags with directionality in TOC
22991 == <span dir="ltr">C++</span> ==
22993 == <span dir="rtl">זבנג!</span> ==
22995 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
22997 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
22999 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
23001 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23003 <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>
23004 <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>
23005 <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>
23006 <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>
23007 <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>
23011 <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>
23012 <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>
23013 <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>
23014 <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>
23015 <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>
23018 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23019 <h2 data-parsoid='{}'> <span dir="ltr">C++</span> </h2>
23020 <h2> <span dir="rtl">זבנג!</span> </h2>
23021 <h2> <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> </h2>
23022 <h2> <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> </h2>
23023 <h2> <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> </h2>
23027 T74884: bdi element in ToC
23030 == <bdi>test</bdi> ==
23032 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23034 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
23038 <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>
23041 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23042 <h2 data-parsoid='{}'> <bdi>test</bdi> </h2>
23046 T35715: s/strike element in ToC
23049 == <s>test</s> test <strike>test</strike> ==
23051 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23053 <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>
23057 <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>
23060 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23061 <h2 data-parsoid='{}'> <s>test</s> test <strike>test</strike> </h2>
23064 # Note that the html output does not have the <p></p>, but the
23065 # html+tidy output *does*. This is because the empty <p></p> is
23066 # removed by the sanitizer, but only when tidy is *not* enabled (!).
23068 Empty <p> tag in TOC, removed by Sanitizer (T92892)
23073 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23075 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
23079 <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>
23083 <div id="toc" class="toc">
23084 <div class="toctitle">
23088 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
23092 <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>
23094 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23095 <h2 data-parsoid='{}'> x </h2>
23101 == {{int:headline_sample}} ==
23105 T34057: Title needed when expanding <h> nodes.
23107 title=[[Main Page]]
23111 <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>
23116 Strip marker in urlencode
23118 {{urlencode:x<nowiki/>y}}
23119 {{urlencode:x<nowiki/>y|wiki}}
23120 {{urlencode:x<nowiki/>y|path}}
23121 {{urlencode:x<pre id="one">two</pre>y}}
23149 Strip marker in formatNum
23151 {{formatnum:1<nowiki/>2}}
23152 {{formatnum:1<nowiki/>2|R}}
23160 Check noCommafy in formatNum
23164 {{formatnum:123456.78}}
23165 {{formatnum:123456.78|NOSEP}}
23173 Wrong option for formatNum (T58199)
23175 {{formatnum:1,234.56|Random}}
23176 {{formatnum:1,234.56|EVERYTHING}}
23177 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
23186 Strip marker in grammar
23190 {{grammar:elative|foo<nowiki/>bar}}
23197 Strip marker in padleft
23199 {{padleft:|2|x<nowiki/>y}}
23206 Strip marker in padright
23208 {{padright:|2|x<nowiki/>y}}
23215 Strip marker in anchorencode
23217 {{anchorencode:x<nowiki/>y}}
23224 nowiki inside link inside heading (T20295)
23226 ==[[foo|x<nowiki>y</nowiki>z]]==
23228 <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>
23233 new support for bdi element (T33817)
23235 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
23237 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
23242 Ignore pipe between table row attributes
23246 |- id=foo | style='color: red'
23254 <tr id="foo" style="color: red">
23261 Language parser function
23270 Padleft and padright as substr
23272 {{padleft:|3|abcde}}
23273 {{padright:|3|abcde}}
23281 Special parser function
23283 {{#special:RandomPage}}
23284 {{#special:BaDtItLe}}
23285 {{#special:Foobar}}
23294 T36939 - Case insensitive link parsing ([HttP://])
23296 [HttP://MediaWiki.Org/]
23298 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
23301 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
23305 T36939 - Case insensitive link parsing ([HttP:// title])
23307 [HttP://MediaWiki.Org/ MediaWiki]
23309 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
23314 T36939 - Case insensitive link parsing (HttP://)
23316 HttP://MediaWiki.Org/
23318 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
23321 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
23339 <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>
23340 <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>
23341 <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>
23342 <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>
23343 <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>
23349 ### Parsoid-specific tests
23350 ### Parsoid-PHP parser incompatibilities
23353 1. SOL-sensitive wikitext tokens as template-args
23355 parsoid=wt2html,wt2wt
23361 <span about="#mwt1" typeof="mw:Transclusion">
23362 </span><ul about="#mwt1"><li>a</li>
23364 <span about="#mwt2" typeof="mw:Transclusion">
23365 </span><ol about="#mwt2"><li>a</li>
23367 <span about="#mwt3" typeof="mw:Transclusion">
23368 </span><dl about="#mwt3"><dd>a</dd>
23372 #### -----------------------------------------------------------------
23373 #### Parsoid-specific functionality tests
23374 #### -----------------------------------------------------------------
23376 # T65642/T68749: Formatting elt fixup around images is cleaned up.
23377 # We know wt2wt will fail, but we expect selser to pass.
23378 # Due to the nature of our testing, wt2wt and selser tests will enter the
23379 # blacklist and we'll catch selser regressions based on changes to the
23380 # blacklist entries for selser tests.
23382 1. Bad treebuilder fixup of formatting elt is cleaned up
23384 parsoid=wt2html,wt2wt
23389 [[Image:Foobar.jpg|right|Test]]
23396 <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>
23403 2. Bad treebuilder fixup of formatting elt is cleaned up
23405 parsoid=wt2html,wt2wt
23407 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
23409 <small>[[Image:Foobar.jpg|right|300px]]</small>
23413 <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>
23415 <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>
23419 3. Bad treebuilder fixup of formatting elt is cleaned up
23421 parsoid=wt2html,wt2wt
23423 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
23425 <p><small><b>foo</b></small></p>
23426 <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>
23427 <p><small><b>bar</b></small></p>
23431 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
23433 parsoid=wt2html,wt2wt
23435 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
23437 <p><b><small></small></b></p>
23438 <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>
23442 #### ----------------------------------------------------------------
23443 #### Parsoid-only testing of Parsoid's impl of LST
23444 #### Not implemented yet, see
23445 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
23446 #### ----------------------------------------------------------------
23448 ## We still need to support serializing the older format while content is stored.
23450 LST Sections: Backwards compatibility
23453 "suppressErrors": true,
23454 "modes": ["html2wt"]
23457 <section begin="2011-05-16" />
23458 <section end="2014-04-10 (MW 1.23wmf22)" />
23460 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
23461 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
23465 LST Sections: Newfangled approach
23467 <section begin="2011-05-16" />
23468 <section end="2014-04-10 (MW 1.23wmf22)" />
23470 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
23472 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
23476 #--------- Test stripping of empty nodes in template content ----------
23479 Empty LI and TR nodes should be stripped from template content
23484 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
23488 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
23501 Empty LI and TR nodes should not be stripped from top-level content
23528 Empty TR nodes should not be stripped if they have any attributes set
23530 {{EmptyTRWithHTMLAttrTest}}
23532 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
23533 <tr align="center"></tr>
23534 <tr><td>foo</td></tr>
23535 <tr align="center"></tr>
23536 <tr><td>bar</td></tr>
23540 #### ----------------------------------------------------------------
23541 #### The following section of tests are primarily to test
23542 #### wikitext escaping capabilities of Parsoid. Given that
23543 #### escaping can be done any number of ways, the wikitext (input)
23544 #### is always adjusted to reflect how Parsoid adds nowiki
23547 #### We are marking several tests as parsoid-only since the
23548 #### HTML in the result section is different from what the
23549 #### PHP parser generates for it.
23550 #### ----------------------------------------------------------------
23553 #### --------------- Headings ---------------
23555 #### 1. Nested inside html <h1>=foo=</h1>
23556 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
23557 #### 3. Nested inside html with wikitext split by html tags
23558 #### 4. No escape needed
23559 #### 5. Empty headings <h1></h1>
23560 #### 6. Heading chars in SOL context
23561 #### ----------------------------------------
23563 Headings: 0. Unnested
23573 <p>=foo<i>a</i>=</p>
23575 <nowiki>=foo=</nowiki>
23577 <nowiki> </nowiki>=foo=
23579 <nowiki>=foo=</nowiki>
23581 =foo''a''<nowiki>=</nowiki>
23584 # New headings and existing headings are handled differently
23586 Headings: 1. Nested inside html
23594 <h1 data-parsoid=''>=foo=</h1>
23595 <h2 data-parsoid=''>=foo=</h2>
23596 <h3 data-parsoid=''>=foo=</h3>
23597 <h4 data-parsoid=''>=foo=</h4>
23598 <h5 data-parsoid=''>=foo=</h5>
23599 <h6 data-parsoid=''>=foo=</h6>
23607 =<nowiki>=foo=</nowiki>=
23608 ==<nowiki>=foo=</nowiki>==
23609 ===<nowiki>=foo=</nowiki>===
23610 ====<nowiki>=foo=</nowiki>====
23611 =====<nowiki>=foo=</nowiki>=====
23612 ======<nowiki>=foo=</nowiki>======
23617 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
23626 <nowiki>*</nowiki>bar
23632 <nowiki>=bar=</nowiki>
23636 Headings: 3. Nested inside html with wikitext split by html tags
23640 <h1>=<b>bold</b>foo=</h1>
23642 = ='''bold'''foo= =
23646 Headings: 4a. No escaping needed (testing just h1 and h2)
23657 <h1><i>=</i>foo=</h1>
23677 Headings: 4b. No escaping needed (inside p-tags)
23692 Headings: 5. Empty headings
23696 <h1 data-parsoid='{}'></h1>
23698 <h2 data-parsoid='{}'></h2>
23700 <h3 data-parsoid='{}'></h3>
23702 <h4 data-parsoid='{}'></h4>
23704 <h5 data-parsoid='{}'></h5>
23706 <h6 data-parsoid='{}'></h6>
23716 =====<nowiki/>=====
23718 ======<nowiki/>======
23722 Headings: 6a. Heading chars in SOL context (with trailing spaces)
23732 <nowiki>=a=</nowiki>
23734 <nowiki>=a=</nowiki>
23736 <nowiki>=a=</nowiki>
23740 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23753 <nowiki>=a=</nowiki>
23756 <nowiki>=a=</nowiki>
23759 <nowiki>=a=</nowiki>
23764 Headings: 6c. Heading chars in SOL context (leading newline break)
23772 <nowiki>=b=</nowiki>
23776 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23780 <!--c0--><p>=a=</p>
23782 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23784 <!--c0--><nowiki>=a=</nowiki>
23786 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23790 Headings: 6d. Heading chars in SOL context (No escaping needed)
23800 Headings: 7. Insert a newline between new content and headings
23806 <h2 data-parsoid='{}'>A</h2>
23807 <p data-parsoid='{}'>a</p>
23817 #### --------------- Lists ---------------
23818 #### 0. Outside nests (*foo, etc.)
23819 #### 1. Nested inside html <ul><li>*foo</li></ul>
23820 #### 2. Inside definition lists
23821 #### 3. Only bullets at start should be escaped
23822 #### 4. No escapes needed
23823 #### 5. No unnecessary escapes
23824 #### 6. Escape bullets in SOL position
23825 #### 7. Escape bullets in a multi-line context
23826 #### ----------------------------------------
23829 Lists: 0. Outside nests
23839 <nowiki>*</nowiki>foo
23841 <nowiki>#</nowiki>foo
23843 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23846 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23847 ## to test wikitext escaping, and insignificant whitespace diffs
23848 ## cause PHP parser tests to barf
23850 Lists: 1. Nested inside html (No unnecessary escapes)
23859 <li data-parsoid='{}'>*foo</li>
23860 <li data-parsoid='{}'>#foo</li>
23861 <li data-parsoid='{}'>:foo</li>
23862 <li data-parsoid='{}'>;foo</li>
23870 <li data-parsoid='{}'>*foo</li>
23871 <li data-parsoid='{}'>#foo</li>
23872 <li data-parsoid='{}'>:foo</li>
23873 <li data-parsoid='{}'>;foo</li>
23880 *<nowiki>*foo</nowiki>
23881 *<nowiki>#foo</nowiki>
23882 *<nowiki>:foo</nowiki>
23883 *<nowiki>;foo</nowiki>
23889 #<nowiki>*foo</nowiki>
23890 #<nowiki>#foo</nowiki>
23891 #<nowiki>:foo</nowiki>
23892 #<nowiki>;foo</nowiki>
23896 Lists: 2. Inside definition lists
23900 <dl><dt>;foo</dt></dl>
23901 <dl><dt>:foo</dt></dl>
23904 <dl><dd>:foo</dd></dl>
23908 ; <nowiki>:foo</nowiki>
23910 ; <nowiki>:foo</nowiki>
23917 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23923 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23927 *<nowiki>*foo</nowiki>''it''*bar
23931 Lists: 4. No escapes needed
23944 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23948 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23962 Lists: 5. No unnecessary escapes
23966 <ul><li> bar <span>[[foo]]</span></li></ul>
23967 <ul><li> =bar <span>[[foo]]</span></li></ul>
23968 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23969 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23970 <ul><li> =bar <span>foo]]</span>=</li></ul>
23971 <ul><li> <s></s>: a</li></ul>
23972 <ul><li> <i>* foo</i></li></ul>
23975 * bar <span><nowiki>[[foo]]</nowiki></span>
23977 * =bar <span><nowiki>[[foo]]</nowiki></span>
23979 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23981 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23983 * =bar <span>foo]]</span>=
23991 Lists: 6. Escape bullets in SOL position
23995 <p><!--cmt-->*foo</p>
23997 <!--cmt--><nowiki>*</nowiki>foo
24001 Lists: 7. Escape bullets in a multi-line context
24010 <nowiki>*</nowiki>b
24014 Lists: 8. Escape colons only if not present in tags
24018 <dl><dt>a:b<i>c:d</i></dt></dl>
24020 ; <nowiki>a:b</nowiki>''c:d''
24023 #### --------------- HRs ---------------
24024 #### 1. Single line
24025 #### -----------------------------------
24028 HRs: 1. Single line
24036 ----<nowiki>----</nowiki>
24041 #### --------------- Tables ---------------
24042 #### 1a. Simple example
24043 #### 1b. No escaping needed (!foo)
24044 #### 1c. No escaping needed (|foo)
24045 #### 1d. No escaping needed (|}foo)
24047 #### 2a. Nested in td (<td>foo|bar</td>)
24048 #### 2b. Nested in td (<td>foo||bar</td>)
24049 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
24051 #### 3a. Nested in th (<th>foo!bar</th>)
24052 #### 3b. Nested in th (<th>foo!!bar</th>)
24053 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
24057 #### 4c. No escaping needed
24058 #### --------------------------------------
24061 Tables: 1a. Simple example
24069 <nowiki>{|</nowiki>
24074 Tables: 1b. No escaping needed
24085 Tables: 1c. No escaping needed
24096 Tables: 1d. No escaping needed
24107 Tables: 2a. Nested in td
24112 <td>foo|bar</td></tr>
24113 <tr><td>x<div>a|b</div></td>
24117 |<nowiki>foo|bar</nowiki>
24119 |x<div><nowiki>a|b</nowiki></div>
24135 Tables: 2b. Nested in td
24141 <td>a<i>b||c</i></td>
24142 <td>a<i><div>b||c</div></i></td>
24143 </tr></tbody></table>
24146 |<nowiki>foo||bar</nowiki>
24147 |a''<nowiki>b||c</nowiki>''
24148 |a''<div><nowiki>b||c</nowiki></div>''
24157 <td>a<i><div>b||c</div></i>
24163 Tables: 2c. Nested in td -- no escaping needed
24179 Tables: 3a. Nested in th
24195 Tables: 3b. Nested in th
24200 <tr><th>foo!!bar</th>
24201 <th><i>foo|bar</i></th>
24202 <th><i>foo!!bar</i></th>
24203 <th><i><span>foo!!bar</span></i></th>
24204 </tr></tbody></table>
24207 !<nowiki>foo!!bar</nowiki>
24208 !''<nowiki>foo|bar</nowiki>''
24209 !''<nowiki>foo!!bar</nowiki>''
24210 !''<span><nowiki>foo!!bar</nowiki></span>''
24219 <th><i>foo!!bar</i>
24221 <th><i><span>foo!!bar</span></i>
24227 Tables: 3c. Nested in th
24232 <tr><th>foo||bar</th>
24233 <th><span typeof="mw:Nowiki">foo||bar</span></th>
24234 </tr></tbody></table>
24237 !<nowiki>foo||bar</nowiki>
24238 !<nowiki>foo||bar</nowiki>
24251 Tables: 4a. Escape -
24267 |<nowiki>-bar</nowiki>
24272 Tables: 4b. Escape +
24288 |<nowiki>+bar</nowiki>
24293 Tables: 4c. No escaping needed
24298 <tr><td>foo-bar</td><td>foo+bar</td></tr>
24299 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
24305 <div>a|b</div></td>
24350 Tables: 4d. No escaping needed
24355 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
24356 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
24357 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
24368 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
24378 T97430: Don't emit empty nowiki pairs around marker meta tags
24382 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
24383 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
24385 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
24386 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
24390 Unclosed xmlish element in table line shouldn't eat end delimiters
24395 <tbody><tr><td> <foo</td>
24396 <td> bar></td></tr>
24413 #### --------------- Links ----------------
24414 #### 1. Quote marks in link text
24415 #### 2. Wikilinks: Escapes needed
24416 #### 3. Wikilinks: No escapes needed
24417 #### 4. Extlinks: Escapes needed
24418 #### 5. Extlinks: No escapes needed
24419 #### --------------------------------------
24421 Links 1. WikiLinks: No escapes needed
24425 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
24426 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
24427 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
24431 [[Foo|x [Foobar] x]]
24433 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
24434 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
24435 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
24440 Links 2. WikiLinks: Escapes needed
24444 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
24445 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
24446 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
24447 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
24448 <a href="Foo" rel="mw:WikiLink">|Bar</a>
24449 <a href="Foo" rel="mw:WikiLink">]]bar</a>
24450 <a href="Foo" rel="mw:WikiLink">[[bar</a>
24451 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
24452 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
24453 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
24455 [[Foo|<nowiki>Foobar]</nowiki>]]
24456 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
24457 [[Foo|<nowiki>[[Bar]]</nowiki>]]
24458 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
24459 [[Foo|<nowiki>|Bar</nowiki>]]
24460 [[Foo|<nowiki>]]bar</nowiki>]]
24461 [[Foo|<nowiki>[[bar</nowiki>]]
24462 [[Foo|<nowiki>x [[ y</nowiki>]]
24463 [[Foo|<nowiki>x ]] y</nowiki>]]
24464 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
24466 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
24467 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
24468 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
24469 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
24470 <a href="/wiki/Foo" title="Foo">|Bar</a>
24471 <a href="/wiki/Foo" title="Foo">]]bar</a>
24472 <a href="/wiki/Foo" title="Foo">[[bar</a>
24473 <a href="/wiki/Foo" title="Foo">x [[ y</a>
24474 <a href="/wiki/Foo" title="Foo">x ]] y</a>
24475 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
24480 Links 3. WikiLinks: No escapes needed
24484 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
24485 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
24490 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
24491 <a href="/wiki/Foo" title="Foo">foo|bar</a>
24496 Links 4. ExtLinks: Escapes needed
24500 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
24501 <a rel="mw:ExtLink" href="http://google.com">google]</a>
24502 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
24503 <p>[http://google.com]</p>
24504 <p>[http://google.com google]</p>
24505 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
24506 <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>
24508 [http://google.com <nowiki>[google]</nowiki>]
24509 [http://google.com <nowiki>google]</nowiki>]
24510 [http://google.com <nowiki>goog] le</nowiki>]
24512 <nowiki>[http://google.com]</nowiki>
24514 <nowiki>[http://google.com google]</nowiki>
24516 [http://google.com<nowiki>]</nowiki>
24518 [{{echo|http://google.com}}<nowiki>]</nowiki>
24520 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
24521 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
24522 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
24523 </p><p>[http://google.com]
24524 </p><p>[http://google.com google]
24525 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24526 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24531 Links 5. ExtLinks: No escapes needed
24535 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
24536 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
24538 [http://google.com [google]
24540 [[http://google.com]]
24542 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
24543 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
24548 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
24552 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
24553 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
24554 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
24555 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
24556 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
24557 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
24558 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24559 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
24560 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24561 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
24562 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
24563 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
24564 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
24567 x<nowiki/>http://example.com<nowiki/>y
24568 http://example.com<nowiki/>?x
24569 http://example.com<nowiki/>&x
24570 http://example.com<nowiki/>'x
24571 http://example.com<nowiki/>,x
24572 http://example.com<nowiki/>.x
24573 http://example.com<nowiki/>;x
24574 http://example.com<nowiki/>:x
24575 http://example.com<nowiki/>;x
24576 http://example.com<nowiki/>!x
24577 http://example.com<nowiki/>=x
24578 http://example.com<nowiki/>(x)
24579 http://example.com(x<nowiki/>)
24583 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
24588 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
24590 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
24591 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
24592 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
24593 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
24594 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
24600 "http://example.com"
24601 (http://example.com)
24602 (http://example.com) foo
24603 http://example.com,
24604 http://example.com, foo
24607 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
24609 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
24610 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
24611 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
24612 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
24613 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
24618 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
24622 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
24623 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
24625 http://example.com.,;:!?\
24626 -http://example.com:
24628 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
24629 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
24634 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
24638 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
24639 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
24640 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
24644 X<nowiki/>RFC 123<nowiki/>y
24648 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
24652 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
24653 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
24654 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
24661 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
24662 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
24663 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
24668 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
24672 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
24673 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24674 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24678 X<nowiki/>PMID 123<nowiki/>y
24682 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
24686 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
24687 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
24688 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
24695 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
24696 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
24697 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
24702 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
24706 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
24707 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
24708 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
24711 ISBN 1234567890<nowiki/>1
24712 ISBN 1234567890<nowiki/>x
24713 a<nowiki/>ISBN 1234567890<nowiki/>b
24717 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
24721 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
24725 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
24730 Links 14. Protect link-like plain text. (Parsoid bug T78425)
24734 <p>this is not a link: http://example.com
24737 this is not a link: <nowiki>http://example.com</nowiki>
24741 Links 15. Link trails can't become link prefixes.
24746 <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>
24748 [[Söfnuður]]-[[00]]
24750 <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>
24754 #### --------------- Quotes ---------------
24755 #### 1. Quotes inside <b> and <i>
24756 #### 2. Link fragments separated by <i> and <b> tags
24757 #### 3. Link fragments inside <i> and <b>
24758 #### 4. No escaping needed
24759 #### --------------------------------------
24761 1a. Quotes inside <b> and <i>
24772 <b>foo'<i>bar'</i>baz</b>
24781 <i>fools'<span> errand</span></i>
24782 <i><span>fool</span>'s errand</i>
24783 '<i>foo</i> bar '<i>baz</i>
24784 a|!*#-:;+-~[]{}b'<i>x</i>
24788 ''<nowiki>''foo''</nowiki>''
24789 ''<nowiki>'''foo'''</nowiki>''
24791 '''<nowiki/>'foo''''
24792 '''<nowiki>''foo''</nowiki>'''
24793 '''<nowiki>'''foo'''</nowiki>'''
24794 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24795 '''foo'''<nowiki/>'s
24801 '''foo'''<nowiki/>'
24802 ''''foo'''<nowiki/>'
24803 ''fools'<span> errand</span>''
24804 ''<span>fool</span>'s errand''
24805 '<nowiki/>''foo'' bar '''baz''
24806 a|!*#-:;+-~[]{}b'''x''
24810 1b. Quotes inside <b> and <i> with other tags on same line
24814 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24815 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24816 <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>
24817 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24818 '<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>
24819 '<i>foo</i> <div title="name">test</div>
24820 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24821 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24822 <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>
24825 '''a'' foo ''[[bar]]''
24826 ''a''' foo ''[[bar]]''
24827 ''a''' foo '''{{echo|[[bar]]}}'''
24828 [[foo]] x'''[[bar]]''
24829 '''foo'' <ref>test</ref>
24830 '''foo'' <div title="name">test</div>
24831 '''foo'' and <br> bar
24836 2. Link fragments separated by <i> and <b> tags
24840 <p>[[<i>foo</i>hello]]</p>
24841 <p>[[<b>foo</b>hello]]</p>
24843 [[''foo''<nowiki>hello]]</nowiki>
24845 [['''foo'''<nowiki>hello]]</nowiki>
24848 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24849 # this is one of the shortcomings of this format
24851 3. Link fragments inside <i> and <b>
24855 <p><i>[[foo</i>]]</p>
24856 <p><b>[[foo</b>]]</p>
24858 ''[[foo''<nowiki>]]</nowiki>
24860 '''[[foo'''<nowiki>]]</nowiki>
24864 4. No escaping needed
24868 <p>'<span><i>bar</i></span>'
24869 '<span><b>bar</b></span>'
24873 '<span>''bar''</span>'
24874 '<span>'''bar'''</span>'
24878 #### ----------- Paragraphs ---------------
24879 #### 1. No unnecessary escapes
24880 #### --------------------------------------
24883 1. No unnecessary escapes
24887 <p>bar <span>[[foo]]</span>
24888 </p><p>=bar <span>[[foo]]</span>
24889 </p><p>[[bar <span>[[foo]]</span>
24890 </p><p>]]bar <span>[[foo]]</span>
24891 </p><p>=bar <span>foo]]</span>=
24894 bar <span><nowiki>[[foo]]</nowiki></span>
24896 =bar <span><nowiki>[[foo]]</nowiki></span>
24898 [[bar <span><nowiki>[[foo]]</nowiki></span>
24900 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24902 =bar <span>foo]]</span><nowiki>=</nowiki>
24905 #### ----------------------- PRE --------------------------
24906 #### 1. Leading whitespace in SOL context should be escaped
24907 #### ------------------------------------------------------
24909 1. Leading whitespace in SOL context should be escaped
24932 <nowiki> </nowiki>a
24934 <nowiki> </nowiki> a
24938 <nowiki> </nowiki> a
24940 <nowiki> </nowiki>a
24943 <nowiki> </nowiki>b
24966 2. Leading whitespace in non-indent-pre contexts should not be escaped
24970 <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>
24971 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24972 <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>
24982 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
25001 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
25005 <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>
25007 [[File:Foobar.jpg|thumb|caption]]
25011 5. Nowiki escaping should account for indent-pres
25021 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
25034 #### --------------- Behavior Switches --------------------
25037 1. Valid behavior switches should be escaped
25044 <nowiki>__TOC__</nowiki>
25045 ''<nowiki>__TOC__</nowiki>''
25049 2. Invalid behavior switches should not be escaped
25060 # We use indent-pre as an indirect way to test for sol-transparent behavior.
25062 Behavior switches should be SOL-transparent
25066 <meta property="mw:PageProp/toc" />
25068 <!-- this one's bogus -->
25071 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
25073 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
25077 <!-- this one's bogus -->
25086 #### --------------- HTML tags ---------------
25089 #### 3. multi-line html tag
25090 #### 4. extension tags
25091 #### -----------------------------------------
25097 <a href="http://google.com">google</a>
25099 <a href="http://google.com">google</a>
25107 <ul><li> <div>foo</div></li>
25108 <li> <div style="color:red">foo</div></li>
25109 <li> <td></li></ul>
25112 * <nowiki><div>foo</div></nowiki>
25113 * <nowiki><div style="color:red">foo</div></nowiki>
25114 * <nowiki><td></nowiki>
25118 3. multi-line html tag
25137 <p><ref>foo</ref>
25138 </p><p><ref>bar
25139 </p><p>baz</ref>
25142 <nowiki><ref>foo</ref></nowiki>
25144 <nowiki><ref>bar</nowiki>
25146 baz<nowiki></ref></nowiki>
25149 #### --------------- Others ---------------
25155 <p><nowiki>foo</nowiki>
25158 <nowiki>foo</nowiki>
25161 ## The quote-char in the input is necessary for triggering the bug
25163 (T54035) Nowiki-escaping should not get tripped by " :" in text
25172 #----------- End of wikitext escaping tests --------------
25176 Tag-like HTML structures are passed through as text
25198 </p><p>1<d e>f
25203 HTML tag with necessary entities in attributes
25205 <span title="&amp;">foo</span>
25207 <p><span title="&amp;">foo</span>
25212 HTML tag with 'unnecessary' entity encoding in attributes
25214 <span title="&">foo</span>
25216 <p><span title="&">foo</span>
25221 HTML tag with broken attribute value quoting
25223 parsoid=wt2html,html2html
25225 <span title="Hello world>Foo</span>
25227 <p><span title="Hello world">Foo</span>
25230 <p><span title="Hello world">Foo</span></p>
25234 Self-closed tag with broken attribute value quoting
25236 parsoid=wt2html,html2html
25238 <div title="Hello world />Foo
25240 <div title="Hello world"></div>
25243 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
25247 Table with broken attribute value quoting
25249 parsoid=wt2html,html2html
25252 | title="Hello world|Foo
25257 <td title="Hello world">Foo
25263 <td title="Hello world">Foo
25269 Table with broken attribute value quoting on consecutive lines
25271 parsoid=wt2html,html2html
25274 | title="Hello world|Foo
25275 | style="color:red|Bar
25280 <td title="Hello world">Foo
25282 <td style="color:red">Bar
25288 <td title="Hello world">Foo
25289 </td><td style="color: red">Bar
25290 </td></tr></tbody></table>
25295 Accept empty td cell attribute
25298 | align="center" | foo || |
25303 <td align="center"> foo </td>
25310 Non-empty attributes in th-cells
25313 ! Foo !! style="color: red" | Bar
25319 <th style="color: red"> Bar
25325 Accept empty attributes in th-cells
25340 Empty table rows go away
25361 ### Parsoid-centric tests for testing RTing of inter-element separators
25362 ### Edge cases not tested by existing parser tests and specific to
25363 ### Parsoid-specific serialization strategies.
25367 RT-ed inter-element separators should be valid separators
25379 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
25383 # Parsoid-only since PHP parser relies on Tidy for correct output
25385 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
25399 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
25400 <p>bar</p></small></td></tr>
25404 <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>
25408 # Note that the "style" attribute is really a template parameter here.
25409 # The = would have to be {{=}} if you wanted the literal.
25411 Empty TD followed by TD with tpl-generated attribute
25416 |{{echo|style='color:red'}}|foo
25430 Indented table with an empty td
25448 ## We have some newline diffs RT-ing this edge case
25449 ## and it is not important enough -- we seem to be emitting
25450 ## at most 2 newlines after a </tr> and this is unrelated to
25451 ## the issue from T85627 that this is testing.
25453 Indented table with blank lines in between (T85627)
25472 Indented block & table
25486 <div data-parsoid='{"stx":"html"}'>foo</div>
25488 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
25493 Indent and comment before table row
25508 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
25509 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
25513 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
25515 Empty TR followed by a template-generated TR
25521 {{echo|<tr><td>foo</td></tr>}}
25527 <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}}]}'>
25532 ## PHP and parsoid output differ for this, and since this is primarily
25533 ## for testing Parsoid's serializer, marking this Parsoid only
25535 Empty TR followed by mixed-ws-comment line should RT correctly
25551 <!--c--> </tr><!--d-->
25557 Multi-line image caption generated by templates with/without trailing newlines
25559 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
25560 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
25562 <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>
25563 <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>
25567 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
25571 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
25573 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
25575 <includeonly>foo</includeonly>
25583 ## PHP emits broken html for this, and since this is primarily
25584 ## a Parsoid serializer test, marking this Parsoid only
25586 Improperly nested inline or quotes tags with whitespace in between
25588 <span> <s>x</span> </s>
25591 <p><span> <s>x</s></span><s> </s>
25592 <b> <i>x</i></b><i> </i>
25597 Encapsulate protected attributes from wt
25599 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
25601 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
25605 <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>
25607 <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">
25608 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
25612 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
25613 ## Having nested or stray pre tags results in the attempt to add duplicates,
25614 ## causing an assertion fail. This test tries to prevent that situation.
25616 Ensure ParagraphWrapper can deal with stray closing pre tags
25626 1. Ensure fostered text content is wrapped in element nodes
25630 <table>hi</table><table>ho</table>
25639 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
25641 parsoid=wt2html,wt2wt
25650 <tbody><tr><td> a</td></tr>
25655 Encapsulation properly handles null DSR information from foster box
25657 parsoid=wt2html,wt2wt
25659 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
25661 <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>
25665 1. Encapsulate foster-parented transclusion content
25667 parsoid=wt2wt,wt2html
25669 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
25671 <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>
25681 2. Encapsulate foster-parented transclusion content
25683 parsoid=wt2wt,wt2html
25685 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
25687 <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>
25698 3. Encapsulate foster-parented transclusion content
25700 parsoid=wt2wt,wt2html
25702 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25704 <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>"]}">
25717 4. Encapsulate foster-parented transclusion content
25719 parsoid=wt2wt,wt2html
25721 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25723 <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>"]}">
25736 5. Encapsulate foster-parented transclusion content
25738 parsoid=wt2wt,wt2html
25740 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
25742 <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>
25757 6. Encapsulate foster-parented transclusion content
25759 parsoid=wt2wt,wt2html
25761 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25763 <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>
25779 7. Encapsulate foster-parented transclusion content
25781 parsoid=wt2wt,wt2html
25783 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25785 <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>
25795 # Note that the wt is broken on purpose: the = should be {{=}} if you
25796 # don't want it to be a template parameter key.
25798 8. Encapsulate foster-parented transclusion content
25800 parsoid=wt2wt,wt2html
25803 }}{|{{echo|style='color:red'}}
25808 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25810 <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>
25821 9. Encapsulate foster-parented transclusion content
25823 parsoid=wt2wt,wt2html
25825 <table>{{echo|hi</table>hello}}
25827 <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>
25831 Table in fosterable position
25842 <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">
25844 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25850 # Parsoid only for T66747
25852 Properly encapsulate empty-content transclusions in fosterable positions
25860 <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"}]]}'>
25866 Always encapsulate foster box when template range is expanded to table
25879 T115289: Unclosed table
25881 {{echo|<table>}}<!--c-->[[Category:Two]]
25883 <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>
25887 T115289: Don't migrate newlines out of tables with fostered content
25889 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25891 <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>
25895 T73074: More fostering fun
25897 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25899 <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>
25903 Support <object> element with .data attribute
25907 <object data="test.swf"></object>
25909 <object data="test.swf"></object>
25913 Don't block XML namespace declaration
25915 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25917 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25920 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25923 # -----------------------------------------------------------------
25924 # The following section of tests are primarily to spec requirements
25925 # around Parsoid's serialization (old, new, edited content)
25927 # All these tests are marked Parsoid html2wt and html2html only
25928 # ----------------------------------------------------------------
25931 Ignore rel attribute in a-tags during serialization to url-links
25935 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25936 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25937 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25939 http://en.wikipedia.org/wiki/Foobar
25940 http://en.wikipedia.org/wiki/Foobar
25941 http://en.wikipedia.org/wiki/Foobar
25944 # 'mi' is a localinterwiki prefix as well as a language
25946 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
25950 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25956 Parsoid should accept interwiki shortcuts
25960 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
25961 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
25962 <a href='./fr:Foo'>Foo</a></p>
25963 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
25964 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
25965 <a href='fr%3AFoo'>Foo</a></p>
25977 Parsoid should not accept invalid interwiki shortcuts
25981 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
25982 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
25983 <a href='news:Foo'>Foo</a></p>
25992 New wikilinks should be serialized properly
25996 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25997 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25998 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25999 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
26000 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
26004 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
26005 http://en.wikipedia.org/wiki/Foo
26006 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
26010 New wiki links (href variations)
26014 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
26015 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
26016 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
26017 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
26022 [[Toxine bactérienne]]
26026 New wiki links (content string variations)
26030 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
26031 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
26032 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
26036 [[Foo_bar|./Foo_bar]]
26040 New category links (href variations)
26044 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
26045 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
26046 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
26048 [[Category:Toxine bactérienne]]
26049 [[Category:Toxine bactérienne]]
26050 [[Category:Toxine bactérienne]]
26054 New sol transparent links don't need indent-pre nowiki protection
26059 <link rel="mw:PageProp/redirect" href="./Main_Page">
26060 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
26061 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
26063 #WEITERLEITUNG [[Main Page]]
26064 <!-- this is good --> [[Category:Good]]
26065 <!-- this is great --> [[Kategorie:Great]]
26069 New interlanguage links (href variations)
26073 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
26074 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
26075 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
26077 [[es:Toxine bactérienne]]
26078 [[es:Toxine_bactérienne]]
26079 [[es:Toxine_bactérienne]]
26083 Image: Modifying size of an image (1)
26086 "modes": ["wt2wt"],
26088 ["img[height]", "attr", "height", "22"],
26089 ["img[width]", "attr", "width", "200"]
26093 [[Image:Foobar.jpg|230x230px]]
26095 [[Image:Foobar.jpg|200x200px]]
26099 Image: Modifying size of an image (2)
26102 "modes": ["wt2wt"],
26104 ["img[height]", "attr", "height", "100"],
26105 ["img[width]", "attr", "width", "500"]
26109 [[Image:Foobar.jpg|230x230px]]
26111 [[Image:Foobar.jpg|500x500px]]
26114 # Change in size is ignored so long as class='mw-default-size'
26116 Image: Modifying size of an image (3)
26119 "modes": ["wt2wt"],
26121 ["figure[class]", "removeClass", "mw-default-size"],
26122 ["figure img", "attr", "height", "19"],
26123 ["figure img", "attr", "width", "170"]
26127 [[Image:Foobar.jpg|thumb]]
26129 [[Image:Foobar.jpg|thumb|170x170px]]
26133 Image: Modifying alignment of an image (T50665)
26136 "modes": ["wt2wt"],
26138 ["figure[class]", "removeClass", "mw-halign-right"],
26139 ["figure[class]", "addClass", "mw-halign-left"]
26143 [[Image:Foobar.jpg|thumb|caption|right]]
26145 [[Image:Foobar.jpg|thumb|caption|left]]
26149 Image: Modifying mw-default-size of an frameless image (T64805)
26152 "modes": ["wt2wt"],
26154 ["figure.mw-default-size", "removeClass", "mw-default-size"]
26158 [[Image:Foobar.jpg|frameless|right]]
26160 [[Image:Foobar.jpg|frameless|right|220x220px]]
26164 Image: Modifying valign of an image (T51221)
26167 "modes": ["wt2wt"],
26169 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
26170 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
26174 [[File:Foobar.jpg|20px|middle]]
26176 [[File:Foobar.jpg|20px|text-top]]
26180 Image: Modifying alt attribute of an image (T58400)
26183 "modes": ["wt2wt"],
26185 ["img[alt]", "attr", "alt", "some alternate edited text"]
26189 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
26191 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
26195 Image: Modifying caption of an image
26198 "modes": ["wt2wt"],
26200 ["figcaption", "text", "new caption"]
26204 [[Image:Foobar.jpg|thumb|original caption]]
26206 [[Image:Foobar.jpg|thumb|new caption]]
26210 Image: empty alt attribute (T50924)
26214 [[File:Foobar.jpg|thumb|alt=|bar]]
26216 <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>
26220 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
26226 <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>
26228 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
26232 Image: Block level image should have \n before and after
26235 [[File:Foobar.jpg|right|thumb|150x150px]]
26239 <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>
26244 Image: New block level image should have \n before and after (existing content)
26247 [[File:Foobar.jpg|right|thumb|150x150px]]
26251 <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>
26256 Image: upright option (parsoid)
26258 [[File:Foobar.jpg|thumb|upright|caption]]
26259 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
26260 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
26262 <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>
26263 <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>
26264 <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>
26268 Image: upright option is ignored on inline and frame images (parsoid)
26270 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
26272 <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>
26276 Image: from basic HTML (1)
26280 <span typeof="mw:Image">
26281 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
26284 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
26288 Image: from basic HTML (2)
26292 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
26294 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
26298 Image: from basic HTML (3)
26302 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
26304 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
26308 Image: from basic HTML (4)
26312 <img src="./File:Foobar.jpg">
26314 [[File:Foobar.jpg|link=]]
26318 Image: Invalid title as link
26320 [[File:Foobar.jpg|link=<]]
26322 <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>
26325 <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>
26329 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
26334 <li><p>foo</p></li>
26341 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
26345 <ul> <li>foo</li></ul>
26351 Don't strip leading whitespace when handling indent-pre suppressing tags
26356 <tr><td> indented row</td></tr>
26359 <b>This is very bold of you!</b>
26362 indented cell (no pre-wrapping!)
26372 '''This is very bold of you!'''
26376 indented cell (no pre-wrapping!)
26384 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
26406 <nowiki> </nowiki></span>bar2
26409 <nowiki> </nowiki><span>bar</span>
26412 <nowiki> </nowiki><span>foo</span>
26417 Lists: Dont insert newlines in a serialized list item.
26421 <ul><li>a<br>b</li><li>c</li></ul>
26428 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
26431 "modes": ["html2wt"],
26432 "scrubWikitext": false
26435 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26436 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26438 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26439 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26441 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
26443 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26445 == hello there [[Category:A1]] ==
26447 == [[Category:A2]] hi pal ==
26449 == <!--foo--> [[Category:A3]] how goes it ==
26451 == it goes well [[Category:A4]] <!--bar--> ==
26453 ==howdy [[Category:A5]]==
26459 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
26462 "modes": ["html2wt"],
26463 "scrubWikitext": true
26466 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26467 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26469 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26470 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26472 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26480 <!--foo--> [[Category:A3]]
26485 [[Category:A4]] <!--bar-->
26493 Headings: Don't hoist metas that come from templates
26496 "modes": ["html2wt"],
26497 "scrubWikitext": true
26500 <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>
26502 == {{echo|foo [[Category:Foo]]}} ==
26506 Headings: Category in ref isn't hoisted
26509 "modes": ["html2wt"],
26510 "scrubWikitext": true
26513 <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>
26515 <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>
26518 [[Category:Baz]] </ref> ==
26524 Parsoid: Serialize positional parameters with = in them as named parameter
26528 <p about="#mwt1" typeof="mw:Transclusion"
26529 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
26531 <p about="#mwt1" typeof="mw:Transclusion"
26532 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
26534 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26535 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26536 <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>
26540 {{echo|1=f=oo|2=bar}}
26542 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26543 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26544 {{echo|<nowiki>f=oo</nowiki>|bar}}
26548 Parsoid: Serialize positional parameters with = in extlink as named parameter
26552 <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>
26554 {{echo|1=http://stuff?is=ok}}
26558 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
26562 <div>a<p>b</p></div>
26583 Substrings resembling wikitext in hrefs should not get nowiki escapes
26587 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
26593 Enforce single-line context in the serializer
26600 <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">
26601 </span><span about="#mwt1">you</span> </h2>
26603 <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>
26605 <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
26606 there</span></li></ol>
26618 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
26625 </tbody></table></dd></dl>
26629 == hi {{bogus|there
26640 * foo '''bar''' baz
26652 Serialize new placeholder space without spans
26656 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
26658 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
26660 <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>
26666 <ref>foo : bar</ref>ok
26670 #-----------------------
26671 # Tag minimization tests
26672 #-----------------------
26675 1. I/B quote minimization: wikitext-only tags should be combined
26679 <p><i>A</i><i>B</i></p>
26680 <p><b>A</b><b>B</b></p>
26681 <p><i>A</i><b><i>B</i></b></p>
26682 <p><b>A</b><i><b>B</b></i></p>
26683 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
26684 <p><i><b>A</b></i><i><b>B</b></i></p>
26685 <p><i><b>A</b></i><b><i>B</i></b></p>
26686 <p><b><i>A</i></b><i><b>B</b></i></p>
26706 2. I/B quote minimization: wikitext and html tags should not be combined
26710 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
26711 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
26715 ''A''<nowiki/>'''<i>B</i>'''
26719 3. I/B quote minimization: templated content stops minimization
26723 <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>
26724 <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>
26726 ''A''{{echo|''B''}}
26728 ''A''{{echo|'''''B'''''}}
26732 4. I/B quote minimization: new content should be mimimized with adjacent old content
26736 <p><i>A</i><i>B</i></p>
26737 <p><b>A</b><b>B</b></p>
26738 <p><i>A</i><b><i>B</i></b></p>
26748 5a. Merge adjacent quote nodes if they've been edited
26751 "modes": ["wt2wt", "selser"],
26753 ["p", "contents", "remove", ":contains('b')"]
26763 5b. Merge adjacent quote nodes if they've been edited
26766 "modes": ["wt2wt", "selser"],
26772 ''a''<span id="x">b</span>''c''
26778 1. Merge adjacent link nodes as long as at least one element is new
26781 "modes": ["html2wt"],
26782 "scrubWikitext": true
26785 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26786 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26787 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26791 [[Football|Foot]][[Football|ball]]
26795 2. Merge adjacent link nodes and enable additional normalizations
26798 "modes": ["html2wt"],
26799 "scrubWikitext": true
26802 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26804 [[Football|''Football'']]
26808 3. Don't merge adjacent link nodes if scrubWikitext is false
26811 "modes": ["html2wt"],
26812 "scrubWikitext": false
26815 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26817 [[Football|Foot]][[Football|ball]]
26820 #------------------------------
26821 # End of tag minimization tests
26822 #------------------------------
26825 T56262: New entities
26829 <span typeof="mw:Entity"> </span>
26834 ## Note that there is no wikitext output for 'unknownproperty' ##
26835 ## Unknown magic words are silently dropped ##
26842 <meta property='mw:PageProp/toc' />
26843 <meta property='mw:PageProp/notoc' />
26844 <meta property='mw:PageProp/forcetoc' />
26845 <meta property='mw:PageProp/index' />
26846 <meta property='mw:PageProp/noindex' />
26847 <meta property='mw:PageProp/nogallery' />
26848 <meta property='mw:PageProp/noeditsection' />
26849 <meta property='mw:PageProp/notitleconvert' />
26850 <meta property='mw:PageProp/nocontentconvert' />
26851 <meta property='mw:PageProp/unknownproperty' />
26861 __NOCONTENTCONVERT__
26865 Consecutive <pre>s should not get merged
26867 parsoid=html2wt,html2html
26869 <pre>a</pre><pre>b</pre>
26897 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26901 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26903 [[Special:BookSources/1234567890|ISBN 1234567895]]
26907 Edited RFC links not serializable as RFC links should serialize as extlinks
26911 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26913 [//tools.ietf.org/html/rfc123 New RFC]
26917 Edited PMID links not serializable as PMID links should serialize as extlinks
26921 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26923 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26927 WTS of autolinks with trailing/surrounding context
26931 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26932 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26933 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26934 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26935 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26936 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26938 http://cscott.net'''foo'''
26940 http://cscott.net<b>foo</b>
26942 '''http://cscott.net'''
26944 '''http://cscott.net '''
26946 '''http://cscott.net<nowiki/>x'''
26948 http://cscott.net<nowiki/>x
26952 WTS of autolinks with nowikis (round-trip)
26954 x<nowiki/>http://cscott.net<nowiki/>x
26956 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26959 # this is the "easy" test because it leaves in place all the
26960 # data-parsoid information indicating this is an autolink
26962 WTS of autolinks with escapes (editing)
26965 "modes": ["wt2wt"],
26967 [ "span", "remove" ]
26971 x<nowiki/>http://cscott.net<nowiki/>x
26973 x<nowiki/>http://cscott.net<nowiki/>x
26977 WTS of edited autolink-like text (T103364)
26980 "modes": ["wt2wt"],
26982 [ "span[typeof]", "removeAttr", "typeof" ]
26986 Not a link: <nowiki>http://example.com</nowiki>.
26988 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26992 WTS of newly-authored autolink-like text (T103364)
26996 <p>http://example.com is not a link.</p>
26998 <nowiki>http://example.com</nowiki> is not a link.
27002 WTS of autolink-like text after an autolink (T108563)
27006 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
27008 http://example.com <nowiki>http://example.com</nowiki> is not a link.
27012 Magic links inside links (not autolinked)
27014 [[Foo|http://example.com]]
27017 [[Foo|ISBN 123456789x]]
27019 [http://foo.com http://example.com]
27020 [http://foo.com RFC 1234]
27021 [http://foo.com PMID 1234]
27022 [http://foo.com ISBN 123456789x]
27024 <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>
27025 <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>
27027 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
27028 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
27029 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
27030 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
27032 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
27033 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
27034 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
27035 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
27039 Magic links inside image captions (autolinked)
27041 [[File:Foobar.jpg|thumb|http://example.com]]
27042 [[File:Foobar.jpg|thumb|RFC 1234]]
27043 [[File:Foobar.jpg|thumb|PMID 1234]]
27044 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
27046 <div class="thumb tright">
27047 <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>
27048 <div class="thumbcaption">
27049 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
27050 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
27053 <div class="thumb tright">
27054 <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>
27055 <div class="thumbcaption">
27056 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
27057 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
27060 <div class="thumb tright">
27061 <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>
27062 <div class="thumbcaption">
27063 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
27064 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
27067 <div class="thumb tright">
27068 <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>
27069 <div class="thumbcaption">
27070 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
27071 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
27075 <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>
27076 <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>
27077 <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>
27078 <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>
27082 WTS of magic word text (T109371)
27087 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
27088 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
27090 <nowiki>RFC 1234</nowiki>
27092 [http://foo.com RFC 1234]
27098 Edited Redirect link should emit a non-piped wikitext link
27102 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
27108 T75121: Infer extension name from typeOf if data-mw is not present
27110 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
27112 <div typeOf="mw:Extension/foo"></div>
27117 # Note that the <p> wrapping isn't present in PHP parser output
27118 # The important thing for this test is that P-wrapping doesn't
27119 # interfere with the <nowiki> protection for leading - in <td>
27120 # (which isn't necessary for <th>).
27122 T88318: p-wrapped dash in table.
27124 parsoid=html2wt,wt2wt
27127 <tr><th><p>-</p></th><th><p>- </p></th></tr>
27128 <tr><td><p>-</p></td><td><p>- </p></td></tr>
27129 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
27136 |<nowiki>-</nowiki>
27137 |<nowiki>- </nowiki>
27156 <td><small>-</small></td>
27168 T149209: WTS: Handle newlines in table cells properly
27176 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
27178 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
27184 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
27186 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
27208 T149209: Selser: Handle newlines in table cells properly
27211 "modes": ["selser"],
27213 [ "#h1", "html", "a\nb\n" ],
27214 [ "#h2", "html", "a\nb\n" ],
27215 [ "#c1", "html", "a\nb\n" ],
27216 [ "#c2", "html", "<p>a</p>" ],
27217 [ "#c3", "html", "<p>a</p>" ],
27218 [ "#c4", "html", "edit-me<p>a</p>" ]
27223 ! id="h1" |edit-me!!1
27225 ! id="h2" |edit-me||2
27227 | id="c1" |edit-me||3
27229 | id="c2" |edit-me||4
27231 | id="c3" |edit-me||p||q||r
27233 | id="c4" |edit-me||p||q||r
27262 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
27267 <td id='mwAc'>foo</td>
27268 <td id='serialize-this'>bar</td>
27273 | id="serialize-this" |bar
27278 Parsoid-like element ids should not be serialized to wikitext unless shadowed
27282 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
27284 <div id="hello">ok</div>
27291 "modes": ["wt2wt"],
27293 [ "#xyz", "before", "<b>before</b> stuff " ],
27294 [ "#xyz", "after", " stuff <i>after</i>" ],
27295 [ "#xyz", "html", "x <b>y</b> z" ]
27299 <span id="xyz">hello</span>
27301 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
27305 Never serialize a-tag as html, regardless of what data-parsoid has to say
27307 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
27309 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
27314 ## SSS FIXME: This is broken output nevertheless.
27315 ## What might be a reasonable non-broken output for this?
27316 ## This is an edge case unlikely to be seen in production
27317 ## that I am not wasting more time on this right now.
27319 Never serialize a-tag as html, no matter what attributes it has
27321 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
27323 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
27325 [http://boo.org http://boohoo.org]
27328 # Misnested is an indication that selser can reuse the source but these have
27329 # shown to sneak through on occasion. See T101768.
27330 # The original wikitext here is: [http://test.com [[one]] two three]
27332 Strip span tags added to mark misnested links
27336 <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>
27338 [http://test.com][[one]] two three
27342 Catch regression when unpacking misnested links
27346 {{echo|hi}}[http://example.com [[ho]]]
27348 <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>
27352 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
27356 <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|}"]}'>
27368 ## This test verifies the presence and computation of this attribute indirectly
27369 ## by making an edit and ensuring that the serialization is correct (which it would be
27370 ## only if firstWikitextNode is properly set).
27372 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
27375 "modes": ["wt2wt"],
27377 [ "div#x", "remove" ],
27378 [ "div", "before", "<div>new</div>" ]
27382 <div id="x">foo</div>
27384 {{echo|<div>boo</div>
27392 {{echo|<div>boo</div>
27398 # --------------------------------------------
27399 # Tests spec'ing wikitext serialization norms |
27400 # --------------------------------------------
27403 Serialize multi-line indent-pre starting with wikitext syntax
27417 1. Categories should always be serialized on their own line
27421 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
27429 2. Categories that are part of templates should not introduce a line break
27431 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
27433 <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>
27436 # Careful while editing these next 2 tests. There are \u200f characters
27437 # before and after the <link> tags in the HTML and following some
27438 # of the categories in wikitext
27439 # Do not remove these characters in edits.
27441 # As part of the serialization, these bidi characters will get stripped.
27443 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
27446 "modes": ["html2wt"],
27447 "scrubWikitext": true
27450 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
27451 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
27454 [[קטגוריה: שיטות משפט]]
27458 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
27461 "modes": ["html2wt"],
27462 "scrubWikitext": true
27465 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
27472 Lists: Add space after bullets
27479 <li><span> baz</span></li>
27484 * <span> baz</span>
27488 1. Headings: Add space before/after == (T53744)
27495 <h2><span> baz</span></h2>
27503 == <span> baz</span> ==
27507 2. Headings: Add space before/after == even after hoisted content
27510 "modes": ["html2wt"],
27511 "scrubWikitext": true
27514 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
27522 1. Headings: suppress newly created empty headings
27525 "modes": ["html2wt"],
27526 "scrubWikitext": true
27534 2. Headings: don't suppress empty headings if scrubWikitext is false
27544 3. Headings: suppress empty headings on edits
27547 "modes": ["selser"],
27548 "scrubWikitext": true,
27554 ==<span id="x">foo</span>==
27559 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
27562 "modes": ["html2wt"],
27563 "scrubWikitext": true
27566 <h2>foo<br/>bar</h2>
27567 <h2>foo <span><br/>bar</span> baz</h2>
27571 == foo <span> bar</span> baz ==
27575 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
27578 "modes": ["html2wt"],
27579 "scrubWikitext": false
27582 <h2>foo<br/>bar</h2>
27588 1. WT Quote Tags: suppress newly created empty style tags
27591 "modes": ["html2wt"],
27592 "scrubWikitext": true
27600 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
27606 ''<nowiki/>'''''<nowiki/>'''
27610 3. WT Quote Tags: suppress empty style tags on edits
27613 "modes": ["selser"],
27614 "scrubWikitext": true,
27620 '''<span id="x">foo</span>'''
27625 1. Anchors: suppress newly created empty anchors
27628 "modes": ["html2wt"],
27629 "scrubWikitext": true
27632 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27637 2. Anchors: don't suppress empty anchors if scrubWikitext is false
27640 "modes": ["html2wt"],
27641 "scrubWikitext": false
27644 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27650 3. Anchors: suppress empty anchors on edits
27653 "modes": ["selser"],
27654 "scrubWikitext": true,
27660 [[Test|<span id="x">foo</span>]]
27665 3a. Anchors: do not suppress numbered extlinks
27668 "modes": ["wt2wt"],
27669 "scrubWikitext": true
27674 <a rel="mw:ExtLink" href="http://foo.com"></a>
27678 3b. Anchors: do not suppress numbered extlinks
27681 "modes": ["wt2wt"],
27682 "scrubWikitext": true,
27688 [http://foo.com <span id="x">foo</span>]
27694 Normalizations should be restricted to edited content
27697 "modes": ["selser"],
27698 "scrubWikitext": true,
27700 [ "h1", "before", "<i></i>"]
27714 1. Multiple normalizations (html2wt)
27717 "modes": ["html2wt"],
27718 "scrubWikitext": true
27722 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
27723 </a><b><i></i></b>x</p>
27732 2. Multiple normalizations (selser)
27735 "modes": ["selser"],
27736 "scrubWikitext": true,
27738 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
27742 <span id="x">foo</span>
27744 <span id="x">foo</span>
27750 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
27753 "modes": ["html2wt"],
27754 "scrubWikitext": true
27766 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
27773 <nowiki> </nowiki>hi
27775 <nowiki> </nowiki> hello
27779 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
27782 "modes": ["html2wt"],
27783 "scrubWikitext": true
27792 baz bang</td></tr></table>
27798 bar<span>boo</span></p>
27814 bar<span>boo</span>
27818 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
27821 "modes": ["selser"],
27822 "scrubWikitext": true,
27824 [ "p", "html", " a\n b" ]
27835 1. New links that end in spaces
27838 "modes": ["html2wt"],
27839 "scrubWikitext": false
27842 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27843 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27844 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27846 [[Berlin ]]<nowiki/>is the capital of Germany.
27850 [[Boston ]] is a city.
27854 2. New links that end in spaces
27857 "modes": ["html2wt"],
27858 "scrubWikitext": true
27861 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27862 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27863 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27865 [[Berlin]] is the capital of Germany.
27869 [[Boston]] is a city.
27873 1. Table cells with escapable prefixes
27876 "modes": ["html2wt"],
27877 "scrubWikitext": false
27881 <tr><td>a</td></tr>
27882 <tr><td>-</td></tr>
27883 <tr><td>+</td></tr>
27889 |<nowiki>-</nowiki>
27891 |<nowiki>+</nowiki>
27896 2. Table cells with escapable prefixes
27899 "modes": ["html2wt"],
27900 "scrubWikitext": true
27904 <tr><td>a</td></tr>
27905 <tr><td>-</td></tr>
27906 <tr><td>+</td></tr>
27919 3a. Table cells with escapable prefixes after edits
27922 "modes": ["selser"],
27923 "scrubWikitext": true,
27925 [ "table tbody tr:first-child td:first-child", "remove"]
27939 3b. Table cells with escapable prefixes after edits
27942 "modes": ["selser"],
27943 "scrubWikitext": true,
27945 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27952 |<span id="x">foo</span>+
27961 # FIXME: This test will fail because
27962 # normalization doesn't realize that the id attribute
27963 # will eliminate the escapable scenario
27965 4a. Table cells without escapable prefixes after edits
27968 "modes": ["selser"],
27969 "scrubWikitext": true,
27971 [ "#x", "html", "-" ]
27984 ## This tests normalizer's ability to discriminate between
27985 ## cells having identical content.
27987 4b. Table cells without escapable prefixes after edits
27990 "modes": ["selser"],
27991 "scrubWikitext": true,
27993 [ "td", "html", "-" ]
28006 ## This tests normalizer's ability to not be tripped by
28007 ## comments (and whitespace)
28009 4c. Table cells without escapable prefixes after edits
28012 "modes": ["selser"],
28013 "scrubWikitext": true,
28015 [ "table tbody tr td:first-child", "remove" ]
28030 ## This tests normalizer's ability to handle HTML cells
28032 4d. Table cells without escapable prefixes after edits
28035 "modes": ["selser"],
28036 "scrubWikitext": true,
28038 [ "td", "html", "-" ]
28043 <tr><td>a</td></tr>
28047 <tr><td>-</td></tr>
28051 ## T111151 Remove font elements without attributes
28053 5a. font tags without attributes should be dropped in scrubWikitext mode
28056 "modes": ["html2wt"],
28057 "scrubWikitext": true
28061 <font><font>bar</font></font>
28062 <font class="x">boo</font>
28066 <font class="x">boo</font>
28070 5b. font tags should not be dropped without scrubWikitext being enabled
28073 "modes": ["html2wt"],
28074 "scrubWikitext": false
28083 Escape nowiki DOM elements
28087 <nowiki><i>foo</i></nowiki>
28089 <nowiki>''foo''</nowiki>
28092 # This is meant to be an interim fix while we go about figuring out
28093 # how to not introduce these trailing <nowiki/>s in the first place.
28095 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
28099 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
28101 <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>
28102 <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>
28115 # ---------------------------------------------------
28116 # End of tests spec'ing wikitext serialization norms |
28117 # ---------------------------------------------------
28121 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
28129 <td><b>c</b><p>d</p></td>
28148 Anchor without href scenarios
28150 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28153 <a class="no">dice</a>
28158 <span name="foo"></span>
28162 New transclusion added after a list should be serialized after the list
28166 <ul><li>a</li></ul><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>
28172 # -----------------------------------------------------------------
28173 # End of section for Parsoid-only html2wt tests for serialization
28175 # -----------------------------------------------------------------
28177 # -----------------------------------------------------------------
28178 # The following section of tests are primarily to spec behavior of
28179 # the selective serializer. All these tests have manual selser
28180 # changes. The automated selser changes for all tests handle the
28181 # wide variation of changes, but these tests here capture specs
28182 # deterministically.
28183 # ----------------------------------------------------------------
28187 Selser: New comments should not be lost
28190 "modes": ["selser"],
28192 [ "#a", "after", "<!--c1-->" ],
28193 [ "#b", "before", "<!--c2-->" ]
28197 <span id="a">a</span>
28199 <span id="b">b</span>
28201 <span id="a">a</span><!--c1-->
28203 <!--c2--><span id="b">b</span>
28208 Selser: Check for validity of DSR before using it
28211 "modes": ["selser"],
28213 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
28217 <span id="a">a</span>
28219 {{DISPLAYTITLE:foo}}
28220 <span id="a">a</span>
28224 1. DOMDiff: Changes to <ref> content should be looked up using id
28227 "modes": ["selser"],
28229 ["#X", "after", "bar"],
28230 ["#Y", "after", "baz"]
28234 X <ref><span id="X">foo</span></ref>
28237 <ref name="a"><span id="Y">foo</span></ref>
28240 X <ref><span id="X">foo</span>bar</ref>
28243 <ref name="a"><span id="Y">foo</span>baz</ref>
28248 2. DOMDiff: Changes to <ref> content should be looked up using id
28251 "modes": ["selser"],
28253 ["#Z", "after", "bar"]
28257 A <ref>foo bar for a</ref>
28258 B <ref group="X" name="b" />
28262 <references group="X">
28263 <ref name="b"><span id="Z">foo</span></ref>
28266 A <ref>foo bar for a</ref>
28267 B <ref group="X" name="b" />
28271 <references group="X">
28272 <ref name="b"><span id="Z">foo</span>bar</ref>
28277 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
28280 "modes": ["selser"],
28282 [ "div:first-child", "text", "bar" ]
28286 <div style="{{1x|color:red;}}%">foo</div>
28288 <div style="{{1x|color:red;}}%">bar</div>
28301 <li class="mw-empty-elt"></li>
28302 <li class="mw-empty-elt"></li>
28310 [[File:Thumb.png|thumb]]
28312 <div class="thumb tright">
28313 <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>
28314 <div class="thumbcaption">
28315 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
28322 unclosed internal link XSS (T137264)
28324 [[#%3Cscript%3Ealert(1)%3C/script%3E|
28326 <p>[[#<script>alert(1)</script>|
28329 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
28333 Validating that <style> isn't eaten by tidy (T167349)
28335 # Use $wgRawHtml to inject a <style> tag, since you normally can't in wikitext
28339 <html><style>.foo::before { content: "<foo>"; }</style></html>
28340 <html><style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style></html>
28344 <style>.foo::before { content: "<foo>"; }</style>
28345 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>