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 }
10443 flags=vary-revision-id
10447 Magic Word: {{SCRIPTPATH}}
10449 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10457 Magic Word: {{STYLEPATH}}
10459 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10468 Magic Word: {{SERVER}}
10470 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10474 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10479 Magic Word: {{SERVERNAME}}
10481 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10490 Magic Word: {{SITENAME}}
10492 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10501 Magic Word: {{PAGELANGUAGE}}
10504 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10513 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10515 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10524 Case-sensitive magic words, when cased differently, should just be template transclusions
10531 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10532 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10533 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10534 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10539 Case-insensitive magic words should still work with weird casing.
10549 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10553 # From plwiki:PLOS_ONE
10555 Parsoid: Page property magic word with magic word contents
10557 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10559 <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>"}]]}'/>
10562 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10563 # But, this is a limitation of our representation and is documented in
10564 # TemplateHandler.js in processSpecialMagicWord
10566 Parsoid: Template-generated DISPLAYTITLE
10568 {{{{echo|DISPLAYTITLE}}:Foo}}
10572 wgAllowDisplayTitle=true
10573 wgRestrictDisplayTitle=false
10578 <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"}]]}'/>
10582 Namespace 1 {{ns:1}}
10591 Namespace 1 {{ns:01}}
10600 Namespace 0 {{ns:0}} (T6783)
10608 Namespace 0 {{ns:00}} (T6783)
10616 Namespace -1 {{ns:-1}}
10625 Namespace User {{ns:User}}
10634 Namespace User talk {{ns:User_talk}}
10643 Namespace User talk {{ns:uSeR tAlK}}
10652 Namespace File {{ns:File}}
10661 Namespace File {{ns:Image}}
10670 Namespace (lang=de) Benutzer {{ns:User}}
10681 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10687 <p>Benutzer Diskussion
10694 {{urlencode:hi world?!}}
10695 {{urlencode:hi world?!|WIKI}}
10696 {{urlencode:hi world?!|PATH}}
10697 {{urlencode:hi world?!|QUERY}}
10707 Magic Word: prioritize type info over data-parsoid
10711 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10717 Magic Word: serialize on separate line (parsoid)
10719 parsoid=wt2wt,html2wt
10725 foo<meta property="mw:PageProp/notoc"/>bar
10729 Magic Word: rt non-english wikis
10736 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10740 __proto__ is treated as normal wikitext (T105997)
10752 Magic links: internal link to RFC (T2479)
10756 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10759 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10763 Magic links: RFC (T2479)
10767 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10770 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10774 Magic links: RFC (T67278)
10776 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10778 <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.
10781 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10785 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10787 RFC      822
10791 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10796 <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>
10802 Magic links: ISBN (T3937)
10806 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10809 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10813 Magic links: ISBN (T67278)
10815 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10817 <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.
10820 <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>
10824 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
10826 ISBN      978 0 316 09811 3
10832 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10839 <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>
10847 Magic links: PMID incorrectly converts space to underscore
10851 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10854 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10858 Magic links: PMID (T67278)
10860 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10862 <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.
10865 <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>
10869 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
10871 PMID      1234
10875 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10880 <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>
10885 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10886 # since these are ExtLinkText, not MagicLinkText
10888 Magic links: use appropriate serialization for "almost" magic links.
10890 X[[Special:BookSources/0978739256|foo]]
10892 X[//tools.ietf.org/html/rfc1234 foo]
10894 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10895 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10898 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10899 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10903 Magic links: All disabled (T47942)
10905 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10911 <p>ISBN 0-306-40615-2
10922 Nonexistent template
10924 {{thistemplatedoesnotexist}}
10926 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10931 Template with invalid target containing tags
10933 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10935 <p>{{a<b>b</b>|foo|a=b|a = b}}
10940 Template with invalid target containing unclosed tag
10942 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10944 <p>{{a<b>|foo|a=b|a = b}}</b>
10949 Template with invalid target containing wikilink
10953 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10956 <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>
10960 Template with just whitespace in it, T70421
10964 <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>
10970 This is a test template
10978 <p>This is a test template
10983 Template with explicit namespace
10987 <p>This is a test template
10995 This is a test template with parameter {{{param}}}
11001 {{paramtest|param=foo}}
11003 <p>This is a test template with parameter foo
11008 Template:paramtestnum
11010 [[{{{1}}}|{{{2}}}]]
11014 Template unnamed parameter
11016 {{paramtestnum|Main Page|the main page}}
11018 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11023 Template:templatesimple
11029 Template:templateredirect
11031 #redirect [[Template:templatesimple]]
11035 Template:templateasargtestnum
11041 Template:templateasargtest
11043 {{template{{{templ}}}}}
11047 Template:templateasargtest2
11053 Template with template name as unnamed argument
11055 {{templateasargtestnum|templatesimple}}
11062 Template with template name as argument
11064 {{templateasargtest|templ=simple}}
11071 Template with template name as argument (2)
11073 {{templateasargtest2|templ=templatesimple}}
11080 Template:templateasargtestdefault
11082 {{{{{templ|templatesimple}}}}}
11092 Template with default value
11094 {{templateasargtestdefault}}
11101 Template with default value (value set)
11103 {{templateasargtestdefault|templ=templa}}
11112 {{templateredirect}}
11117 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11121 Template with argument in separate line
11123 {{ templateasargtest |
11131 Template with complex template as argument
11134 param ={{ templateasargtest |
11135 templ = simple }}}}
11137 <p>This is a test template with parameter (test)
11142 Templates with templated name
11144 {{{{echo|echo}}|foo}}
11145 {{{{echo|inner list}} }}
11149 <ul><li> item 1</li></ul>
11152 <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>
11153 <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>
11156 # Parsoid markup is deliberate "broken". This is an edge case.
11157 # See long comment in TemplateHandler.js:convertAttribsToString.
11159 Templates with invalid templated targets
11170 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11175 Template with thumb image (with link in description)
11177 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11179 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>
11182 <p>This is a test template with parameter</p>
11183 <div class="thumb tright">
11184 <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>
11185 <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>
11189 <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>
11193 Template:complextemplate
11195 {{{1}}} {{paramtest|
11196 param ={{{param}}}}}
11200 Template with complex arguments
11203 param ={{ templateasargtest |
11204 templ = simple }}|[[Template:complextemplate|link]]}}
11206 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11211 T2553: link with two variables in a piped link
11214 |[[{{{1}}}|{{{2}}}]]
11219 <td>[[{{{1}}}|{{{2}}}]]
11224 <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>
11230 Abort table cell attribute parsing on wikilink
11233 | testing [[one|two]] | three || four
11234 | testing one two | three || four
11235 | testing="[[one|two]]" | three || four
11240 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11246 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11252 <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>
11253 <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>
11254 <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>
11259 Don't abort table cell attribute parsing if wikilink is found in template arg
11262 | Test {{#tag:ref|One two "[[three]]" four}}
11266 <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>
11271 Magic variable as template parameter
11273 {{paramtest|param={{SITENAME}}}}
11275 <p>This is a test template with parameter MediaWiki
11282 [[{{{param}}}|link]]
11286 Template parameter as link source
11288 {{linktest|param=Main Page}}
11290 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11295 Template:paramtest2
11297 including another template, {{paramtest|param={{{arg}}}}}
11301 Template passing argument to another template
11303 {{paramtest2|arg='hmm'}}
11305 <p>including another template, This is a test template with parameter 'hmm'
11316 Template as link source
11320 [[{{linktest2}}|Main Page]]
11322 [[{{linktest2}}]]Page
11324 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11325 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11326 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11344 Template infinite loop
11348 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11353 Template from main namespace
11372 T2529: Template with table, not included at beginning of line
11391 T2523: Template shouldn't eat newline (or add an extra one before table)
11411 T2041: Template parameters shown as broken links
11420 Template with targets containing wikilinks
11426 {{[[{{echo|foo}}]]}}
11428 {{{{echo|[[foo}}]]}}
11430 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11431 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11435 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11436 <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>
11437 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11447 Templates: Double quotes as template target
11454 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11458 ## This test is about making sure Parsoid's data-mw is well formed in the
11459 ## face of multiple templates with intersecting and overlapping ranges. The
11460 ## wikitext itself is wretched.
11462 Templates with intersecting and overlapping ranges
11487 <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":""}]]}'>
11489 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11491 <tbody><tr><td>hi</td></tr>
11496 Template:MSGNW test
11498 ''None'' of '''this''' should be
11500 but rather passed unmodified
11508 # hmm, fix this or just deprecate msgnw and document its behavior?
11512 {{msgnw:MSGNW test}}
11514 <p>''None'' of '''this''' should be
11516  but rather passed unmodified
11517 {{test}}
11521 <!-- comment -->
11528 {{int:youhavenewmessages|lots of money|not!}}
11530 <p>You have lots of money (not!).
11535 int keyword - non-existing message
11546 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11550 <includeonly> and <noinclude> being included
11561 <onlyinclude>Foo</onlyinclude>bar
11565 <onlyinclude> being included
11577 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11581 <onlyinclude> and <includeonly> being included
11590 <includeonly> and <noinclude> on a page
11592 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11599 Un-closed <noinclude>
11606 <onlyinclude> on a page
11608 <onlyinclude>Foo</onlyinclude>bar
11615 Un-closed <onlyinclude>
11622 Self-closed noinclude, includeonly, onlyinclude tags
11633 Unbalanced includeonly and noinclude tags
11637 |b</noinclude></noinclude>
11638 |c</noinclude></includeonly>
11639 |d</includeonly></includeonly>
11648 <td>c</includeonly>
11650 <td>d</includeonly></includeonly>
11656 Template:Includeonly section
11659 ==Includeonly section==
11665 T8563: Edit link generation for section shown by <includeonly>
11667 {{includeonly section}}
11669 <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>
11670 <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>
11674 # Uses same input as the contents of [[Template:Includeonly section]]
11676 T8563: Section extraction for section shown by <includeonly>
11681 ==Includeonly section==
11689 T8563: Edit link generation for section suppressed by <includeonly>
11692 ==Includeonly section==
11696 <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>
11701 T8563: Section extraction for section suppressed by <includeonly>
11706 ==Includeonly section==
11714 Un-closed <includeonly>
11719 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11722 ## We used to, but no longer wt2wt this test since the default serializer
11723 ## will normalize the include directives to serialize on their own line.
11724 ## Selser will take care of preserving formatting in scenarios where they
11725 ## intermingled with other wikitext.
11727 Includes and comments at SOL
11729 parsoid=wt2html,html2html
11731 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11735 </noinclude>* stuff
11738 <includeonly>can have stuff</includeonly>=== here ===
11741 <h2><span class="mw-headline" id="hu">hu</span></h2>
11744 <ul><li> stuff</li>
11745 <li> here</li></ul>
11746 <h3><span class="mw-headline" id="here">here</span></h3>
11749 <!-- 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>
11751 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11753 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11754 <li> here</li></ul>
11756 <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>
11760 # TODO: test with DOM fragment reuse!
11762 Parsoid: DOM fragment reuse
11764 parsoid=wt2wt,wt2html
11766 a{{echo|b<table></table>c}}d
11778 <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>
11780 <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">
11781 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11782 </span><p about="#mwt2">cd</p>
11784 <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">
11786 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11788 </span><p about="#mwt3">b</p>
11792 Parsoid: Merge double tds (T52603)
11797 |{{echo|{{!}} foo}}
11801 <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>
11806 Parsoid: Merge double tds in nested transclusion content (T52603)
11812 |{{echo|{{!}} foo}}
11816 <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}}]}'>
11818 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11824 ### <includeonly> and <noinclude> in attributes
11827 0. includeonly around the entire attribute
11829 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11831 <p><span id="v2">bar</span>
11836 1. includeonly in html attr key
11838 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11840 <p><span id="foo">bar</span>
11845 2. includeonly in html attr value
11847 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11848 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11850 <p><span id="v1">bar</span>
11851 <span id="v1">bar</span>
11856 3. includeonly in part of an attr value
11858 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11860 <p><span style="color:red;">bar</span>
11865 4. includeonly in table attributes
11889 ### Preprocessor precedence tests
11890 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
11892 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
11894 Preprocessor precedence 1: link is rightmost opening
11898 But close-brace is not a valid character in a link title:
11901 However, we can still tell this was handled as a link in the preprocessor:
11902 {{echo|[[Foo}}|bar]]|bat}}
11904 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
11905 </p><p>But close-brace is not a valid character in a link title:
11907 </p><p>However, we can still tell this was handled as a link in the preprocessor:
11913 Preprocessor precedence 2: template is rightmost opening
11924 Preprocessor precedence 3: language converter is rightmost opening
11941 Preprocessor precedence 4: left-most angle bracket
11950 Template:Precedence5
11956 Preprocessor precedence 5: tplarg takes precedence over template
11958 {{Precedence5|Bullet}}
11960 <ul><li> Bar</li></ul>
11965 Preprocessor precedence 6: broken link is rightmost opening
11969 {{echo|[[Foo|bar|bat=baz}}
11972 </p><p>{{echo|[[Foo|bar|bat=baz}}
11976 # This next test exposes a difference between PHP and Parsoid:
11977 # Given [[Foo|{{echo|Bar]]x}}y]]z:
11978 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
11979 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
11980 # outer `[[Foo` extends until the `y]]`
11981 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
11982 # intermediate result (after template expansion), and link processing
11983 # happens on this intermediate result, which moves the wikilink
11984 # boundary leftward to `[[Foo|Bar]]`
11985 # 2b) Parsoid works in a single step, so it's going to keep the
11986 # wikilink as extending to the `y]]`
11987 # 3a) Then PHP does linktrail processing which slurps up the trailing
11988 # `xy` inside the link.
11989 # 3b) Parsoid will do linktrail processing to slurp up the trailing
11990 # `z` inside the link.
11991 # This is "correct" behavior. Parsoid's basic worldview is that the
11992 # `]]` inside the template shouldn't be allowed to leak out to affect
11993 # the surrounding wikilink. PHP may match Parsoid (in the future)
11994 # if you use {{#balance}} (T114445).
11997 Preprocessor precedence 7: broken template is rightmost opening
12001 [[Foo|{{echo|Bar]]-x}}-y]]-z
12003 Careful: linktrails can move the end of the wikilink:
12004 [[Foo|{{echo|y']]a}}l]]l
12006 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12007 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12008 </p><p>Careful: linktrails can move the end of the wikilink:
12009 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12014 Preprocessor precedence 8: broken language converter is rightmost opening
12025 Template:Preprocessor_precedence_9
12030 ;7: {{{{{{{4}}}}}}}
12034 Preprocessor precedence 9: groups of braces
12036 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12042 <ul><li> Bar</li></ul>
12046 <dd> {Bullet}</dd></dl>
12051 Template:Preprocessor_precedence_10
12058 ;6: -{{{{{{4}}}}}}-
12059 ;7: -{{{{{{{5}}}}}}}-
12063 Preprocessor precedence 10: groups of braces with leading dash
12067 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12073 <ul><li> Bar-</li></ul>
12080 <ul><li> Bar-</li></ul>
12084 <dd> raw2</dd></dl>
12089 Preprocessor precedence 11: found during visual diff testing
12091 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12093 {{echo|-{{echo|-{{echo|x}}}}}}
12095 {{echo|-{{echo|x}}}}
12097 <p><span>-<span>-x</span></span>
12104 Preprocessor precedence 12: broken language converter closed by brace.
12106 This form breaks the template, which is unfortunate:
12107 * {{echo|foo-{bar}bat}}
12109 But if the broken language converter markup is inside an extension
12110 tag, nothing bad happens:
12111 * <nowiki>foo-{bar}bat</nowiki>
12112 * {{echo|<nowiki>foo-{bar}bat</nowiki>}}
12113 * <pre>foo-{bar}bat</pre>
12114 * {{echo|<pre>foo-{bar}bat</pre>}}
12116 <tag>foo-{bar}bat</tag>
12117 {{echo|<tag>foo-{bar}bat</tag>}}
12120 <p>This form breaks the template, which is unfortunate:</p>
12122 <li>{{echo|foo-{bar}bat}}</li>
12124 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12126 <li>foo-{bar}bat</li>
12127 <li>foo-{bar}bat</li>
12150 Preprocessor precedence, 13: broken language converter in external link
12152 * [http://example.com/-{foo Example in URL]
12153 * [http://example.com Example in -{link} description]
12154 * {{echo|[http://example.com/-{foo Breaks template, however]}}
12157 <li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12158 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12159 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12164 Preprocessor precedence, 14: broken language converter in comment
12166 * <!--{{foo}}--> ...should be ok
12167 * <!---{{foo}}--> ...extra dashes
12168 * {{echo|foo<!-- -{bar} -->bat}} ...should be ok
12171 <li>...should be ok</li>
12172 <li>...extra dashes</li>
12173 <li>foobat ...should be ok</li>
12178 Preprocessor precedence, 15: broken brace markup in headings
12180 __NOTOC__ __NOEDITSECTION__
12189 ===5 foo{{{bar 5===
12194 <h3><span class="mw-headline" id="1_foo.5Bbar_1">1 foo[bar 1</span></h3>
12196 <h3><span class="mw-headline" id="2_foo.5B.5Bbar_2">2 foo[[bar 2</span></h3>
12198 <h3><span class="mw-headline" id="3_foo.7Bbar_3">3 foo{bar 3</span></h3>
12200 <h3><span class="mw-headline" id="4_foo.7B.7Bbar_4">4 foo{{bar 4</span></h3>
12202 <h3><span class="mw-headline" id="5_foo.7B.7B.7Bbar_5">5 foo{{{bar 5</span></h3>
12204 <h3><span class="mw-headline" id="6_foo-.7Bbar_6">6 foo-{bar 6</span></h3>
12209 ### Token Stream Patcher tests
12211 ### These tests won't always pass wt2wt and other modes because
12212 ### on serialization, the table will be output on a new line.
12213 ### For now, we are blacklisting them, and using this to test selser.
12217 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12219 parsoid=wt2html,wt2wt
12221 {{echo|}}{| width = '100%'
12225 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12226 <tbody><tr><td>foo</td></tr>
12230 ## We used to, but no longer wt2wt this test since the default serializer
12231 ## will normalize the include directives to serialize on their own line.
12232 ## Selser will take care of preserving formatting in scenarios where they
12233 ## intermingled with other wikitext.
12235 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12239 <includeonly>a</includeonly>{| {{{b}}}
12243 <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":""}]]}'>
12244 <tbody><tr><td>c</td></tr>
12249 Table wikitext syntax outside wiki-tables
12253 ! not a table heading
12256 | class="foo bar" | baz
12264 ! not a table heading
12267 | class="foo bar" | baz
12276 ### Testing parsing of templates where a template arg
12277 ### has the same name as the template itself.
12283 {{{quote|{{{1}}}}}}
12287 Templates: Template Name/Arg clash: 1. Use of positional param
12296 Templates: Template Name/Arg clash: 2. Use of named param
12298 {{quote|quote=foo}}
12305 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12314 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12318 Templates: 1. Simple use
12327 Templates: 2. Inside a block tag
12329 <div>{{echo|Foo}}</div>
12330 <blockquote>{{echo|Foo}}</blockquote>
12333 <blockquote>Foo</blockquote>
12343 Templates: P-wrapping: 1a. Templates on consecutive lines
12354 Templates: P-wrapping: 1b. Templates on consecutive lines
12368 Templates: P-wrapping: 1c. Templates on consecutive lines
12371 {{echo|bar}} <div>baz</div>
12384 Templates: P-wrapping: 1d. Template preceded by comment-only line
12393 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12397 Templates: Inline Text: 1. Multiple template uses
12399 {{echo|Foo}}bar{{echo|baz}}
12406 Templates: Inline Text: 2. Back-to-back template uses
12408 {{echo|Foo}}{{echo|bar}}
12415 Templates: Block Tags: 1. Multiple template uses
12417 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12419 <div>Foo</div><div>bar</div><div>baz</div>
12424 Templates: Block Tags: 2. Back-to-back template uses
12426 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12428 <div>Foo</div><div>bar</div>
12432 # This is an edge case relating to paragraph wrapping.
12434 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12439 <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
12444 Templates: Links: 1. Simple example
12446 {{echo|[[Foo|bar]]}}
12448 <p><a href="/wiki/Foo" title="Foo">bar</a>
12453 Templates: Links: 2. Generation of link href
12455 [[{{echo|Foo}}|bar]]
12457 <p><a href="/wiki/Foo" title="Foo">bar</a>
12462 Templates: Links: 3. Generation of part of a link href
12464 [[Fo{{echo|o}}|bar]]
12466 [[Foo{{echo|bar}}]]
12468 [[Foo{{echo|bar}}baz]]
12470 [[Foo{{echo|bar}}|bar]]
12472 [[:Foo{{echo|bar}}]]
12474 [[:Foo{{echo|bar}}|bar]]
12476 <p><a href="/wiki/Foo" title="Foo">bar</a>
12477 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12478 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12479 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12480 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12481 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12486 Templates: Links: 4. Multiple templates generating link href
12488 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12490 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12495 Templates: Links: 5. Generation of link text
12497 [[Foo|{{echo|bar}}]]
12499 <p><a href="/wiki/Foo" title="Foo">bar</a>
12504 Templates: Links: 5. Nested templates (only outermost template should be marked)
12506 {{echo|[[{{echo|Foo}}|bar]]}}
12508 <p><a href="/wiki/Foo" title="Foo">bar</a>
12513 Templates: HTML Tag: 1. Generation of HTML attr. key
12515 <div {{echo|style}}="color:red;">foo</div>
12517 <div style="color:red;">foo</div>
12522 Templates: HTML Tag: 2. Generation of HTML attr. value
12524 <div style={{echo|'color:red;'}}>foo</div>
12526 <div style="color:red;">foo</div>
12531 Templates: HTML Tag: 3. Generation of HTML attr key and value
12533 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12535 <div style="color:red;">foo</div>
12540 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12542 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12544 <div title="This is a long title with just one piece templated">foo</div>
12549 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12551 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12553 <div title="This is a long title with just one piece templated">foo</div>
12558 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12560 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12562 <div title="This is a long title with just one piece templated">foo</div>
12566 # SSS FIXME: While it is great we added support for all this,
12567 # do we want to make this part of the spec? Maybe we want to
12568 # deprecate this kind of usage in the future?
12570 Templates: HTML Tag: 7. Generation of partial attribute key string
12572 <div st{{echo|yle}}="color:red;">foo</div>
12574 <div style="color:red;">foo</div>
12579 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12581 <div {{echo|1=id="v1"}}>bar</div>
12583 <div id="v1">bar</div>
12588 Templates: HTML Tag: 9. Multiple template-generated attributes
12590 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12592 <div id="v1" title="foo">bar</div>
12597 Templates: Support for templates generating attributes and content
12599 {| {{mixed_attr_content_template}}
12604 <table style="color:red;" title="T48811">
12614 <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|}"]}'>
12623 1. Entities and nowikis inside templated attributes should be handled correctly
12625 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12627 <div style="background:#f9f9f9;">foo</div>
12630 <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>
12634 2. Entities and nowikis inside templated attributes should be handled correctly
12637 |{{table_attribs_3}}
12642 <td style="background:#f9f9f9;">Foo
12647 <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>
12652 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12655 |{{table_attribs_3}}
12660 <td style="background:#f9f9f9;">Foo
12664 <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}}]}'>
12665 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12671 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12674 | {{table_attribs_6}} hi
12679 <td style="background: red;"> hi
12684 <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>
12689 Templates: HTML Tables: 1. Generating start of a HTML table
12691 {{echo|<table><tr><td>foo</td>}}</tr></table>
12693 <table><tr><td>foo</td></tr></table>
12698 Templates: HTML Tables: 2a. Generating middle of a HTML table
12700 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12702 <table><tr><td>foo</td></tr></table>
12707 Templates: HTML Tables: 2b. Generating middle of a HTML table
12709 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12711 <table><tr><td>foo</td></tr></table>
12716 Templates: HTML Tables: 3. Generating end of a HTML table
12718 <table><tr>{{echo|<td>foo</td></tr></table>}}
12720 <table><tr><td>foo</td></tr></table>
12725 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12727 {{echo|<table>}}<tr><td>foo</td></tr></table>
12729 <table><tr><td>foo</td></tr></table>
12734 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12736 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12738 <table><tr><td>foo</td></tr></table>
12743 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12745 <table><tr>{{echo|<td>}}foo</td></tr></table>
12747 <table><tr><td>foo</td></tr></table>
12752 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12754 <table><tr><td>foo{{echo|</td>}}</tr></table>
12756 <table><tr><td>foo</td></tr></table>
12761 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12763 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12765 <table><tr><td>foo</td></tr></table>
12770 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12772 <table><tr><td>foo</td></tr>{{echo|</table>}}
12774 <table><tr><td>foo</td></tr></table>
12779 Templates: HTML Tables: 5. Proper fostering of categories from inside
12781 parsoid=wt2html,wt2wt
12783 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12784 <!--Two categories (T52330)-->
12785 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12787 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12788 <!--Two categories (T52330)-->
12789 <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>
12793 Templates: Wiki Tables: 1a. Fostering of entire template content
12801 <tr><td></td></tr></table>
12813 Templates: Wiki Tables: 1b. Fostering of entire template content
12826 <tr><td></td></tr></table>
12840 Templates: Wiki Tables: 2. Fostering of partial template content
12850 <tr><td></td></tr></table>
12863 Templates: Wiki Tables: 3. td-content via multiple templates
12866 {{echo|{{pipe}}a}}{{echo|b}}
12877 Templates: Wiki Tables: 4. Templated tags, no content
12883 <tr><td></td></tr></table>
12888 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12902 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12915 ## This test case is very specific to Parsoid's internals
12916 ## and is hence only tested for Parsoid's code. Parsoid uses
12917 ## a <meta> marker tag for <ref> tags and they are expanded
12918 ## much later. We are verifying that this <meta> tag usage
12919 ## doesn't prevent foster parenting.
12921 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12923 {{PartialTable}}<ref>foo</ref>
12928 <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">
12932 <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>
12936 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12946 <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{{!}}}"]}'>
12947 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12951 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12956 Templates: Lists: Multi-line list-items via templates
12958 *{{echo|a {{nonexistent|
12960 *{{echo|b {{nonexistent|
12963 <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>
12964 <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>
12969 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12971 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12973 <p><i>ab</i>c<i>d</i>e
12978 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12979 (PHP parser generates misnested html)
12981 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12983 <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>
12987 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12988 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12990 parsoid=wt2html,wt2wt
12992 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12994 <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>
12995 <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>
12996 <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>
13000 Templates: Ugly nesting: 4. Divs opened/closed across templates
13002 a<div>b{{echo|c</div>d}}e
13013 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
13019 |{{echo|foo</table>}}
13023 <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|}"]}'>
13027 <td>foo</td></tr></tbody></table><span about="#mwt1">
13028 </span><span about="#mwt1">|bar</span><span about="#mwt1">
13033 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
13043 <td>1. {{echo|foo </table>}}</td>
13045 <td>2. {{echo|baz </table>}}</td>
13058 <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>"]}'>
13063 <td>1. foo </td></tr></tbody></table></td>
13065 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
13066 </span><span about="#mwt2">
13067 </span><span about="#mwt2">
13068 </span><span about="#mwt2">abc</span><span about="#mwt2">
13069 </span><span about="#mwt2">
13070 </span><span about="#mwt2">
13071 </span><span about="#mwt2">
13072 </span><span about="#mwt2">
13073 </span><span about="#mwt2">
13074 </span><span about="#mwt2">xyz</span><span about="#mwt2">
13075 </span><span about="#mwt2">
13080 Templates: Ugly templates: 3. newline-only template parameter
13089 # This looks like a bug: a single newline triggers p/br for some reason.
13091 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13100 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13101 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13103 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13109 <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
13110 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13114 # T66017 -- ugly wikitext with fostered content generates two template ranges
13115 # that are "identical" and generate nesting cycles in the algorithm
13117 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13119 {{echo|<table><tr><td><table>}}
13123 <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"}'>
13124 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13125 </table></td></tr></tbody></table>
13129 Templates: Parameters substituted at the top-level
13131 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13135 <p><i>who</i> me? <b>never!</b>
13139 <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>
13141 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13145 Parser Functions: 1. Simple example
13154 Parser Functions: 2. Nested use (only outermost should be marked up)
13163 ### Pre-save transform tests
13166 pre-save transform: subst:
13172 This is a test template
13176 pre-save transform: normal template
13186 pre-save transform: nonexistent template
13190 {{thistemplatedoesnotexist}}
13192 {{thistemplatedoesnotexist}}
13196 pre-save transform: subst magic variables
13205 # This is T2089, which I fixed. -- wtm
13207 pre-save transform: subst: templates with parameters
13211 {{subst:paramtest|param="something else"}}
13213 This is a test template with parameter "something else"
13217 Template:nowikitest
13219 <nowiki>'''not wiki'''</nowiki>
13223 pre-save transform: nowiki in subst (T3188)
13227 {{subst:nowikitest}}
13229 <nowiki>'''not wiki'''</nowiki>
13233 Template:commenttest
13235 This template has <!-- a comment --> in it.
13239 pre-save transform: comment in subst (T3936)
13243 {{subst:commenttest}}
13245 This template has <!-- a comment --> in it.
13249 pre-save transform: unclosed tag
13253 <nowiki>'''not wiki'''
13255 <nowiki>'''not wiki'''
13259 pre-save transform: mixed tag case
13263 <NOwiki>'''not wiki'''</noWIKI>
13265 <NOwiki>'''not wiki'''</noWIKI>
13269 pre-save transform: unclosed comment in <nowiki>
13273 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13275 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13278 # Leading @ in this template definition works around a limitation
13279 # in parsoid's parserTests which otherwise strips the <span> from the
13280 # result (confusing it for a template wrapper)
13284 @<span onmouseover="alert('crap')">Oh no</span>
13288 (confirming safety of fix for subst T3936)
13290 {{Template:dangerous}}
13292 <p>@<span>Oh no</span>
13297 pre-save transform: comment containing gallery (T7024)
13301 <!-- <gallery>data</gallery> -->
13303 <!-- <gallery>data</gallery> -->
13307 pre-save transform: comment containing extension
13311 <!-- <tag>data</tag> -->
13313 <!-- <tag>data</tag> -->
13317 pre-save transform: comment containing nowiki
13321 <!-- <nowiki>data</nowiki> -->
13323 <!-- <nowiki>data</nowiki> -->
13327 pre-save transform: <noinclude> in subst (T5298)
13337 pre-save transform: <onlyinclude> in subst (T5298)
13341 {{subst:Includes2}}
13349 {{<includeonly>subst:</includeonly>Includes}}
13353 Template:SafeSubstTest
13355 {{<includeonly>safesubst:</includeonly>Includes}}
13359 T24297: safesubst: works during PST
13363 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13369 T24297: safesubst: works during normal parse
13378 subst: does not work during normal parse
13382 <p>{{subst:Includes}}
13387 pre-save transform: context links ("pipe trick")
13391 [[Article (context)|]]
13394 [[Bar:Article (context)|]]
13395 [[:Bar:Article (context)|]]
13397 [[|Article (context)]]
13401 [[Article (context)|Article]]
13402 [[Bar:Article|Article]]
13403 [[:Bar:Article|Article]]
13404 [[Bar:Article (context)|Article]]
13405 [[:Bar:Article (context)|Article]]
13407 [[Article (context)]]
13408 [[Bar:X (Y) Z|X (Y) Z]]
13409 [[:Bar:X (Y) Z|X (Y) Z]]
13413 pre-save transform: context links ("pipe trick") with interwiki prefix
13417 [[interwiki:Article|]]
13418 [[:interwiki:Article|]]
13419 [[interwiki:Bar:Article|]]
13420 [[:interwiki:Bar:Article|]]
13422 [[interwiki:Article|Article]]
13423 [[:interwiki:Article|Article]]
13424 [[interwiki:Bar:Article|Bar:Article]]
13425 [[:interwiki:Bar:Article|Bar:Article]]
13429 pre-save transform: context links ("pipe trick") with parens in title
13431 pst title=[[Somearticle (context)]]
13435 [[Article (context)|Article]]
13439 pre-save transform: context links ("pipe trick") with comma in title
13441 pst title=[[Someplace, Somewhere]]
13444 [[Otherplace, Elsewhere|]]
13445 [[Otherplace, Elsewhere, Anywhere|]]
13447 [[Otherplace, Somewhere|Otherplace]]
13448 [[Otherplace, Elsewhere|Otherplace]]
13449 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13453 pre-save transform: context links ("pipe trick") with parens and comma
13455 pst title=[[Someplace (IGNORED), Somewhere]]
13458 [[Otherplace (place), Elsewhere|]]
13460 [[Otherplace, Somewhere|Otherplace]]
13461 [[Otherplace (place), Elsewhere|Otherplace]]
13465 pre-save transform: context links ("pipe trick") with comma and parens
13467 pst title=[[Who, me? (context)]]
13470 [[Me, Myself, and I (1937 song)|]]
13472 [[Yes, you. (context)|Yes, you.]]
13473 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13477 pre-save transform: context links ("pipe trick") with namespace
13479 pst title=[[Ns:Somearticle]]
13483 [[Ns:Article|Article]]
13487 pre-save transform: context links ("pipe trick") with namespace and parens
13489 pst title=[[Ns:Somearticle (context)]]
13493 [[Ns:Article (context)|Article]]
13497 pre-save transform: context links ("pipe trick") with namespace and comma
13499 pst title=[[Ns:Somearticle, Context, Whatever]]
13503 [[Ns:Article, Context, Whatever|Article]]
13507 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13509 pst title=[[Ns:Somearticle, Context (context)]]
13513 [[Ns:Article (context)|Article]]
13517 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13519 pst title=[[Ns:Somearticle (IGNORED), Context]]
13523 [[Ns:Article, Context|Article]]
13527 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13531 [[Article(context)|]]
13532 [[Bar:Article(context)|]]
13533 [[:Bar:Article(context)|]]
13534 [[|Article(context)]]
13538 [[Article(context)|Article]]
13539 [[Bar:Article(context)|Article]]
13540 [[:Bar:Article(context)|Article]]
13541 [[Article(context)]]
13542 [[Bar:X(Y)Z|X(Y)Z]]
13543 [[:Bar:X(Y)Z|X(Y)Z]]
13547 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13551 [[Article (context)|]]
13552 [[Bar:Article (context)|]]
13553 [[:Bar:Article (context)|]]
13554 [[|Article (context)]]
13558 [[Article (context)|Article]]
13559 [[Bar:Article (context)|Article]]
13560 [[:Bar:Article (context)|Article]]
13561 [[Article (context)]]
13562 [[Bar:X (Y) Z|X (Y) Z]]
13563 [[:Bar:X (Y) Z|X (Y) Z]]
13567 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13571 [[Article(context)|]]
13572 [[Bar:Article(context)|]]
13573 [[:Bar:Article(context)|]]
13574 [[|Article(context)]]
13578 [[Article(context)|Article]]
13579 [[Bar:Article(context)|Article]]
13580 [[:Bar:Article(context)|Article]]
13581 [[Article(context)]]
13582 [[Bar:X(Y)Z|X(Y)Z]]
13583 [[:Bar:X(Y)Z|X(Y)Z]]
13587 pre-save transform: context links ("pipe trick") with commas (T23660)
13591 [[Article (context), context|]]
13592 [[Article (context),context|]]
13593 [[Bar:Article (context), context|]]
13594 [[Bar:Article (context),context|]]
13595 [[:Bar:Article (context), context|]]
13596 [[:Bar:Article (context),context|]]
13598 [[Article (context), context|Article]]
13599 [[Article (context),context|Article]]
13600 [[Bar:Article (context), context|Article]]
13601 [[Bar:Article (context),context|Article]]
13602 [[:Bar:Article (context), context|Article]]
13603 [[:Bar:Article (context),context|Article]]
13607 Parsoid: backwards pipe trick
13614 <p>[[|<b>bar</b>]]</p>
13618 pre-save transform: trim trailing empty lines
13622 Empty lines are trimmed
13628 Empty lines are trimmed
13632 pre-save transform: Signature expansion
13639 * <noinclude>~~~</noinclude>
13640 * <includeonly>~~~</includeonly>
13641 * <onlyinclude>~~~</onlyinclude>
13643 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13644 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13645 * 00:02, 1 January 1970 (UTC)
13646 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13647 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13648 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13653 ParserOutput flags from signature expansion (T84843)
13660 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13661 flags=user-signature
13666 pre-save transform: Signature expansion in nowiki tags (T2093)
13672 <nowiki>~~~~</nowiki>
13674 <includeonly><nowiki>~~~~</nowiki></includeonly>
13676 <noinclude><nowiki>~~~~</nowiki></noinclude>
13678 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13680 {{subst:Foo}} shall be converted to FOO
13682 As well as inside noinclude/onlyinclude
13683 <noinclude>{{subst:Foo}}</noinclude>
13684 <onlyinclude>{{subst:Foo}}</onlyinclude>
13686 But not inside includeonly
13687 <includeonly>{{subst:Foo}}</includeonly>
13691 <nowiki>~~~~</nowiki>
13693 <includeonly><nowiki>~~~~</nowiki></includeonly>
13695 <noinclude><nowiki>~~~~</nowiki></noinclude>
13697 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13699 FOO shall be converted to FOO
13701 As well as inside noinclude/onlyinclude
13702 <noinclude>FOO</noinclude>
13703 <onlyinclude>FOO</onlyinclude>
13705 But not inside includeonly
13706 <includeonly>{{subst:Foo}}</includeonly>
13710 Parsoid: Recognize nowiki with trailing space in tags
13714 <nowiki ><div>[[foo]]</nowiki >
13722 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13729 Parsoid: Recognize nowiki with odd capitalization
13733 <noWikI ><div>[[foo]]</Nowiki >
13735 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13740 Parsoid: Escape nowiki with trailing space in tags
13744 <p><nowiki > foo </nowiki ></p>
13745 <p>a<nowiki />b</p>
13746 <p>c<nowiki/ >d</p>
13748 <nowiki > foo </nowiki >
13756 Parsoid: Escape weird noWikI capitalizations
13760 <p><noWikI > foo </NoWikI ></p>
13762 <noWikI > foo </NoWikI >
13766 ### Message transform tests
13769 message transform: magic variables
13779 message transform: should not transform wiki markup
13789 message transform: <noinclude> in transcluded template (T6926)
13799 message transform: <onlyinclude> in transcluded template (T6926)
13809 {{#special:}} page name, known
13813 {{#special:Recentchanges}}
13815 Special:RecentChanges
13819 {{#special:}} page name with subpage, known
13823 {{#special:Recentchanges/param}}
13825 Special:RecentChanges/param
13829 {{#special:}} page name, unknown
13833 {{#special:foobar nonexistent}}
13835 Special:Foobar nonexistent
13839 {{#speciale:}} page name, known
13843 {{#speciale:Recentchanges}}
13845 Special:RecentChanges
13849 {{#speciale:}} page name with subpage, known
13853 {{#speciale:Recentchanges/param}}
13855 Special:RecentChanges/param
13859 {{#speciale:}} page name, unknown
13863 {{#speciale:foobar nonexistent}}
13865 Special:Foobar_nonexistent
13871 ### For Parsoid-specific tests, see
13872 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13877 parsoid=wt2html,wt2wt,html2html
13879 [[Image:foobar.jpg]]
13881 <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>
13884 <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>
13888 Simple image (using File: namespace, now canonical)
13890 [[File:Foobar.jpg]]
13892 <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>
13895 <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>
13899 Right-aligned image
13901 [[File:Foobar.jpg|right]]
13903 <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>
13906 <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>
13912 [[File:Foobar.jpg|right|Caption text]]
13914 <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>
13917 <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>
13921 Image with caption, T55312 #1
13923 [[File:Foobar.jpg|right|Caption page stuff]]
13925 <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>
13928 <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>
13932 Image with caption, T55312 #2
13934 [[File:Foobar.jpg|right|Caption page=]]
13936 <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>
13939 <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>
13943 Image with caption, T55312 #3
13945 [[File:Foobar.jpg|right|Caption page=stuff]]
13947 <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>
13950 <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>
13954 Allow empty links in image captions (T62753)
13958 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13963 <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>
13966 <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>
13968 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13969 </figcaption></figure>
13973 Titles in unlinked images (T23454)
13975 [[File:Foobar.jpg|link=|stuff]]
13977 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13982 Link with empty target
13991 Image with link trail
13993 Linktrails should not work for images: [[File:Foobar.jpg]]s
13995 <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
13998 <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>
14002 Image with empty attribute
14004 parsoid=wt2html,wt2wt,html2html
14006 [[File:Foobar.jpg|right||Caption text]]
14008 <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>
14011 <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>
14015 1. Block image with individual attributes from templates
14017 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14019 <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>
14022 <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>
14026 2. Block Image with individual attributes from templates
14028 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14030 <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>
14033 <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>
14037 3. Inline image with individual attributes from templates
14039 [[File:Foobar.jpg|{{echo|50px}}]]
14041 <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>
14044 <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>
14047 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14048 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14050 Image with multiple attributes from the same template
14052 [[File:Foobar.jpg|{{image_attribs}}]]
14054 <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>
14057 <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>
14061 Image with link tails
14065 123[[File:Foobar.jpg]]456
14066 123[[File:Foobar.jpg|right]]456
14067 123[[File:Foobar.jpg|thumb]]456
14069 <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
14071 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
14072 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
14075 <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>
14077 <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>
14079 <div class="thumb tright">
14080 <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>
14081 <div class="thumbcaption">
14082 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
14088 <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>
14089 <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>
14090 <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>
14094 Image with multiple captions -- only last one is accepted
14096 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14098 <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>
14101 <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>
14105 Image with multiple widths -- use last
14107 [[File:Foobar.jpg|200px|300px|caption]]
14109 <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>
14112 <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>
14116 Image with multiple alignments -- use first (T50664)
14120 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14122 [[File:Foobar.jpg|middle|text-top|caption]]
14124 <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>
14125 <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>
14128 <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>
14129 <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>
14133 Image with width attribute at different positions
14135 [[File:Foobar.jpg|200px|right|Caption]]
14136 [[File:Foobar.jpg|right|200px|Caption]]
14137 [[File:Foobar.jpg|right|Caption|200px]]
14139 <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>
14140 <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>
14141 <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>
14144 <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>
14145 <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>
14146 <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>
14149 # a sad bit of backward-compatibility
14151 Image with size specified with pxpx (T15500, T53628)
14153 parsoid=wt2html,wt2wt,html2html
14155 [[File:Foobar.jpg|20pxpx]]
14156 [[File:Foobar.jpg|200x20pxpx]]
14158 <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>
14159 <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>
14162 <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>
14166 Image with link parameter, wiki target
14168 [[File:Foobar.jpg|link=Main Page]]
14170 <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>
14173 <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>
14176 # parsoid T51293 (part 1)
14178 Image with link parameter, URL target
14180 [[File:Foobar.jpg|link=http://example.com/]]
14182 <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>
14185 <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>
14188 # parsoid T51293 (part 2)
14190 Image with link parameter, protocol-less URL target
14192 [[File:Foobar.jpg|link=//example.com/]]
14194 <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>
14197 <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>
14201 Escaping non-block captions (T107435)
14204 "modes": ["wt2wt"],
14206 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14210 [[Image:Foobar.jpg|caption]]
14212 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14215 # wgExternalLinkTarget not supported by Parsoid
14217 Image with link parameter, wgExternalLinkTarget
14219 [[Image:foobar.jpg|link=http://example.com/]]
14221 wgExternalLinkTarget='foobar'
14223 <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>
14228 Image with link parameter, wgNoFollowLinks set to false
14230 [[Image:foobar.jpg|link=http://example.com/]]
14232 wgNoFollowLinks=false
14234 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14239 Image with link parameter, wgNoFollowDomainExceptions
14241 [[Image:foobar.jpg|link=http://example.com/]]
14243 wgNoFollowDomainExceptions='example.com'
14245 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14249 # wgExternalLinkTarget not supported by Parsoid
14251 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14253 [[Image:foobar.jpg|link=http://example.com/|Title]]
14255 wgExternalLinkTarget='foobar'
14257 <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>
14262 Image with empty link parameter
14264 [[File:Foobar.jpg|link=]]
14266 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14269 <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>
14273 Image with link parameter (wiki target) and unnamed parameter
14275 [[File:Foobar.jpg|link=Main_Page|Title]]
14277 <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>
14280 <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>
14284 Image with link parameter (URL target) and unnamed parameter
14286 [[File:Foobar.jpg|link=http://example.com/|Title]]
14288 <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>
14291 <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>
14295 Thumbnail image with link parameter
14298 parsoid=wt2html,wt2wt,html2html
14300 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14302 <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>
14305 <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>
14309 Manually-specified thumbnail image
14313 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14315 <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>
14318 <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>
14322 Manually-specified thumbnail image with explicit link to wiki page
14325 parsoid=wt2html,wt2wt,html2html
14327 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14329 <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>
14332 <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>
14336 Manually-specified thumbnail image with explicit link to url
14339 parsoid=wt2html,wt2wt,html2html
14341 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14343 <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>
14346 <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>
14350 Manually-specified thumbnail image with explicit no link
14353 parsoid=wt2html,wt2wt,html2html
14355 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14357 <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>
14360 <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>
14364 Manually-specified thumbnail image with explicit link and alt text
14367 parsoid=wt2html,wt2wt,html2html
14369 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14371 <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>
14374 <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>
14378 Image with frame and link
14380 parsoid=wt2html,wt2wt,html2html
14382 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14384 <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>
14387 <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>
14391 Image with frame and link and explicit alt
14393 parsoid=wt2html,wt2wt,html2html
14395 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14397 <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>
14400 <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>
14404 Image with wiki markup in implicit alt
14406 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14408 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14410 <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>
14411 </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>
14414 <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>
14416 <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>
14420 Alt image option should handle most kinds of wikitext without barfing
14422 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14424 <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>
14427 <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>
14430 ###################
14431 # Conflicting image format options.
14432 # First option specified should 'win'.
14433 # All three cases in each test should be identical.
14436 Image with 'frameless' first.
14438 parsoid=wt2html,wt2wt,html2html
14440 [[File:Foobar.jpg|frameless|caption]]
14442 [[File:Foobar.jpg|frameless|frame|caption]]
14444 [[File:Foobar.jpg|frameless|thumb|caption]]
14446 <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>
14447 </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>
14448 </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>
14451 <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>
14452 <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>
14453 <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>
14457 Image with 'frame' first.
14459 parsoid=wt2html,wt2wt,html2html
14461 [[File:Foobar.jpg|frame|caption]]
14462 [[File:Foobar.jpg|frame|frameless|caption]]
14463 [[File:Foobar.jpg|frame|thumb|caption]]
14465 <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>
14466 <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>
14467 <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>
14470 <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>
14471 <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>
14472 <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>
14476 Image with 'thumb' first.
14478 parsoid=wt2html,wt2wt,html2html
14480 [[File:Foobar.jpg|thumb|caption]]
14481 [[File:Foobar.jpg|thumb|frameless|caption]]
14482 [[File:Foobar.jpg|thumb|frame|caption]]
14484 <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>
14485 <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>
14486 <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>
14489 <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>
14490 <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>
14491 <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>
14494 ###################
14496 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14497 # and https://phabricator.wikimedia.org/T64258
14498 # Foobar has actual size of 1941x220
14499 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14500 # a scalable format.
14501 # 2. Framed images always ignore size options; always render at default size.
14502 # 3. "Unspecified format" and border are the only types which can be
14506 Image: "unspecified format" and border enlarge
14508 parsoid=wt2html,wt2wt,html2html
14510 [[File:Foobar.jpg|2000px]]
14512 [[File:Foobar.jpg|border|2000px]]
14514 <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>
14515 </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>
14518 <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>
14519 <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>
14523 Image: "unspecified format" and border reduce
14525 parsoid=wt2html,wt2wt,html2html
14527 [[File:Foobar.jpg|1000px]]
14529 [[File:Foobar.jpg|border|1000px]]
14531 <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>
14532 </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>
14535 <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>
14536 <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>
14540 Image: thumbs reduce
14542 parsoid=wt2html,wt2wt,html2html
14544 [[File:Foobar.jpg|thumb|50px]]
14546 <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>
14549 <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>
14553 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14555 parsoid=wt2html,wt2wt,html2html
14557 [[File:Foobar.jpg|thumb|2000px]]
14559 [[File:Foobar.svg|thumb|2000px]]
14561 <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>
14562 <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>
14565 <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>
14566 <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>
14570 Image: frameless can reduce in size
14572 parsoid=wt2html,wt2wt,html2html
14574 [[File:Foobar.jpg|frameless|50px]]
14576 <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>
14579 <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>
14583 Image: bitmap frameless can't be enlarged past original size, but vector can
14585 parsoid=wt2html,wt2wt,html2html
14587 [[File:Foobar.jpg|frameless|2000px]]
14589 [[File:Foobar.svg|frameless|2000px]]
14591 <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>
14592 </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>
14595 <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>
14596 <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>
14600 Image: framed images are always unscaled.
14602 parsoid=wt2html,wt2wt,html2html
14604 [[File:Foobar.jpg|frame]]
14606 [[File:Foobar.jpg|frame|50px]]
14608 [[File:Foobar.jpg|frame|50x50px]]
14610 [[File:Foobar.jpg|frame|2000px]]
14612 <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>
14613 <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>
14614 <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>
14615 <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>
14618 <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>
14619 <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>
14620 <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>
14621 <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>
14624 ###################
14627 Link to image page- image page normally doesn't exists, hence edit link
14628 Add test with existing image page
14629 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14633 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14638 T20784 Link to non-existent image page with caption should use caption as link text
14640 [[:Image:test|caption]]
14642 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14647 Frameless image caption with a free URL
14649 [[File:Foobar.jpg|http://example.com]]
14651 <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>
14654 <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>
14658 Thumbnail image caption with a free URL
14662 [[File:Foobar.jpg|thumb|http://example.com]]
14664 <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>
14667 <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>
14671 Thumbnail image caption with a free URL and explicit alt
14674 parsoid=wt2html,wt2wt,html2html
14676 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14678 <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>
14681 <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>
14685 SVG thumbnails with no language set
14688 [[File:Foobar.svg|thumb|caption]]
14690 <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>
14693 <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>
14697 SVG thumbnails with language de
14699 parsoid=wt2html,wt2wt,html2html
14701 [[File:Foobar.svg|thumb|caption|lang=de]]
14703 <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>
14706 <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>
14710 SVG thumbnails with invalid language code
14712 parsoid=wt2html,wt2wt,html2html
14714 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
14716 <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>
14719 <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>
14723 T3887: A ISBN with a thumbnail
14725 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
14727 <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>
14730 <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>
14734 T3887: A RFC with a thumbnail
14736 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14738 <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>
14741 <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>
14745 T3887: A mailto link with a thumbnail
14747 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14749 <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>
14752 <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>
14755 # Pending resolution to T2368
14757 T2648: Frameless image caption with a link
14759 [[File:Foobar.jpg|text with a [[link]] in it]]
14761 <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>
14764 <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>
14768 T2648: Frameless image caption with a link (suffix)
14770 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14772 <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>
14775 <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>
14779 T2648: Frameless image caption with an interwiki link
14781 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14783 <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>
14786 <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>
14790 T2648: Frameless image caption with a piped interwiki link
14792 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14794 <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>
14797 <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>
14801 T107474: Frameless image caption with <nowiki>
14803 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14805 <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>
14809 Escape HTML special chars in image alt text
14811 [[File:Foobar.jpg|& < > "]]
14813 <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>
14816 <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>
14820 Escape HTML special chars in image alt text with LanguageConverter
14824 [[File:Foobar.jpg|& < > "]]
14826 <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>
14829 <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>
14833 Entities in file name and attributes
14835 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14837 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14840 <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>
14844 T2499: Alt text should have Ӓ, not &1234;
14846 [[File:Foobar.jpg|♀]]
14848 <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>
14851 <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>
14855 Broken image caption with link
14857 parsoid=wt2html,wt2wt,html2html
14859 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14861 <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.
14864 <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>
14868 Image caption containing another image
14870 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14872 <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>
14875 <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>
14879 Image: caption containing a newline
14881 [[File:Foobar.jpg|This
14884 <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>
14887 <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>
14891 Image: caption containing leading space
14892 (The leading space should not trigger nowiki escaping in wt2wt mode)
14894 [[File:Foobar.jpg|thumb| bar]]
14896 <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>
14899 <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>
14903 Image: caption containing a table
14905 parsoid=wt2html,wt2wt,html2html
14907 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14913 and some more text.]]
14915 <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>
14918 <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
14921 <tr><th>Foo </th><th>Bar</th></tr>
14924 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14928 T5090: External links other than http: in image captions
14930 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14932 <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>
14935 <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>
14941 parsoid=wt2html,wt2wt,html2html
14943 [[Image:foobar.jpg|a|class=b]]
14945 <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>
14948 <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>
14952 Localized image handling (1).
14954 parsoid=wt2html,wt2wt,html2html
14957 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14959 <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>
14962 <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>
14966 Localized image handling (2).
14969 parsoid=wt2html,wt2wt,html2html
14972 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14974 <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>
14977 <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>
14981 Localized image handling (3).
14986 <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>
14988 [[File:Foobar.jpg|بندانگشتی]]
14992 "border", "frameless" and "class" attributes on an image.
14995 parsoid=wt2html,wt2wt,html2html
14997 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14999 <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>
15002 <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>
15005 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15007 Invalid image attributes (T64500)
15010 parsoid=wt2html,wt2wt,html2html
15012 [[File:Foobar.jpg|thumb|float|left|caption]]
15014 [[File:Foobar.jpg|thumb|righ|caption]]
15016 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15018 <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>
15019 <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>
15020 <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>
15023 <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>
15024 <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>
15025 <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>
15031 #REDIRECT [[File:Barfoo.jpg]]
15034 # FIXME: Parsoid should run this test -- but we'd need to teach the
15035 # mockAPI about the redirected Barfoo.jpg image.
15039 [[Image:Barfoo.jpg]]
15041 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15046 Missing image with uploads disabled
15050 [[File:Foobaz.jpg]]
15052 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15055 <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>
15058 # Parsoid-specific testing for images
15059 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15060 # Currently imperfect due to a flaw in the Parsoid testrunner
15062 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15066 Parsoid-specific image handling - simple image with size and middle alignment
15068 [[File:Foobar.jpg|middle|50px]]
15070 <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>
15074 Parsoid-specific image handling - simple image with size, middle alignment,
15075 non-standard namespace alias
15077 parsoid=wt2wt,wt2html,html2html
15079 [[Image:Foobar.jpg|middle|50px]]
15081 <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>
15085 Parsoid-specific image handling - simple image with size and middle alignment
15088 [[File:Foobar.jpg|50px|middle]]
15090 <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>
15094 Parsoid-specific image handling - simple image with size and middle alignment
15095 and non-standard namespace name
15097 parsoid=wt2html,wt2wt,html2html
15099 [[Image:Foobar.jpg|50px|middle]]
15101 <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>
15105 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15107 [[File:Foobar.jpg|500x10px|baseline|caption]]
15109 <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>
15113 Parsoid-specific image handling - simple image with border and size spec
15115 [[File:Foobar.jpg|50px|border|caption]]
15117 <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>
15121 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15123 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15125 <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>
15129 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15132 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15134 <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>
15138 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15140 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15142 <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>
15146 Parsoid-specific image handling - thumbnail with specific size, halign,
15147 valign, and caption (existing content)
15149 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15151 <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>
15155 Parsoid-specific image handling - framed image with specific size and caption
15158 parsoid=wt2html,wt2wt,html2html
15160 [[File:Foobar.jpg|frame|500x50px|caption]]
15162 <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>
15166 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15169 parsoid=wt2html,wt2wt,html2html
15171 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15173 <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>
15177 Parsoid-specific image handling - frameless image with specific size, border, and caption
15179 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15181 <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>
15185 Parsoid-specific image handling - simple image with a formatted caption
15187 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15189 <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>
15193 Parsoid-specific image handling - caption with a template in it
15195 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15197 <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>
15201 Parsoid-specific image handling - caption with unbalanced tags in it
15203 parsoid=wt2html,wt2wt,html2html
15206 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15210 <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>
15215 Parsoid-specific image handling - empty caption (1)
15217 parsoid=wt2html,wt2wt
15219 [[File:Foobar.jpg|thumb|]]
15221 <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>
15224 # empty captions don't get serialized unless we're in the "round trip" case
15226 Parsoid-specific image handling - empty caption (2)
15230 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15231 <a href="./File:Foobar.jpg">
15232 <img resource="./File:Foobar.jpg"
15233 src="//example.com/images/3/3a/Foobar.jpg"
15234 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15235 height="25" width="220"/>
15237 <figcaption></figcaption>
15240 [[File:Foobar.jpg|thumb]]
15244 Parsoid-specific image handling - whitespace caption
15246 [[File:Foobar.jpg|thumb| ]]
15248 <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>
15252 Parsoid-specific image handling - lang option
15255 [[File:Foobar.svg|lang=de|caption]]
15259 <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>
15263 ## Edge case bugs in Parsoid from T93580
15265 T93580: 1. Templated <ref> inside block images
15267 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15271 <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>
15273 <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>
15277 T93580: 2. <ref> inside inline images
15279 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15283 <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>
15285 <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>
15289 T93580: 3. Templated <ref> inside inline images
15291 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15295 <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>
15297 <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>
15304 Subpage test/subpage
15312 subpage title=[[Subpage test]]
15316 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15321 Subpage noslash link
15323 subpage title=[[Subpage test]]
15327 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15332 Subpage test/1/2/subpage
15338 Relative subpage noslash link
15340 parsoid=wt2wt,wt2html,html2html
15341 subpage title=[[Subpage test/1/2/3/4]]
15347 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15348 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15351 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15352 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15356 Parsoid: dot-slash prefixed wikilinks
15366 </p><p>[[././baz/]]
15371 </p><p>[[././baz/]]
15376 Render invalid page names as plain text (T53090)
15388 [[foo[http://example.com]xyz]]
15390 [[{{echo|./../foo}}|bar]]
15391 [[{{echo|foo/.}}|bar]]
15392 [[{{echo|foo/..}}|bar]]
15393 [[{{echo|foo~~~~bar}}]]
15394 [[{{echo|foo>bar}}]]
15395 [[{{echo|foo././bar}}]]
15396 [[{{echo|foo{bar}}]]
15397 [[{{echo|foo}bar}}]]
15398 [[{{echo|foo[bar}}]]
15399 [[{{echo|foo]bar}}]]
15400 [[{{echo|foo<bar}}]]
15402 <p>[[./../foo|bar]]
15412 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15413 </p><p>[[./../foo|bar]]
15426 <p>[[./../foo|bar]]
15436 [[foo<a rel="mw:ExtLink" href="http://example.com"></a>xyz]]</p>
15438 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15439 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15440 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15441 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15442 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15443 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15444 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15445 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15446 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15447 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15448 [[<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>
15456 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15461 T2561: {{/Subpage}}
15463 subpage title=[[Page]]
15467 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15475 Category:MediaWiki User's Guide
15483 [[:Category:MediaWiki User's Guide]]
15485 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15494 [[Category:MediaWiki User's Guide]]
15496 cat=MediaWiki_User's_Guide sort=
15498 <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"}}'/>
15502 PAGESINCATEGORY invalid title fatal (r33546 fix)
15504 {{PAGESINCATEGORY:<bogus>}}
15511 Category with different sort key
15515 [[Category:MediaWiki User's Guide|Foo]]
15517 cat=MediaWiki_User's_Guide sort=Foo
15519 <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"}}'/>
15523 Category with identical sort key
15527 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15529 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15531 <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"}}'/>
15535 Category with empty sort key
15540 [[Category:MediaWiki User's Guide|]]
15542 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15546 Category with empty sort key and parentheses
15551 [[Category:Foo (bar)|]]
15553 [[Category:Foo (bar)|Foo]]
15557 Category with link tail
15562 123[[Category:Foo]]456
15564 123[[Category:Foo]]456
15568 Category with template
15573 [[Category:{{echo|Foo}}]]
15575 [[Category:{{echo|Foo}}]]
15579 Category with template in sort key
15584 [[Category:Foo|{{echo|Bar}}]]
15586 [[Category:Foo|{{echo|Bar}}]]
15590 Category with template in sort key and title
15595 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15597 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15600 ## We used to, but no longer wt2wt this test since the default serializer
15601 ## will normalize all categories to serialize on their own line.
15602 ## This wikitext usage is going to be fairly uncommon in production and
15603 ## selser will take care of preserving formatting in those scenarios.
15605 Category / paragraph interactions
15609 Foo [[Category:Baz]] Bar
15611 Foo [[Category:Baz]]
15619 [[Category:Baz]] Bar
15632 {{echo|[[Category:Baz]]}}
15645 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15646 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15647 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15648 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15649 <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>
15650 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15653 ## We used to, but no longer wt2wt this test since the default serializer
15654 ## will normalize all categories to serialize on their own line.
15655 ## This wikitext usage is going to be fairly uncommon in production and
15656 ## selser will take care of preserving formatting in those scenarios.
15658 ## The whitespace on the empty line is part of the test. Please do not delete
15660 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15666 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15668 {{echo|[[Category:Foo]] and so should this!}}
15670 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15675 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15677 <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>
15680 ## Parsoid will not try to wt2wt this while preserving newlines because
15681 ## it suppresses excess newlines within list items -- and we don't want to
15682 ## introduce a special case just for categories, which is, in reality somewhat
15683 ## odd behavior -- categories are unlikely to be used in list items like this
15684 ## in top-level pages and are only likely to show up in template-generated
15685 ## list items where this RT-ing is a non-issue.
15687 ## The whitespace on the empty line is part of the test. Please do not delete
15689 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15695 [[Category:Foo]] and this should be part of the same list item
15698 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15700 <ul><li>This and this should be part of the same list item</li>
15701 <li>So should this and this should be part of the same list item</li></ul>
15704 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15705 <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>
15709 ## Newlines and categories that follow the last item of a list
15710 ## are treated differently because this (list followed by categories)
15711 ## is an extremely common pattern on wikis.
15713 3. Categories and newlines: newline suppression for last list item should RT properly
15726 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15728 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15729 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15733 4. Categories and newlines: newline suppression for last list item should RT properly
15741 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15743 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15746 ## only wt2html for this to make sure the algo only applies to the rightmost path
15748 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15761 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15763 <ul><li> d</li></ul></li></ul>
15764 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15767 ## We used to, but no longer wt2wt this test since the default serializer
15768 ## will normalize all categories to serialize on their own line.
15769 ## This wikitext usage is going to be fairly uncommon in production and
15770 ## selser will take care of preserving formatting in those scenarios.
15772 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15776 * a [[Category:Foo]]
15778 <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>
15781 # This test also demonstrates because of newline+category tunneling
15782 # through the list hander, template wrapping doesn't expand to the
15783 # containing list when the list item swallows the category.
15785 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15790 <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
15791 </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>
15795 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15799 {{echo|[[Category:Foo]]
15803 <ul><li> a</li></ul>
15805 <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">
15806 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15807 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15811 9. Categories and newlines: should behave properly with linkprefix (T87753)
15826 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
15827 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
15831 Category links with multiple namespaces
15833 [[Category:Project:Foo]]
15835 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15839 Parsoid: Serialize link to category page with colon escape
15845 [[:Category:Foo|Bar]]
15848 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15849 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15853 # We used to, but no longer wt2wt this test since the default serializer
15854 # will normalize all categories to serialize on their own line.
15855 # This wikitext usage is going to be fairly uncommon in production and
15856 # selser will take care of preventing whitespace insertion if this
15857 # occurs in an article.
15859 # html2html disabled for the same reason (whitespace insertion between
15862 # html2wt disabled because it localizes the "Category" namespace.
15864 Link prefix/suffixes aren't applied to category links
15874 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15878 Link prefix/suffixes aren't applied to language links
15888 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
15892 Parsoid: Serialize link to file page with colon escape
15898 [[:File:Foo.png|Bar]]
15901 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15902 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15907 Parsoid: Serialize a genuine category link without colon escape
15912 [[Category:Foo|Bar]]
15914 <link rel="mw:PageProp/Category" href="./Category:Foo">
15915 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15919 Normalize hrefs properly before testing for invalid link targets (T72894)
15923 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15925 [[Category:Toxine bactérienne]]
15929 Parsoid: Defaultsort
15931 {{DEFAULTSORT:Foo}}
15933 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15936 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
15937 # But, this is a limitation of our representation and is documented in
15938 # TemplateHandler.js in processSpecialMagicWord
15940 Parsoid: Defaultsort (template-generated)
15942 {{{{echo|DEFAULTSORT}}:Foo}}
15944 <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"}]]}'/>
15948 ### Inter-language links
15951 Interlanguage links
15959 es:Alimento fr:Nourriture zh:食品
15961 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15962 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15963 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15967 Duplicate interlanguage links (T26502)
15978 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15979 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15980 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15981 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15988 Basic section headings
15995 ===Smaller headline===
15998 <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>
16001 <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>
16004 <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>
16010 Section headings with TOC
16013 === Subheadline 1 ===
16014 ===== Skipping a level =====
16015 ====== Skipping a level ======
16019 ===Another headline===
16021 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16023 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16025 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16027 <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>
16029 <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>
16036 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16038 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16044 <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>
16045 <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>
16046 <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>
16047 <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>
16048 <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>
16051 <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>
16056 TOC anchors don't collide
16064 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16066 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16067 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16068 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16069 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16073 <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>
16074 <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>
16075 <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>
16076 <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>
16080 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16082 Handling of sections up to level 6 and beyond
16085 == Level 2 Heading==
16086 === Level 3 Heading===
16087 ==== Level 4 Heading====
16088 ===== Level 5 Heading=====
16089 ====== Level 6 Heading======
16090 ======= Level 7 Heading=======
16091 ======== Level 8 Heading========
16092 ========= Level 9 Heading=========
16093 ========== Level 10 Heading==========
16095 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16097 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16099 <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>
16101 <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>
16103 <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>
16105 <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>
16107 <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>
16108 <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>
16109 <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>
16110 <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>
16111 <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>
16125 <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>
16126 <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>
16127 <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>
16128 <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>
16129 <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>
16130 <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>
16131 <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>
16132 <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>
16133 <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>
16134 <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>
16139 TOC regression (T11764)
16143 ==== title 1.1.1 ====
16148 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16150 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16152 <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>
16154 <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>
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 for heading containing <span id="..."></span> (T96153)
16181 ==<span id="old-anchor"></span>New title==
16183 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16185 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16189 <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>
16194 TOC with wgMaxTocLevel=3 (T8204)
16200 ==== title 1.1.1 ====
16205 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16207 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16209 <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>
16210 <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>
16213 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16215 <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>
16221 <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>
16222 <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>
16223 <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>
16224 <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>
16225 <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>
16226 <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>
16231 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16237 ====Section 1.1.1====
16238 ====Section 1.1.1.1====
16241 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16243 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16245 <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>
16248 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16252 <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>
16253 <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>
16254 <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>
16255 <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>
16256 <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>
16262 Resolving duplicate section names
16267 <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>
16268 <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>
16273 Resolving duplicate section names with differing case (T12721)
16278 <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>
16279 <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>
16291 Template with sections, __NOTOC__
16298 <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>
16299 <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>
16300 <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>
16301 <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>
16306 __NOEDITSECTION__ keyword
16312 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16313 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16318 Link inside a section heading
16320 ==Section with a [[Main Page|link]] in it==
16322 <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>
16327 TOC regression (T14077)
16334 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16336 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16338 <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>
16341 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16345 <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>
16346 <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>
16347 <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>
16352 T3219 URL next to image (good)
16354 http://example.com [[File:Foobar.jpg]]
16356 <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>
16359 <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>
16363 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16366 The line above must have a trailing space!
16369 But just in case it doesn't...
16371 <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>
16372 <p>The line above must have a trailing space!
16374 <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>
16375 <p>But just in case it doesn't...
16380 Header with special characters (T27462)
16382 The tooltips shall not show entities to the user (ie. be double escaped)
16399 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16401 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16403 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16404 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16405 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16406 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16407 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16411 <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>
16414 <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>
16417 <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>
16420 <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>
16423 <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>
16429 Header with space, plus and underscore as entity
16431 Id should not contain + for spaces
16433 == Space between Text ==
16436 == Space-Entity between Text ==
16439 == Plus+between+Text ==
16442 == Plus-Entity+between+Text ==
16445 == Underscore_between_Text ==
16448 == Underscore-Entity_between_Text ==
16451 [[#Space between Text]]
16452 [[#Space-Entity between Text]]
16453 [[#Plus+between+Text]]
16454 [[#Plus-Entity+between+Text]]
16455 [[#Underscore_between_Text]]
16456 [[#Underscore-Entity_between_Text]]
16458 <p>Id should not contain + for spaces
16460 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16462 <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>
16463 <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>
16464 <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>
16465 <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>
16466 <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>
16467 <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>
16471 <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>
16474 <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>
16477 <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>
16480 <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>
16483 <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>
16486 <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>
16488 </p><p><a href="#Space_between_Text">#Space between Text</a>
16489 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
16490 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
16491 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
16492 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
16493 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
16498 Headers with excess '=' characters
16499 (Are similar tests necessary beyond the 1st level?)
16503 =''italic'' heading==
16504 ==''italic'' heading=
16506 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16508 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
16509 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
16510 <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>
16511 <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>
16515 <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>
16516 <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>
16517 <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>
16518 <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>
16523 HTML headers vs TOC (T25393)
16524 (__NOEDITSECTION__ for clearer output, doesn't matter here)
16536 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16538 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
16540 <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>
16541 <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>
16544 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
16546 <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>
16547 <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>
16553 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
16554 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
16555 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
16556 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
16557 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
16558 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
16563 Single-line or multiline-comments can follow headings
16565 parsoid=wt2html,wt2wt
16573 <h2><span class="mw-headline" id="foo">foo</span></h2>
16574 <h2><span class="mw-headline" id="bar">bar</span></h2>
16575 <h2><span class="mw-headline" id="baz">baz</span></h2>
16580 T3219 URL next to image (broken)
16582 http://example.com[[File:Foobar.jpg]]
16584 <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>
16587 <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>
16591 T3186 news: in the middle of text
16593 http://en.wikinews.org/wiki/Wikinews:Workplace
16595 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
16601 Namespaced link must have a title
16610 Namespaced link must have a title (bad fragment version)
16612 [[Project:#fragment]]
16614 <p>[[Project:#fragment]]
16620 ### HTML tags and HTML attributes
16624 div with no attributes
16626 <div>HTML rocks</div>
16628 <div>HTML rocks</div>
16633 div with double-quoted attribute
16635 <div id="rock">HTML rocks</div>
16637 <div id="rock">HTML rocks</div>
16642 div with single-quoted attribute
16644 <div id='rock'>HTML rocks</div>
16646 <div id="rock">HTML rocks</div>
16651 div with unquoted attribute
16653 <div id=rock>HTML rocks</div>
16655 <div id="rock">HTML rocks</div>
16660 div with illegal double attributes
16662 <div id="a" id="b">HTML rocks</div>
16664 <div id="b">HTML rocks</div>
16669 div with empty attribute value, space before equals
16671 parsoid=wt2html,html2html
16673 <div class =>HTML rocks</div>
16675 <div class="">HTML rocks</div>
16678 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16682 div with multiple empty attribute values
16684 parsoid=wt2html,html2html
16686 <div id= title=>HTML rocks</div>
16688 <div id="title.3D">HTML rocks</div>
16691 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16695 table with multiple empty attribute values
16697 parsoid=wt2html,html2html
16703 <table title="id=">
16709 <table title="id=">
16710 <tbody><tr><td> hi</td></tr>
16715 div with braces in attribute value
16717 <div title="{}">Foo</div>
16719 <div title="{}">Foo</div>
16722 <div title="{}">Foo</div>
16726 div with empty attribute value, no space before equals
16728 parsoid=wt2html,html2html
16730 <div class=>HTML rocks</div>
16732 <div class="">HTML rocks</div>
16735 <div class="">HTML rocks</div>
16739 HTML multiple attributes correction
16741 <p class="error" class="awesome">Awesome!</p>
16743 <p class="awesome">Awesome!</p>
16748 Table multiple attributes correction
16751 !+ class="error" class="awesome"| status
16756 <th class="awesome"> status
16764 <DIV ID="x">HTML ROCKS</DIV>
16766 <div id="x">HTML ROCKS</div>
16771 Non-ASCII pseudo-tags are rendered as text
16780 Pseudo-tag with URL 'name' renders as url link
16782 <http://example.com/>
16784 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16789 text with amp in the middle of nowhere
16793 <p>Remember AT&T?
16798 text with character entity: eacute
16800 I always thought é was a cute letter.
16802 <p>I always thought é was a cute letter.
16805 <p>I always thought é was a cute letter.</p>
16809 text with entity-escaped character entity-like string: eacute
16811 I always thought &eacute; was a cute letter.
16813 <p>I always thought &eacute; was a cute letter.
16818 text with undefined character entity: xacute
16820 I always thought &xacute; was a cute letter.
16822 <p>I always thought &xacute; was a cute letter.
16829 <data value="5">five</data>
16830 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16831 <mark>This highlighted text</mark>
16833 <p><data value="5">five</data>
16834 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16835 <mark>This highlighted text</mark>
16840 HTML tag with leading space is parsed as text
16844 <p>< div>foo< /div>
16849 ### Nesting tests (see T43545, T52604, T53081)
16852 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
16853 # Note that html2wt is considerably more difficult if we use <b> in
16854 # the test case, instead of <small>
16856 Ensure that HTML adoption agency algorithm is properly implemented.
16858 <small>X<small>Y</small>Z</small>
16860 <p><small>X<small>Y</small>Z</small>
16864 # This was T43545 in the PHP parser.
16865 # Note that tidy doesn't handle this correctly.
16869 <kbd>X<kbd>Y</kbd>Z</kbd>
16871 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16875 # The following cases were T53081 in the PHP parser.
16876 # Note that there are some other nestable tags (b, i, etc) which are
16877 # not covered; see T53081 for discussion.
16879 # Note that tidy doesn't handle this correctly.
16883 <em>X<em>Y</em>Z</em>
16885 <p><em>X<em>Y</em>Z</em>
16889 # Note that tidy doesn't handle this correctly.
16891 Nesting of <strong>
16893 <strong>X<strong>Y</strong>Z</strong>
16895 <p><strong>X<strong>Y</strong>Z</strong>
16904 <p><q>X<q>Y</q>Z</q></p>
16907 # Note that tidy doesn't handle this correctly.
16911 <ruby>X<ruby>Y</ruby>Z</ruby>
16913 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16917 # Note that tidy doesn't handle this correctly.
16921 <bdo>X<bdo>Y</bdo>Z</bdo>
16923 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16935 [[Media:Foobar.jpg]]
16937 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16940 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a></p>
16944 Media link with text
16946 [[Media:Foobar.jpg|A neat file to look at]]
16948 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16951 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
16954 # FIXME: this is still bad HTML tag nesting
16955 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16957 Media link with nasty text
16959 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16961 <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>
16964 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16965 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16967 <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>
16972 Media link to nonexistent file (T3702)
16974 [[Media:No such.jpg]]
16975 [[Media:No_such file.jpg]]
16977 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16978 <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>
16981 <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>
16982 <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>
16986 Image link to nonexistent file (T3850 - good)
16988 [[File:No_such.jpg]]
16990 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16993 <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>
16997 :Image link to nonexistent file (T3850 - bad)
16999 [[:Image:No such.jpg]]
17001 <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>
17004 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17010 Character reference normalization in link text (T3938)
17012 [[Main Page|this&that]]
17014 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17021 Test for unicode normalization
17023 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17027 (T21451) Links should refer to the normalized form.
17035 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17036 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17037 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17038 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17039 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17044 Empty attribute crash test (T4067)
17046 <font color="">foo</font>
17048 <p><font color="">foo</font>
17053 Empty attribute crash test single-quotes (T4067)
17055 <font color=''>foo</font>
17057 <p><font color="">foo</font>
17062 Attribute test: equals, then nothing
17064 parsoid=wt2html,html2html
17066 <font color=>foo</font>
17068 <p><font color="">foo</font>
17071 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17075 Attribute test: unquoted value
17077 parsoid=wt2html,html2html
17079 <font color=x>foo</font>
17081 <p><font color="x">foo</font>
17084 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17088 Attribute test: unquoted but illegal value (hash)
17090 <font color=#x>foo</font>
17092 <p><font color="#x">foo</font>
17096 # Parsoid does not serialize to empty attribute syntax,
17097 # so wt2wt and html2wt cases are skipped
17099 Attribute test: no value (T54330)
17101 parsoid=wt2html,html2html
17103 <font color>foo</font>
17105 <p><font color="">foo</font>
17108 <p><font color="">foo</font></p>
17112 T4095: link with three closing brackets
17116 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17119 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17123 T4095: link with pipe and three closing brackets
17125 [[Main Page|link]]]
17127 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17130 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17134 T4095: link with pipe and three closing brackets, version 2
17136 [[Main Page|[http://example.com/]]]
17138 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17141 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17150 Template:Dangerous attribute
17152 " onmouseover="alert(document.cookie)
17156 Template:Dangerous style attribute
17158 border-size: expression(alert(document.cookie))
17164 <div style="float: right; {{{1}}}">Magic div</div>
17168 T4304: HTML attribute safety (safe template; regression T4309)
17170 <div title="{{test}}"></div>
17172 <div title="This is a test template"></div>
17175 <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>
17178 # Parsoid has enough context to handle this case
17180 T4304: HTML attribute safety (dangerous template; 2309)
17182 <div title="{{dangerous attribute}}"></div>
17184 <div title=""></div>
17187 <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>
17191 T4304: HTML attribute safety (dangerous style template; 2309)
17193 <div style="{{dangerous style attribute}}"></div>
17195 <div style="/* insecure input */"></div>
17198 <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>
17202 T4304: HTML attribute safety (safe parameter; 2309)
17204 {{div style|width: 200px}}
17206 <div style="float: right; width: 200px">Magic div</div>
17209 <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>
17213 T4304: HTML attribute safety (unsafe parameter; 2309)
17215 {{div style|width: expression(alert(document.cookie))}}
17217 <div style="/* insecure input */">Magic div</div>
17220 <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>
17223 ## Parsoid output here differs; needs investigation.
17225 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17227 {{div style|"><script>alert(document.cookie)</script>}}
17229 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17233 ## Parsoid output here differs; needs investigation.
17235 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17237 {{div style|" ><script>alert(document.cookie)</script>}}
17239 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17244 T4304: HTML attribute safety (link)
17246 <div title="[[Main Page]]"></div>
17248 <div title="[[Main Page]]"></div>
17253 T4304: HTML attribute safety (italics)
17255 <div title="''foobar''"></div>
17257 <div title="''foobar''"></div>
17262 T4304: HTML attribute safety (bold)
17264 <div title="'''foobar'''"></div>
17266 <div title="'''foobar'''"></div>
17271 T4304: HTML attribute safety (ISBN)
17273 <div title="ISBN 1234567890"></div>
17275 <div title="ISBN 1234567890"></div>
17280 T4304: HTML attribute safety (RFC)
17282 <div title="RFC 1234"></div>
17284 <div title="RFC 1234"></div>
17289 T4304: HTML attribute safety (PMID)
17291 <div title="PMID 1234567890"></div>
17293 <div title="PMID 1234567890"></div>
17298 T4304: HTML attribute safety (web link)
17300 <div title="http://example.com/"></div>
17302 <div title="http://example.com/"></div>
17307 T4304: HTML attribute safety (named web link)
17309 <div title="[http://example.com/ link]"></div>
17311 <div title="[http://example.com/ link]"></div>
17316 T5244: HTML attribute safety (extension; safe)
17318 <div style="<nowiki>background:blue</nowiki>"></div>
17320 <div style="background:blue"></div>
17323 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17327 T5244: HTML attribute safety (extension; unsafe)
17329 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17331 <div style="/* insecure input */"></div>
17334 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17337 # More MSIE fun discovered by Tom Gilder
17340 MSIE CSS safety test: spurious slash
17342 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17344 <div style="/* insecure input */">evil</div>
17347 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
17351 MSIE CSS safety test: hex code
17353 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
17355 <div style="/* insecure input */">evil</div>
17358 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
17362 MSIE CSS safety test: comment in url
17364 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
17366 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
17369 <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>
17373 MSIE CSS safety test: comment in expression
17375 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
17377 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
17380 <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>
17384 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
17386 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
17388 <p style="/* invalid control char */">A</p>
17391 <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>
17395 MSIE 6 CSS safety test: Fullwidth (T57332)
17397 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
17398 <div style="top:EXPRESSION(alert())">B</div>
17400 <p style="/* insecure input */">A</p>
17401 <div style="/* insecure input */">B</div>
17404 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
17405 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
17409 MSIE 6 CSS safety test: IPA extensions (T57332)
17411 <div style="background-image:uʀʟ(javascript:alert())">A</div>
17412 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
17414 <div style="/* insecure input */">A</div>
17415 <p style="/* insecure input */">B</p>
17418 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
17419 <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>
17423 MSIE 6 CSS safety test: sup/sub script (T57332)
17425 <div style="background-image:url⁽javascript:alert())">A</div>
17426 <div style="background-image:url₍javascript:alert())">B</div>
17427 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
17429 <div style="/* insecure input */">A</div>
17430 <div style="/* insecure input */">B</div>
17431 <p style="/* insecure input */">C</p>
17434 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
17435 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
17436 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
17442 parsoid=wt2html,html2html
17445 title="data:text/html,<img src=1 onerror=alert(1)>"
17446 style="-o-link:attr(title);-o-link-source:current">X</div>
17448 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
17451 <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>
17455 MSIE 6 CSS safety test: Repetition markers (T57332)
17457 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
17458 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
17459 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
17460 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
17461 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
17462 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
17463 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
17465 <p style="/* insecure input */">A</p>
17466 <p style="/* insecure input */">B</p>
17467 <p style="/* insecure input */">C</p>
17468 <p style="/* insecure input */">D</p>
17469 <p style="/* insecure input */">E</p>
17470 <p style="/* insecure input */">F</p>
17471 <p style="/* insecure input */">G</p>
17474 <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>
17475 <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>
17476 <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>
17477 <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>
17478 <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>
17479 <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>
17480 <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>
17484 Table attribute legitimate extension
17487 !+ style="<nowiki>color:blue</nowiki>"| status
17492 <th style="color:blue"> status
17498 Table attribute safety
17501 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
17506 <th style="/* insecure input */"> status
17512 CSS line continuation 1
17514 <div style="background-image: u\ rl(test.jpg);"></div>
17516 <div style="/* insecure input */"></div>
17521 CSS line continuation 2
17523 <div style="background-image: u\ rl(test.jpg); "></div>
17525 <div style="/* invalid control char */"></div>
17536 Expansion of multi-line templates in attribute values (T8255)
17538 <div style="background: {{identity|#00FF00}}">-</div>
17540 <div style="background: #00FF00">-</div>
17545 Expansion of multi-line templates in attribute values (T8255 sanity check)
17547 <div style="background:
17550 <div style="background: #00FF00">-</div>
17553 <div style="background:
17558 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
17560 <div style="background: #00FF00">-</div>
17562 <div style="background: #00FF00">-</div>
17567 Tags which are hidden from Tidy cannot pass through the Sanitizer
17569 <mw:toc><script>alert();</script></mw:toc>
17571 <p><mw:toc><script>alert();</script></mw:toc></p>
17575 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
17579 Parser hook: empty input
17590 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17593 ## Don't expect parsoid to rt this form.
17595 Parser hook: empty input using terminated empty elements
17597 parsoid=wt2html,html2html
17608 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17612 Parser hook: empty input using terminated empty elements (space before)
17623 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17627 Parser hook: basic input
17638 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17641 ## Don't expect parsoid to rt this form.
17643 Parser hook: case insensitive
17645 parsoid=wt2html,html2html
17656 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17659 ## Don't expect parsoid to rt this form.
17661 Parser hook: case insensitive, redux
17663 parsoid=wt2html,html2html
17674 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17678 Parser hook: nested tags
17680 <tag><tag></tag></tag>
17689 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
17693 Parser hook: basic arguments
17695 <tag width="200" height="100" depth="50" square=""></tag>
17708 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17711 ## Don't expect parsoid to rt this form.
17713 Parser hook: basic arguments, variations
17715 parsoid=wt2html,html2html
17717 <tag width=200 height = "100" depth = '50' square></tag>
17730 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17734 Parser hook: argument containing a forward slash (T7344)
17736 <tag filename="/tmp/bla"></tag>
17741 'filename' => '/tmp/bla',
17746 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17749 ## Don't expect parsoid to rt this form.
17751 Parser hook: empty input using terminated empty elements (T4374)
17753 parsoid=wt2html,html2html
17765 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
17768 ## </tag> should be output literally since there is no matching tag that begins it
17769 ## Don't expect parsoid to rt this form.
17771 Parser hook: basic arguments using terminated empty elements (T4374)
17775 <tag width=200 height = "100" depth = '50' square/>
17792 <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
17796 ## Don't expect parsoid to rt this form.
17798 Parser hook: Don't allow unclosed extension tags
17804 this is a '''test'''
17806 <p>test <tag>123
17807 </p><p>this is a <b>test</b>
17810 <p>test <tag>123</p>
17812 <p>this is a <b>test</b></p>
17816 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
17820 Parser hook: static parser hook not inside a comment
17822 <statictag>hello, world</statictag>
17824 <statictag action="flush" />
17830 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
17831 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17835 Parser hook: static parser hook inside a comment
17837 <!-- <statictag>hello, world</statictag> -->
17838 <statictag action="flush" />
17843 <!-- <statictag>hello, world</statictag> -->
17844 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17847 # Nested template calls; this case was broken by Parser.php rev 1.506,
17851 Template:One-parameter
17853 (My parameter is: {{{1}}})
17857 Template:Map-one-parameter
17859 {{{{{1}}}|{{{2}}}}}
17863 Nested template calls
17865 {{Map-one-parameter|One-parameter|param}}
17867 <p>(My parameter is: param)
17876 # HTML+Tidy effectively strips out the empty tags completely
17877 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17878 # which Tidy would have done for the PHP parser had there been content inside it.
17880 Sanitizer: Closing of open tags
17882 <s></s><table></table>
17884 <s></s><table></table>
17887 <p><s></s></p><table></table>
17891 Sanitizer: Closing of open but not closed tags
17900 Sanitizer: Closing of closed but not open tags
17910 Sanitizer: Closing of closed but not open table tags
17914 Table not started</td></tr></table>
17916 <p>Table not started</p>
17918 <p>Table not started</p>
17922 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17924 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17926 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17929 <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>
17932 # In HTML5, the restrictions are that id must contain at least one character,
17933 # and must not contain any space characters.
17935 Sanitizer: Validating the contents of the id attribute (T6515)
17939 <br id="" /><br id="a space" />
17944 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17946 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
17950 <br id="foo" /><br id="foo" />
17952 Something need to be done. foo-2 ?
17956 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17959 <meta itemprop="hello" content="world">
17960 <meta http-equiv="refresh" content="5">
17961 <meta itemprop="hello" http-equiv="refresh" content="5">
17962 <link itemprop="hello" href="{{SERVER}}">
17963 <link rel="stylesheet" href="{{SERVER}}">
17964 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17968 <p> <meta itemprop="hello" content="world" />
17969 <meta http-equiv="refresh" content="5">
17970 <meta itemprop="hello" content="5" />
17971 <link itemprop="hello" href="http://example.org" />
17972 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17973 <link itemprop="hello" href="http://example.org" />
17980 Sanitizer: Strip comments from CSS attributes
17982 parsoid=wt2html,wt2wt
17984 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
17986 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
17989 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
17993 Language converter: output gets cut off unexpectedly (T7757)
17997 this bit is safe: }-
17999 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18001 then we get cut off here: }-
18003 all additional text is vanished
18005 <p>this bit is safe: }-
18006 </p><p>but if we add a conversion instance: xxx
18007 </p><p>then we get cut off here: }-
18008 </p><p>all additional text is vanished
18013 Self closed html pairs (T7487)
18015 <center><font id="bug" />Centered text</center>
18016 <div><font id="bug2" />In div text</div>
18018 <center><font id="bug"></font>Centered text</center>
18019 <div><font id="bug2"></font>In div text</div>
18027 Punctuation: nbsp before exclamation
18031 <p>C'est grave !
18036 Punctuation: CSS !important (T13874)
18038 <div style="width:50% !important">important</div>
18040 <div style="width:50% !important">important</div>
18045 Punctuation: CSS ! important (T13874; with space after)
18047 <div style="width:50% ! important">important</div>
18049 <div style="width:50% ! important">important</div>
18054 HTML bullet list, closed tags (T7497)
18067 <ul data-parsoid='{"stx":"html"}'>
18068 <li data-parsoid='{"stx":"html"}'>One</li>
18069 <li data-parsoid='{"stx":"html"}'>Two</li>
18075 HTML bullet list, unclosed tags (T7497)
18087 <ul data-parsoid='{"stx":"html"}'>
18088 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18089 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18095 HTML ordered list, closed tags (T7497)
18108 <ol data-parsoid='{"stx":"html"}'>
18109 <li data-parsoid='{"stx":"html"}'>One</li>
18110 <li data-parsoid='{"stx":"html"}'>Two</li>
18116 HTML ordered list, unclosed tags (T7497)
18129 <ol data-parsoid='{"stx":"html"}'>
18130 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18131 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18137 HTML nested bullet list, closed tags (T7497)
18160 <ul data-parsoid='{"stx":"html"}'>
18161 <li data-parsoid='{"stx":"html"}'>One</li>
18162 <li data-parsoid='{"stx":"html"}'>Two:
18163 <ul data-parsoid='{"stx":"html"}'>
18164 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18165 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18172 HTML nested bullet list, open tags (T7497)
18209 HTML nested ordered list, closed tags (T7497)
18234 HTML nested ordered list, open tags (T7497)
18271 HTML ordered list item with parameters oddity
18273 <ol><li id="fragment">One</li>
18276 <ol><li id="fragment">One</li>
18281 # parsoid doesn't explicitly mark autonumbered links, see T55505
18283 T7918: autonumbering
18285 [http://first/] [http://second] [ftp://ftp]
18289 [mailto:enclosed@mail.tld With target]
18291 [mailto:enclosed@mail.tld]
18293 mailto:inline@mail.tld
18295 <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>
18296 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
18297 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
18298 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
18299 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
18302 <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>
18303 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
18304 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
18305 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
18306 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
18311 # Security and HTML correctness
18312 # From Nick Jenkins' fuzz testing
18316 Fuzz testing: Parser13
18331 Fuzz testing: Parser14
18336 <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>
18337 http://<div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
18339 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18345 <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>
18347 <div id="toc" class="toc">
18348 <div class="toctitle">
18352 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18359 Fuzz testing: Parser14-table
18361 parsoid=wt2html,html2html
18366 <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>
18367 <table style="__TOC__">
18372 <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>
18373 <table style="__TOC__">
18380 <table style="__TOC__"></table>
18383 # Known to produce bogus xml (extra </td>)
18385 Fuzz testing: Parser16
18412 Fuzz testing: Parser21
18415 ! irc://{{ftp://a" onmouseover="alert('hello world');"
18420 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
18430 Fuzz testing: Parser22
18432 http://===r:::https://b
18436 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
18444 # Known to produce bad XML for now
18446 Fuzz testing: Parser24
18453 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
18454 <br style="onmouseover='alert(document.cookie);' " />
18456 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18461 <u class="|">}}}} >
18462 <br style="onmouseover='alert(document.cookie);'" />
18464 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18472 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
18473 <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>"}'/>}}}} >
18474 <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}'>
18478 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
18481 # Note: the current result listed for this is not what the original one was,
18482 # but the original bug was JavaScript injection, which is fixed in any case.
18483 # It's not clear that the original result listed was any more correct than the
18484 # current one. Original result:
18487 # <li class="||">
18488 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18490 Fuzz testing: Parser25 (T8055)
18496 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
18498 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18501 <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"]}'>
18502 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
18506 Fuzz testing: URL adjacent extension (with space, clean)
18508 http://example.com <nowiki>junk</nowiki>
18510 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
18513 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
18517 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
18519 http://example.com<nowiki>junk</nowiki>
18521 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
18524 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
18528 Fuzz testing: URL adjacent extension (no space, dirty; pre)
18530 http://example.com<pre>junk</pre>
18532 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
18535 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
18540 <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>
18544 Fuzz testing: image with bogus manual thumbnail
18546 [[Image:foobar.jpg|thumbnail= ]]
18548 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
18551 <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>
18555 Fuzz testing: encoded newline in generated HTML replacements (T8577)
18557 <pre dir=" "></pre>
18559 <pre dir=" "></pre>
18562 <pre typeof="mw:Extension/pre" about="#mwt2" dir="&#10;" data-mw='{"name":"pre","attrs":{"dir":"&#10;"},"body":{"extsrc":""}}'></pre>
18566 Parsing optional HTML elements (T8171)
18571 <td> Some tabular data</td>
18572 <td> More tabular data ...
18573 <td> And yet som tabular data</td>
18579 <td> Some tabular data</td>
18580 <td> More tabular data ...
18581 </td><td> And yet som tabular data</td>
18588 Correct handling of <td>, <tr> (T8171)
18593 <td> Some tabular data</td>
18594 <td> More tabular data ...</td>
18595 <td> And yet som tabular data</td>
18601 <td> Some tabular data</td>
18602 <td> More tabular data ...</td>
18603 <td> And yet som tabular data</td>
18611 Parsing crashing regression (fr:JavaScript)
18615 <p></body></x>
18620 Inline wiki vs wiki block nesting
18626 <p><b>Bold paragraph</b>
18627 </p><p>New wiki paragraph
18631 # FIXME: The current php output is documented
18632 # and desired output is the parsoid target.
18634 Inline HTML vs wiki block nesting
18640 <p><b>Bold paragraph
18641 </p><p>New wiki paragraph</b>
18644 <p><b>Bold paragraph</b>
18645 </p><p>New wiki paragraph
18649 # Original result was this:
18650 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
18652 # While that might be marginally more intuitive, maybe, the six-apostrophe
18653 # construct is clearly pathological and the result stated here (which is what
18654 # the parser actually does) is about as reasonable as anything.
18656 Mixing markup for italics and bold
18659 '''bold''''''bold''bolditalics'''''
18661 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
18669 Article for special page transclusion test
18673 Special page transclusion
18676 {{Special:Prefixindex/Xyzzyx}}
18678 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18684 Special page transclusion twice (T7021)
18687 {{Special:Prefixindex/Xyzzyx}}
18688 {{Special:Prefixindex/Xyzzyx}}
18690 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18692 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18698 Transclusion of default MediaWiki message
18700 {{MediaWiki:Mainpage}}
18707 Transclusion of nonexistent MediaWiki message
18709 {{MediaWiki:Mainpagexxx}}
18711 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
18716 Transclusion of MediaWiki message with underscore
18718 {{MediaWiki:history_short}}
18725 Transclusion of MediaWiki message with space
18727 {{MediaWiki:history short}}
18734 Invalid header with following text
18744 Section extraction test (section 0)
18764 Section extraction test (section 1)
18786 Section extraction test (section 2)
18807 Section extraction test (section 3)
18827 Section extraction test (section 4)
18851 Section extraction test (section 5)
18871 Section extraction test (section 6)
18892 Section extraction test (section 7)
18912 Section extraction test (section 8)
18932 Section extraction test (section 9)
18953 Section extraction test (section 10)
18973 Section extraction test (nonexistent section 11)
18992 Section extraction test with bogus heading (section 1)
18997 ==bogus== not a legal section
19001 ==bogus== not a legal section
19005 Section extraction test with bogus heading (section 2)
19010 ==bogus== not a legal section
19017 Section extraction test with comment after heading (section 1)
19029 Section extraction test with comment after heading (section 2)
19041 Section extraction test with bogus <nowiki> heading (section 1)
19046 ==bogus== <nowiki>not a legal section</nowiki>
19050 ==bogus== <nowiki>not a legal section</nowiki>
19054 Section extraction test with bogus <nowiki> heading (section 2)
19059 ==bogus== <nowiki>not a legal section</nowiki>
19065 # Formerly testing for T4587, now resolved by the use of unmarked sections
19066 # instead of respecting commented sections
19068 Section extraction prefixed by comment (section 1)
19079 Section extraction prefixed by comment (section 2)
19089 # Formerly testing for T4607, now resolved by the use of unmarked sections
19090 # instead of respecting HTML-style headings
19092 Section extraction, mixed wiki and html (section 1)
19108 Section extraction, mixed wiki and html (section 2)
19124 # Formerly testing for T5342
19126 Section extraction, heading surrounded by <noinclude>
19130 <noinclude>==unmarked==</noinclude>
19136 # Test behavior of T21910
19138 Sectiion with all-equals
19143 The line above must have a trailing space
19146 But just in case it doesn't...
19150 But just in case it doesn't...
19154 Section replacement test (section 0)
19185 Section replacement test (section 1)
19214 Section replacement test (section 2)
19244 Section replacement test (section 3)
19275 Section replacement test (section 4)
19302 Section replacement test (section 5)
19333 Section replacement test (section 6)
19363 Section replacement test (section 7)
19394 Section replacement test (section 8)
19425 Section replacement test (section 9)
19454 Section replacement test (section 10)
19484 Section replacement test with initial whitespace (T15728)
19488 Preformatted initial line
19492 Preformatted initial line
19499 Section extraction, heading followed by pre with 20 spaces (T8398)
19511 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
19524 Section extraction, <pre> around bogus header (T12309)
19541 Section replacement, <pre> around bogus header (T12309)
19562 Handling of 
 in URLs
19566 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19569 <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>
19573 Handling of %0A in URLs
19577 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19580 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19583 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
19585 5 quotes, code coverage +1 line
19592 <p><b><i></i></b></p>
19595 # same html as previous, but wikitext adjusted to match parsoid html2wt
19596 # note that wt2html and html2html will put the <i> before the <b>
19598 5 quotes, code coverage +1 line w/ nowiki (1)
19600 parsoid=wt2wt,html2wt
19602 '''''<nowiki/>'''''
19607 <p><b><i></i></b></p>
19610 # same as previous, just swapping the <i> and <b>
19612 5 quotes, code coverage +1 line w/ nowiki (2)
19614 '''''<nowiki/>'''''
19619 <p><i><b></b></i></p>
19623 Special:Search page linking.
19627 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
19632 {{!}} is a magic word
19634 {{!}} is a magic word there and {{!}} is still a magic word here
19635 | is not a magic word here but {{!}} is still a magic word here
19637 <p>| is a magic word there and | is still a magic word here
19638 | is not a magic word here but | is still a magic word here
19641 <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
19642 | 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>
19648 title=[[Parser test]]
19653 * {{FULLPAGENAMEE}}
19655 * {{BASEPAGENAMEE}}
19659 * {{ROOTPAGENAMEE}}
19661 * {{TALKPAGENAMEE}}
19662 * {{SUBJECTPAGENAME}}
19663 * {{SUBJECTPAGENAMEE}}
19666 * {{NAMESPACENUMBER}}
19670 * {{SUBJECTSPACEE}}
19671 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
19673 <ul><li> Parser test</li>
19674 <li> Parser_test</li>
19675 <li> Parser test</li>
19676 <li> Parser_test</li>
19677 <li> Parser test</li>
19678 <li> Parser_test</li>
19679 <li> Parser test</li>
19680 <li> Parser_test</li>
19681 <li> Parser test</li>
19682 <li> Parser_test</li>
19683 <li> Talk:Parser test</li>
19684 <li> Talk:Parser_test</li>
19685 <li> Parser test</li>
19686 <li> Parser_test</li>
19694 <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>
19697 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
19700 Gallery with valid attributes
19702 <gallery type="123" summary="345">
19703 File:File:Foobar.jpg
19706 <ul class="gallery mw-gallery-traditional" type="123">
19707 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19708 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
19709 <div class="gallerytext">
19715 <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"}}'>
19716 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span style="display: inline-block; height: 100%; vertical-align: middle;"></span><span style="vertical-align: middle; display: inline-block;">File:File:Foobar.jpg</span></div><div class="gallerytext"></div></li>
19720 ## Parsoid thinks the "centre" here is a property, not a caption.
19725 "modes": ["wt2html"],
19726 "nativeGallery": true
19734 image4 |300px| centre
19735 image5.svg| http://///////
19740 <ul class="gallery mw-gallery-traditional">
19741 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19742 <div class="thumb" style="height: 150px;">Image1.png</div>
19743 <div class="gallerytext">
19746 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19747 <div class="thumb" style="height: 150px;">Image2.gif</div>
19748 <div class="gallerytext">
19751 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19752 <div class="thumb" style="height: 150px;">Image3</div>
19753 <div class="gallerytext">
19756 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19757 <div class="thumb" style="height: 150px;">Image4</div>
19758 <div class="gallerytext">
19763 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19764 <div class="thumb" style="height: 150px;">Image5.svg</div>
19765 <div class="gallerytext">
19766 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
19770 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19771 <div class="thumb" style="height: 150px;">* image6</div>
19772 <div class="gallerytext">
19778 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19779 <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>
19780 <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>
19781 <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>
19782 <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>
19783 <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>
19784 <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>
19789 Gallery (with options, html)
19792 "modes": ["wt2html", "html2html"],
19793 "nativeGallery": true
19796 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19797 File:Nonexistent.jpg|caption
19798 File:Nonexistent.jpg
19799 image:foobar.jpg|some '''caption''' [[Main Page]]
19801 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19804 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19805 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19806 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19807 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19808 <div class="gallerytext">
19813 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19814 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19815 <div class="gallerytext">
19818 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19819 <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>
19820 <div class="gallerytext">
19821 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19825 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19826 <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>
19827 <div class="gallerytext">
19830 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19831 <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>
19832 <div class="gallerytext">
19840 <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":{}}'>
19841 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19842 <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>
19843 <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>
19844 <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>
19845 <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>
19846 <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>
19851 Gallery (with options, extsrc)
19854 "nativeGallery": false
19857 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19858 File:Nonexistent.jpg|caption
19859 File:Nonexistent.jpg
19860 image:foobar.jpg|some '''caption''' [[Main Page]]
19862 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19865 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19866 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19867 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19868 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19869 <div class="gallerytext">
19874 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19875 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19876 <div class="gallerytext">
19879 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19880 <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>
19881 <div class="gallerytext">
19882 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19886 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19887 <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>
19888 <div class="gallerytext">
19891 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19892 <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>
19893 <div class="gallerytext">
19901 <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"}}'>
19902 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19903 <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>
19904 <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>
19905 <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>
19906 <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>
19907 <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>
19912 Gallery with link that has fragment
19915 "modes": ["wt2html", "html2html"],
19916 "nativeGallery": true
19920 image:foobar.jpg|link=Main_Page
19921 image:foobar.jpg|link=Main_Page#section
19922 image:foobar.jpg|link=Main Page#section|caption
19925 <ul class="gallery mw-gallery-traditional">
19926 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19927 <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>
19928 <div class="gallerytext">
19931 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19932 <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>
19933 <div class="gallerytext">
19936 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19937 <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>
19938 <div class="gallerytext">
19946 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19947 <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>
19948 <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>
19949 <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>
19953 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
19955 Gallery with template inside caption
19958 "nativeGallery": true
19961 <gallery caption="{{echo|hi}}">
19962 File:Foobar.jpg|{{echo|ho}}
19965 <ul class="gallery mw-gallery-traditional">
19966 <li class='gallerycaption'>{{echo|hi}}</li>
19967 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19968 <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>
19969 <div class="gallerytext">
19977 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19978 <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>
19979 <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>
19984 Gallery with wikitext inside caption
19987 "nativeGallery": true
19991 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
19992 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
19995 <ul class="gallery mw-gallery-traditional">
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="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>
19998 <div class="gallerytext">
19999 <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>
20003 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20004 <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>
20005 <div class="gallerytext">
20006 <p>This is a test template
20013 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20014 <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>
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 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>
20020 Gallery (with showfilename option)
20023 "nativeGallery": true
20026 <gallery showfilename="">
20027 File:Nonexistent.jpg|caption
20028 File:Nonexistent.jpg
20029 File:Foobar.jpg|some '''caption''' [[Main Page]]
20033 <ul class="gallery mw-gallery-traditional">
20034 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20035 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20036 <div class="gallerytext">
20037 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20042 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20043 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20044 <div class="gallerytext">
20045 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
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="" 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">
20052 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20053 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20057 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20058 <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>
20059 <div class="gallerytext">
20060 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20067 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20068 <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>
20069 <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>
20070 <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>
20071 <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>
20075 ## Should Parsoid be preserving these variations?
20077 Gallery (with namespace-less filenames)
20080 "modes": ["wt2html", "html2html"],
20081 "nativeGallery": true
20085 File:Nonexistent.jpg
20091 <ul class="gallery mw-gallery-traditional">
20092 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20093 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20094 <div class="gallerytext">
20097 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20098 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20099 <div class="gallerytext">
20102 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20103 <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>
20104 <div class="gallerytext">
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="/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>
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 style="vertical-align: middle; display: inline-block;">File:Nonexistent.jpg</span></div><div class="gallerytext"></div></li>
20117 <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>
20118 <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>
20119 <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>
20124 Gallery override link with WikiLink (T36852)
20127 "nativeGallery": true
20131 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
20134 <ul class="gallery mw-gallery-traditional">
20135 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20136 <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>
20137 <div class="gallerytext">
20143 <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":{}}'>
20144 <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>
20149 Gallery override link with absolute external link (T36852)
20152 "nativeGallery": true
20156 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20159 <ul class="gallery mw-gallery-traditional">
20160 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20161 <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>
20162 <div class="gallerytext">
20168 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20169 <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>
20174 Gallery override link with absolute external link with LanguageConverter
20179 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20182 <ul class="gallery mw-gallery-traditional">
20183 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20184 <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>
20185 <div class="gallerytext">
20195 Gallery override link with malicious javascript (T36852)
20198 "modes": ["wt2html", "html2html"],
20199 "nativeGallery": true
20203 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20206 <ul class="gallery mw-gallery-traditional">
20207 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20208 <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>
20209 <div class="gallerytext">
20215 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20216 <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>
20221 Gallery with invalid title as link (T45964)
20224 "modes": ["wt2html", "html2html"],
20225 "nativeGallery": true
20229 File:Foobar.jpg|link=<
20232 <ul class="gallery mw-gallery-traditional">
20233 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20234 <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>
20235 <div class="gallerytext">
20241 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20242 <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>
20247 Serialize gallery without attrs in data-mw
20250 "modes": ["html2wt"],
20251 "nativeGallery": true
20254 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
20255 <li class="gallerycaption">123</li>
20256 <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>
20259 <gallery caption="123">
20265 Gallery with class and style attributes
20268 "nativeGallery": true
20271 <gallery class="center" style="text-align: center;">
20275 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
20276 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20277 <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>
20278 <div class="gallerytext">
20284 <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":{}}'>
20285 <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>
20290 Gallery in slideshow mode
20293 "nativeGallery": true
20296 <gallery mode="slideshow" showthumbnails="">
20300 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
20301 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20302 <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>
20303 <div class="gallerytext">
20309 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
20310 <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>
20315 HTML Hex character encoding (spells the word "JavaScript")
20317 parsoid=wt2html,wt2wt,html2html
20319 JavaScript
20321 <p>JavaScript
20326 <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>
20330 HTML Hex character encoding bogus encoding (T28437 regression check)
20334 <p>&#xsee;&#XSEE;
20337 <p>&#xsee;&#XSEE;</p>
20341 HTML Hex character encoding mixed case
20343 parsoid=wt2html,wt2wt,html2html
20352 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
20355 # See: https://www.w3.org/TR/html5/syntax.html#character-references
20356 # Note that U+000C (form feed) is not a valid XML character, so
20357 # it is banned even though allowed in HTML5.
20359 Illegal character references (T106578)
20364 ; Control (low): 
20365 ; Control (high):  Ÿ
20366 ; Surrogate: ��
20367 ; This is an okay astral character: 💩
20376 <dt>Control (low)</dt>
20378 <dt>Control (high)</dt>
20379 <dd>&#x7F; &#x9F;</dd>
20381 <dd>&#xD83D;&#xDCA9;</dd>
20382 <dt>This is an okay astral character</dt>
20388 __FORCETOC__ override
20400 ISBN 978-0-1234-56 789
20402 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
20405 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
20407 <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>
20411 ISBN followed by 5 spaces
20422 ISBN ISBN 1234567890
20424 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20427 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
20430 # Uppercase X and lowercase x as well
20441 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
20442 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
20443 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
20444 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
20445 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
20446 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
20449 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
20450 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
20451 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
20452 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
20453 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
20454 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
20458 ISBN with empty prefix (parsoid test)
20462 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20465 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
20469 T24905: <abbr> followed by ISBN followed by </a>
20471 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
20473 <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>
20476 <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>
20484 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
20489 Double RFC with a wiki link
20493 <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>
20502 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
20505 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
20509 Centre-aligned image
20511 [[Image:foobar.jpg|centre]]
20513 <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>
20520 [[Image:foobar.jpg|none]]
20522 <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>
20527 Width + Height sized image (using px) (height is ignored)
20529 [[Image:foobar.jpg|640x480px]]
20531 <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>
20536 Width-sized image (using px, no following whitespace)
20538 [[Image:foobar.jpg|640px]]
20540 <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>
20545 Width-sized image (using px, with following whitespace - test regression from r39467)
20547 [[Image:foobar.jpg|640px ]]
20549 <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>
20554 Width-sized image (using px, with preceding whitespace - test regression from r39467)
20556 [[Image:foobar.jpg| 640px]]
20558 <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>
20563 Image with page parameter
20567 [[File:LoremIpsum.djvu|page=2]]
20569 <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>
20572 <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>
20576 Another italics / bold test
20584 # FIXME: The php output seems broken. It's interleaving some open/close tags.
20590 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
20593 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
20597 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
20599 Images with the "|" character in the comment
20601 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
20603 <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>
20606 <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>
20610 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
20612 <html><script>alert(1);</script></html>
20614 <p><html><script>alert(1);</script></html>
20619 HTML with raw HTML ($wgRawHtml==true)
20623 <html><script>alert(1);</script></html>
20625 <p><script>alert(1);</script>
20630 Parents of subpages, one level up
20632 subpage title=[[Subpage test/L1/L2/L3]]
20636 <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>
20642 Parents of subpages, one level up, not named
20644 subpage title=[[Subpage test/L1/L2/L3]]
20648 <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>
20655 Parents of subpages, two levels up
20657 subpage title=[[Subpage test/L1/L2/L3]]
20663 <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
20664 </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>
20669 Parents of subpages, two levels up, without trailing slash or name.
20671 subpage title=[[Subpage test/L1/L2/L3]]
20680 Parents of subpages, two levels up, with lots of extra trailing slashes.
20682 subpage title=[[Subpage test/L1/L2/L3]]
20686 <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>
20691 Subpage test/L1/L2/L3Sibling
20697 Transclusion of a sibling page (one level up)
20699 subpage title=[[Subpage test/L1/L2/L3]]
20708 Transclusion of a child page
20710 subpage title=[[Subpage test/L1/L2]]
20718 # This is wt2html only in Parsoid because we add <nowiki>
20719 # because of {{..}} and we don't expect to fix that to
20720 # eliminate the nowikis selective for {{..}} markup.
20722 Non-transclusion because of too many up levels
20724 subpage title=[[Subpage test/L1/L2/L3]]
20727 {{../../../../More than parent}}
20729 <p>{{../../../../More than parent}}
20732 <p>{{../../../../More than parent}}</p>
20736 Definition list code coverage
20742 <dl><dt> title  </dt>
20744 <dt> title </dt>
20750 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20751 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20752 <dt>title</dt><dd> def</dd></dl>
20756 Don't fall for the self-closing div
20758 <div>hello world</div/>
20760 <div>hello world</div>
20769 <p>[[:Template:Msg]]
20778 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
20782 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
20784 Always escape literal '>' in output, not just after '<'
20798 <p>This is a test template
20799 This is a test template
20811 Inclusion of !userCanEdit() content
20815 <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>
20821 Out-of-order TOC heading levels
20830 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
20832 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
20834 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
20835 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
20838 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
20840 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
20841 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
20847 <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>
20848 <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>
20849 <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>
20850 <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>
20851 <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>
20852 <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>
20858 ISBN with a dummy number
20868 ISBN with space-delimited number
20872 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
20875 <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>
20880 ISBN with multiple spaces, no number
20899 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20900 </p><p>ISBN 12345678901
20903 <p>ISBN 123456789</p>
20905 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
20907 <p>ISBN 12345678901</p>
20912 ISBN with trailing year (T9110)
20914 ISBN 1-234-56789-0 - 2006
20916 ISBN 1 234 56789 0 - 2006
20918 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
20919 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
20922 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
20924 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
20931 {{anchorencode:foo bar©#%n}}
20933 <p>foo_bar.C2.A9.23.25n
20938 anchorencode trims spaces
20940 {{anchorencode: __pretty__please__}}
20947 anchorencode deals with links
20949 {{anchorencode: [[hello|world]] [[hi]]}}
20956 anchorencode deals with templates
20958 {{anchorencode: {{Foo}} }}
20965 anchorencode encodes like the TOC generator: (T20431)
20967 === _ +:.3A%3A&&]] ===
20968 {{anchorencode: _ +:.3A%3A&&]] }}
20971 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
20972 <p>.2B:.3A.253A.26.26.5D.5D
20977 T8200: blockquotes and paragraph formatting
20998 T10293: Use of center tag ruins paragraph formatting
21019 Parsing of overlapping (improperly nested) inline html tags
21021 <span><s>x</span></s>
21023 <p><span><s>x</span></s></span>
21026 <p><span><s>x</s></span>
21031 ### Language variants related tests
21034 Self-link in language variants
21036 title=[[Dunav]] language=sr
21038 Both [[Dunav]] and [[Дунав]] are names for this river.
21040 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21051 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21053 title=[[Duna]] language=sr
21055 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21057 <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.
21062 Link to a section of a variant of this title shouldn't be parsed as self-link
21064 title=[[Duna]] language=sr
21066 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21068 <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.
21073 Link to pages in language variants
21077 Main Page can be written as [[Маин Паге]]
21079 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21085 Multiple links to pages in language variants
21089 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21091 <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>.
21097 Simple template in language variants
21103 <p>This is a test template
21109 Template with explicit namespace in language variants
21115 <p>This is a test template
21121 Basic test for template parameter in language variants
21125 {{парамтест|param=foo}}
21127 <p>This is a test template with parameter foo
21132 Simple category in language variants
21136 [[Category:МедиаWики Усер'с Гуиде]]
21138 cat=МедиаWики_Усер'с_Гуиде sort=
21140 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21155 ## We used to, but no longer wt2wt this test since the default serializer
21156 ## will normalize all categories to serialize on their own line.
21157 ## This wikitext usage is going to be fairly uncommon in production and
21158 ## selser will take care of preserving formatting in those scenarios.
21160 Don't convert blue categorylinks to another variant (T35210)
21166 [[A]][[Category:分类]]
21170 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
21171 <link rel="mw:PageProp/Category" href="./Category:分类"/>
21175 Stripping -{}- tags (language variants)
21179 Latin proverb: -{Ne nuntium necare}-
21181 <p>Latin proverb: Ne nuntium necare
21187 Prevent conversion with -{}- tags (language variants)
21189 language=sr variant=sr-ec
21191 Latinski: -{Ne nuntium necare}-
21193 <p>Латински: Ne nuntium necare
21199 Prevent conversion of text with -{}- tags (language variants)
21201 language=sr variant=sr-ec
21203 Latinski: -{Ne nuntium necare}-
21205 <p>Латински: Ne nuntium necare
21211 Prevent conversion of links with -{}- tags (language variants)
21213 language=sr variant=sr-ec
21217 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21223 -{}- tags within headlines (within html for parserConvert())
21225 language=sr variant=sr-ec
21229 <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>
21235 Explicit definition of language variant alternatives
21237 language=zh variant=zh-tw
21239 -{zh:China;zh-tw:Taiwan}-, not China
21241 <p>Taiwan, not China
21247 Conversion around HTML tags
21249 language=sr variant=sr-ec
21251 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
21252 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
21255 <span title="ЛаCтин">ски</span>
21261 Explicit session-wise language variant mapping (A flag and - flag)
21263 language=zh variant=zh-tw
21265 Taiwan is not China.
21266 But -{A|zh:China;zh-tw:Taiwan}- is China,
21267 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
21268 and -{China}- is China.
21270 <p>Taiwan is not China.
21271 But Taiwan is Taiwan,
21272 (This should be stripped!)
21273 and China is China.
21278 Explicit session-wise language variant mapping (H flag for hide)
21280 language=zh variant=zh-tw
21282 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
21285 <p>(This should be stripped!)
21291 Adding explicit conversion rule for title (T flag)
21293 language=zh variant=zh-tw showtitle
21295 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
21298 <p>Should be stripped!
21303 Testing that changing the language variant here in the tests actually works
21305 language=zh variant=zh showtitle
21307 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
21310 <p>Should be stripped!
21315 Recursive conversion of alt and title attrs shouldn't clear converter state
21317 language=zh variant=zh-cn showtitle
21319 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
21320 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
21324 Should be stripped<span title="Exclamation">!</span>
21329 T26072: more test on conversion rule for title
21331 language=zh variant=zh-tw showtitle
21333 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
21334 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
21337 <p>This should be stripped!
21338 This won't take interferes with the title rule.
21343 Partly disable title conversion if variant == main language code
21345 language=zh variant=zh title=[[ZH]] showtitle
21347 -{T|zh-cn:CN;zh-tw:TW}-
21355 Partly disable title conversion if variant == main language code, more
21357 language=zh variant=zh title=[[ZH]] showtitle
21367 Raw output of variant escape tags (R flag)
21369 language=zh variant=zh-tw
21371 Raw: -{R|zh:China;zh-tw:Taiwan}-
21373 <p>Raw: zh:China;zh-tw:Taiwan
21378 Nested markup inside raw output of variant escape tags (R flag)
21380 language=zh variant=zh-tw
21382 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
21384 <p>Nested raw: nested Taiwan nested
21389 Templates inside raw output of variant escape tags (R flag)
21391 language=zh variant=zh-tw
21393 Nested raw: -{R|nested {{echo|hi}} templates}-
21395 <p>Nested raw: nested hi templates
21400 Strings evaluating false shouldn't be ignored by Language converter (T51072)
21402 language=zh variant=zh-cn
21404 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
21411 Conversion rules from [numeric-only string] to [something else] (T48634)
21413 language=zh variant=zh-cn
21415 -{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
21422 Bidirectional converter rule entries with an empty value should be ignored (T53551)
21424 language=zh variant=zh-cn
21426 -{H|zh-cn:foo;zh-tw:;}-foobar
21433 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
21435 language=zh variant=zh-cn
21437 -{H|=>zh-cn:foo;}-foobar
21444 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
21446 language=zh variant=zh-cn
21455 Nested using of manual convert syntax
21457 language=zh variant=zh-hk
21459 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
21461 <p>Nested: Hello Hong Kong!
21466 HTML markups with conversion syntax in attribs, nested in other conversion blocks
21468 language=zh variant=zh-cn
21470 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
21472 <p><span title="X">A</span>
21477 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet)
21479 language=zh variant=zh-cn disabled
21481 -{<span title="-{X}-">A</span>}-
21483 <p><span title="X">A</span>
21487 # Since Parsoid is starting to emit canonical wikitext for links,
21488 # [http://example.com http://example.com] will not RT back to that
21491 Proper conversion of text in external links
21493 language=sr variant=sr-ec
21496 http://www.google.com
21497 gopher://www.google.com
21498 [http://www.google.com http://www.google.com]
21499 [gopher://www.google.com gopher://www.google.com]
21500 [https://www.google.com irc://www.google.com]
21501 [ftp://www.google.com www.google.com/ftp://dir]
21502 [//www.google.com www.google.com]
21504 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
21505 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
21506 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
21507 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
21508 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
21509 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
21510 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
21513 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
21514 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
21515 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
21516 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
21517 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
21518 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
21519 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
21523 Do not convert roman numbers to language variants
21525 language=sr variant=sr-ec
21529 <p>Фридрих IV је цар.
21534 Unclosed language converter markup "-{"
21545 Don't convert raw rule "-{R|=>}-" to "=>"
21556 Don't break link parsing if language converter markup is in the caption.
21558 language=sr variant=sr-ec
21560 [[Main Page|-{R|main page}-]]
21562 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
21567 T146304: Don't break template parsing if language converter markup is in the parameter.
21569 language=sr variant=sr-ec
21578 T146305: Don't break image parsing if language converter markup is in the caption.
21582 [[File:Foobar.jpg|thumb|-{R|caption:}-]]
21584 <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>
21587 <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>
21591 T146305: Don't break image parsing if nested language converter markup is in the caption.
21593 language=zh variant=zh-cn
21595 [[File:Foobar.jpg|thumb|-{zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
21597 <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>
21600 <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>
21604 Don't break gallery if language converter markup is inside.
21609 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
21610 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
21613 <ul class="gallery mw-gallery-traditional">
21614 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21615 <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>
21616 <div class="gallerytext">
21617 <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>
21621 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21622 <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>
21623 <div class="gallerytext">
21624 <p>This is a test template
21633 T153135: Don't break list handling if language converter markup is in the item.
21635 language=zh variant=zh-cn
21637 ;-{zh-cn:AAA;zh-tw:BBB}-
21641 <dt>foo:bar</dt></dl>
21645 <dt><span typeof="mw:LanguageVariant" data-mw='{"bidir":[{"l":"zh-cn","t":"AAA"},{"l":"zh-tw","t":"BBB"}],"show":true}'></span></dt>
21646 <dt><span typeof="mw:LanguageVariant" data-mw='{"disabled":true,"show":true,"text":"foo:bar"}'></span></dt>
21650 // Note that parsoid does not protect colons unless language converter
21651 // markup is properly nested, because it is a backtracking parser.
21653 T153135: Unclosed markup in definition list (code coverage)
21655 language=zh variant=zh-cn
21660 <dl><dt><b>foo:bar</dt>
21661 <dt>-{zh-cn:AAA</b></dt></dl>
21665 <dt><b>foo:bar</b></dt>
21673 T153135: Nested language converter markup in definition list (code coverage)
21675 language=zh variant=zh-cn
21677 ;-{zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
21679 <dl><dt>AAA foo:bar bat:baz</dt>
21684 <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>
21690 T153140: Don't break table handling if language converter markup is in the cell.
21692 language=sr variant=sr-ec
21715 T2529: Uncovered bullet
21724 # Plain MediaWiki does not remove empty lists, but tidy actually does.
21725 # Templates in Wikipedia rely on this behavior, as tidy has always been
21726 # enabled there. These tests are normally run *without* tidy, so specify the
21727 # full output here.
21728 # To test realistic parsing behavior, apply a tidy-like transformation to both
21729 # the expected output and your parser's output.
21731 T2529: Uncovered bullet leaving empty list, normally removed by tidy
21733 ******* Foo {{bullet}}
21735 <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>
21741 T2529: Uncovered table already at line-start
21764 T2529: Uncovered bullet in parser function result
21766 * Foo {{lc:{{bullet}} }}
21774 T7678: Double-parsed template argument
21776 {{lc:{{{1}}}|hello}}
21783 T7678: Double-parsed template invocation
21785 {{lc:{{paramtest {{!}} param = hello }} }}
21787 <p>{{paramtest | param = hello }}
21792 Case insensitivity of parser functions for non-ASCII characters (T10143)
21795 title=[[Main Page]]
21797 {{PRVNÍVELKÉ:ěščř}}
21798 {{prvnívelké:ěščř}}
21818 Morwen/13: Unclosed link followed by heading
21825 <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>
21830 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
21837 <h1><span class="mw-headline" id="heading">heading</span></h1>
21842 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
21849 <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>
21864 Paragraphs inside divs (no extra line breaks)
21876 Paragraphs inside divs (extra line break on open)
21891 Paragraphs inside divs (extra line break on close)
21906 Paragraphs inside divs (extra line break on open and close)
21923 Nesting tags, paragraphs on lines which begin with <div>
21925 <div></div><strong>A
21928 <p><strong>A</strong></p>
21929 <p><strong>B</strong></p>
21937 # T8200: <blockquote> should behave like <div> with respect to line breaks
21939 T8200: paragraphs inside blockquotes (no extra line breaks)
21941 <blockquote>Line one
21943 Line two</blockquote>
21945 <blockquote>Line one
21946 Line two</blockquote>
21950 <p>Line one Line two</p>
21955 T8200: paragraphs inside blockquotes (extra line break on open)
21960 Line two</blockquote>
21965 Line two</blockquote>
21970 Line two</blockquote>
21974 T8200: paragraphs inside blockquotes (extra line break on close)
21976 <blockquote>Line one
21981 <blockquote>Line one
21994 T8200: paragraphs inside blockquotes (extra line break on open and close)
22016 Paragraphs inside blockquotes/divs (no extra line breaks)
22018 <blockquote><div>Line one
22020 Line two</div></blockquote>
22022 <blockquote><div>Line one
22023 Line two</div></blockquote>
22028 Paragraphs inside blockquotes/divs (extra line break on open)
22033 Line two</div></blockquote>
22038 Line two</div></blockquote>
22043 Paragraphs inside blockquotes/divs (extra line break on close)
22045 <blockquote><div>Line one
22048 </div></blockquote>
22050 <blockquote><div>Line one
22053 </div></blockquote>
22058 Paragraphs inside blockquotes/divs (extra line break on open and close)
22064 </div></blockquote>
22070 </div></blockquote>
22075 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
22077 wgLinkHolderBatchSize=0
22083 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
22084 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
22085 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
22090 Free external link invading image caption
22092 [[Image:Foobar.jpg|thumb|http://x|hello]]
22094 <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>
22099 T17196: localised external link numbers
22103 [http://en.wikipedia.org/]
22105 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
22108 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
22112 Multibyte character in padleft
22114 {{padleft:-Hello|7|Æ}}
22121 Multibyte character in padright
22123 {{padright:Hello-|7|Æ}}
22130 formatdate parser function
22132 {{#formatdate:2009-03-24}}
22134 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
22139 formatdate parser function, with default format
22141 {{#formatdate:2009-03-24|mdy}}
22143 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
22148 Spacing of numbers in formatted dates
22150 {{#formatdate:January 15}}
22152 <p><span class="mw-formatted-date" title="01-15">January 15</span>
22157 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
22159 language=nl title=[[MediaWiki:Common.css]]
22161 {{#formatdate:2009-03-24|dmy}}
22163 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
22176 Edit comment with link
22180 I like the [[Main Page]] a lot
22182 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
22186 Edit comment with link and link text
22190 I like the [[Main Page|best pages]] a lot
22192 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
22196 Edit comment with link and link text with suffix
22200 I like the [[Main Page|best page]]s a lot
22202 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
22206 Edit comment with section link (non-local, eg in history list)
22208 comment title=[[Main Page]]
22210 /* External links */ removed bogus entries
22212 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
22216 Edit comment with section link and text before it (non-local, eg in history list)
22218 comment title=[[Main Page]]
22220 pre-comment text /* External links */ removed bogus entries
22222 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>
22226 Edit comment with section link (local, eg in diff view)
22228 comment local title=[[Main Page]]
22230 /* External links */ removed bogus entries
22232 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
22236 Edit comment with subpage link (T16080)
22240 title=[[Subpage test]]
22242 Poked at a [[/subpage]] here...
22244 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
22248 Edit comment with subpage link and link text (T16080)
22252 title=[[Subpage test]]
22254 Poked at a [[/subpage|neat little page]] here...
22256 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
22260 Edit comment with bogus subpage link in non-subpage NS (T16080)
22263 title=[[Subpage test]]
22265 Poked at a [[/subpage]] here...
22267 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
22271 Edit comment with bare anchor link (local, as on diff)
22275 title=[[Main Page]]
22279 <a href="#section">#section</a>
22283 Edit comment with bare anchor link (non-local, as on history)
22286 title=[[Main Page]]
22290 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
22294 Anchor starting with underscore
22300 <p><a href="#_ref">One</a>
22303 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
22307 Id starting with underscore
22309 <div id="_ref"></div>
22311 <div id="_ref"></div>
22316 Edit comment with link with more than one pipe (T99346)
22320 [[Main Page|Many|pipes]]
22322 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
22326 Complex edit comment with link with more than one pipe (T99346)
22330 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
22332 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..."
22336 Space normalisation on autocomment (T24784)
22339 title=[[Main Page]]
22341 /* __hello__world__ */
22343 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
22347 percent-encoding and + signs in comments (T28410)
22351 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
22353 <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>
22356 # Parsoid doesn't support this yet: see T75581
22357 # but it *should* omit the 'src' attribute if the image is bad.
22358 # PHP side of tests was disabled in
22359 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
22360 # because of issues in the PHP parserTests infrastructure
22361 # (but the output below is indeed what the PHP side emits)
22363 Bad images - basic functionality
22366 !! DISABLED/html/php
22368 <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>
22372 Bad images - T18039: text after bad image disappears
22377 !! DISABLED/html/php
22383 <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>
22388 Verify that displaytitle works (T24501) no displaytitle
22392 wgAllowDisplayTitle=true
22393 wgRestrictDisplayTitle=false
22395 this is not the the title
22398 <p>this is not the the title
22403 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
22408 wgAllowDisplayTitle=true
22409 wgRestrictDisplayTitle=false
22411 this is not the the title
22412 {{DISPLAYTITLE:whatever}}
22415 <p>this is not the the title
22420 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
22425 wgAllowDisplayTitle=true
22426 wgRestrictDisplayTitle=true
22428 this is not the the title
22429 {{DISPLAYTITLE:whatever}}
22432 <p>this is not the the title
22437 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
22442 wgAllowDisplayTitle=true
22443 wgRestrictDisplayTitle=true
22445 this is not the the title
22446 {{DISPLAYTITLE:screen}}
22449 <p>this is not the the title
22454 Verify that displaytitle works (T24501) AllowDisplayTitle=false
22459 wgAllowDisplayTitle=false
22461 this is not the the title
22462 {{DISPLAYTITLE:screen}}
22465 <p>this is not the the title
22466 <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>
22471 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
22476 wgAllowDisplayTitle=false
22478 this is not the the title
22481 <p>this is not the the title
22486 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
22491 wgAllowDisplayTitle=true
22492 wgRestrictDisplayTitle=true
22494 this is not the the title
22495 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
22497 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
22498 <p>this is not the the title
22503 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
22508 wgAllowDisplayTitle=true
22509 wgRestrictDisplayTitle=true
22511 this is not the the title
22512 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
22514 <span style="color: red;">s</span>creen
22515 <p>this is not the the title
22520 Page status indicators: Empty name is invalid
22524 <indicator name=" "></indicator>
22525 <indicator></indicator>
22527 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
22528 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
22533 Page status indicators: Weird syntaxes that are okay
22537 <indicator name="empty" />
22538 <indicator name="name"></indicator>
22547 Page status indicators: Torture test
22551 <indicator name="01">hello world</indicator>
22552 <indicator name="02">[[Main Page]]</indicator>
22553 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
22554 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
22555 <indicator name="05">* foo
22557 <indicator name="06"><nowiki>foo</nowiki></indicator>
22558 <indicator name="07"> Preformatted</indicator>
22559 <indicator name="08"><div>Broken tag</indicator>
22560 <indicator name="09">{| class=wikitable
22563 <indicator name="10">Two
22565 paragraphs</indicator>
22568 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22569 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" />
22570 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>
22571 05=<ul><li> foo</li>
22575 07=<pre>Preformatted
22577 08=<div>Broken tag</div>
22579 09=<table class="wikitable">
22596 preload: check <noinclude> and <includeonly>
22600 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
22606 preload: check <onlyinclude>
22610 Goodbye <onlyinclude>Hello world</onlyinclude>
22616 preload: can pass tags through if we want to
22620 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
22622 <includeonly>Hello world</includeonly>
22626 preload: check that it doesn't try to do tricks
22630 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
22632 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
22636 Play a bit with r67090 and T5158
22638 <div style="width:50% !important"> </div>
22639 <div style="width:50% !important"> </div>
22640 <div style="width:50% !important"> </div>
22641 <div style="border : solid;"> </div>
22643 <div style="width:50% !important"> </div>
22644 <div style="width:50% !important"> </div>
22645 <div style="width:50% !important"> </div>
22646 <div style="border : solid;"> </div>
22649 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
22650 <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>
22651 <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>
22652 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
22657 HTML5 data attributes
22659 <span data-foo="bar">Baz</span>
22660 <p data-abc-def_hij="">Quuz</p>
22662 <p><span data-foo="bar">Baz</span>
22664 <p data-abc-def_hij="">Quuz</p>
22667 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
22668 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
22672 Strip reserved data attributes
22674 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
22676 <div data-ok="fred">d</div>
22679 <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>
22683 percent-encoding and + signs in internal links (T28410)
22685 [[User:+%]] [[Page+title%]]
22686 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
22687 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
22688 [[%33%45]] [[%33%45+]]
22690 <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>
22691 <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>
22692 <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>
22693 <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>
22696 <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>
22697 <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>
22698 <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>
22699 <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>
22703 Special characters in embedded file links (T29679)
22705 [[File:Contains & ampersand.jpg]]
22706 [[File:Does not exist.jpg|Title with & ampersand]]
22708 <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>
22709 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
22712 <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>
22713 <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>
22717 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
22719 Text's been normalized?
22721 <p>Text's been normalized?
22726 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
22728 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
22730 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
22735 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
22737 [http://www.example.org/ ideograms]
22739 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
22744 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
22746 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
22748 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
22772 T33098 Template which includes system messages which includes the template
22776 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22777 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22782 T33490 Turkish: ucfirst 'blah'
22793 T33490 Turkish: ucfirst 'ix'
22804 T33490 Turkish: lcfirst 'BLAH'
22815 T33490 Turkish: ucfırst (with a dotless i)
22821 <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>
22826 T33490 ucfırst (with a dotless i) with English language
22832 <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>
22836 # Note that Parsoid doesn't emit an explicit TOC.
22837 # Note also that the html2wt direction tends to emit an extra newline
22838 # between the __TOC__ magicword and the first heading unless *both*
22839 # the <meta> and the <h2> have a data-parsoid attribute set (even if
22843 T28375: TOC with italics
22845 title=[[Main Page]]
22848 == ''Lost'' episodes ==
22850 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22852 <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>
22856 <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>
22859 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22860 <h2 data-parsoid='{}'> <i>Lost</i> episodes </h2>
22864 T28375: TOC with bold
22866 title=[[Main Page]]
22869 == '''should be bold''' then normal text ==
22871 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22873 <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>
22877 <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>
22880 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22881 <h2 data-parsoid='{}'> <b>should be bold</b> then normal text </h2>
22885 T35845: Headings become cursive in TOC when they contain an image
22887 title=[[Main Page]]
22890 == Image [[Image:foobar.jpg]] ==
22892 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22894 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
22898 <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>
22901 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22902 <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>
22906 T35845 (2): Headings become bold in TOC when they contain a blockquote
22908 title=[[Main Page]]
22911 == <blockquote>Quote</blockquote> ==
22913 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22915 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22919 <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>
22923 <div id="toc" class="toc">
22924 <div class="toctitle">
22928 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22932 <h2><span class="mw-headline" id="Quote"></span></h2>
22934 <p><span class="mw-headline" id="Quote">Quote</span></p>
22936 <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>
22938 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22939 <h2 data-parsoid='{}'> <blockquote>Quote</blockquote> </h2>
22943 Unclosed tags in TOC
22945 title=[[Main Page]]
22949 <small>Hanc marginis exiguitas non caperet.</small>
22952 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22954 <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>
22958 <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>
22959 <p><small>Hanc marginis exiguitas non caperet.</small>
22963 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
22964 <h2 data-parsoid='{}'> Proof: 2 < 3 </h2>
22965 <p><small>Hanc marginis exiguitas non caperet.</small>
22970 Multiple tags in TOC
22973 == <i>Foo</i> <b>Bar</b> ==
22975 == <i>Foo</i> <blockquote>Bar</blockquote> ==
22977 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
22979 <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>
22980 <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>
22984 <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>
22985 <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>
22989 <div id="toc" class="toc">
22990 <div class="toctitle">
22994 <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>
22995 <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>
22999 <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>
23000 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
23002 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
23004 <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>
23006 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23007 <h2 data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b> </h2>
23008 <h2> <i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote> </h2>
23011 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
23012 # html5 tag parsing.
23014 Tags with parameters in TOC
23019 == <sup class="in-h2">Hello</sup> ==
23021 == <sup class="a > b">Evilbye</sup> ==
23023 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23025 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
23026 <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>
23030 <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>
23031 <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>
23034 <meta property="mw:PageProp/toc" />
23035 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
23037 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
23041 span tags with directionality in TOC
23044 == <span dir="ltr">C++</span> ==
23046 == <span dir="rtl">זבנג!</span> ==
23048 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
23050 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
23052 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
23054 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23056 <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>
23057 <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>
23058 <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>
23059 <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>
23060 <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>
23064 <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>
23065 <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>
23066 <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>
23067 <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>
23068 <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>
23071 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23072 <h2 data-parsoid='{}'> <span dir="ltr">C++</span> </h2>
23073 <h2> <span dir="rtl">זבנג!</span> </h2>
23074 <h2> <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> </h2>
23075 <h2> <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> </h2>
23076 <h2> <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> </h2>
23080 T74884: bdi element in ToC
23083 == <bdi>test</bdi> ==
23085 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23087 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
23091 <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>
23094 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23095 <h2 data-parsoid='{}'> <bdi>test</bdi> </h2>
23099 T35715: s/strike element in ToC
23102 == <s>test</s> test <strike>test</strike> ==
23104 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23106 <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>
23110 <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>
23113 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23114 <h2 data-parsoid='{}'> <s>test</s> test <strike>test</strike> </h2>
23117 # Note that the html output does not have the <p></p>, but the
23118 # html+tidy output *does*. This is because the empty <p></p> is
23119 # removed by the sanitizer, but only when tidy is *not* enabled (!).
23121 Empty <p> tag in TOC, removed by Sanitizer (T92892)
23126 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23128 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
23132 <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>
23136 <div id="toc" class="toc">
23137 <div class="toctitle">
23141 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
23145 <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>
23147 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23148 <h2 data-parsoid='{}'> x </h2>
23154 == {{int:headline_sample}} ==
23158 T34057: Title needed when expanding <h> nodes.
23160 title=[[Main Page]]
23164 <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>
23169 Strip marker in urlencode
23171 {{urlencode:x<nowiki/>y}}
23172 {{urlencode:x<nowiki/>y|wiki}}
23173 {{urlencode:x<nowiki/>y|path}}
23174 {{urlencode:x<pre id="one">two</pre>y}}
23202 Strip marker in formatNum
23204 {{formatnum:1<nowiki/>2}}
23205 {{formatnum:1<nowiki/>2|R}}
23213 Check noCommafy in formatNum
23217 {{formatnum:123456.78}}
23218 {{formatnum:123456.78|NOSEP}}
23226 Wrong option for formatNum (T58199)
23228 {{formatnum:1,234.56|Random}}
23229 {{formatnum:1,234.56|EVERYTHING}}
23230 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
23239 Strip marker in grammar
23243 {{grammar:elative|foo<nowiki/>bar}}
23250 Strip marker in padleft
23252 {{padleft:|2|x<nowiki/>y}}
23259 Strip marker in padright
23261 {{padright:|2|x<nowiki/>y}}
23268 Strip marker in anchorencode
23270 {{anchorencode:x<nowiki/>y}}
23277 nowiki inside link inside heading (T20295)
23279 ==[[foo|x<nowiki>y</nowiki>z]]==
23281 <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>
23286 new support for bdi element (T33817)
23288 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
23290 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
23295 Ignore pipe between table row attributes
23299 |- id=foo | style='color: red'
23307 <tr id="foo" style="color: red">
23314 Language parser function
23323 Padleft and padright as substr
23325 {{padleft:|3|abcde}}
23326 {{padright:|3|abcde}}
23334 Special parser function
23336 {{#special:RandomPage}}
23337 {{#special:BaDtItLe}}
23338 {{#special:Foobar}}
23347 T36939 - Case insensitive link parsing ([HttP://])
23349 [HttP://MediaWiki.Org/]
23351 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
23354 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
23358 T36939 - Case insensitive link parsing ([HttP:// title])
23360 [HttP://MediaWiki.Org/ MediaWiki]
23362 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
23367 T36939 - Case insensitive link parsing (HttP://)
23369 HttP://MediaWiki.Org/
23371 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
23374 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
23392 <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>
23393 <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>
23394 <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>
23395 <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>
23396 <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>
23402 ### Parsoid-specific tests
23403 ### Parsoid-PHP parser incompatibilities
23406 1. SOL-sensitive wikitext tokens as template-args
23408 parsoid=wt2html,wt2wt
23414 <span about="#mwt1" typeof="mw:Transclusion">
23415 </span><ul about="#mwt1"><li>a</li>
23417 <span about="#mwt2" typeof="mw:Transclusion">
23418 </span><ol about="#mwt2"><li>a</li>
23420 <span about="#mwt3" typeof="mw:Transclusion">
23421 </span><dl about="#mwt3"><dd>a</dd>
23425 #### -----------------------------------------------------------------
23426 #### Parsoid-specific functionality tests
23427 #### -----------------------------------------------------------------
23429 # T65642/T68749: Formatting elt fixup around images is cleaned up.
23430 # We know wt2wt will fail, but we expect selser to pass.
23431 # Due to the nature of our testing, wt2wt and selser tests will enter the
23432 # blacklist and we'll catch selser regressions based on changes to the
23433 # blacklist entries for selser tests.
23435 1. Bad treebuilder fixup of formatting elt is cleaned up
23437 parsoid=wt2html,wt2wt
23442 [[Image:Foobar.jpg|right|Test]]
23449 <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>
23456 2. Bad treebuilder fixup of formatting elt is cleaned up
23458 parsoid=wt2html,wt2wt
23460 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
23462 <small>[[Image:Foobar.jpg|right|300px]]</small>
23466 <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>
23468 <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>
23472 3. Bad treebuilder fixup of formatting elt is cleaned up
23474 parsoid=wt2html,wt2wt
23476 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
23478 <p><small><b>foo</b></small></p>
23479 <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>
23480 <p><small><b>bar</b></small></p>
23484 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
23486 parsoid=wt2html,wt2wt
23488 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
23490 <p><b><small></small></b></p>
23491 <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>
23495 #### ----------------------------------------------------------------
23496 #### Parsoid-only testing of Parsoid's impl of LST
23497 #### Not implemented yet, see
23498 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
23499 #### ----------------------------------------------------------------
23501 ## We still need to support serializing the older format while content is stored.
23503 LST Sections: Backwards compatibility
23506 "suppressErrors": true,
23507 "modes": ["html2wt"]
23510 <section begin="2011-05-16" />
23511 <section end="2014-04-10 (MW 1.23wmf22)" />
23513 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
23514 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
23518 LST Sections: Newfangled approach
23520 <section begin="2011-05-16" />
23521 <section end="2014-04-10 (MW 1.23wmf22)" />
23523 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
23525 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
23529 #--------- Test stripping of empty nodes in template content ----------
23532 Empty LI and TR nodes should be stripped from template content
23537 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
23541 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
23554 Empty LI and TR nodes should not be stripped from top-level content
23581 Empty TR nodes should not be stripped if they have any attributes set
23583 {{EmptyTRWithHTMLAttrTest}}
23585 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
23586 <tr align="center"></tr>
23587 <tr><td>foo</td></tr>
23588 <tr align="center"></tr>
23589 <tr><td>bar</td></tr>
23593 #### ----------------------------------------------------------------
23594 #### The following section of tests are primarily to test
23595 #### wikitext escaping capabilities of Parsoid. Given that
23596 #### escaping can be done any number of ways, the wikitext (input)
23597 #### is always adjusted to reflect how Parsoid adds nowiki
23600 #### We are marking several tests as parsoid-only since the
23601 #### HTML in the result section is different from what the
23602 #### PHP parser generates for it.
23603 #### ----------------------------------------------------------------
23606 #### --------------- Headings ---------------
23608 #### 1. Nested inside html <h1>=foo=</h1>
23609 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
23610 #### 3. Nested inside html with wikitext split by html tags
23611 #### 4. No escape needed
23612 #### 5. Empty headings <h1></h1>
23613 #### 6. Heading chars in SOL context
23614 #### ----------------------------------------
23616 Headings: 0. Unnested
23626 <p>=foo<i>a</i>=</p>
23628 <nowiki>=foo=</nowiki>
23630 <nowiki> </nowiki>=foo=
23632 <nowiki>=foo=</nowiki>
23634 =foo''a''<nowiki>=</nowiki>
23637 # New headings and existing headings are handled differently
23639 Headings: 1. Nested inside html
23647 <h1 data-parsoid=''>=foo=</h1>
23648 <h2 data-parsoid=''>=foo=</h2>
23649 <h3 data-parsoid=''>=foo=</h3>
23650 <h4 data-parsoid=''>=foo=</h4>
23651 <h5 data-parsoid=''>=foo=</h5>
23652 <h6 data-parsoid=''>=foo=</h6>
23660 =<nowiki>=foo=</nowiki>=
23661 ==<nowiki>=foo=</nowiki>==
23662 ===<nowiki>=foo=</nowiki>===
23663 ====<nowiki>=foo=</nowiki>====
23664 =====<nowiki>=foo=</nowiki>=====
23665 ======<nowiki>=foo=</nowiki>======
23670 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
23679 <nowiki>*</nowiki>bar
23685 <nowiki>=bar=</nowiki>
23689 Headings: 3. Nested inside html with wikitext split by html tags
23693 <h1>=<b>bold</b>foo=</h1>
23695 = ='''bold'''foo= =
23699 Headings: 4a. No escaping needed (testing just h1 and h2)
23710 <h1><i>=</i>foo=</h1>
23730 Headings: 4b. No escaping needed (inside p-tags)
23745 Headings: 5. Empty headings
23749 <h1 data-parsoid='{}'></h1>
23751 <h2 data-parsoid='{}'></h2>
23753 <h3 data-parsoid='{}'></h3>
23755 <h4 data-parsoid='{}'></h4>
23757 <h5 data-parsoid='{}'></h5>
23759 <h6 data-parsoid='{}'></h6>
23769 =====<nowiki/>=====
23771 ======<nowiki/>======
23775 Headings: 6a. Heading chars in SOL context (with trailing spaces)
23785 <nowiki>=a=</nowiki>
23787 <nowiki>=a=</nowiki>
23789 <nowiki>=a=</nowiki>
23793 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23806 <nowiki>=a=</nowiki>
23809 <nowiki>=a=</nowiki>
23812 <nowiki>=a=</nowiki>
23817 Headings: 6c. Heading chars in SOL context (leading newline break)
23825 <nowiki>=b=</nowiki>
23829 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23833 <!--c0--><p>=a=</p>
23835 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23837 <!--c0--><nowiki>=a=</nowiki>
23839 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23843 Headings: 6d. Heading chars in SOL context (No escaping needed)
23853 Headings: 7. Insert a newline between new content and headings
23859 <h2 data-parsoid='{}'>A</h2>
23860 <p data-parsoid='{}'>a</p>
23870 #### --------------- Lists ---------------
23871 #### 0. Outside nests (*foo, etc.)
23872 #### 1. Nested inside html <ul><li>*foo</li></ul>
23873 #### 2. Inside definition lists
23874 #### 3. Only bullets at start should be escaped
23875 #### 4. No escapes needed
23876 #### 5. No unnecessary escapes
23877 #### 6. Escape bullets in SOL position
23878 #### 7. Escape bullets in a multi-line context
23879 #### ----------------------------------------
23882 Lists: 0. Outside nests
23892 <nowiki>*</nowiki>foo
23894 <nowiki>#</nowiki>foo
23896 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23899 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23900 ## to test wikitext escaping, and insignificant whitespace diffs
23901 ## cause PHP parser tests to barf
23903 Lists: 1. Nested inside html (No unnecessary escapes)
23912 <li data-parsoid='{}'>*foo</li>
23913 <li data-parsoid='{}'>#foo</li>
23914 <li data-parsoid='{}'>:foo</li>
23915 <li data-parsoid='{}'>;foo</li>
23923 <li data-parsoid='{}'>*foo</li>
23924 <li data-parsoid='{}'>#foo</li>
23925 <li data-parsoid='{}'>:foo</li>
23926 <li data-parsoid='{}'>;foo</li>
23933 *<nowiki>*foo</nowiki>
23934 *<nowiki>#foo</nowiki>
23935 *<nowiki>:foo</nowiki>
23936 *<nowiki>;foo</nowiki>
23942 #<nowiki>*foo</nowiki>
23943 #<nowiki>#foo</nowiki>
23944 #<nowiki>:foo</nowiki>
23945 #<nowiki>;foo</nowiki>
23949 Lists: 2. Inside definition lists
23953 <dl><dt>;foo</dt></dl>
23954 <dl><dt>:foo</dt></dl>
23957 <dl><dd>:foo</dd></dl>
23961 ; <nowiki>:foo</nowiki>
23963 ; <nowiki>:foo</nowiki>
23970 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23976 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23980 *<nowiki>*foo</nowiki>''it''*bar
23984 Lists: 4. No escapes needed
23997 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
24001 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
24015 Lists: 5. No unnecessary escapes
24019 <ul><li> bar <span>[[foo]]</span></li></ul>
24020 <ul><li> =bar <span>[[foo]]</span></li></ul>
24021 <ul><li> [[bar <span>[[foo]]</span></li></ul>
24022 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
24023 <ul><li> =bar <span>foo]]</span>=</li></ul>
24024 <ul><li> <s></s>: a</li></ul>
24025 <ul><li> <i>* foo</i></li></ul>
24028 * bar <span><nowiki>[[foo]]</nowiki></span>
24030 * =bar <span><nowiki>[[foo]]</nowiki></span>
24032 * [[bar <span><nowiki>[[foo]]</nowiki></span>
24034 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
24036 * =bar <span>foo]]</span>=
24044 Lists: 6. Escape bullets in SOL position
24048 <p><!--cmt-->*foo</p>
24050 <!--cmt--><nowiki>*</nowiki>foo
24054 Lists: 7. Escape bullets in a multi-line context
24063 <nowiki>*</nowiki>b
24067 Lists: 8. Escape colons only if not present in tags
24071 <dl><dt>a:b<i>c:d</i></dt></dl>
24073 ; <nowiki>a:b</nowiki>''c:d''
24076 #### --------------- HRs ---------------
24077 #### 1. Single line
24078 #### -----------------------------------
24081 HRs: 1. Single line
24089 ----<nowiki>----</nowiki>
24094 #### --------------- Tables ---------------
24095 #### 1a. Simple example
24096 #### 1b. No escaping needed (!foo)
24097 #### 1c. No escaping needed (|foo)
24098 #### 1d. No escaping needed (|}foo)
24100 #### 2a. Nested in td (<td>foo|bar</td>)
24101 #### 2b. Nested in td (<td>foo||bar</td>)
24102 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
24104 #### 3a. Nested in th (<th>foo!bar</th>)
24105 #### 3b. Nested in th (<th>foo!!bar</th>)
24106 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
24110 #### 4c. No escaping needed
24111 #### --------------------------------------
24114 Tables: 1a. Simple example
24122 <nowiki>{|</nowiki>
24127 Tables: 1b. No escaping needed
24138 Tables: 1c. No escaping needed
24149 Tables: 1d. No escaping needed
24160 Tables: 2a. Nested in td
24165 <td>foo|bar</td></tr>
24166 <tr><td>x<div>a|b</div></td>
24170 |<nowiki>foo|bar</nowiki>
24172 |x<div><nowiki>a|b</nowiki></div>
24188 Tables: 2b. Nested in td
24194 <td>a<i>b||c</i></td>
24195 <td>a<i><div>b||c</div></i></td>
24196 </tr></tbody></table>
24199 |<nowiki>foo||bar</nowiki>
24200 |a''<nowiki>b||c</nowiki>''
24201 |a''<div><nowiki>b||c</nowiki></div>''
24210 <td>a<i><div>b||c</div></i>
24216 Tables: 2c. Nested in td -- no escaping needed
24232 Tables: 3a. Nested in th
24248 Tables: 3b. Nested in th
24253 <tr><th>foo!!bar</th>
24254 <th><i>foo|bar</i></th>
24255 <th><i>foo!!bar</i></th>
24256 <th><i><span>foo!!bar</span></i></th>
24257 </tr></tbody></table>
24260 !<nowiki>foo!!bar</nowiki>
24261 !''<nowiki>foo|bar</nowiki>''
24262 !''<nowiki>foo!!bar</nowiki>''
24263 !''<span><nowiki>foo!!bar</nowiki></span>''
24272 <th><i>foo!!bar</i>
24274 <th><i><span>foo!!bar</span></i>
24280 Tables: 3c. Nested in th
24285 <tr><th>foo||bar</th>
24286 <th><span typeof="mw:Nowiki">foo||bar</span></th>
24287 </tr></tbody></table>
24290 !<nowiki>foo||bar</nowiki>
24291 !<nowiki>foo||bar</nowiki>
24304 Tables: 4a. Escape -
24320 |<nowiki>-bar</nowiki>
24325 Tables: 4b. Escape +
24341 |<nowiki>+bar</nowiki>
24346 Tables: 4c. No escaping needed
24351 <tr><td>foo-bar</td><td>foo+bar</td></tr>
24352 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
24358 <div>a|b</div></td>
24403 Tables: 4d. No escaping needed
24408 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
24409 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
24410 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
24421 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
24431 T97430: Don't emit empty nowiki pairs around marker meta tags
24435 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
24436 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
24438 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
24439 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
24443 Unclosed xmlish element in table line shouldn't eat end delimiters
24448 <tbody><tr><td> <foo</td>
24449 <td> bar></td></tr>
24466 #### --------------- Links ----------------
24467 #### 1. Quote marks in link text
24468 #### 2. Wikilinks: Escapes needed
24469 #### 3. Wikilinks: No escapes needed
24470 #### 4. Extlinks: Escapes needed
24471 #### 5. Extlinks: No escapes needed
24472 #### --------------------------------------
24474 Links 1. WikiLinks: No escapes needed
24478 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
24479 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
24480 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
24484 [[Foo|x [Foobar] x]]
24486 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
24487 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
24488 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
24493 Links 2. WikiLinks: Escapes needed
24497 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
24498 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
24499 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
24500 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
24501 <a href="Foo" rel="mw:WikiLink">|Bar</a>
24502 <a href="Foo" rel="mw:WikiLink">]]bar</a>
24503 <a href="Foo" rel="mw:WikiLink">[[bar</a>
24504 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
24505 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
24506 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
24508 [[Foo|<nowiki>Foobar]</nowiki>]]
24509 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
24510 [[Foo|<nowiki>[[Bar]]</nowiki>]]
24511 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
24512 [[Foo|<nowiki>|Bar</nowiki>]]
24513 [[Foo|<nowiki>]]bar</nowiki>]]
24514 [[Foo|<nowiki>[[bar</nowiki>]]
24515 [[Foo|<nowiki>x [[ y</nowiki>]]
24516 [[Foo|<nowiki>x ]] y</nowiki>]]
24517 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
24519 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
24520 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
24521 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
24522 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
24523 <a href="/wiki/Foo" title="Foo">|Bar</a>
24524 <a href="/wiki/Foo" title="Foo">]]bar</a>
24525 <a href="/wiki/Foo" title="Foo">[[bar</a>
24526 <a href="/wiki/Foo" title="Foo">x [[ y</a>
24527 <a href="/wiki/Foo" title="Foo">x ]] y</a>
24528 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
24533 Links 3. WikiLinks: No escapes needed
24537 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
24538 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
24543 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
24544 <a href="/wiki/Foo" title="Foo">foo|bar</a>
24549 Links 4. ExtLinks: Escapes needed
24553 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
24554 <a rel="mw:ExtLink" href="http://google.com">google]</a>
24555 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
24556 <p>[http://google.com]</p>
24557 <p>[http://google.com google]</p>
24558 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
24559 <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>
24561 [http://google.com <nowiki>[google]</nowiki>]
24562 [http://google.com <nowiki>google]</nowiki>]
24563 [http://google.com <nowiki>goog] le</nowiki>]
24565 <nowiki>[http://google.com]</nowiki>
24567 <nowiki>[http://google.com google]</nowiki>
24569 [http://google.com<nowiki>]</nowiki>
24571 [{{echo|http://google.com}}<nowiki>]</nowiki>
24573 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
24574 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
24575 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
24576 </p><p>[http://google.com]
24577 </p><p>[http://google.com google]
24578 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24579 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
24584 Links 5. ExtLinks: No escapes needed
24588 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
24589 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
24591 [http://google.com [google]
24593 [[http://google.com]]
24595 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
24596 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
24601 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
24605 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
24606 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
24607 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
24608 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
24609 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
24610 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
24611 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24612 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
24613 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
24614 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
24615 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
24616 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
24617 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
24620 x<nowiki/>http://example.com<nowiki/>y
24621 http://example.com<nowiki/>?x
24622 http://example.com<nowiki/>&x
24623 http://example.com<nowiki/>'x
24624 http://example.com<nowiki/>,x
24625 http://example.com<nowiki/>.x
24626 http://example.com<nowiki/>;x
24627 http://example.com<nowiki/>:x
24628 http://example.com<nowiki/>;x
24629 http://example.com<nowiki/>!x
24630 http://example.com<nowiki/>=x
24631 http://example.com<nowiki/>(x)
24632 http://example.com(x<nowiki/>)
24636 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
24641 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
24643 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
24644 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
24645 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
24646 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
24647 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
24653 "http://example.com"
24654 (http://example.com)
24655 (http://example.com) foo
24656 http://example.com,
24657 http://example.com, foo
24660 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
24662 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
24663 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
24664 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
24665 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
24666 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
24671 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
24675 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
24676 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
24678 http://example.com.,;:!?\
24679 -http://example.com:
24681 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
24682 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
24687 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
24691 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
24692 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
24693 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
24697 X<nowiki/>RFC 123<nowiki/>y
24701 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
24705 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
24706 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
24707 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
24714 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
24715 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
24716 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
24721 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
24725 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
24726 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24727 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24731 X<nowiki/>PMID 123<nowiki/>y
24735 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
24739 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
24740 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
24741 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
24748 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
24749 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
24750 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
24755 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
24759 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
24760 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
24761 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
24764 ISBN 1234567890<nowiki/>1
24765 ISBN 1234567890<nowiki/>x
24766 a<nowiki/>ISBN 1234567890<nowiki/>b
24770 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
24774 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
24778 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
24783 Links 14. Protect link-like plain text. (Parsoid bug T78425)
24787 <p>this is not a link: http://example.com
24790 this is not a link: <nowiki>http://example.com</nowiki>
24794 Links 15. Link trails can't become link prefixes.
24799 <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>
24801 [[Söfnuður]]-[[00]]
24803 <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>
24807 #### --------------- Quotes ---------------
24808 #### 1. Quotes inside <b> and <i>
24809 #### 2. Link fragments separated by <i> and <b> tags
24810 #### 3. Link fragments inside <i> and <b>
24811 #### 4. No escaping needed
24812 #### --------------------------------------
24814 1a. Quotes inside <b> and <i>
24825 <b>foo'<i>bar'</i>baz</b>
24834 <i>fools'<span> errand</span></i>
24835 <i><span>fool</span>'s errand</i>
24836 '<i>foo</i> bar '<i>baz</i>
24837 a|!*#-:;+-~[]{}b'<i>x</i>
24841 ''<nowiki>''foo''</nowiki>''
24842 ''<nowiki>'''foo'''</nowiki>''
24844 '''<nowiki/>'foo''''
24845 '''<nowiki>''foo''</nowiki>'''
24846 '''<nowiki>'''foo'''</nowiki>'''
24847 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24848 '''foo'''<nowiki/>'s
24854 '''foo'''<nowiki/>'
24855 ''''foo'''<nowiki/>'
24856 ''fools'<span> errand</span>''
24857 ''<span>fool</span>'s errand''
24858 '<nowiki/>''foo'' bar '''baz''
24859 a|!*#-:;+-~[]{}b'''x''
24863 1b. Quotes inside <b> and <i> with other tags on same line
24867 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24868 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24869 <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>
24870 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24871 '<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>
24872 '<i>foo</i> <div title="name">test</div>
24873 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24874 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24875 <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>
24878 '''a'' foo ''[[bar]]''
24879 ''a''' foo ''[[bar]]''
24880 ''a''' foo '''{{echo|[[bar]]}}'''
24881 [[foo]] x'''[[bar]]''
24882 '''foo'' <ref>test</ref>
24883 '''foo'' <div title="name">test</div>
24884 '''foo'' and <br> bar
24889 2. Link fragments separated by <i> and <b> tags
24893 <p>[[<i>foo</i>hello]]</p>
24894 <p>[[<b>foo</b>hello]]</p>
24896 [[''foo''<nowiki>hello]]</nowiki>
24898 [['''foo'''<nowiki>hello]]</nowiki>
24901 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24902 # this is one of the shortcomings of this format
24904 3. Link fragments inside <i> and <b>
24908 <p><i>[[foo</i>]]</p>
24909 <p><b>[[foo</b>]]</p>
24911 ''[[foo''<nowiki>]]</nowiki>
24913 '''[[foo'''<nowiki>]]</nowiki>
24917 4. No escaping needed
24921 <p>'<span><i>bar</i></span>'
24922 '<span><b>bar</b></span>'
24926 '<span>''bar''</span>'
24927 '<span>'''bar'''</span>'
24931 #### ----------- Paragraphs ---------------
24932 #### 1. No unnecessary escapes
24933 #### --------------------------------------
24936 1. No unnecessary escapes
24940 <p>bar <span>[[foo]]</span>
24941 </p><p>=bar <span>[[foo]]</span>
24942 </p><p>[[bar <span>[[foo]]</span>
24943 </p><p>]]bar <span>[[foo]]</span>
24944 </p><p>=bar <span>foo]]</span>=
24947 bar <span><nowiki>[[foo]]</nowiki></span>
24949 =bar <span><nowiki>[[foo]]</nowiki></span>
24951 [[bar <span><nowiki>[[foo]]</nowiki></span>
24953 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24955 =bar <span>foo]]</span><nowiki>=</nowiki>
24958 #### ----------------------- PRE --------------------------
24959 #### 1. Leading whitespace in SOL context should be escaped
24960 #### ------------------------------------------------------
24962 1. Leading whitespace in SOL context should be escaped
24985 <nowiki> </nowiki>a
24987 <nowiki> </nowiki> a
24991 <nowiki> </nowiki> a
24993 <nowiki> </nowiki>a
24996 <nowiki> </nowiki>b
25019 2. Leading whitespace in non-indent-pre contexts should not be escaped
25023 <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>
25024 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
25025 <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>
25035 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
25054 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
25058 <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>
25060 [[File:Foobar.jpg|thumb|caption]]
25064 5. Nowiki escaping should account for indent-pres
25074 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
25087 #### --------------- Behavior Switches --------------------
25090 1. Valid behavior switches should be escaped
25097 <nowiki>__TOC__</nowiki>
25098 ''<nowiki>__TOC__</nowiki>''
25102 2. Invalid behavior switches should not be escaped
25113 # We use indent-pre as an indirect way to test for sol-transparent behavior.
25115 Behavior switches should be SOL-transparent
25119 <meta property="mw:PageProp/toc" />
25121 <!-- this one's bogus -->
25124 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
25126 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
25130 <!-- this one's bogus -->
25139 #### --------------- HTML tags ---------------
25142 #### 3. multi-line html tag
25143 #### 4. extension tags
25144 #### -----------------------------------------
25150 <a href="http://google.com">google</a>
25152 <a href="http://google.com">google</a>
25160 <ul><li> <div>foo</div></li>
25161 <li> <div style="color:red">foo</div></li>
25162 <li> <td></li></ul>
25165 * <nowiki><div>foo</div></nowiki>
25166 * <nowiki><div style="color:red">foo</div></nowiki>
25167 * <nowiki><td></nowiki>
25171 3. multi-line html tag
25190 <p><ref>foo</ref>
25191 </p><p><ref>bar
25192 </p><p>baz</ref>
25195 <nowiki><ref>foo</ref></nowiki>
25197 <nowiki><ref>bar</nowiki>
25199 baz<nowiki></ref></nowiki>
25202 #### --------------- Others ---------------
25208 <p><nowiki>foo</nowiki>
25211 <nowiki>foo</nowiki>
25214 ## The quote-char in the input is necessary for triggering the bug
25216 (T54035) Nowiki-escaping should not get tripped by " :" in text
25225 #----------- End of wikitext escaping tests --------------
25229 Tag-like HTML structures are passed through as text
25251 </p><p>1<d e>f
25256 HTML tag with necessary entities in attributes
25258 <span title="&amp;">foo</span>
25260 <p><span title="&amp;">foo</span>
25265 HTML tag with 'unnecessary' entity encoding in attributes
25267 <span title="&">foo</span>
25269 <p><span title="&">foo</span>
25274 HTML tag with broken attribute value quoting
25276 parsoid=wt2html,html2html
25278 <span title="Hello world>Foo</span>
25280 <p><span title="Hello world">Foo</span>
25283 <p><span title="Hello world">Foo</span></p>
25287 Self-closed tag with broken attribute value quoting
25289 parsoid=wt2html,html2html
25291 <div title="Hello world />Foo
25293 <div title="Hello world"></div>
25296 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
25300 Table with broken attribute value quoting
25302 parsoid=wt2html,html2html
25305 | title="Hello world|Foo
25310 <td title="Hello world">Foo
25316 <td title="Hello world">Foo
25322 Table with broken attribute value quoting on consecutive lines
25324 parsoid=wt2html,html2html
25327 | title="Hello world|Foo
25328 | style="color:red|Bar
25333 <td title="Hello world">Foo
25335 <td style="color:red">Bar
25341 <td title="Hello world">Foo
25342 </td><td style="color: red">Bar
25343 </td></tr></tbody></table>
25348 Accept empty td cell attribute
25351 | align="center" | foo || |
25356 <td align="center"> foo </td>
25363 Non-empty attributes in th-cells
25366 ! Foo !! style="color: red" | Bar
25372 <th style="color: red"> Bar
25378 Accept empty attributes in th-cells
25393 Empty table rows go away
25414 ### Parsoid-centric tests for testing RTing of inter-element separators
25415 ### Edge cases not tested by existing parser tests and specific to
25416 ### Parsoid-specific serialization strategies.
25420 RT-ed inter-element separators should be valid separators
25432 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
25436 # Parsoid-only since PHP parser relies on Tidy for correct output
25438 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
25452 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
25453 <p>bar</p></small></td></tr>
25457 <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>
25461 # Note that the "style" attribute is really a template parameter here.
25462 # The = would have to be {{=}} if you wanted the literal.
25464 Empty TD followed by TD with tpl-generated attribute
25469 |{{echo|style='color:red'}}|foo
25483 Indented table with an empty td
25501 ## We have some newline diffs RT-ing this edge case
25502 ## and it is not important enough -- we seem to be emitting
25503 ## at most 2 newlines after a </tr> and this is unrelated to
25504 ## the issue from T85627 that this is testing.
25506 Indented table with blank lines in between (T85627)
25525 Indented block & table
25539 <div data-parsoid='{"stx":"html"}'>foo</div>
25541 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
25546 Indent and comment before table row
25561 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
25562 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
25566 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
25568 Empty TR followed by a template-generated TR
25574 {{echo|<tr><td>foo</td></tr>}}
25580 <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}}]}'>
25585 ## PHP and parsoid output differ for this, and since this is primarily
25586 ## for testing Parsoid's serializer, marking this Parsoid only
25588 Empty TR followed by mixed-ws-comment line should RT correctly
25604 <!--c--> </tr><!--d-->
25610 Multi-line image caption generated by templates with/without trailing newlines
25612 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
25613 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
25615 <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>
25616 <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>
25620 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
25624 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
25626 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
25628 <includeonly>foo</includeonly>
25636 ## PHP emits broken html for this, and since this is primarily
25637 ## a Parsoid serializer test, marking this Parsoid only
25639 Improperly nested inline or quotes tags with whitespace in between
25641 <span> <s>x</span> </s>
25644 <p><span> <s>x</s></span><s> </s>
25645 <b> <i>x</i></b><i> </i>
25650 Encapsulate protected attributes from wt
25652 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
25654 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
25658 <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>
25660 <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">
25661 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
25665 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
25666 ## Having nested or stray pre tags results in the attempt to add duplicates,
25667 ## causing an assertion fail. This test tries to prevent that situation.
25669 Ensure ParagraphWrapper can deal with stray closing pre tags
25679 1. Ensure fostered text content is wrapped in element nodes
25683 <table>hi</table><table>ho</table>
25692 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
25694 parsoid=wt2html,wt2wt
25703 <tbody><tr><td> a</td></tr>
25708 Encapsulation properly handles null DSR information from foster box
25710 parsoid=wt2html,wt2wt
25712 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
25714 <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>
25718 1. Encapsulate foster-parented transclusion content
25720 parsoid=wt2wt,wt2html
25722 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
25724 <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>
25734 2. Encapsulate foster-parented transclusion content
25736 parsoid=wt2wt,wt2html
25738 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
25740 <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>
25751 3. Encapsulate foster-parented transclusion content
25753 parsoid=wt2wt,wt2html
25755 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25757 <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>"]}">
25770 4. Encapsulate foster-parented transclusion content
25772 parsoid=wt2wt,wt2html
25774 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25776 <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>"]}">
25789 5. Encapsulate foster-parented transclusion content
25791 parsoid=wt2wt,wt2html
25793 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
25795 <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>
25810 6. Encapsulate foster-parented transclusion content
25812 parsoid=wt2wt,wt2html
25814 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25816 <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>
25832 7. Encapsulate foster-parented transclusion content
25834 parsoid=wt2wt,wt2html
25836 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25838 <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>
25848 # Note that the wt is broken on purpose: the = should be {{=}} if you
25849 # don't want it to be a template parameter key.
25851 8. Encapsulate foster-parented transclusion content
25853 parsoid=wt2wt,wt2html
25856 }}{|{{echo|style='color:red'}}
25861 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25863 <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>
25874 9. Encapsulate foster-parented transclusion content
25876 parsoid=wt2wt,wt2html
25878 <table>{{echo|hi</table>hello}}
25880 <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>
25884 Table in fosterable position
25895 <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">
25897 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25903 # Parsoid only for T66747
25905 Properly encapsulate empty-content transclusions in fosterable positions
25913 <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"}]]}'>
25919 Always encapsulate foster box when template range is expanded to table
25932 T115289: Unclosed table
25934 {{echo|<table>}}<!--c-->[[Category:Two]]
25936 <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>
25940 T115289: Don't migrate newlines out of tables with fostered content
25942 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25944 <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>
25948 T73074: More fostering fun
25950 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25952 <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>
25956 Support <object> element with .data attribute
25960 <object data="test.swf"></object>
25962 <object data="test.swf"></object>
25966 Don't block XML namespace declaration
25968 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25970 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25973 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25976 # -----------------------------------------------------------------
25977 # The following section of tests are primarily to spec requirements
25978 # around Parsoid's serialization (old, new, edited content)
25980 # All these tests are marked Parsoid html2wt and html2html only
25981 # ----------------------------------------------------------------
25984 Ignore rel attribute in a-tags during serialization to url-links
25988 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25989 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25990 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25992 http://en.wikipedia.org/wiki/Foobar
25993 http://en.wikipedia.org/wiki/Foobar
25994 http://en.wikipedia.org/wiki/Foobar
25997 # 'mi' is a localinterwiki prefix as well as a language
25999 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
26003 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
26009 Parsoid should accept interwiki shortcuts
26013 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
26014 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
26015 <a href='./fr:Foo'>Foo</a></p>
26016 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
26017 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
26018 <a href='fr%3AFoo'>Foo</a></p>
26030 Parsoid should not accept invalid interwiki shortcuts
26034 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
26035 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
26036 <a href='news:Foo'>Foo</a></p>
26045 New wikilinks should be serialized properly
26049 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
26050 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
26051 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
26052 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
26053 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
26057 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
26058 http://en.wikipedia.org/wiki/Foo
26059 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
26063 New wiki links (href variations)
26067 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
26068 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
26069 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
26070 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
26075 [[Toxine bactérienne]]
26079 New wiki links (content string variations)
26083 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
26084 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
26085 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
26089 [[Foo_bar|./Foo_bar]]
26093 New category links (href variations)
26097 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
26098 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
26099 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
26101 [[Category:Toxine bactérienne]]
26102 [[Category:Toxine bactérienne]]
26103 [[Category:Toxine bactérienne]]
26107 New sol transparent links don't need indent-pre nowiki protection
26112 <link rel="mw:PageProp/redirect" href="./Main_Page">
26113 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
26114 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
26116 #WEITERLEITUNG [[Main Page]]
26117 <!-- this is good --> [[Category:Good]]
26118 <!-- this is great --> [[Kategorie:Great]]
26122 New interlanguage links (href variations)
26126 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
26127 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
26128 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
26130 [[es:Toxine bactérienne]]
26131 [[es:Toxine_bactérienne]]
26132 [[es:Toxine_bactérienne]]
26136 Image: Modifying size of an image (1)
26139 "modes": ["wt2wt"],
26141 ["img[height]", "attr", "height", "22"],
26142 ["img[width]", "attr", "width", "200"]
26146 [[Image:Foobar.jpg|230x230px]]
26148 [[Image:Foobar.jpg|200x200px]]
26152 Image: Modifying size of an image (2)
26155 "modes": ["wt2wt"],
26157 ["img[height]", "attr", "height", "100"],
26158 ["img[width]", "attr", "width", "500"]
26162 [[Image:Foobar.jpg|230x230px]]
26164 [[Image:Foobar.jpg|500x500px]]
26167 # Change in size is ignored so long as class='mw-default-size'
26169 Image: Modifying size of an image (3)
26172 "modes": ["wt2wt"],
26174 ["figure[class]", "removeClass", "mw-default-size"],
26175 ["figure img", "attr", "height", "19"],
26176 ["figure img", "attr", "width", "170"]
26180 [[Image:Foobar.jpg|thumb]]
26182 [[Image:Foobar.jpg|thumb|170x170px]]
26186 Image: Modifying alignment of an image (T50665)
26189 "modes": ["wt2wt"],
26191 ["figure[class]", "removeClass", "mw-halign-right"],
26192 ["figure[class]", "addClass", "mw-halign-left"]
26196 [[Image:Foobar.jpg|thumb|caption|right]]
26198 [[Image:Foobar.jpg|thumb|caption|left]]
26202 Image: Modifying mw-default-size of an frameless image (T64805)
26205 "modes": ["wt2wt"],
26207 ["figure.mw-default-size", "removeClass", "mw-default-size"]
26211 [[Image:Foobar.jpg|frameless|right]]
26213 [[Image:Foobar.jpg|frameless|right|220x220px]]
26217 Image: Modifying valign of an image (T51221)
26220 "modes": ["wt2wt"],
26222 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
26223 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
26227 [[File:Foobar.jpg|20px|middle]]
26229 [[File:Foobar.jpg|20px|text-top]]
26233 Image: Modifying alt attribute of an image (T58400)
26236 "modes": ["wt2wt"],
26238 ["img[alt]", "attr", "alt", "some alternate edited text"]
26242 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
26244 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
26248 Image: Modifying caption of an image
26251 "modes": ["wt2wt"],
26253 ["figcaption", "text", "new caption"]
26257 [[Image:Foobar.jpg|thumb|original caption]]
26259 [[Image:Foobar.jpg|thumb|new caption]]
26263 Image: empty alt attribute (T50924)
26267 [[File:Foobar.jpg|thumb|alt=|bar]]
26269 <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>
26273 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
26279 <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>
26281 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
26285 Image: Block level image should have \n before and after
26288 [[File:Foobar.jpg|right|thumb|150x150px]]
26292 <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>
26297 Image: New block level image should have \n before and after (existing content)
26300 [[File:Foobar.jpg|right|thumb|150x150px]]
26304 <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>
26309 Image: upright option (parsoid)
26311 [[File:Foobar.jpg|thumb|upright|caption]]
26312 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
26313 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
26315 <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>
26316 <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>
26317 <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>
26321 Image: upright option is ignored on inline and frame images (parsoid)
26323 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
26325 <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>
26329 Image: from basic HTML (1)
26333 <span typeof="mw:Image">
26334 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
26337 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
26341 Image: from basic HTML (2)
26345 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
26347 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
26351 Image: from basic HTML (3)
26355 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
26357 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
26361 Image: from basic HTML (4)
26365 <img src="./File:Foobar.jpg">
26367 [[File:Foobar.jpg|link=]]
26371 Image: Invalid title as link
26373 [[File:Foobar.jpg|link=<]]
26375 <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>
26378 <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>
26382 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
26387 <li><p>foo</p></li>
26394 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
26398 <ul> <li>foo</li></ul>
26404 Don't strip leading whitespace when handling indent-pre suppressing tags
26409 <tr><td> indented row</td></tr>
26412 <b>This is very bold of you!</b>
26415 indented cell (no pre-wrapping!)
26425 '''This is very bold of you!'''
26429 indented cell (no pre-wrapping!)
26437 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
26459 <nowiki> </nowiki></span>bar2
26462 <nowiki> </nowiki><span>bar</span>
26465 <nowiki> </nowiki><span>foo</span>
26470 Lists: Dont insert newlines in a serialized list item.
26474 <ul><li>a<br>b</li><li>c</li></ul>
26481 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
26484 "modes": ["html2wt"],
26485 "scrubWikitext": false
26488 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26489 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26491 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26492 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26494 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
26496 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26498 == hello there [[Category:A1]] ==
26500 == [[Category:A2]] hi pal ==
26502 == <!--foo--> [[Category:A3]] how goes it ==
26504 == it goes well [[Category:A4]] <!--bar--> ==
26506 ==howdy [[Category:A5]]==
26512 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
26515 "modes": ["html2wt"],
26516 "scrubWikitext": true
26519 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
26520 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
26522 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
26523 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
26525 <h2><meta property="mw:PageProp/toc" /> ok</h2>
26533 <!--foo--> [[Category:A3]]
26538 [[Category:A4]] <!--bar-->
26546 Headings: Don't hoist metas that come from templates
26549 "modes": ["html2wt"],
26550 "scrubWikitext": true
26553 <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>
26555 == {{echo|foo [[Category:Foo]]}} ==
26559 Headings: Category in ref isn't hoisted
26562 "modes": ["html2wt"],
26563 "scrubWikitext": true
26566 <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>
26568 <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>
26571 [[Category:Baz]] </ref> ==
26577 Parsoid: Serialize positional parameters with = in them as named parameter
26581 <p about="#mwt1" typeof="mw:Transclusion"
26582 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
26584 <p about="#mwt1" typeof="mw:Transclusion"
26585 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
26587 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26588 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26589 <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>
26593 {{echo|1=f=oo|2=bar}}
26595 <!--Orig params with data-parsoid has heuristics for handling = chars-->
26596 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
26597 {{echo|<nowiki>f=oo</nowiki>|bar}}
26601 Parsoid: Serialize positional parameters with = in extlink as named parameter
26605 <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>
26607 {{echo|1=http://stuff?is=ok}}
26611 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
26615 <div>a<p>b</p></div>
26636 Substrings resembling wikitext in hrefs should not get nowiki escapes
26640 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
26646 Enforce single-line context in the serializer
26653 <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">
26654 </span><span about="#mwt1">you</span> </h2>
26656 <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>
26658 <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
26659 there</span></li></ol>
26671 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
26678 </tbody></table></dd></dl>
26682 == hi {{bogus|there
26693 * foo '''bar''' baz
26705 Serialize new placeholder space without spans
26709 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
26711 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
26713 <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>
26719 <ref>foo : bar</ref>ok
26723 #-----------------------
26724 # Tag minimization tests
26725 #-----------------------
26728 1. I/B quote minimization: wikitext-only tags should be combined
26732 <p><i>A</i><i>B</i></p>
26733 <p><b>A</b><b>B</b></p>
26734 <p><i>A</i><b><i>B</i></b></p>
26735 <p><b>A</b><i><b>B</b></i></p>
26736 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
26737 <p><i><b>A</b></i><i><b>B</b></i></p>
26738 <p><i><b>A</b></i><b><i>B</i></b></p>
26739 <p><b><i>A</i></b><i><b>B</b></i></p>
26759 2. I/B quote minimization: wikitext and html tags should not be combined
26763 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
26764 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
26768 ''A''<nowiki/>'''<i>B</i>'''
26772 3. I/B quote minimization: templated content stops minimization
26776 <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>
26777 <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>
26779 ''A''{{echo|''B''}}
26781 ''A''{{echo|'''''B'''''}}
26785 4. I/B quote minimization: new content should be mimimized with adjacent old content
26789 <p><i>A</i><i>B</i></p>
26790 <p><b>A</b><b>B</b></p>
26791 <p><i>A</i><b><i>B</i></b></p>
26801 5a. Merge adjacent quote nodes if they've been edited
26804 "modes": ["wt2wt", "selser"],
26806 ["p", "contents", "remove", ":contains('b')"]
26816 5b. Merge adjacent quote nodes if they've been edited
26819 "modes": ["wt2wt", "selser"],
26825 ''a''<span id="x">b</span>''c''
26831 1. Merge adjacent link nodes as long as at least one element is new
26834 "modes": ["html2wt"],
26835 "scrubWikitext": true
26838 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26839 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26840 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26844 [[Football|Foot]][[Football|ball]]
26848 2. Merge adjacent link nodes and enable additional normalizations
26851 "modes": ["html2wt"],
26852 "scrubWikitext": true
26855 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26857 [[Football|''Football'']]
26861 3. Don't merge adjacent link nodes if scrubWikitext is false
26864 "modes": ["html2wt"],
26865 "scrubWikitext": false
26868 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26870 [[Football|Foot]][[Football|ball]]
26873 #------------------------------
26874 # End of tag minimization tests
26875 #------------------------------
26878 T56262: New entities
26882 <span typeof="mw:Entity"> </span>
26887 ## Note that there is no wikitext output for 'unknownproperty' ##
26888 ## Unknown magic words are silently dropped ##
26895 <meta property='mw:PageProp/toc' />
26896 <meta property='mw:PageProp/notoc' />
26897 <meta property='mw:PageProp/forcetoc' />
26898 <meta property='mw:PageProp/index' />
26899 <meta property='mw:PageProp/noindex' />
26900 <meta property='mw:PageProp/nogallery' />
26901 <meta property='mw:PageProp/noeditsection' />
26902 <meta property='mw:PageProp/notitleconvert' />
26903 <meta property='mw:PageProp/nocontentconvert' />
26904 <meta property='mw:PageProp/unknownproperty' />
26914 __NOCONTENTCONVERT__
26918 Consecutive <pre>s should not get merged
26920 parsoid=html2wt,html2html
26922 <pre>a</pre><pre>b</pre>
26950 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26954 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26956 [[Special:BookSources/1234567890|ISBN 1234567895]]
26960 Edited RFC links not serializable as RFC links should serialize as extlinks
26964 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26966 [//tools.ietf.org/html/rfc123 New RFC]
26970 Edited PMID links not serializable as PMID links should serialize as extlinks
26974 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26976 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26980 WTS of autolinks with trailing/surrounding context
26984 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26985 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26986 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26987 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26988 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26989 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26991 http://cscott.net'''foo'''
26993 http://cscott.net<b>foo</b>
26995 '''http://cscott.net'''
26997 '''http://cscott.net '''
26999 '''http://cscott.net<nowiki/>x'''
27001 http://cscott.net<nowiki/>x
27005 WTS of autolinks with nowikis (round-trip)
27007 x<nowiki/>http://cscott.net<nowiki/>x
27009 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
27012 # this is the "easy" test because it leaves in place all the
27013 # data-parsoid information indicating this is an autolink
27015 WTS of autolinks with escapes (editing)
27018 "modes": ["wt2wt"],
27020 [ "span", "remove" ]
27024 x<nowiki/>http://cscott.net<nowiki/>x
27026 x<nowiki/>http://cscott.net<nowiki/>x
27030 WTS of edited autolink-like text (T103364)
27033 "modes": ["wt2wt"],
27035 [ "span[typeof]", "removeAttr", "typeof" ]
27039 Not a link: <nowiki>http://example.com</nowiki>.
27041 Not a link: <span><nowiki>http://example.com</nowiki></span>.
27045 WTS of newly-authored autolink-like text (T103364)
27049 <p>http://example.com is not a link.</p>
27051 <nowiki>http://example.com</nowiki> is not a link.
27055 WTS of autolink-like text after an autolink (T108563)
27059 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
27061 http://example.com <nowiki>http://example.com</nowiki> is not a link.
27065 Magic links inside links (not autolinked)
27067 [[Foo|http://example.com]]
27070 [[Foo|ISBN 123456789x]]
27072 [http://foo.com http://example.com]
27073 [http://foo.com RFC 1234]
27074 [http://foo.com PMID 1234]
27075 [http://foo.com ISBN 123456789x]
27077 <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>
27078 <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>
27080 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
27081 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
27082 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
27083 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
27085 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
27086 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
27087 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
27088 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
27092 Magic links inside image captions (autolinked)
27094 [[File:Foobar.jpg|thumb|http://example.com]]
27095 [[File:Foobar.jpg|thumb|RFC 1234]]
27096 [[File:Foobar.jpg|thumb|PMID 1234]]
27097 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
27099 <div class="thumb tright">
27100 <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>
27101 <div class="thumbcaption">
27102 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
27103 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
27106 <div class="thumb tright">
27107 <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>
27108 <div class="thumbcaption">
27109 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
27110 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
27113 <div class="thumb tright">
27114 <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>
27115 <div class="thumbcaption">
27116 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
27117 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
27120 <div class="thumb tright">
27121 <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>
27122 <div class="thumbcaption">
27123 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
27124 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
27128 <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>
27129 <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>
27130 <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>
27131 <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>
27135 WTS of magic word text (T109371)
27140 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
27141 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
27143 <nowiki>RFC 1234</nowiki>
27145 [http://foo.com RFC 1234]
27151 Edited Redirect link should emit a non-piped wikitext link
27155 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
27161 T75121: Infer extension name from typeOf if data-mw is not present
27163 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
27165 <div typeOf="mw:Extension/foo"></div>
27170 # Note that the <p> wrapping isn't present in PHP parser output
27171 # The important thing for this test is that P-wrapping doesn't
27172 # interfere with the <nowiki> protection for leading - in <td>
27173 # (which isn't necessary for <th>).
27175 T88318: p-wrapped dash in table.
27177 parsoid=html2wt,wt2wt
27180 <tr><th><p>-</p></th><th><p>- </p></th></tr>
27181 <tr><td><p>-</p></td><td><p>- </p></td></tr>
27182 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
27189 |<nowiki>-</nowiki>
27190 |<nowiki>- </nowiki>
27209 <td><small>-</small></td>
27221 T149209: WTS: Handle newlines in table cells properly
27229 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
27231 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
27237 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
27239 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
27261 T149209: Selser: Handle newlines in table cells properly
27264 "modes": ["selser"],
27266 [ "#h1", "html", "a\nb\n" ],
27267 [ "#h2", "html", "a\nb\n" ],
27268 [ "#c1", "html", "a\nb\n" ],
27269 [ "#c2", "html", "<p>a</p>" ],
27270 [ "#c3", "html", "<p>a</p>" ],
27271 [ "#c4", "html", "edit-me<p>a</p>" ]
27276 ! id="h1" |edit-me!!1
27278 ! id="h2" |edit-me||2
27280 | id="c1" |edit-me||3
27282 | id="c2" |edit-me||4
27284 | id="c3" |edit-me||p||q||r
27286 | id="c4" |edit-me||p||q||r
27315 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
27320 <td id='mwAc'>foo</td>
27321 <td id='serialize-this'>bar</td>
27326 | id="serialize-this" |bar
27331 Parsoid-like element ids should not be serialized to wikitext unless shadowed
27335 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
27337 <div id="hello">ok</div>
27344 "modes": ["wt2wt"],
27346 [ "#xyz", "before", "<b>before</b> stuff " ],
27347 [ "#xyz", "after", " stuff <i>after</i>" ],
27348 [ "#xyz", "html", "x <b>y</b> z" ]
27352 <span id="xyz">hello</span>
27354 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
27358 Never serialize a-tag as html, regardless of what data-parsoid has to say
27360 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
27362 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
27367 ## SSS FIXME: This is broken output nevertheless.
27368 ## What might be a reasonable non-broken output for this?
27369 ## This is an edge case unlikely to be seen in production
27370 ## that I am not wasting more time on this right now.
27372 Never serialize a-tag as html, no matter what attributes it has
27374 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
27376 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
27378 [http://boo.org http://boohoo.org]
27381 # Misnested is an indication that selser can reuse the source but these have
27382 # shown to sneak through on occasion. See T101768.
27383 # The original wikitext here is: [http://test.com [[one]] two three]
27385 Strip span tags added to mark misnested links
27389 <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>
27391 [http://test.com][[one]] two three
27395 Catch regression when unpacking misnested links
27399 {{echo|hi}}[http://example.com [[ho]]]
27401 <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>
27405 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
27409 <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|}"]}'>
27421 ## This test verifies the presence and computation of this attribute indirectly
27422 ## by making an edit and ensuring that the serialization is correct (which it would be
27423 ## only if firstWikitextNode is properly set).
27425 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
27428 "modes": ["wt2wt"],
27430 [ "div#x", "remove" ],
27431 [ "div", "before", "<div>new</div>" ]
27435 <div id="x">foo</div>
27437 {{echo|<div>boo</div>
27445 {{echo|<div>boo</div>
27451 # --------------------------------------------
27452 # Tests spec'ing wikitext serialization norms |
27453 # --------------------------------------------
27456 Serialize multi-line indent-pre starting with wikitext syntax
27470 1. Categories should always be serialized on their own line
27474 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
27482 2. Categories that are part of templates should not introduce a line break
27484 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
27486 <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>
27489 # Careful while editing these next 2 tests. There are \u200f characters
27490 # before and after the <link> tags in the HTML and following some
27491 # of the categories in wikitext
27492 # Do not remove these characters in edits.
27494 # As part of the serialization, these bidi characters will get stripped.
27496 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
27499 "modes": ["html2wt"],
27500 "scrubWikitext": true
27503 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
27504 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
27507 [[קטגוריה: שיטות משפט]]
27511 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
27514 "modes": ["html2wt"],
27515 "scrubWikitext": true
27518 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
27525 Lists: Add space after bullets
27532 <li><span> baz</span></li>
27537 * <span> baz</span>
27541 1. Headings: Add space before/after == (T53744)
27548 <h2><span> baz</span></h2>
27556 == <span> baz</span> ==
27560 2. Headings: Add space before/after == even after hoisted content
27563 "modes": ["html2wt"],
27564 "scrubWikitext": true
27567 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
27575 1. Headings: suppress newly created empty headings
27578 "modes": ["html2wt"],
27579 "scrubWikitext": true
27587 2. Headings: don't suppress empty headings if scrubWikitext is false
27597 3. Headings: suppress empty headings on edits
27600 "modes": ["selser"],
27601 "scrubWikitext": true,
27607 ==<span id="x">foo</span>==
27612 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
27615 "modes": ["html2wt"],
27616 "scrubWikitext": true
27619 <h2>foo<br/>bar</h2>
27620 <h2>foo <span><br/>bar</span> baz</h2>
27624 == foo <span> bar</span> baz ==
27628 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
27631 "modes": ["html2wt"],
27632 "scrubWikitext": false
27635 <h2>foo<br/>bar</h2>
27641 1. WT Quote Tags: suppress newly created empty style tags
27644 "modes": ["html2wt"],
27645 "scrubWikitext": true
27653 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
27659 ''<nowiki/>'''''<nowiki/>'''
27663 3. WT Quote Tags: suppress empty style tags on edits
27666 "modes": ["selser"],
27667 "scrubWikitext": true,
27673 '''<span id="x">foo</span>'''
27678 1. Anchors: suppress newly created empty anchors
27681 "modes": ["html2wt"],
27682 "scrubWikitext": true
27685 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27690 2. Anchors: don't suppress empty anchors if scrubWikitext is false
27693 "modes": ["html2wt"],
27694 "scrubWikitext": false
27697 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27703 3. Anchors: suppress empty anchors on edits
27706 "modes": ["selser"],
27707 "scrubWikitext": true,
27713 [[Test|<span id="x">foo</span>]]
27718 3a. Anchors: do not suppress numbered extlinks
27721 "modes": ["wt2wt"],
27722 "scrubWikitext": true
27727 <a rel="mw:ExtLink" href="http://foo.com"></a>
27731 3b. Anchors: do not suppress numbered extlinks
27734 "modes": ["wt2wt"],
27735 "scrubWikitext": true,
27741 [http://foo.com <span id="x">foo</span>]
27747 Normalizations should be restricted to edited content
27750 "modes": ["selser"],
27751 "scrubWikitext": true,
27753 [ "h1", "before", "<i></i>"]
27767 1. Multiple normalizations (html2wt)
27770 "modes": ["html2wt"],
27771 "scrubWikitext": true
27775 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
27776 </a><b><i></i></b>x</p>
27785 2. Multiple normalizations (selser)
27788 "modes": ["selser"],
27789 "scrubWikitext": true,
27791 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
27795 <span id="x">foo</span>
27797 <span id="x">foo</span>
27803 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
27806 "modes": ["html2wt"],
27807 "scrubWikitext": true
27819 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
27826 <nowiki> </nowiki>hi
27828 <nowiki> </nowiki> hello
27832 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
27835 "modes": ["html2wt"],
27836 "scrubWikitext": true
27845 baz bang</td></tr></table>
27851 bar<span>boo</span></p>
27867 bar<span>boo</span>
27871 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
27874 "modes": ["selser"],
27875 "scrubWikitext": true,
27877 [ "p", "html", " a\n b" ]
27888 1. New links that end in spaces
27891 "modes": ["html2wt"],
27892 "scrubWikitext": false
27895 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27896 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27897 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27899 [[Berlin ]]<nowiki/>is the capital of Germany.
27903 [[Boston ]] is a city.
27907 2. New links that end in spaces
27910 "modes": ["html2wt"],
27911 "scrubWikitext": true
27914 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27915 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27916 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27918 [[Berlin]] is the capital of Germany.
27922 [[Boston]] is a city.
27926 1. Table cells with escapable prefixes
27929 "modes": ["html2wt"],
27930 "scrubWikitext": false
27934 <tr><td>a</td></tr>
27935 <tr><td>-</td></tr>
27936 <tr><td>+</td></tr>
27942 |<nowiki>-</nowiki>
27944 |<nowiki>+</nowiki>
27949 2. Table cells with escapable prefixes
27952 "modes": ["html2wt"],
27953 "scrubWikitext": true
27957 <tr><td>a</td></tr>
27958 <tr><td>-</td></tr>
27959 <tr><td>+</td></tr>
27972 3a. Table cells with escapable prefixes after edits
27975 "modes": ["selser"],
27976 "scrubWikitext": true,
27978 [ "table tbody tr:first-child td:first-child", "remove"]
27992 3b. Table cells with escapable prefixes after edits
27995 "modes": ["selser"],
27996 "scrubWikitext": true,
27998 [ "table tbody tr:first-child td:first-child", "html", "-" ],
28005 |<span id="x">foo</span>+
28014 # FIXME: This test will fail because
28015 # normalization doesn't realize that the id attribute
28016 # will eliminate the escapable scenario
28018 4a. Table cells without escapable prefixes after edits
28021 "modes": ["selser"],
28022 "scrubWikitext": true,
28024 [ "#x", "html", "-" ]
28037 ## This tests normalizer's ability to discriminate between
28038 ## cells having identical content.
28040 4b. Table cells without escapable prefixes after edits
28043 "modes": ["selser"],
28044 "scrubWikitext": true,
28046 [ "td", "html", "-" ]
28059 ## This tests normalizer's ability to not be tripped by
28060 ## comments (and whitespace)
28062 4c. Table cells without escapable prefixes after edits
28065 "modes": ["selser"],
28066 "scrubWikitext": true,
28068 [ "table tbody tr td:first-child", "remove" ]
28083 ## This tests normalizer's ability to handle HTML cells
28085 4d. Table cells without escapable prefixes after edits
28088 "modes": ["selser"],
28089 "scrubWikitext": true,
28091 [ "td", "html", "-" ]
28096 <tr><td>a</td></tr>
28100 <tr><td>-</td></tr>
28104 ## T111151 Remove font elements without attributes
28106 5a. font tags without attributes should be dropped in scrubWikitext mode
28109 "modes": ["html2wt"],
28110 "scrubWikitext": true
28114 <font><font>bar</font></font>
28115 <font class="x">boo</font>
28119 <font class="x">boo</font>
28123 5b. font tags should not be dropped without scrubWikitext being enabled
28126 "modes": ["html2wt"],
28127 "scrubWikitext": false
28136 Escape nowiki DOM elements
28140 <nowiki><i>foo</i></nowiki>
28142 <nowiki>''foo''</nowiki>
28145 # This is meant to be an interim fix while we go about figuring out
28146 # how to not introduce these trailing <nowiki/>s in the first place.
28148 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
28152 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
28154 <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>
28155 <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>
28168 # ---------------------------------------------------
28169 # End of tests spec'ing wikitext serialization norms |
28170 # ---------------------------------------------------
28174 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
28182 <td><b>c</b><p>d</p></td>
28201 Anchor without href scenarios
28203 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28206 <a class="no">dice</a>
28211 <span name="foo"></span>
28215 New transclusion added after a list should be serialized after the list
28219 <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>
28225 # -----------------------------------------------------------------
28226 # End of section for Parsoid-only html2wt tests for serialization
28228 # -----------------------------------------------------------------
28230 # -----------------------------------------------------------------
28231 # The following section of tests are primarily to spec behavior of
28232 # the selective serializer. All these tests have manual selser
28233 # changes. The automated selser changes for all tests handle the
28234 # wide variation of changes, but these tests here capture specs
28235 # deterministically.
28236 # ----------------------------------------------------------------
28240 Selser: New comments should not be lost
28243 "modes": ["selser"],
28245 [ "#a", "after", "<!--c1-->" ],
28246 [ "#b", "before", "<!--c2-->" ]
28250 <span id="a">a</span>
28252 <span id="b">b</span>
28254 <span id="a">a</span><!--c1-->
28256 <!--c2--><span id="b">b</span>
28261 Selser: Check for validity of DSR before using it
28264 "modes": ["selser"],
28266 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
28270 <span id="a">a</span>
28272 {{DISPLAYTITLE:foo}}
28273 <span id="a">a</span>
28277 1. DOMDiff: Changes to <ref> content should be looked up using id
28280 "modes": ["selser"],
28282 ["#X", "after", "bar"],
28283 ["#Y", "after", "baz"]
28287 X <ref><span id="X">foo</span></ref>
28290 <ref name="a"><span id="Y">foo</span></ref>
28293 X <ref><span id="X">foo</span>bar</ref>
28296 <ref name="a"><span id="Y">foo</span>baz</ref>
28301 2. DOMDiff: Changes to <ref> content should be looked up using id
28304 "modes": ["selser"],
28306 ["#Z", "after", "bar"]
28310 A <ref>foo bar for a</ref>
28311 B <ref group="X" name="b" />
28315 <references group="X">
28316 <ref name="b"><span id="Z">foo</span></ref>
28319 A <ref>foo bar for a</ref>
28320 B <ref group="X" name="b" />
28324 <references group="X">
28325 <ref name="b"><span id="Z">foo</span>bar</ref>
28330 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
28333 "modes": ["selser"],
28335 [ "div:first-child", "text", "bar" ]
28339 <div style="{{1x|color:red;}}%">foo</div>
28341 <div style="{{1x|color:red;}}%">bar</div>
28354 <li class="mw-empty-elt"></li>
28355 <li class="mw-empty-elt"></li>
28363 [[File:Thumb.png|thumb]]
28365 <div class="thumb tright">
28366 <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>
28367 <div class="thumbcaption">
28368 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
28375 unclosed internal link XSS (T137264)
28377 [[#%3Cscript%3Ealert(1)%3C/script%3E|
28379 <p>[[#<script>alert(1)</script>|
28382 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
28386 Validating that <style> isn't eaten by tidy (T167349)
28388 # Use $wgRawHtml to inject a <style> tag, since you normally can't in wikitext
28392 <html><style>.foo::before { content: "<foo>"; }</style></html>
28393 <html><style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style></html>
28397 <style>.foo::before { content: "<foo>"; }</style>
28398 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
28403 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
28405 == A&B&C&amp;D&amp;amp;E ==
28406 [[#A&B&C&amp;D&amp;amp;E]]
28408 <h2><span class="mw-headline" id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">A&B&C&amp;D&amp;amp;E</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&amp;D&amp;amp;E">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28409 <p><a href="#A.26B.26C.26D.26amp.3BE">#A&B&C&amp;D&amp;amp;E</a>
28414 Decoding of HTML entities in indicator names for IDs (T104196)
28418 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
28420 1&2&3&4&amp;5=Indicator
28425 HTML5 ids: fallback to legacy
28427 wgFragmentMode=[ 'html5', 'legacy' ]
28439 == Hey < # " > % : ' ==
28440 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
28442 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
28444 <!-- These two links should produce identical HTML -->
28445 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
28448 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
28450 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
28451 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
28452 <li class="toclevel-1 tocsection-3"><a href="#%D0%A2%D0%B5%D1%81%D1%82"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
28453 <li class="toclevel-1 tocsection-4"><a href="#%D0%A2%D0%B5%D1%81%D1%82_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
28454 <li class="toclevel-1 tocsection-5"><a href="#%D1%82%D0%B5%D1%81%D1%82"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
28455 <li class="toclevel-1 tocsection-6"><a href="#Hey_%3C_%23_%22_%3E_%25_:_%27"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
28459 <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>
28460 <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>
28461 <div id=".D0.A2.D0.B5.D1.81.D1.82"></div><h2><span class="mw-headline" id="Тест">Тест</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: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28462 <div id=".D0.A2.D0.B5.D1.81.D1.82_2"></div><h2><span class="mw-headline" id="Тест_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: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28463 <div id=".D1.82.D0.B5.D1.81.D1.82"></div><h2><span class="mw-headline" id="тест">тест</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: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28464 <div id="Hey_.3C_.23_.22_.3E_.25_:_.27"></div><h2><span class="mw-headline" id="Hey_<_#_"_>_%_:_'">Hey < # " > % : '</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: Hey < # " > % : '">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28465 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#%D0%A2%D0%B5%D1%81%D1%82">#Тест</a> <a href="#%D1%82%D0%B5%D1%81%D1%82">#тест</a> <a href="#Hey_%3C_%23_%22_%3E_%25_:_%27">#Hey < # " > % : '</a>
28466 </p><p>%F0%9F%92%A9 <span id="%F0%9F%92%A9"></span>
28467 </p><p><a href="#%E5%95%A4%E9%85%92">#啤酒</a> <a href="#%E5%95%A4%E9%85%92">#啤酒</a>
28472 HTML5 ids: legacy with a fallback to modern
28474 wgFragmentMode=[ 'legacy', 'html5' ]
28486 == Hey < # " > % : ' ==
28487 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
28489 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
28491 <!-- These two links should produce identical HTML -->
28492 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
28495 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
28497 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
28498 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
28499 <li class="toclevel-1 tocsection-3"><a href="#.D0.A2.D0.B5.D1.81.D1.82"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
28500 <li class="toclevel-1 tocsection-4"><a href="#.D0.A2.D0.B5.D1.81.D1.82_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
28501 <li class="toclevel-1 tocsection-5"><a href="#.D1.82.D0.B5.D1.81.D1.82"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
28502 <li class="toclevel-1 tocsection-6"><a href="#Hey_.3C_.23_.22_.3E_.25_:_.27"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
28506 <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>
28507 <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>
28508 <div id="Тест"></div><h2><span class="mw-headline" id=".D0.A2.D0.B5.D1.81.D1.82">Тест</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: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28509 <div id="Тест_2"></div><h2><span class="mw-headline" id=".D0.A2.D0.B5.D1.81.D1.82_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: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28510 <div id="тест"></div><h2><span class="mw-headline" id=".D1.82.D0.B5.D1.81.D1.82">тест</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: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28511 <div id="Hey_<_#_"_>_%_:_'"></div><h2><span class="mw-headline" id="Hey_.3C_.23_.22_.3E_.25_:_.27">Hey < # " > % : '</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: Hey < # " > % : '">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28512 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#.D0.A2.D0.B5.D1.81.D1.82">#Тест</a> <a href="#.D1.82.D0.B5.D1.81.D1.82">#тест</a> <a href="#Hey_.3C_.23_.22_.3E_.25_:_.27">#Hey < # " > % : '</a>
28513 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
28514 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
28519 HTML5 ids: no legacy
28521 wgFragmentMode=[ 'html5' ]
28533 == Hey < # " > % : ' ==
28534 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
28536 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
28538 <!-- These two links should produce identical HTML -->
28539 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
28542 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
28544 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
28545 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
28546 <li class="toclevel-1 tocsection-3"><a href="#%D0%A2%D0%B5%D1%81%D1%82"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
28547 <li class="toclevel-1 tocsection-4"><a href="#%D0%A2%D0%B5%D1%81%D1%82_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
28548 <li class="toclevel-1 tocsection-5"><a href="#%D1%82%D0%B5%D1%81%D1%82"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
28549 <li class="toclevel-1 tocsection-6"><a href="#Hey_%3C_%23_%22_%3E_%25_:_%27"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
28553 <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>
28554 <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>
28555 <h2><span class="mw-headline" id="Тест">Тест</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: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28556 <h2><span class="mw-headline" id="Тест_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: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28557 <h2><span class="mw-headline" id="тест">тест</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: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28558 <h2><span class="mw-headline" id="Hey_<_#_"_>_%_:_'">Hey < # " > % : '</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: Hey < # " > % : '">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
28559 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#%D0%A2%D0%B5%D1%81%D1%82">#Тест</a> <a href="#%D1%82%D0%B5%D1%81%D1%82">#тест</a> <a href="#Hey_%3C_%23_%22_%3E_%25_:_%27">#Hey < # " > % : '</a>
28560 </p><p>%F0%9F%92%A9 <span id="%F0%9F%92%A9"></span>
28561 </p><p><a href="#%E5%95%A4%E9%85%92">#啤酒</a> <a href="#%E5%95%A4%E9%85%92">#啤酒</a>