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: Handle empty comment-and-ws-only lines correctly
2743 <!--should be ignored-->
2744 <!--should be ignored as well-->
2751 <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>
2755 Templates: Handle comments in the target
2758 <!-- should be ignored -->
2762 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2765 {{echo<!-- should be ignored -->
2768 {{echo<!-- should be ignored -->|foo}}
2770 {{<!-- should be ignored -->echo|foo}}
2779 <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>
2781 <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>
2783 <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>
2785 <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>
2787 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2791 Templates: Handle comments in parameter names (T69657)
2794 <!-- should be ignored -->
2798 <!-- should be ignored -->
2801 {{echo|1<!-- should be ignored -->=foo}}
2803 {{echo|<!-- should be ignored -->1=foo}}
2811 <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>
2813 <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>
2815 <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>
2817 <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>
2821 Templates: Other wikitext in parameter names (T69657)
2828 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2831 #--------------------------------------------------------------------
2832 # Transclusion parameter escaping tests
2833 #--------------------------------------------------------------------
2835 Templates: Parsoid parameter escaping test 1
2837 {{echo|[foo]|{{echo|[bar]}}}}
2841 <p about="#mwt1" typeof="mw:Transclusion"
2842 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2846 Parsoid: Pipes in external links in template parameter
2848 {{echo|[{{echo|http://example.com}} link]}}
2850 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2852 <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>
2856 Parsoid: pipe in transclusion parameter
2858 {{echo|http://foo.com/a|b}}
2860 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2862 <p><a rel="mw:ExtLink" href="http://foo.com/a%7Cb" about="#mwt1"
2863 typeof="mw:Transclusion"
2864 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>
2868 Parsoid: Pipe in external link target and content in template parameter
2870 parsoid=html2wt,wt2wt
2872 {{echo|[http://foo.com/a|b a|b]}}
2874 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2876 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2877 typeof="mw:Transclusion"
2878 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2879 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2883 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2887 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2889 <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>
2893 Templates: Don't escape already nowiki-escaped text in template parameters
2895 parsoid=html2wt,wt2wt
2897 {{echo|foo<nowiki>|</nowiki>bar}}
2898 {{echo|<nowiki><div></nowiki>}}
2899 {{echo|<nowiki></nowiki>}}
2901 <p>foo|bar <div></p>
2903 <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>
2904 <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>
2905 <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>
2911 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2913 parsoid=html2wt,wt2wt
2915 {{echo|{{echo|1=bar}}}}
2919 <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>
2924 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
2930 <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>
2935 Templates: Preserve blank parameter names
2941 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2945 Templates: Preserve blank parameter names in other positions
2947 {{blank_param|bar|=foo}}
2951 <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
2956 ### Parsoid-centric tests for testing RT edge cases for pre
2960 1a. Indent-Pre and Comments
2973 1b. Indent-Pre and Comments
2986 1c. Indent-Pre and Comments
2999 1d. Indent-Pre and Comments
3000 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3013 2a. Indent-Pre and tables
3034 2b. Indent-Pre and tables
3050 2c. Indent-Pre and tables (T44252)
3067 2d. Indent-Pre and tables
3084 <tbody><tr><td> b</td></tr>
3089 2e. Indent-Pre and table-line syntax
3102 2f. Indent-pre started by table-line syntax
3121 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3126 Text that should be rendered preformatted
3134 <pre>Text that should be rendered preformatted
3143 3a. Indent-Pre and block tags (single-line html)
3147 c <blockquote> foo </blockquote>
3152 c <blockquote> foo </blockquote>
3153 <pre><span> foo </span>
3156 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3157 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3158 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3159 <pre><span> foo </span>
3176 3b. Indent-Pre and block tags (multi-line html)
3181 <pre>a <span>foo</span>
3186 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3187 b <div data-parsoid='{"stx":"html"}'> foo </div>
3197 3c. Indent-Pre and block tags (pre-content on separate line)
3261 4. Indent-Pre and extension tags
3272 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3276 5. Indent-Pre and html pre
3278 <pre class="123">hi</pre>
3280 <pre class="123">hi</pre>
3283 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3287 Render paragraphs when indent-pre is suppressed in blocklevels
3304 4. Multiple spaces at start-of-line
3322 ## NOTE: the leading white-space chars on empty line are significant
3324 5a. White-space in indent-pre
3336 ## NOTE: the leading white-space chars on empty line are significant
3338 5b. White-space in indent-pre
3357 5c. White-space in indent-pre
3370 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3393 7a. Indent-pre and category links
3395 parsoid=wt2html,wt2wt
3397 [[Category:foo]] <!-- No pre-wrapping -->
3398 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3401 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3402 <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 -->
3405 ## We used to, but no longer wt2wt this test since the default serializer
3406 ## will normalize all categories to serialize on their own line.
3407 ## This wikitext usage is going to be fairly uncommon in production and
3408 ## selser will take care of preserving formatting in those scenarios.
3410 7b. Indent-pre and category links
3415 [[Category:foo]] {{echo|b}}
3417 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3418 <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>
3422 Indent-Pre: Newlines in comments shouldn't affect sol state
3436 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3440 HTML-pre: 1. embedded newlines
3475 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3477 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3480 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3485 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3493 HTML-pre: big spaces
3529 <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"}}'>
3548 HTML-pre: 2: indented text
3561 HTML-pre: 3: other wikitext
3580 <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
3589 ### Definition lists
3596 <dl><dt> name </dt>
3597 <dd> Definition</dd></dl>
3602 Definition list for indentation only
3606 <dl><dd> Indented text</dd></dl>
3611 Definition list with no space
3616 <dd>Definition</dd></dl>
3621 Definition list with URL link
3623 ; http://example.com/ : definition
3625 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3626 <dd> definition</dd></dl>
3631 Definition list with bracketed URL link
3633 ;[http://www.example.com/ Example]:Something about it
3635 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3636 <dd>Something about it</dd></dl>
3641 Definition list with wikilink containing colon
3643 ; [[Help:FAQ]]: The least-read page on Wikipedia
3645 <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>
3646 <dd> The least-read page on Wikipedia</dd></dl>
3650 # At Brion's and JeLuF's insistence... :)
3652 Definition list with news link containing colon
3654 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3656 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3657 <dd> This isn't even a real newsgroup!</dd></dl>
3660 <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>
3664 Malformed definition list with colon
3666 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3668 <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>
3673 Definition lists: colon in external link text
3675 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3677 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3678 <dd> OK, I made that up</dd></dl>
3683 Definition lists: colon in HTML attribute
3685 ;<b style="display: inline">bold</b>
3687 <dl><dt><b style="display: inline">bold</b></dt></dl>
3692 Definition lists: self-closed tag
3694 ;one<br/>two : two-line fun
3696 <dl><dt>one<br />two </dt>
3697 <dd> two-line fun</dd></dl>
3702 Definition lists: ignore colons inside tags
3704 ;one <b>two : tag <i>fun:</i>:</b>: def
3706 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3712 Definition lists: excess closed tags
3714 ;one</b>two : bad tag fun
3717 <dt>onetwo </dt>
3718 <dd>bad tag fun</dd>
3723 <dd>bad tag fun</dd>
3728 T13748: Literal closing tags
3732 <dd>test test test test test</dd>
3734 <dd>test test test test test</dd>
3739 <dd>test test test test test</dd>
3741 <dd>test test test test test</dd>
3747 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3750 ; term : description
3755 <dl><dt> term </dt>
3756 <dd> description</dd></dl>
3757 <ul><li> unordered</li></ul>
3763 Definition list with empty definition and following paragraph
3775 Nested definition lists using html syntax
3788 Definition Lists: No nesting: Multiple dd's
3801 Definition Lists: Indentation: Regular
3809 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3814 Definition Lists: Indentation: Missing 1st level
3820 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3825 Definition Lists: Indentation: Multi-level indent
3829 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3834 Definition Lists: Hacky use to indent tables
3841 should be left alone
3843 <dl><dd><dl><dd><table>
3848 </td></tr></table></dd></dl></dd></dl>
3850 should be left alone
3855 Definition Lists: Hacky use to indent tables, with comments (T65979)
3863 should be left alone
3866 <dl><dd><dl><dd><table><tr>
3869 </tr></table><!-- bar --></dd></dl></dd></dl>
3871 should be left alone</p>
3875 Definition Lists: Hacky use to indent tables, with comment before table
3881 <dl><dd><dl><dd><!-- foo --><table><tr>
3883 </tr></table></dd></dl></dd></dl>
3886 # The trailing whitespace in this test is to catch a regression in
3887 # Parsoid after T54473.
3889 Definition Lists: Hacky use to indent tables (WS-insensitive)
3898 </td></tr></table></dd></dl>
3902 <tbody><tr><td>a</td></tr>
3903 </tbody></table> </dd></dl>
3906 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3907 ## as an empty dt item. It also ignores all but the last ";" when followed
3908 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3909 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3912 ## Ex: ";;t2 ::d2" is transformed into:
3924 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3925 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
3936 ## All Parsoid only definition list tests have this difference.
3938 ## See also: https://phabricator.wikimedia.org/T8569
3939 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
3942 Table / list interaction: indented table with lists in table contents
3957 <ul><li> b</li></ul>
3961 <ul><li> d</li></ul>
3962 </td></tr></table></dd></dl>
3967 Table / list interaction: lists nested in tables nested in indented lists
3990 </td></tr></table></dd></dl>
3997 Definition Lists: Nesting: Multi-level (Parsoid only)
4027 Definition Lists: Nesting: Test 2 (Parsoid only)
4054 Definition Lists: Nesting: Test 3 (Parsoid only)
4097 Definition Lists: Nesting: Test 4
4102 <dl><dd><dl><dd><dl><dt>t3</dt>
4103 <dd>d3</dd></dl></dd></dl></dd></dl>
4108 ## The Parsoid team believes the following three test exposes a
4109 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4110 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4111 ## It also exposes a "misfeature" in tidy, which doesn't like
4112 ## <dl> tags with a single <dt> child; it converts the <dt> into
4113 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4115 Definition Lists: Mixed Lists: Test 1
4121 <dl><dd><dl><dt><ul><li> foo</li>
4122 <li> bar</li></ul></dt></dl>
4123 <dl><dt> baz</dt></dl></dd></dl>
4158 Definition Lists: Mixed Lists: Test 2
4163 <ul><li><dl><dd> d1</dd>
4164 <dd> d2</dd></dl></li></ul>
4170 Definition Lists: Mixed Lists: Test 3
4175 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4176 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4182 Definition Lists: Mixed Lists: Test 4
4187 <ul><li><dl><dt>d1 </dt>
4190 <dd>d4</dd></dl></li></ul>
4196 Definition Lists: Mixed Lists: Test 5
4202 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4208 Definition Lists: Mixed Lists: Test 6
4213 <ol><li><ul><li><dl><dd>d1
4214 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4220 Definition Lists: Mixed Lists: Test 7
4225 <dl><dd><ul><li> d1</li>
4226 <li> d2</li></ul></dd></dl>
4232 Definition Lists: Mixed Lists: Test 8
4237 <dl><dd><ul><li> d1</li></ul>
4238 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4244 Definition Lists: Mixed Lists: Test 9
4248 <ul><li><dl><dt>foo </dt>
4249 <dd>bar</dd></dl></li></ul>
4255 Definition Lists: Mixed Lists: Test 10
4259 <ul><li><ol><li><dl><dt>foo </dt>
4260 <dd>bar</dd></dl></li></ol></li></ul>
4264 # The Parsoid team disagrees with the PHP parser's seemingly-random
4265 # rules regarding dd/dt on the next two tests. Parsoid is more
4266 # consistent, and recognizes the shared nesting and keeps the
4267 # still-open tags around until the nesting is complete.
4268 # (And tidy again converts <dt> to <dd> before 'bar'.)
4271 Definition Lists: Mixed Lists: Test 11
4276 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4277 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4278 <dl><dt>boo </dt>
4279 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4334 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4335 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4339 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4340 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4349 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4351 # * The test is wrong, there are two colons where there should be :;
4352 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4354 Definition Lists: Weird Ones: Test 1
4356 *#;*::;; foo : bar (who uses this?)
4358 <ul><li><ol><li><dl><dt> foo </dt>
4359 <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>
4378 <dt>bar (who uses this?)</dt>
4410 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4411 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4423 Definition Lists: colons occurring in tags
4441 <dt><span>a:b</span></dt>
4468 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4470 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4471 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4472 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4473 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4475 <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>
4476 <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>
4477 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4481 Definition Lists: colons and tables 1
4493 </td></tr></table></dd></dl>
4497 </td></tr></table></dd></dl>
4501 # Parsoid's output (as documented below) differs from php's in this case.
4502 # This is probably a bug. If we fixup parsoid to match php's output, the
4503 # above test should pass and the below test case can be removed. It is
4504 # unclear which output is more desirable.
4507 Definition Lists: colons and tables 2
4519 </td></tr></table></dd>
4523 </td></tr></table></dd></dl>
4527 Definition Lists: template interaction
4529 ::{{definition_list}}
4532 ::{{definition_list}}
4537 <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">
4538 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4540 <dl><dd data-parsoid='{}'>one
4541 <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">
4542 </span><dd about="#mwt2">two
4544 <dd>three</dd></dl></dd>
4545 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4553 External links: non-bracketed
4555 Non-bracketed: http://example.com
4557 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4561 # parsoid doesn't explicitly mark autonumbered links, see T55505
4563 External links: numbered
4565 Numbered: [http://example.com]
4566 Numbered: [http://example.net]
4567 Numbered: [http://example.com]
4569 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4570 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4571 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4574 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4575 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4576 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4580 External links: specified text
4582 Specified text: [http://example.com link]
4584 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4589 External links: trail
4591 Linktrails should not work for external links: [http://example.com link]s
4593 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4598 External links: dollar sign in URL
4600 http://example.com/1$2345
4602 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4606 # parsoid doesn't explicitly mark autonumbered links, see T55505
4608 External links: dollar sign in URL (autonumber)
4610 [http://example.com/1$2345]
4612 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4615 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4619 External links: open square bracket forbidden in URL (T6377)
4621 parsoid=wt2html,wt2wt,html2html
4623 http://example.com/1[2345
4625 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4628 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4632 External links: open square bracket forbidden in URL (named) (T6377)
4634 parsoid=wt2html,html2html
4636 [http://example.com/1[2345]
4638 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4641 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4644 # parsoid adds a space before the link name
4646 External links: open square bracket forbidden in URL (named) (T6377)
4649 [http://example.com/1 [2345]
4651 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4656 External links: nowiki in URL link text (T8230)
4658 [http://example.com/ <nowiki>''example site''</nowiki>]
4660 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4665 External links: newline forbidden in text (T8230 regression check)
4667 [http://example.com/ first
4670 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4676 External links: Pipe char between url and text
4678 [http://example.com | link]
4680 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4685 External links: protocol-relative URL in brackets
4687 [//example.com/ Test]
4689 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4693 # parsoid doesn't explicitly mark autonumbered links, see T55505
4695 External links: protocol-relative URL in brackets without text
4699 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4702 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4706 External links: protocol-relative URL in free text is left alone
4710 <p>//example.com/Foo
4715 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4717 foo//example.com/Foo
4719 <p>foo//example.com/Foo
4724 External links: with no contents
4726 [http://en.wikipedia.org/wiki/Foo]
4728 [[wikipedia:Foo|Bar]]
4730 [[wikipedia:Foo|<span>Bar</span>]]
4732 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4733 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4734 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4737 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4738 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4739 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4743 External links: Free with trailing punctuation
4753 http://example.com/url_with_(brackets)
4754 (http://example.com/url_without_brackets)
4755 http://example.com/url_with_entity&
4756 http://example.com/url_with_entity&
4757 http://example.com/url_with_entity&
4758 http://example.com/url_with_entity
4759 http://example.com/url_with_entity 
4760 http://example.com/url_with_entity 
4761 http://example.com/url_with_entity<
4762 http://example.com/url_with_entity<
4763 http://example.com/url_with_entity<
4765 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4766 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4767 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4768 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4769 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4770 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4771 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4772 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4773 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4774 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4775 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4776 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4777 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4778 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4779 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4780 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4781 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4782 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4783 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4786 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4787 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4788 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4789 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4790 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4791 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4792 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4793 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4794 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4795 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4796 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4797 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4798 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4799 <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>
4800 <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>
4801 <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>
4802 <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>
4803 <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>
4804 <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>
4808 External links: tricky Parsoid html2html case
4810 parsoid=wt2html,wt2wt,html2html
4812 http://example.com/url_with_entity&amp;
4814 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4817 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4821 External links: Free with trailing quotes (T113666)
4823 '''News:''' Stuff here
4827 <p><b>News:</b> Stuff here
4828 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4831 <p><b>News:</b> Stuff here</p>
4832 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4836 External links: with entity
4838 [http:// www.librarieswithoutborders.org Libraries without borders]
4840 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4843 <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>
4847 External links: Lone protocols are never linked (T105697)
4866 External links: No preceding word characters allowed (T67278)
4868 NOPEhttp://example.com
4869 N0http://example.com
4870 ok:http://example.com
4871 ok-http://example.com
4873 <p>NOPEhttp://example.com
4874 N0http://example.com
4875 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4876 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4881 External links: nofollow domain exception
4883 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4885 <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>.
4892 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4894 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4899 External image from https
4901 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4903 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4908 External image (when not allowed)
4910 wgAllowExternalImages=0
4912 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4914 <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>
4919 Link to non-http image, no img tag
4921 Link to non-http image, no img tag: ftp://example.com/test.jpg
4923 <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>
4928 External links: terminating separator
4930 Terminating separator: http://example.com/thing,
4932 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4937 External links: intervening separator
4939 Intervening separator: http://example.com/1,2,3
4941 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4946 External links: old bug with URL in query
4948 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4950 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4955 External links: old URL-in-URL bug, mixed protocols
4957 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4959 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4963 # Since Parsoid is starting to emit canonical wikitext for links,
4964 # [http://example.com http://example.com] will not RT back to that
4967 External links: URL in text
4971 URL in text: [http://example.com http://example.com]
4973 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4976 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
4980 External links: Clickable images
4982 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4984 <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>
4987 <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>
4991 External links: raw ampersand
4993 Old & use: http://x&y
4995 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5000 External links: encoded ampersand
5002 Old & use: http://x&y
5004 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5007 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
5011 External links: encoded equals (T8102)
5013 http://example.com/?foo=bar
5015 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5018 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5022 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5023 ## does it number them. As discussed in T55505, we can identify
5024 ## autonumbered links via CSS.
5028 External links: [raw ampersand]
5030 Old & use: [http://x&y]
5032 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5035 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5038 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5039 # mode will return the [raw ampersand] wikitext
5041 External links: [encoded ampersand]
5043 parsoid=wt2html,wt2wt,html2html
5045 Old & use: [http://x&y]
5047 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5050 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5054 External links: [raw equals]
5056 [http://example.com/?foo=bar]
5058 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5061 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5064 # note that parsoid html is identical to [raw equals] case; so html2wt
5065 # mode will return the [raw equals] wikitext
5067 External links: [encoded equals] (T8102)
5069 parsoid=wt2html,wt2wt,html2html
5071 [http://example.com/?foo=bar]
5073 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5076 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5079 # xxx parsoid strips the IDN character, so the round-trip tests will
5080 # obviously fail and are disabled. --cscott
5082 External links: [IDN ignored character reference in hostname; strip it right off]
5084 parsoid=wt2html,wt2wt,html2html
5086 [http://e‌xample.com/]
5088 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5091 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5094 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5095 # Where an external link could easily circumvent the sanitization of the text of
5096 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5097 # test demands a higher standard. That's a bit strange.
5101 # http://example.com -> [http://example.com|http://example.com]
5102 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5104 # The first example is sanitized, but the second is not. Any security benefits
5105 # from this production are trivial to circumvent. Either remove this test and
5106 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5107 # the test accordingly.
5111 # xxx parsoid strips the IDN character, so the round-trip tests will
5112 # obviously fail and are disabled. --cscott
5114 External links: IDN ignored character reference in hostname; strip it right off
5116 parsoid=wt2html,html2html
5118 http://e‌xample.com/
5120 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5123 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5127 External links: www.jpeg.org (T2554)
5131 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5135 # parsoid doesn't explicitly mark autonumbered links, see T55505
5137 External links: URL within URL (T2002)
5139 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5141 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5144 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5148 T2361: URL inside bracketed URL
5150 [http://www.example.com/foo http://www.example.com/bar]
5152 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5157 T2361: URL within URL, not bracketed
5159 http://www.example.com/foo?=http://www.example.com/bar
5161 <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>
5166 T2289: ">"-token in URL-tail
5168 http://www.example.com/<hello>
5170 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5175 T2289: literal ">"-token in URL-tail
5177 http://www.example.com/<b>html</b>
5179 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5182 <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>
5186 T2289: ">"-token in bracketed URL
5188 [http://www.example.com/<hello> stuff]
5190 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5195 T2289: literal ">"-token in bracketed URL
5197 [http://www.example.com/<b>html</b> stuff]
5199 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5204 T2289: literal double quote at end of URL
5206 http://www.example.com/"hello"
5208 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5213 T2289: literal double quote in bracketed URL
5215 [http://www.example.com/"hello" stuff]
5217 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5222 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5224 [http://www.example.com test]
5226 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5231 External links: link text with spaces
5233 [http://www.example.com a b c]
5234 [http://www.example.com ''a'' ''b'']
5236 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5237 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5242 External links: wiki links within external link (T5695)
5244 parsoid=wt2html,html2html
5246 [http://example.com [[wikilink]] embedded in ext link]
5248 <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>
5251 <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>
5255 T2787: Links with one slash after the url protocol are invalid
5259 [http:/example.com title]
5261 <p>http:/example.com
5262 </p><p>[http:/example.com title]
5267 Bracketed external links with template-generated invalid target
5269 [{{echo|http:/example.com}} title]
5271 <p>[http:/example.com title]
5276 T4702: Mismatched <i>, <b> and <a> tags are invalid
5278 ''[http://example.com text'']
5279 [http://example.com '''text]'''
5280 ''Something [http://example.com in italic'']
5281 ''Something [http://example.com mixed''''', even bold]'''
5282 '''''Now [http://example.com both''''']
5284 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5285 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5286 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5287 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5288 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5296 http://www.example.com/?title=AT%26T
5298 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5301 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5304 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5305 # % is actually legal in HTML5. Any change in output would need testing though.
5307 T6781, T7267: %25 in URL
5309 http://www.example.com/?title=100%25_Bran
5311 <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>
5314 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5318 T6781, T7267: %28, %29 in URL
5320 http://www.example.com/?title=Ben-Hur_%281959_film%29
5322 <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>
5325 <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>
5330 T6781: %26 in autonumber URL
5332 [http://www.example.com/?title=AT%26T]
5334 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5337 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5341 T6781, T7267: %26 in autonumber URL
5343 [http://www.example.com/?title=100%25_Bran]
5345 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5348 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5352 T6781, T7267: %28, %29 in autonumber URL
5354 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5356 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5359 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5364 T6781: %26 in bracketed URL
5366 [http://www.example.com/?title=AT%26T link]
5368 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5371 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5375 T6781, T7267: %25 in bracketed URL
5377 [http://www.example.com/?title=100%25_Bran link]
5379 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5384 T6781, T7267: %28, %29 in bracketed URL
5386 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5388 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5391 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5395 External link containing a period in the anchor. (T65947)
5397 [//foo.org/bar#baz. bang]
5399 [//foo.org/bar. bang]
5401 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5402 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5405 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5406 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5410 External link containing a single quote. (T65947)
5414 [//foo.org/bar'baz bang]
5416 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5417 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5420 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5421 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5425 External link containing double-single-quotes in text '' (T6598 sanity check)
5427 Some [http://example.com/ pretty ''italics'' and stuff]!
5429 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5434 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5436 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5438 <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>
5443 External link containing double-single-quotes with no space separating the url from text in italics
5445 [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]].]
5447 <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>
5450 <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>
5452 <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>
5456 External link with comments in link text
5458 [http://www.google.com Google <!-- comment -->]
5460 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5463 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5467 External link to bare IPv4 address
5469 [http://192.168.0.1 Link]
5471 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5474 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5478 URL-encoding in URL functions (single parameter)
5480 {{localurl:Some page|amp=&}}
5482 <p>/index.php?title=Some_page&amp=&
5487 URL-encoding in URL functions (multiple parameters)
5489 {{localurl:Some page|q=?&=&}}
5491 <p>/index.php?title=Some_page&q=?&amp=&
5498 http://example.com/index.php?foozoid%5B%5D=bar
5500 http://example.com/index.php?foozoid[]=bar
5502 <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>
5503 </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>
5506 <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>
5508 <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>
5512 IPv6 urls, autolink format (T23261)
5514 http://[2404:130:0:1000::187:2]/index.php
5516 Examples from RFC 2373, section 2.2:
5517 * http://[1080::8:800:200C:417A]/unicast
5518 * http://[FF01::101]/multicast
5519 * http://[::1]/loopback
5520 * http://[::]/unspecified
5521 * http://[::13.1.68.3]/ipv4compat
5522 * http://[::FFFF:129.144.52.38]/ipv4compat
5524 Examples from RFC 2732, section 2:
5525 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5526 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5527 * http://[3ffe:2a00:100:7031::1]
5528 * http://[1080::8:800:200C:417A]/foo
5529 * http://[::192.9.5.5]/ipng
5530 * http://[::FFFF:129.144.52.38]:80/index.html
5531 * http://[2010:836B:4179::836B:4179]
5534 <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>
5535 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5537 <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>
5538 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5539 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5540 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5541 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5542 <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>
5543 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5545 <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>
5546 <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>
5547 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5548 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5549 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5550 <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>
5551 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5554 <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>
5556 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5557 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5558 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5559 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5560 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5561 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5562 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5564 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5565 <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>
5566 <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>
5567 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5568 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5569 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5570 <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>
5571 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5575 IPv6 urls, bracketed format (T23261)
5577 [http://[2404:130:0:1000::187:2]/index.php test]
5579 Examples from RFC 2373, section 2.2:
5580 * [http://[1080::8:800:200C:417A] unicast]
5581 * [http://[FF01::101] multicast]
5582 * [http://[::1]/ loopback]
5583 * [http://[::] unspecified]
5584 * [http://[::13.1.68.3] ipv4compat]
5585 * [http://[::FFFF:129.144.52.38] ipv4compat]
5587 Examples from RFC 2732, section 2:
5588 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5589 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5590 * [http://[3ffe:2a00:100:7031::1] 3]
5591 * [http://[1080::8:800:200C:417A]/foo 4]
5592 * [http://[::192.9.5.5]/ipng 5]
5593 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5594 * [http://[2010:836B:4179::836B:4179] 7]
5597 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5598 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5600 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5601 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5602 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5603 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5604 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5605 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5606 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5608 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5609 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5610 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5611 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5612 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5613 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5614 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5617 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5619 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5620 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5621 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5622 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5623 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5624 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5625 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5627 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5628 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5629 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5630 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5631 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5632 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5633 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5634 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5638 Non-extlinks in brackets
5647 [{{echo|foo}} ''bar'']
5648 [{{echo|foo}}l's] errand
5649 [{{echo|foo}}l's errand]
5651 [url=http://example.com]
5652 [http:// bare protocols don't count]
5665 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5666 [http:// bare protocols don't count]
5674 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5675 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5676 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5677 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5678 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5679 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5680 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5681 [http:// bare protocols don't count]</p>
5685 Percent encoding in external links
5687 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5689 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5692 <p><a rel="mw:ExtLink"
5693 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5697 Use url link syntax for links where the content is equal the link target
5701 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5704 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5708 Parenthesis in external links, especially URL links
5712 http://example.com/test)
5714 http://example.com/(test)
5716 http://example.com/((test)
5718 (http://example.com/(test))
5720 (http://example.com/(test)))))
5722 http://example.com/a)b
5724 [http://example.com) foo]
5726 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5727 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5728 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5729 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5730 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5731 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5732 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5733 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5736 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5737 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5738 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5739 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5740 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5741 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5742 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5743 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5747 Parenthesis in external links, w/ transclusion or comment
5749 (http://example.com/{{echo|hi}})
5751 (http://example.com<!-- hi -->)
5753 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5754 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5757 <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>
5759 <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>
5763 Serialize <a> tags with invalid link targets as plain text
5765 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5767 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5768 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5769 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5770 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5773 <nowiki>*</nowiki>text
5774 <nowiki>[[foo]]</nowiki>
5775 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5779 mw:ExtLink -vs- mw:WikiLink (T94723)
5783 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5784 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5785 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5786 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5788 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5789 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5794 [[wikipedia:Foo|Bar]]
5795 [[wikipedia:Foo|Bar]]
5797 [[wikipedia:European_Robin|European Robin]]
5798 [[wikipedia:European_Robin|European Robin]]
5802 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5806 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5808 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5819 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5821 Normal text. '''''Bold italic text.''''' Normal text.
5823 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5824 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5829 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5830 # parser strips. The wikitext contains just the first half of the bold
5833 Unclosed and unmatched quotes
5835 '''''Bold italic text '''with bold deactivated''' in between.'''''
5837 '''''Bold italic text ''with italic deactivated'' in between.'''''
5841 ..spanning two paragraphs (should not work).'''
5843 '''Bold tag left open
5845 ''Italic tag left open
5849 <!-- Unmatching number of opening, closing tags: -->
5850 '''This year''''s election ''should'' beat '''last year''''s.
5852 ''Tom'''s car is bigger than ''Susan'''s.
5854 Plain ''italic'''s plain
5856 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5857 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5858 </p><p><b>Bold text..</b>
5859 </p><p>..spanning two paragraphs (should not work).
5860 </p><p><b>Bold tag left open</b>
5861 </p><p><i>Italic tag left open</i>
5863 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5864 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5865 </p><p>Plain <i>italic'</i>s plain
5868 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5869 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5870 </p><p><b>Bold text..</b>
5871 </p><p>..spanning two paragraphs (should not work).<b></b>
5872 </p><p><b>Bold tag left open</b>
5873 </p><p><i>Italic tag left open</i>
5876 <!-- Unmatching number of opening, closing tags: -->
5877 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5878 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5879 </p><p>Plain <i>italic'</i>s plain
5886 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5889 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5890 # is the bare minimum required by the spec, see:
5891 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5892 # Parsoid team replies: empty table tags are legal in HTML5
5894 A table with no data.
5907 A table with stray table end tags on start tag line (wt2html)
5911 {|style="color: red;"|}
5913 {|style="color: red;" |}
5917 {|style="color: red;"|} id="foo"
5921 {|style="color: red;" |} id="foo"
5925 <table style="color: red;"></table>
5927 <table style="color: red;">
5933 <table style="color: red;" id="foo">
5939 <table style="color: red;" id="foo">
5948 A table with no data (take 2)
5956 # A table with nothing but a caption is invalid XHTML, we might want to render
5957 # this as <p>caption</p>
5958 # Parsoid team replies: table with only a caption is legal in HTML5
5960 A table with nothing but a caption
5968 </caption><tr><td></td></tr></table>
5971 <table><caption> caption</caption></table>
5975 A table with caption with default-spaced attributes and a table row
5978 |+ style="color: red;" | caption1
5984 <caption style="color: red;"> caption1
5993 A table with captions with non-default spaced attributes and a table row
5996 |+style="color: red;"|caption2
5997 |+ style="color: red;"| caption3
6003 <caption style="color: red;">caption2
6005 <caption style="color: red;"> caption3
6014 Table td-cell syntax variations
6018 | foo bar foo || baz
6019 | style='color:red;' | baz
6020 | style='color:red;' || baz
6027 <td> foo bar foo </td>
6030 <td style="color:red;"> baz
6032 <td> style='color:red;' </td>
6060 Simple table but with multiple dashes for row wikitext
6079 Multiplication table
6081 {| border="1" cellpadding="2"
6082 |+Multiplication table
6084 ! × !! 1 !! 2 !! 3
6102 <table border="1" cellpadding="2">
6103 <caption>Multiplication table
6150 Accept "||" in table headings
6165 Accept "!!" in table data
6179 <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>
6184 Accept "||" in indented table headings
6194 </th></tr></table></dd></dl>
6199 Accept "!!" in templates
6213 <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>
6217 Accept "!!" in table headings after newline
6234 <p>b!!c</p></th></tr>
6239 Accept "!!" in table data of mixed wikitext / html syntax
6243 <tr><td>b!!c</td></tr>
6256 <tbody><tr><th>a</th></tr>
6257 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6262 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6279 Accept "| !" at start of line in tables (ignore !-attribute)
6283 | !style="color:red" | bar
6295 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 +/-
6299 |style='color:red;'|+1
6300 |style='color:blue;'|-1
6312 <td style="color:red;">+1
6314 <td style="color:blue;">-1
6338 |rowspan=2| Cell 2, row 1 (and 2)
6349 <td rowspan="2"> Cell 2, row 1 (and 2)
6367 {| bgcolor=#ABCDEF border=2
6372 |the original table again
6380 <table bgcolor="#ABCDEF" border="2">
6388 <td>the original table again
6394 Invalid attributes in table cell (T3830)
6408 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6412 | title="foo<nowiki>|</nowiki>" |bar
6413 | title="foo<nowiki>|</nowiki>" bar
6420 <td title="foo|">bar
6422 <td> title="foo|" bar
6427 <tbody><tr><td title="foo">bar</td>
6428 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6429 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6433 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6434 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6435 # *2wt modes will fail.
6437 Table security: embedded pipes
6439 parsoid=wt2html,html2html
6442 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6446 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6447 <td>]" onmouseover="alert(document.cookie)">test
6455 <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>
6459 Element attributes with double ! should not be broken up by <th>
6462 ! hi <div class="!!">ha</div> ho
6467 <th> hi <div class="!!">ha</div> ho
6472 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6477 ! and || in element attributes should not be parsed as <th>/<td>
6480 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6485 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6490 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6494 # FIXME: The output seems broken. Filed as T110268.
6496 ! and || in td attributes should not be parsed as <th>/<td>
6501 | style="color: red !important;" data-contrived="put this here ||" | foo
6506 <td> style="color: red !important;" data-contrived="put this here </td>
6512 <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>
6517 Break on | in element attribute in template
6519 parsoid=wt2html,html2html
6521 {{echo|1=<div class="hi|ho">ha</div>}}
6523 <p>ho">ha</div>
6526 <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>
6530 Break on | in element attribute name in template
6532 {{echo|<div cla|ss="hiho">ha</div>}}
6534 <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>
6538 Don't break on | in extension attribute in template
6540 {{echo|<ref name="hi|ho">ha</ref>}}
6544 <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>
6546 <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>
6549 ## We don't support roundtripping of these attributes in Parsoid.
6550 ## Selective serialization takes care of preventing dirty diffs.
6551 ## But, on edits, we dirty-diff the invalid attribute text.
6553 Invalid text in table attributes should be discarded
6557 {| <span>boo</span> style='border:1px solid black'
6558 | <span>boo</span> style='color:blue' | 1
6559 |<span>boo</span> style='color:blue'| 2
6562 <table style="border:1px solid black">
6564 <td style="color:blue"> 1
6566 <td style="color:blue"> 2
6570 <table style="border:1px solid black">
6572 <td style="color:blue"> 1</td>
6573 <td style="color:blue"> 2</td>
6579 Invalid text in table attributes should be preserved by selective serializer
6582 "modes": ["selser"],
6584 ["td:first-child", "text", "abc"],
6585 ["td + td", "text", "xyz"]
6589 {| <span>boo</span> style='border:1px solid black'
6590 | <span>boo</span> style='color:blue' | 1
6591 |<span>boo</span> style='color:blue'| 2
6594 {| <span>boo</span> style='border:1px solid black'
6595 | <span>boo</span> style='color:blue' |abc
6596 |<span>boo</span> style='color:blue'|xyz
6601 1. Template-generated table cell attributes and cell content
6606 || {{table_attribs_5}}
6607 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6608 |align=center {{table_attribs}}
6609 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6614 <td style="color:red;">Foo
6616 <td style="color:red;">Foo
6618 <td> style="color:red;"</td>
6621 <td style="color:red;">Foo
6623 <td align="center" style="color:red;">Foo
6625 <td align="center" style="color:red;">Foo
6631 2. Template-generated table cell attributes and cell content
6634 |{{table_attribs_2}}
6639 <td style="color:red;">Foo
6647 <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>
6648 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6653 3. Template-generated table cell attributes and cell content
6656 !align=center {{table_header_cells}}
6658 |align=center {{table_cells}}
6663 <th align="center" style="color:red;">Foo</th>
6664 <th style="color:red;"><i>Bar</i></th>
6665 <th style="color:brown;"><i>Foo</i> and Baz
6668 <td align="center" style="color:red;">Foo</td>
6669 <td style="color:red;"><i>Bar</i></td>
6670 <td style="color:brown;"><i>Foo</i> and Baz
6675 <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>
6676 <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>
6681 4. Template-generated table cell attributes and cell content inside a templated table
6684 !align=center {{table_header_cells}}
6686 |align=center {{table_cells}}
6691 <th align="center" style="color:red;">Foo</th>
6692 <th style="color:red;"><i>Bar</i></th>
6693 <th style="color:brown;"><i>Foo</i> and Baz
6696 <td align="center" style="color:red;">Foo</td>
6697 <td style="color:red;"><i>Bar</i></td>
6698 <td style="color:brown;"><i>Foo</i> and Baz
6702 <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}}]}'>
6703 <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>
6705 <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>
6709 ## Edge case fix to prevent future regressions
6711 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6714 |{{table_attribs_7}}
6719 <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>
6721 <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>
6725 Table with row followed by newlines and table heading
6727 parsoid=wt2html,html2html
6745 Table with empty line following the start tag
6747 parsoid=wt2html,html2html
6765 Table attributes with empty value
6767 parsoid=wt2html,html2html
6780 <tbody><tr><td style=""> hello</td></tr>
6785 Wikitext table with a lot of comments
6808 Wikitext table comments represented in parsoid dom
6810 {|<!--c1--><!--c2-->
6821 <table><!--c1--><!--c2-->
6822 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6823 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6828 Wikitext table with double-line table cell
6845 Table cell with a single comment
6862 Table-cell after a comment-only-empty-line
6879 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6881 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
6887 Build table with {{!}}
6889 {{{!}} class="wikitable"
6892 {{!}}- style="color:red;"
6893 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
6896 <table class="wikitable">
6902 <tr style="color:red;">
6904 <td style="color:red;"> second data
6910 Build table with pipe as data
6912 {| class="wikitable"
6915 |- style="color:red;"
6916 | data || style="color:red;" | second data
6918 | style="color:red;" | data with | || style="color:red;" | second data with |
6920 || data with | ||| second data with |
6923 <table class="wikitable">
6929 <tr style="color:red;">
6931 <td style="color:red;"> second data
6934 <td style="color:red;"> data with | </td>
6935 <td style="color:red;"> second data with |
6938 <td> data with | </td>
6939 <td> second data with |
6945 Build table with wikilink
6947 {| class="wikitable"
6948 ! header || second header
6949 |- style="color:red;"
6950 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
6952 | data || second data [[Main Page|link|text with pipe]]
6955 <table class="wikitable">
6960 <tr style="color:red;">
6961 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
6962 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6966 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6971 # The expected HTML structure in this test is debatable. The PHP parser does
6972 # not parse this kind of table at all. The main focus for Parsoid is on
6973 # round-tripping, so this output is ok for now. TODO: revisit!
6975 Wikitext table with html-syntax row
6985 <td>foo</td></tr></tbody></table>
6989 Implicit <td> after a |-
6991 parsoid=wt2html,html2html
7006 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7007 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7009 </tr></tbody></table>
7013 Lists should be recognized in an implicit <td> context
7015 parsoid=wt2html,html2html
7032 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7033 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7035 </tr></tbody></table>
7039 Table cells not properly parsed in an implicit-td context
7043 {{table_attribs_4}} || a || b
7048 <td style="background-color:#DC241f;" width="10px"></td>
7055 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7056 <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>
7060 Parsoid: Round-trip tables directly followed by content (T53219)
7062 parsoid=wt2html,wt2wt
7087 Parsoid: Default to a newline after tables in new content (T53219)
7092 <tr><td>foo</td></tr></tbody></table> bar
7094 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7099 <nowiki> </nowiki>bar
7107 Parsoid: newline inducing block nodes don't suppress <nowiki>
7119 Parsoid: Row-syntax table headings followed by comment & table cells
7121 parsoid=wt2html,wt2wt
7125 <!-- foo --> || baz || quux
7139 <tbody><tr><th> foo </th><th> bar
7140 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7145 Parsoid: Recover better from broken table attributes
7165 <p>foo</p></td></tr>
7170 Tables: Digest broken attributes on table and tr tag
7186 # T137406: Whitespace in the HTML
7188 1. Generate correct wikitext for tables with thead/tbody/tfoot
7193 <caption>Test</caption>
7234 <caption>Test</caption>
7254 # T137406: No whitespace in the HTML
7256 2. Generate correct wikitext for tables with thead/tbody/tfoot
7260 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7270 Testing serialization after deletion in references
7279 hi <ref><div id="x">ho</div></ref>
7289 Testing serialization after deletion of table cells
7292 "modes": ["wt2wt", "selser"],
7300 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7310 Testing selser after addition of new row before first row (T125419)
7313 "modes": ["wt2wt", "selser"],
7315 [ "tr", "before", "<tr><td>X</td></tr>" ]
7331 Serialize new table rows in a HTML table using HTML tags
7334 "modes": ["wt2wt", "selser"],
7336 [ "tr", "before", "<tr><td>X</td></tr>" ]
7340 <table><tr><td>a</td></tr></table>
7342 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7346 Serialize new table cells in a HTML row using HTML tags
7349 "modes": ["wt2wt", "selser"],
7351 [ "td", "before", "<td>X</td>" ]
7355 <table><tr><td>a</td></tr></table>
7357 <table><tr><td>X</td><td>a</td></tr></table>
7361 Wikitext tables can be nested inside HTML tables
7365 <table data-parsoid='{"stx":"html"}'>
7368 <tr><td>foo</td></tr>
7383 Serialize wikitext list items as HTML list items when embedded in a HTML list
7387 <ul data-parsoid='{"stx": "html"}'>
7388 <li data-parsoid='{}'>a</li>
7398 # SSS FIXME: Is this actually a good thing given the
7399 # odd nested list output that is generated by MW?
7400 # <ul><li>foo<ul>..</ul></li></ul> instead of
7401 # <ul><li>foo</li><ul>..</ul></ul>
7403 Wikitext lists can be nested inside HTML lists
7407 <ul data-parsoid='{"stx": "html"}'>
7408 <li data-parsoid='{"stx": "html"}'>a
7413 <ul data-parsoid='{"stx": "html"}'>
7436 Plain link, capitalized
7440 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7445 Plain link, uncapitalized
7449 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7456 [[Main Page|The Main Page]]
7458 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7463 Piped link with comment in link text
7465 [[Main Page|The Main<!--front--> Page]]
7467 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7472 Piped link with multiple pipe characters in link text
7474 [[Main Page||The|Main|Page|]]
7476 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7479 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7483 Piped link with no link text
7485 [[Thomas Bek (bishop of St David's)|]]
7487 <p>[[Thomas Bek (bishop of St David's)|]]
7490 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7494 Piped link with empty link text
7496 [[Main Page|<nowiki/>]] - empty nowiki
7497 [[Main Page| ]] - empty space
7498 [[Main Page| ]] - empty non breaking space
7500 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7501 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7502 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7505 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7506 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7507 <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>
7515 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7520 Broken link with fragment
7522 [[Zigzagzogzagzig#zug]]
7524 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7529 Special page link with fragment
7531 [[Special:Version#anchor]]
7533 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7538 Nonexistent special page link with fragment
7540 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7542 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7549 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7551 <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>
7558 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7560 <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>!!!
7571 T45661: Piped links with identical prefixes
7573 [[prefixed article|prefixed articles with spaces]]
7575 [[prefixed article|prefixed articlesaoeu]]
7577 [[Main Page|Main Page test]]
7579 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7580 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7581 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7587 Link with HTML entity in suffix / tail
7589 [[Main Page]]", [[Main Page]]a
7591 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7594 <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>
7598 Link with 3 brackets
7609 Link with 4 brackets
7613 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7618 Piped link with 3 brackets
7620 [[[main page|the main page]]]
7622 <p>[[[main page|the main page]]]
7627 Piped link with extlink-like text
7630 [[Main Page|This is a [bar]]]
7632 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7633 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7636 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7637 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a></p>
7641 Link with multiple pipes
7643 [[Main Page|The|Main|Page]]
7645 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7650 Anchor containing a #. (T65430)
7652 [[Main Page#And#Link]]
7654 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7657 <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>
7663 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7665 <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>
7670 Link with space in namespace
7672 [[User talk:Foo bar]]
7674 <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>
7679 MemoryAlpha:AlphaTest
7681 This is an article in the MemoryAlpha namespace
7682 (which shadows the memoryalpha interwiki link).
7686 Namespace takes precedence over interwiki link (T53680)
7688 [[MemoryAlpha:AlphaTest]]
7690 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7694 # The previous test doesn't work correctly in html2*, due to not recognizing the
7695 # link as an internal one. This one checks for the correct behavior.
7697 Link to namespace preferred over interwiki with correct rel attribute
7699 parsoid=html2wt,html2html
7701 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7703 [[MemoryAlpha:AlphaTest]]
7707 Piped link to namespace
7709 [[Meta:Disclaimers|The disclaimers]]
7711 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7718 [[Usually caused by a typo (oops}]]
7720 <p>[[Usually caused by a typo (oops}]]
7727 Just a test of an article title containing a percent.
7731 Link containing % (not as a hex sequence)
7734 [[7% Solution|7%25 Solution]]
7736 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7737 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7740 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7741 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7744 # note that the parsoid HTML is identical to the previous test output,
7745 # so the previous test ensures that the html2wt mode will generate the
7746 # "not as a hex sequence" wikitext.
7748 Link containing % as a single hex sequence interpreted to char
7750 parsoid=wt2wt,wt2html,html2html
7753 [[7%25 Solution|7%25 Solution]]
7755 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7756 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7759 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7760 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7764 Link containing % as a double hex sequence interpreted to hex sequence
7768 <p>[[7%2525 Solution]]
7772 ## Example for such a section: == < ==
7774 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7776 [[%23%3c]][[%23%3e]]
7778 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7781 <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>
7785 Link containing "<#" and ">#" as a hex sequences
7787 [[%3c%23]][[%3e%23]]
7789 <p>[[%3c%23]][[%3e%23]]
7794 Link containing an equals sign
7796 [[Special:BookSources/isbn=4-00-026157-6]]
7798 <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>
7801 <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>
7807 Just a test of an article title containing a tilde.
7810 # note that links containing signatures, like [[Foo~~~~]], are
7811 # massaged by the pre-save transform (PST) and so the tildes are never
7812 # seen by the parser.
7814 Link containing a tilde
7818 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7821 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7825 Link containing double-single-quotes '' (T6598)
7827 [[Lista d''e paise d''o munno]]
7829 <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>
7832 <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>
7836 Link containing double quotes and spaces
7840 <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>
7843 <p><a rel="mw:WikiLink" href="./Cool_%22Gator%22" title='Cool "Gator"'>Cool "Gator"</a></p>
7847 File containing double quotes and spaces
7849 [[File:Cool "Gator".png]]
7851 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[]}' data-mw='{"errors":[{"key":"missing-image","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>
7855 Redirect containing double quotes and spaces
7857 #REDIRECT [[Cool "Gator"]]
7859 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7863 Link containing double-single-quotes '' in text (T6598 sanity check)
7865 Some [[Link|pretty ''italics'' and stuff]]!
7867 <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>!
7870 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7874 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
7876 ''Some [[Link|pretty ''italics'' and stuff]]!''
7878 <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>
7883 Link with double quotes in title part (literal) and alternate part (interpreted)
7885 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7889 [[''Pentecoste''|Pentecoste]]
7891 [[''Pentecoste''|''Pentecoste'']]
7893 <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>
7894 </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>
7895 </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>
7896 </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>
7899 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Denys_Savchenko_''Pentecoste''.jpg"><img resource="./File:Denys_Savchenko_''Pentecoste''.jpg" src="./Special:FilePath/Denys_Savchenko_''Pentecoste''.jpg" height="220" width="220"/></a></span></p>
7900 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7901 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7902 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7906 Broken image links with HTML captions (T41700)
7908 [[File:Nonexistent|<script></script>]]
7909 [[File:Nonexistent|100x100px|<script></script>]]
7910 [[File:Nonexistent|<]]
7911 [[File:Nonexistent|a<i>b</i>c]]
7913 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7914 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7915 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7916 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7919 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"missing-image","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>
7920 <span typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"missing-image","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>
7921 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"missing-image","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>
7922 <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":"missing-image","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>
7928 [[http://www.example.com]]
7930 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7933 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
7937 Plain link to URL with link text
7939 [[http://www.example.com Link text]]
7941 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7946 Plain link to protocol-relative URL
7948 [[//www.example.com]]
7950 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
7953 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
7957 Plain link to protocol-relative URL with link text
7959 [[//www.example.com Link text]]
7961 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
7966 Plain link to page with question mark in title
7972 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
7973 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
7978 # I'm fairly sure the expected result here is wrong.
7979 # We want these to be URL links, not pseudo-pages with URLs for titles....
7980 # However the current output is also pretty screwy.
7983 # I'm changing it to match the current output--it arguably makes more
7984 # sense in the light of the test above. Old expected result was:
7985 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
7987 # But I think this test is bordering on "garbage in, garbage out" anyway.
7992 Piped link to URL: [[http://www.example.com|an example URL]]
7994 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
7997 <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>
8001 T2002: [[page|http://url/]] should link to page, not http://url/
8003 [[Main Page|http://url/]]
8005 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8008 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8011 # Parsoid does not mark self-links, by design.
8013 T2337: Escaped self-links should be bold
8017 [[Bug462]] [[Bug462]]
8019 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8022 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a></p>
8024 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8028 Self-link to section should not be bold
8032 [[Main Page#section]]
8034 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8045 Self-link to numeric title
8051 <p><a class="mw-selflink selflink">0</a>
8056 Link to numeric-equivalent title
8062 <p><a href="/wiki/00" title="00">00</a>
8067 <nowiki> inside a link
8069 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8071 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8076 Non-breaking spaces in title
8078 [[ Main Page ]]
8080 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8085 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8091 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8096 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8102 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8107 Internal link with en linktrail: no apostrophes (T29473)
8113 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8118 Internal link with ca linktrail with apostrophes (T29473)
8124 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8129 Internal link with kaa linktrail with apostrophes (T29473)
8135 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8140 Link with multiple ":" in a subpage-supporting namespace (T65636)
8142 [[User:Foo/Test/63636:Bar|Test]]
8144 <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>
8147 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8150 ## Mainly a sanity check for Parsoid
8152 Handle title parsing for subpages
8172 Link to a subpage from a namespace other than main
8179 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8182 <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>
8186 Ensure that transclusion titles are not url-decoded
8188 subpage title=[[Test]]
8191 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8193 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8196 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8200 Purely hash wikilink
8202 title=[[User:Test/123]]
8207 <p><a href="#a">b</a>
8210 <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>
8214 1. Interaction of linktrail and template encapsulation
8218 <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>
8222 2. Interaction of linktrail and template encapsulation
8226 {{echo|Some [[Fool]]}}s
8228 <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>
8232 3. Interaction of linktrail and template encapsulation
8236 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8238 <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>
8248 Internal link with is link prefix
8252 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8254 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8265 Internal link with is link trail and link prefix
8269 [[mótmælendatrú|xxx]]ar
8271 mótmælenda[[söfnuður]]
8272 mótmælenda[[söfnuður|söfnuðir]]
8273 mótmælenda[[söfnuður|söfnuðir]]xxx
8275 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8276 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8277 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8278 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8279 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8284 Parsoid link trail escaping
8286 parsoid=html2wt,html2html
8288 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8294 Parsoid link prefix escaping
8297 parsoid=html2wt,html2html
8299 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8301 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8305 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8313 [http://wp.org ''foo'']
8315 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8316 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8317 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8318 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8323 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8325 [[Foo|{{echo|a}} b {{echo|c}}]]
8327 <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>
8331 Link with angle bracket after anchor
8335 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8338 <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>
8342 ### Interwiki links (see maintenance/interwiki.sql)
8346 Inline interwiki link
8348 parsoid=wt2html,wt2wt,html2html
8350 [[MeatBall:SoftSecurity]]
8352 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8355 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8359 Inline interwiki link with empty title (T4372)
8361 parsoid=wt2html,wt2wt,html2html
8365 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8368 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8372 Interwiki link encoding conversion (T3636)
8374 *[[Wikipedia:ro:Olteniţa]]
8375 *[[Wikipedia:ro:Olteniţa]]
8377 <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>
8378 <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>
8382 <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>
8383 <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>
8388 Interwiki link with fragment (T4130)
8390 [[MeatBall:SoftSecurity#foo]]
8392 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8397 Link scenarios with escaped fragments
8400 [[Foo#Is this great?]]
8401 [[meatball:Foo#Is this great?]]
8403 <p><a href="#Is_this_great.3F">#Is this great?</a>
8404 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8405 <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>
8408 <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>
8409 <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>
8410 <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>
8413 # Ideally the wikipedia: prefix here should be proto-relative too
8414 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8415 # define the 'en' prefix, and originally the test used 'wikipedia',
8416 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8419 Different interwiki prefixes mapping to the same URL
8427 [[:wikipedia:Foo|Foo]]
8429 [[wikipedia:en:Foo]]
8431 [[:wikipedia:en:Foo]]
8435 <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>
8437 <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>
8439 <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>
8441 <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>
8443 <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>
8445 <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>
8447 <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>
8451 Interwiki links that cannot be represented in wiki syntax
8454 [[meatball:ok#foo|ok with fragment]]
8455 [[meatball:ok_as_well?|ok ending with ? mark]]
8456 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8457 [http://de.wikipedia.org/wiki/#foo is just fragment]
8460 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8461 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8462 <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>
8463 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8464 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8467 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8468 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8469 <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>
8470 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8471 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8475 Interwiki links: trail
8477 [[wikipedia:Foo|Ba]]r
8479 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8482 <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>
8486 Local interwiki link
8488 parsoid=wt2html,wt2wt,html2html
8490 [[local:Template:Foo]]
8492 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8495 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8498 # Parsoid does not mark self-links, by design.
8500 Local interwiki link: self-link to current page
8503 parsoid=wt2html,wt2wt,html2html
8507 <p><a class="mw-selflink selflink">local:Main Page</a>
8510 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8514 Local interwiki link: prefix only (T66167)
8516 parsoid=wt2html,wt2wt,html2html
8520 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8523 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8527 Local interwiki link: with additional interwiki prefix (T63357)
8529 parsoid=wt2html,wt2wt,html2html
8531 [[local:meatball:Hello]]
8533 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8536 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8540 Multiple local interwiki link prefixes
8542 [[local:local:local:local:mi:local:Foo]]
8544 parsoid=wt2html,wt2wt,html2html
8546 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8549 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8553 ### Interlanguage links
8554 ### Language links (so that searching for '### language' matches..)
8566 <p>Blah blah blah</p>
8567 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8570 ## parsoid html2wt will lose the space variations
8572 Interlanguage link with spacing
8574 parsoid=wt2html,wt2wt,html2html
8582 <p>Blah blah blah</p>
8583 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8587 Double interlanguage link
8596 <p>Blah blah blah</p>
8597 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8598 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8601 ## parsoid html2wt will lose the space variations
8603 Interlanguage link variations
8605 parsoid=wt2html,wt2wt,html2html
8615 <p>Blah blah blah</p>
8616 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8617 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8618 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8622 Escaping of interlanguage links (T129218, T156308)
8626 [[ : zh : Chinese ]]
8629 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8630 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8634 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8635 <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8638 ## parsoid html2wt will normalize the space to _
8640 Space and question mark encoding in interlanguage links (T95473)
8642 parsoid=wt2html,wt2wt,html2html
8650 <p>Blah blah blah</p>
8651 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8655 Interlanguage link, with prefix links
8665 <p>Blah blah blah</p>
8666 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8670 Double interlanguage link, with prefix links (T10897)
8681 <p>Blah blah blah</p>
8682 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8683 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8687 "Extra" interlanguage links (T34189 / gerrit 111390)
8695 <p>Blah blah blah</p>
8696 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8699 ## PHP parser tests script needs an update
8700 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8702 Language links render as inline links if $wgInterwikiMagic=false
8704 wgInterwikiMagic=false
8705 parsoid=wt2html,wt2wt,html2html
8710 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8713 ## PHP parser tests script needs an update
8714 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8716 Language links render as inline links in the Talk namespace
8719 parsoid=wt2html,wt2wt,html2html
8724 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8728 Parsoid-specific test: Wikilinks with should RT properly
8734 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8739 Parsoid T55221: Wikilinks should be properly entity-escaped
8741 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8743 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8744 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8746 He&nbsp;llo [[Foo|He&nbsp;llo]]
8748 He&nbsp;llo He&nbsp;llo
8750 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8751 </p><p>He&nbsp;llo He&nbsp;llo
8755 # html2wt will fail because of title normalization without data-parsoid
8757 Parsoid: handle constructor well
8759 parsoid=wt2html,wt2wt
8765 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8766 </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>
8769 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8771 <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>
8780 # Note that `ko` isn't a known interlanguage prefix
8782 Parsoid: recognize interlanguage links without a target page
8792 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8794 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8797 # Note that `ko` isn't a known interwiki prefix
8799 Parsoid: recognize interwiki links without a target page
8801 parsoid=wt2html,wt2wt,html2html
8807 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
8808 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
8811 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
8812 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8816 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
8820 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
8823 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
8827 Interlanguage link with preceding local interwiki link (T70085)
8829 parsoid=wt2html,wt2wt,html2html
8832 [[local:es:Spanish]]
8835 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
8839 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
8843 Looks like an interlanguage link, but is actually a local interwiki
8845 parsoid=wt2html,wt2wt,html2html
8851 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
8855 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
8859 ### Redirects, Parsoid-only
8863 1. Simple redirect to page
8865 #REDIRECT [[Main Page]]
8867 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8871 2. Other redirect variants
8873 #REDIRECT [[Main_Page]]
8875 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
8878 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
8879 # This tests the Parsoid bail-out code.
8881 3. Other redirect variants
8883 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
8885 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
8889 4. Redirect to a templated destination
8891 #REDIRECT [[{{echo|Foo}}bar]]
8893 <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"}]]}'/>
8899 parsoid=wt2html,wt2wt
8904 <li>REDIRECT [[]]</li></ol>
8908 Optional colon in #REDIRECT
8910 # the colon is archaic syntax. we support it for wt2html, but we
8911 # don't care that it roundtrips back to the modern syntax.
8912 parsoid=wt2html,html2html
8914 #REDIRECT:[[Main Page]]
8916 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8920 Whitespace in #REDIRECT with optional colon
8922 # the colon and gratuitous whitespace is archaic syntax. we support
8923 # it for wt2html, but we don't care that it roundtrips back to the
8924 # modern syntax (without extra whitespace)
8925 parsoid=wt2html,html2html
8932 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8936 Piped link in #REDIRECT
8938 # content after piped link is ignored. we support this syntax,
8939 # but don't care that the piped link is lost when we roundtrip this.
8942 #REDIRECT [[Main Page|bar]]
8944 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
8948 Redirect to category (T104502)
8950 parsoid=wt2html,wt2wt
8952 #REDIRECT [[Category:Foo]]
8954 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8958 Redirect to category with URL encoding (T104502)
8962 #REDIRECT [[Category%3AFoo]]
8964 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8968 Redirect to category page
8970 #REDIRECT [[:Category:Foo]]
8972 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
8976 Redirect to image page (1)
8978 #REDIRECT [[File:Wiki.png]]
8980 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
8984 Redirect to image page (2)
8986 #REDIRECT [[Image:Wiki.png]]
8988 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
8991 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
8992 # Next test confirms this.
8994 Redirect to language (1) (T104918)
8996 parsoid=wt2html,wt2wt,html2html
8998 #REDIRECT [[en:File:Wiki.png]]
9000 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9004 Redirect to language (2) (T104918)
9006 #REDIRECT [[:en:File:Wiki.png]]
9008 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9012 Redirect to interwiki (T104918)
9014 #REDIRECT [[meatball:File:Wiki.png]]
9016 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9020 Non-English #REDIRECT
9024 #TILVÍSUN [[Main Page]]
9026 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9030 Redirect syntax under text isn't considered a redirect
9033 #redirect [[Main Page]]
9036 <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>
9039 # FIXME: Should hoist the redirect to the top of the page and ensure there
9046 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9066 Broken br tag sanitization
9074 # TODO: Fix html2html mode (T53055)!
9076 Parsoid: Broken br tag recognition
9089 Incorrecly removing closing slashes from correctly formed XHTML
9091 <br style="clear:both;" />
9093 <p><br style="clear:both;" />
9098 Failing to transform badly formed HTML into correct XHTML
9100 <br style="clear: left;">
9101 <br style="clear: right;">
9102 <br style="clear: both;">
9104 <p><br style="clear: left;" />
9105 <br style="clear: right;" />
9106 <br style="clear: both;" />
9110 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9111 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9113 Handling html with a div self-closing tag
9122 <p><div title />
9126 <p><div title=bar />
9127 <div title=bar/>
9129 <div title="bar/"></div>
9133 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9134 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9135 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9136 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9137 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9138 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9142 Handling html with a br self-closing tag
9169 Horizontal ruler (should it add that extra space?)
9184 Horizontal ruler -- 4+ dashes render hr
9193 Horizontal ruler -- eats additional dashes on the same line
9202 Horizontal ruler -- does not collapse dashes on consecutive lines
9213 Horizontal ruler -- <4 dashes render as plain text
9222 Horizontal ruler -- Supports content following dashes on same line
9234 ### Block-level elements
9243 <ul><li>Common list</li>
9245 <li>item 3</li></ul>
9256 <ol><li>Numbered list</li>
9258 <li> item 3</li></ol>
9272 ***#Number on level 4
9274 **#Number on level 3
9275 **#Number on level 3
9279 #** Level 3, but ordered
9282 <ol><li> with numbers</li></ol>
9283 <ul><li> and bullets</li></ul>
9284 <ol><li> and numbers</li></ol></li>
9286 <ul><li>bullet level 2
9287 <ul><li>bullet level 3
9288 <ol><li>Number on level 4</li></ol></li></ul></li>
9290 <ol><li>Number on level 3</li>
9291 <li>Number on level 3</li></ol></li></ul>
9292 <ol><li>number level 2</li></ol></li>
9294 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9295 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9300 1. Nested mixed wikitext and html list
9303 * <ul><li>ho</li></ul>
9308 <li> <ul><li>ho</li></ul></li>
9310 <ul><li> ho</li></ul></li></ul>
9314 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9316 <ul><li> ho</li></ul></li></ul>
9320 2. Nested mixed wikitext and html list (incompatible)
9323 : {{echo|<li>ho</li>}}
9326 <dd> <li>ho</li></dd></dl>
9330 <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>
9340 <ul><li>bar</li></ul></li></ul>
9350 <ul><li><ul><li>foo</li></ul></li>
9356 Nested lists 3 (first element empty)
9362 <ul><li>bar</li></ul></li></ul>
9367 Nested lists 4 (first element empty)
9372 <ul><li><ul><li></li></ul></li>
9378 Nested lists 5 (both elements empty)
9383 <ul><li><ul><li></li></ul></li>
9389 Nested lists 6 (both elements empty)
9395 <ul><li></li></ul></li></ul>
9400 Nested lists 7 (skip initial nesting levels)
9404 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9409 Nested lists 8 (multiple nesting transitions)
9417 <ul><li><ul><li> bar</li></ul></li>
9418 <li> baz</li></ul></li>
9424 Nested lists 9 (extension interaction)
9430 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9434 1. Lists with start-of-line-transparent tokens before bullets: Comments
9447 2. Lists with start-of-line-transparent tokens before bullets: Template close
9452 <ul><li>foo bar</li>
9458 List items are not parsed correctly following a <pre> block (T2785)
9464 <ul><li> <pre>foo</pre></li>
9465 <li> <pre>bar</pre></li>
9469 <ul><li> <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9470 <li> <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9475 List items from template
9486 * notSOL{{inner list}}
9489 <ul><li> item 1</li>
9490 <li> item 2</li></ul>
9491 <ul><li> item 0</li>
9493 <li> item 2</li></ul>
9494 <ul><li> item 0</li>
9497 <li> item 2</li></ul>
9502 List interrupted by empty line or heading
9510 <ul><li> foo</li></ul>
9511 <ul><li><ul><li> bar</li></ul></li></ul>
9512 <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>
9513 <ul><li> Another list item</li></ul>
9518 Multiple list tags generated by templates
9539 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9542 <!--This line will NOT split the list-->
9544 <!--This line will NOT split the list either-->
9546 <!--foo--> <!----> <!--This line NOT split the list either-->
9557 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9560 <!--This line will NOT split the list-->
9562 <!--This line will NOT split the list either-->
9564 <!--foo--> <!----> <!--This line NOT split the list
9577 (The PHP parser relies on Tidy for the hack)
9579 parsoid=wt2html,wt2wt
9583 * {{echo|<li>templated li-hack}}
9584 * <!--foo--> <li> unsupported li-hack with preceding comments
9587 <li><li>not a li-hack
9594 <li>templated li-hack</li>
9595 <li>unsupported li-hack with preceding comments</li>
9598 <li>not a li-hack</li>
9603 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9630 Parsoid: Test of whitespace serialization with Templated bullets
9637 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9641 # ------------------------------------------------------------------------
9642 # The next set of tests are about Parsoid's ability to handle badly nested
9643 # tags (parse, minimize scope of fixup, and roundtrip back)
9644 # ------------------------------------------------------------------------
9647 Unbalanced closing block tags break a list
9648 (php parser relies on Tidy to fix up)
9666 # Parsoid fails this test, but it might be tricky to support properly.
9669 Unbalanced closing non-block tags don't break a list
9670 (php parser relies on Tidy to fix up)
9677 <li><span>a</span></li>
9678 <li><span>b</span></li>
9692 Unclosed formatting tags that straddle lists are closed and reopened
9693 (php parser relies on Tidy to fix up)
9695 parsoid=wt2html,wt2wt,html2html
9705 <ol><li> <s> a</s></li>
9706 <li><s> b </s></li></ol>
9711 1. List embedded in a formatting tag
9718 <li><small>foo</small></li>
9728 ## Ugly Parsoid output here
9729 ## Not sure what the right output is.
9731 2. List embedded in a formatting tag
9738 <li><small>a</small></li>
9739 <li><small>b</small></li>
9746 <li><small>b</small></li>
9750 # Ugly Parsoid and PHP parser output here
9751 # Not sure if we want to make this a test!
9754 ## 3. Unclosed formatting tags in list elements
9760 ## <li><small>a</small></li>
9761 ## <li><small><small>b</small></small></li>
9765 ## <li><small>a</small></li>
9767 ## <li><small>b</small></li>
9771 # This is a bug in the PHP parser + tidy combination.
9772 # (The </tr> tag gets parsed as text and html-escaped by PHP,
9773 # and then fostered out of the table by tidy.)
9774 # We believe the Parsoid output to be correct.
9776 Table with missing opening <tr> tag
9778 parsoid=wt2html,wt2wt
9796 # Note that the current date is hard-coded as
9797 # 1970-01-01T00:02:03Z (a Thursday)
9798 # when running parser tests. The timezone is also fixed to GMT, so
9799 # local date will be identical to current date.
9802 Magic Word: {{CURRENTDAY}}
9811 Magic Word: {{CURRENTDAY2}}
9820 Magic Word: {{CURRENTDAYNAME}}
9829 Magic Word: {{CURRENTDOW}}
9838 Magic Word: {{CURRENTMONTH}}
9847 Magic Word: {{CURRENTMONTH1}}
9856 Magic Word: {{CURRENTMONTHABBREV}}
9858 {{CURRENTMONTHABBREV}}
9865 Magic Word: {{CURRENTMONTHNAME}}
9867 {{CURRENTMONTHNAME}}
9874 Magic Word: {{CURRENTMONTHNAMEGEN}}
9876 {{CURRENTMONTHNAMEGEN}}
9883 Magic Word: {{CURRENTTIME}}
9892 Magic Word: {{CURRENTHOUR}}
9901 Magic Word: {{CURRENTWEEK}} (T6594)
9910 Magic Word: {{CURRENTYEAR}}
9919 Magic Word: {{CURRENTTIMESTAMP}}
9921 {{CURRENTTIMESTAMP}}
9928 Magic Words LOCAL (UTC)
9932 * {{LOCALMONTHNAME}}
9933 * {{LOCALMONTHNAMEGEN}}
9934 * {{LOCALMONTHABBREV}}
9943 * {{LOCALTIMESTAMP}}
9958 <li> 19700101000203</li></ul>
9963 Magic Word: {{FULLPAGENAME}}
9965 title=[[User:Ævar Arnfjörð Bjarmason]]
9966 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
9970 <p>User:Ævar Arnfjörð Bjarmason
9975 Magic Word: {{FULLPAGENAMEE}}
9977 title=[[User:Ævar Arnfjörð Bjarmason]]
9978 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
9982 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
9987 Magic Word: {{TALKSPACE}}
9989 title=[[User:Ævar Arnfjörð Bjarmason]]
9990 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
9999 Magic Word: {{TALKSPACE}}, same namespace
10001 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10002 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10011 Magic Word: {{TALKSPACE}}, main namespace
10013 title=[[Parser Test]]
10014 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10023 Magic Word: {{TALKSPACEE}}
10025 title=[[User:Ævar Arnfjörð Bjarmason]]
10026 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10035 Magic Word: {{SUBJECTSPACE}}
10037 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10038 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10047 Magic Word: {{SUBJECTSPACE}}, same namespace
10049 title=[[User:Ævar Arnfjörð Bjarmason]]
10050 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10059 Magic Word: {{SUBJECTSPACE}}, main namespace
10061 title=[[Parser Test]]
10062 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10070 Magic Word: {{SUBJECTSPACEE}}
10072 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10073 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10082 Magic Word: {{NAMESPACE}}
10084 title=[[User:Ævar Arnfjörð Bjarmason]]
10085 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10094 Magic Word: {{NAMESPACEE}}
10096 title=[[User:Ævar Arnfjörð Bjarmason]]
10097 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10106 Magic Word: {{NAMESPACENUMBER}}
10108 title=[[User:Ævar Arnfjörð Bjarmason]]
10109 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10111 {{NAMESPACENUMBER}}
10118 Magic Word: {{SUBPAGENAME}}
10120 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10121 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10130 Magic Word: {{SUBPAGENAMEE}}
10132 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10133 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10142 Magic Word: {{ROOTPAGENAME}}
10144 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10145 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10149 <p>Ævar Arnfjörð Bjarmason
10154 Magic Word: {{ROOTPAGENAMEE}}
10156 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10157 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10161 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10166 Magic Word: {{BASEPAGENAME}}
10168 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10169 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10173 <p>Ævar Arnfjörð Bjarmason
10178 Magic Word: {{BASEPAGENAMEE}}
10180 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10181 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10185 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10190 Magic Word: {{TALKPAGENAME}}
10192 title=[[User:Ævar Arnfjörð Bjarmason]]
10193 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10197 <p>User talk:Ævar Arnfjörð Bjarmason
10202 Magic Word: {{TALKPAGENAMEE}}
10204 title=[[User:Ævar Arnfjörð Bjarmason]]
10205 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10209 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10214 Magic Word: {{SUBJECTPAGENAME}}
10216 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10217 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10219 {{SUBJECTPAGENAME}}
10221 <p>User:Ævar Arnfjörð Bjarmason
10226 Magic Word: {{SUBJECTPAGENAMEE}}
10228 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10229 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10231 {{SUBJECTPAGENAMEE}}
10233 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10238 Magic Word: {{NUMBEROFFILES}}
10240 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10249 Magic Word: {{PAGENAME}}
10251 title=[[User:Ævar Arnfjörð Bjarmason]]
10252 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10256 <p>Ævar Arnfjörð Bjarmason
10261 Magic Word: {{PAGENAME}} with metacharacters
10263 title=[['foo & bar = baz']]
10264 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10268 <p><i>'foo & bar = baz'</i>
10271 <p><i>'foo & bar = baz'</i></p>
10275 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10277 title=[[*RFC 1234 http://example.com/]]
10278 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10282 <p>*RFC 1234 http://example.com/
10285 <p>*RFC 1234 http://example.com/</p>
10289 Magic Word: {{PAGENAMEE}}
10291 title=[[User:Ævar Arnfjörð Bjarmason]]
10292 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10296 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10301 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10303 title=[[*RFC 1234 http://example.com/]]
10304 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10308 <p>*RFC_1234_http://example.com/
10311 <p>*RFC_1234_http://example.com/</p>
10315 Magic Word: {{REVISIONID}}
10317 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10326 Magic Word: {{SCRIPTPATH}}
10328 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10336 Magic Word: {{STYLEPATH}}
10338 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10347 Magic Word: {{SERVER}}
10349 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10353 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10358 Magic Word: {{SERVERNAME}}
10360 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10369 Magic Word: {{SITENAME}}
10371 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10380 Magic Word: {{PAGELANGUAGE}}
10383 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10392 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10394 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10403 Case-sensitive magic words, when cased differently, should just be template transclusions
10410 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10411 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10412 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10413 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10418 Case-insensitive magic words should still work with weird casing.
10428 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10432 # From plwiki:PLOS_ONE
10434 Parsoid: Page property magic word with magic word contents
10436 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10438 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt2\" 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>"}]]}'/>
10442 Parsoid: Template-generated DISPLAYTITLE
10444 {{{{echo|DISPLAYTITLE}}:Foo}}
10446 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DISPLAYTITLE}}:Foo"},"params":{},"i":0}}]}'/>
10450 Namespace 1 {{ns:1}}
10459 Namespace 1 {{ns:01}}
10468 Namespace 0 {{ns:0}} (T6783)
10476 Namespace 0 {{ns:00}} (T6783)
10484 Namespace -1 {{ns:-1}}
10493 Namespace User {{ns:User}}
10502 Namespace User talk {{ns:User_talk}}
10511 Namespace User talk {{ns:uSeR tAlK}}
10520 Namespace File {{ns:File}}
10529 Namespace File {{ns:Image}}
10538 Namespace (lang=de) Benutzer {{ns:User}}
10549 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10555 <p>Benutzer Diskussion
10562 {{urlencode:hi world?!}}
10563 {{urlencode:hi world?!|WIKI}}
10564 {{urlencode:hi world?!|PATH}}
10565 {{urlencode:hi world?!|QUERY}}
10575 Magic Word: prioritize type info over data-parsoid
10579 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10585 Magic Word: serialize on separate line (parsoid)
10587 parsoid=wt2wt,html2wt
10593 foo<meta property="mw:PageProp/notoc"/>bar
10597 Magic Word: rt non-english wikis
10604 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10608 __proto__ is treated as normal wikitext (T105997)
10620 Magic links: internal link to RFC (T2479)
10624 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10627 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10631 Magic links: RFC (T2479)
10635 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10638 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10642 Magic links: RFC (T67278)
10644 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10646 <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.
10649 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10653 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10655 RFC      822
10659 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10664 <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>
10670 Magic links: ISBN (T3937)
10674 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10677 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10681 Magic links: ISBN (T67278)
10683 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10685 <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.
10688 <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>
10692 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
10694 ISBN      978 0 316 09811 3
10700 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10707 <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>
10715 Magic links: PMID incorrectly converts space to underscore
10719 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10722 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
10726 Magic links: PMID (T67278)
10728 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10730 <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.
10733 <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>
10737 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
10739 PMID      1234
10743 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10748 <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>
10753 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10754 # since these are ExtLinkText, not MagicLinkText
10756 Magic links: use appropriate serialization for "almost" magic links.
10758 X[[Special:BookSources/0978739256|foo]]
10760 X[//tools.ietf.org/html/rfc1234 foo]
10762 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
10763 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
10766 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
10767 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
10771 Magic links: All disabled (T47942)
10773 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
10779 <p>ISBN 0-306-40615-2
10790 Nonexistent template
10792 {{thistemplatedoesnotexist}}
10794 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
10799 Template with invalid target containing tags
10801 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10803 <p>{{a<b>b</b>|foo|a=b|a = b}}
10808 Template with invalid target containing unclosed tag
10810 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
10812 <p>{{a<b>|foo|a=b|a = b}}</b>
10817 Template with invalid target containing wikilink
10821 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
10824 <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>
10828 Template with just whitespace in it, T70421
10832 <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>
10838 This is a test template
10846 <p>This is a test template
10851 Template with explicit namespace
10855 <p>This is a test template
10863 This is a test template with parameter {{{param}}}
10869 {{paramtest|param=foo}}
10871 <p>This is a test template with parameter foo
10876 Template:paramtestnum
10878 [[{{{1}}}|{{{2}}}]]
10882 Template unnamed parameter
10884 {{paramtestnum|Main Page|the main page}}
10886 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
10891 Template:templatesimple
10897 Template:templateredirect
10899 #redirect [[Template:templatesimple]]
10903 Template:templateasargtestnum
10909 Template:templateasargtest
10911 {{template{{{templ}}}}}
10915 Template:templateasargtest2
10921 Template with template name as unnamed argument
10923 {{templateasargtestnum|templatesimple}}
10930 Template with template name as argument
10932 {{templateasargtest|templ=simple}}
10939 Template with template name as argument (2)
10941 {{templateasargtest2|templ=templatesimple}}
10948 Template:templateasargtestdefault
10950 {{{{{templ|templatesimple}}}}}
10960 Template with default value
10962 {{templateasargtestdefault}}
10969 Template with default value (value set)
10971 {{templateasargtestdefault|templ=templa}}
10980 {{templateredirect}}
10985 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
10989 Template with argument in separate line
10991 {{ templateasargtest |
10999 Template with complex template as argument
11002 param ={{ templateasargtest |
11003 templ = simple }}}}
11005 <p>This is a test template with parameter (test)
11010 Template with thumb image (with link in description)
11012 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11014 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>
11017 <p>This is a test template with parameter</p>
11018 <div class="thumb tright">
11019 <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>
11020 <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>
11024 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"paramtest","href":"./Template:Paramtest"},"params":{"param":{"wt":"[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]"}},"i":0}}]}'>This is a test template with parameter </p><figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" about="#mwt1" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Noimage.png" ><img resource="./File:Noimage.png" src="./Special:FilePath/Noimage.png" height="220" width="220"/></a><figcaption><a rel="mw:WikiLink" href="./No_link" title="No link">link</a> <a rel="mw:WikiLink" href="./No_link" title="No link">caption</a></figcaption></figure>
11028 Template:complextemplate
11030 {{{1}}} {{paramtest|
11031 param ={{{param}}}}}
11035 Template with complex arguments
11038 param ={{ templateasargtest |
11039 templ = simple }}|[[Template:complextemplate|link]]}}
11041 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11046 T2553: link with two variables in a piped link
11049 |[[{{{1}}}|{{{2}}}]]
11054 <td>[[{{{1}}}|{{{2}}}]]
11059 <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>
11065 Abort table cell attribute parsing on wikilink
11068 | testing [[one|two]] | three || four
11069 | testing one two | three || four
11070 | testing="[[one|two]]" | three || four
11075 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11081 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11087 <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>
11088 <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>
11089 <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>
11094 Don't abort table cell attribute parsing if wikilink is found in template arg
11097 | Test {{#tag:ref|One two "[[three]]" four}}
11101 <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>
11106 Magic variable as template parameter
11108 {{paramtest|param={{SITENAME}}}}
11110 <p>This is a test template with parameter MediaWiki
11117 [[{{{param}}}|link]]
11121 Template parameter as link source
11123 {{linktest|param=Main Page}}
11125 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11130 Template:paramtest2
11132 including another template, {{paramtest|param={{{arg}}}}}
11136 Template passing argument to another template
11138 {{paramtest2|arg='hmm'}}
11140 <p>including another template, This is a test template with parameter 'hmm'
11151 Template as link source
11155 [[{{linktest2}}|Main Page]]
11157 [[{{linktest2}}]]Page
11159 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11160 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11161 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11179 Template infinite loop
11183 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11188 Template from main namespace
11207 T2529: Template with table, not included at beginning of line
11226 T2523: Template shouldn't eat newline (or add an extra one before table)
11246 T2041: Template parameters shown as broken links
11255 Template with targets containing wikilinks
11259 {{[[{{echo|foo}}]]}}
11261 {{{{echo|[[foo}}]]}}
11263 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11264 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11276 Templates: Double quotes as template target
11283 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11287 ## This test is about making sure Parsoid's data-mw is well formed in the
11288 ## face of multiple templates with intersecting and overlapping ranges. The
11289 ## wikitext itself is wretched.
11291 Templates with intersecting and overlapping ranges
11316 <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":""}]]}'>
11318 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11320 <tbody><tr><td>hi</td></tr>
11325 Template:MSGNW test
11327 ''None'' of '''this''' should be
11329 but rather passed unmodified
11337 # hmm, fix this or just deprecate msgnw and document its behavior?
11341 {{msgnw:MSGNW test}}
11343 <p>''None'' of '''this''' should be
11345  but rather passed unmodified
11346 {{test}}
11350 <!-- comment -->
11357 {{int:youhavenewmessages|lots of money|not!}}
11359 <p>You have lots of money (not!).
11364 int keyword - non-existing message
11375 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11379 <includeonly> and <noinclude> being included
11390 <onlyinclude>Foo</onlyinclude>bar
11394 <onlyinclude> being included
11406 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11410 <onlyinclude> and <includeonly> being included
11419 <includeonly> and <noinclude> on a page
11421 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11428 Un-closed <noinclude>
11435 <onlyinclude> on a page
11437 <onlyinclude>Foo</onlyinclude>bar
11444 Un-closed <onlyinclude>
11451 Self-closed noinclude, includeonly, onlyinclude tags
11462 Unbalanced includeonly and noinclude tags
11466 |b</noinclude></noinclude>
11467 |c</noinclude></includeonly>
11468 |d</includeonly></includeonly>
11477 <td>c</includeonly>
11479 <td>d</includeonly></includeonly>
11485 Template:Includeonly section
11488 ==Includeonly section==
11494 T8563: Edit link generation for section shown by <includeonly>
11496 {{includeonly section}}
11498 <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>
11499 <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>
11503 # Uses same input as the contents of [[Template:Includeonly section]]
11505 T8563: Section extraction for section shown by <includeonly>
11510 ==Includeonly section==
11518 T8563: Edit link generation for section suppressed by <includeonly>
11521 ==Includeonly section==
11525 <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>
11530 T8563: Section extraction for section suppressed by <includeonly>
11535 ==Includeonly section==
11543 Un-closed <includeonly>
11548 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11551 ## We used to, but no longer wt2wt this test since the default serializer
11552 ## will normalize the include directives to serialize on their own line.
11553 ## Selser will take care of preserving formatting in scenarios where they
11554 ## intermingled with other wikitext.
11556 Includes and comments at SOL
11558 parsoid=wt2html,html2html
11560 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11564 </noinclude>* stuff
11567 <includeonly>can have stuff</includeonly>=== here ===
11570 <h2><span class="mw-headline" id="hu">hu</span></h2>
11573 <ul><li> stuff</li>
11574 <li> here</li></ul>
11575 <h3><span class="mw-headline" id="here">here</span></h3>
11578 <!-- 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>
11580 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11582 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11583 <li> here</li></ul>
11585 <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>
11589 # TODO: test with DOM fragment reuse!
11591 Parsoid: DOM fragment reuse
11593 parsoid=wt2wt,wt2html
11595 a{{echo|b<table></table>c}}d
11607 <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>
11609 <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">
11610 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11611 </span><p about="#mwt2">cd</p>
11613 <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">
11615 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11617 </span><p about="#mwt3">b</p>
11621 Parsoid: Merge double tds (T52603)
11626 |{{echo|{{!}} foo}}
11630 <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>
11635 Parsoid: Merge double tds in nested transclusion content (T52603)
11641 |{{echo|{{!}} foo}}
11645 <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}}]}'>
11647 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11653 ### <includeonly> and <noinclude> in attributes
11656 0. includeonly around the entire attribute
11658 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11660 <p><span id="v2">bar</span>
11665 1. includeonly in html attr key
11667 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11669 <p><span id="foo">bar</span>
11674 2. includeonly in html attr value
11676 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11677 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11679 <p><span id="v1">bar</span>
11680 <span id="v1">bar</span>
11685 3. includeonly in part of an attr value
11687 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11689 <p><span style="color:red;">bar</span>
11694 4. includeonly in table attributes
11718 ### Token Stream Patcher tests
11720 ### These tests won't always pass wt2wt and other modes because
11721 ### on serialization, the table will be output on a new line.
11722 ### For now, we are blacklisting them, and using this to test selser.
11726 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
11728 parsoid=wt2html,wt2wt
11730 {{echo|}}{| width = '100%'
11734 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
11735 <tbody><tr><td>foo</td></tr>
11739 ## We used to, but no longer wt2wt this test since the default serializer
11740 ## will normalize the include directives to serialize on their own line.
11741 ## Selser will take care of preserving formatting in scenarios where they
11742 ## intermingled with other wikitext.
11744 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
11748 <includeonly>a</includeonly>{| {{{b}}}
11752 <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":""}]]}'>
11753 <tbody><tr><td>c</td></tr>
11758 Table wikitext syntax outside wiki-tables
11762 ! not a table heading
11765 | class="foo bar" | baz
11773 ! not a table heading
11776 | class="foo bar" | baz
11785 ### Testing parsing of templates where a template arg
11786 ### has the same name as the template itself.
11792 {{{quote|{{{1}}}}}}
11796 Templates: Template Name/Arg clash: 1. Use of positional param
11805 Templates: Template Name/Arg clash: 2. Use of named param
11807 {{quote|quote=foo}}
11814 Templates: Template Name/Arg clash: 3. Use of named param with empty input
11823 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
11827 Templates: 1. Simple use
11836 Templates: 2. Inside a block tag
11838 <div>{{echo|Foo}}</div>
11839 <blockquote>{{echo|Foo}}</blockquote>
11842 <blockquote>Foo</blockquote>
11852 Templates: P-wrapping: 1a. Templates on consecutive lines
11863 Templates: P-wrapping: 1b. Templates on consecutive lines
11877 Templates: P-wrapping: 1c. Templates on consecutive lines
11880 {{echo|bar}} <div>baz</div>
11893 Templates: P-wrapping: 1d. Template preceded by comment-only line
11902 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
11906 Templates: Inline Text: 1. Multiple template uses
11908 {{echo|Foo}}bar{{echo|baz}}
11915 Templates: Inline Text: 2. Back-to-back template uses
11917 {{echo|Foo}}{{echo|bar}}
11924 Templates: Block Tags: 1. Multiple template uses
11926 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
11928 <div>Foo</div><div>bar</div><div>baz</div>
11933 Templates: Block Tags: 2. Back-to-back template uses
11935 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
11937 <div>Foo</div><div>bar</div>
11941 # This is an edge case relating to paragraph wrapping.
11943 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
11948 <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
11953 Templates: Links: 1. Simple example
11955 {{echo|[[Foo|bar]]}}
11957 <p><a href="/wiki/Foo" title="Foo">bar</a>
11962 Templates: Links: 2. Generation of link href
11964 [[{{echo|Foo}}|bar]]
11966 <p><a href="/wiki/Foo" title="Foo">bar</a>
11971 Templates: Links: 3. Generation of part of a link href
11973 [[Fo{{echo|o}}|bar]]
11975 [[Foo{{echo|bar}}]]
11977 [[Foo{{echo|bar}}baz]]
11979 [[Foo{{echo|bar}}|bar]]
11981 [[:Foo{{echo|bar}}]]
11983 [[:Foo{{echo|bar}}|bar]]
11985 <p><a href="/wiki/Foo" title="Foo">bar</a>
11986 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11987 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
11988 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11989 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
11990 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
11995 Templates: Links: 4. Multiple templates generating link href
11997 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
11999 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12004 Templates: Links: 5. Generation of link text
12006 [[Foo|{{echo|bar}}]]
12008 <p><a href="/wiki/Foo" title="Foo">bar</a>
12013 Templates: Links: 5. Nested templates (only outermost template should be marked)
12015 {{echo|[[{{echo|Foo}}|bar]]}}
12017 <p><a href="/wiki/Foo" title="Foo">bar</a>
12022 Templates: HTML Tag: 1. Generation of HTML attr. key
12024 <div {{echo|style}}="color:red;">foo</div>
12026 <div style="color:red;">foo</div>
12031 Templates: HTML Tag: 2. Generation of HTML attr. value
12033 <div style={{echo|'color:red;'}}>foo</div>
12035 <div style="color:red;">foo</div>
12040 Templates: HTML Tag: 3. Generation of HTML attr key and value
12042 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12044 <div style="color:red;">foo</div>
12049 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12051 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12053 <div title="This is a long title with just one piece templated">foo</div>
12058 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12060 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12062 <div title="This is a long title with just one piece templated">foo</div>
12067 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12069 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12071 <div title="This is a long title with just one piece templated">foo</div>
12075 # SSS FIXME: While it is great we added support for all this,
12076 # do we want to make this part of the spec? Maybe we want to
12077 # deprecate this kind of usage in the future?
12079 Templates: HTML Tag: 7. Generation of partial attribute key string
12081 <div st{{echo|yle}}="color:red;">foo</div>
12083 <div style="color:red;">foo</div>
12088 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12090 <div {{echo|1=id="v1"}}>bar</div>
12092 <div id="v1">bar</div>
12097 Templates: HTML Tag: 9. Multiple template-generated attributes
12099 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12101 <div id="v1" title="foo">bar</div>
12106 Templates: Support for templates generating attributes and content
12108 {| {{mixed_attr_content_template}}
12113 <table style="color:red;" title="T48811">
12123 <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|}"]}'>
12132 1. Entities and nowikis inside templated attributes should be handled correctly
12134 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12136 <div style="background:#f9f9f9;">foo</div>
12139 <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>
12143 2. Entities and nowikis inside templated attributes should be handled correctly
12146 |{{table_attribs_3}}
12151 <td style="background:#f9f9f9;">Foo
12156 <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>
12161 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12164 |{{table_attribs_3}}
12169 <td style="background:#f9f9f9;">Foo
12173 <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}}]}'>
12174 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12180 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12183 | {{table_attribs_6}} hi
12188 <td style="background: red;"> hi
12193 <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>
12198 Templates: HTML Tables: 1. Generating start of a HTML table
12200 {{echo|<table><tr><td>foo</td>}}</tr></table>
12202 <table><tr><td>foo</td></tr></table>
12207 Templates: HTML Tables: 2a. Generating middle of a HTML table
12209 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12211 <table><tr><td>foo</td></tr></table>
12216 Templates: HTML Tables: 2b. Generating middle of a HTML table
12218 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12220 <table><tr><td>foo</td></tr></table>
12225 Templates: HTML Tables: 3. Generating end of a HTML table
12227 <table><tr>{{echo|<td>foo</td></tr></table>}}
12229 <table><tr><td>foo</td></tr></table>
12234 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12236 {{echo|<table>}}<tr><td>foo</td></tr></table>
12238 <table><tr><td>foo</td></tr></table>
12243 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
12245 <table>{{echo|<tr>}}<td>foo</td></tr></table>
12247 <table><tr><td>foo</td></tr></table>
12252 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
12254 <table><tr>{{echo|<td>}}foo</td></tr></table>
12256 <table><tr><td>foo</td></tr></table>
12261 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
12263 <table><tr><td>foo{{echo|</td>}}</tr></table>
12265 <table><tr><td>foo</td></tr></table>
12270 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
12272 <table><tr><td>foo</td>{{echo|</tr>}}</table>
12274 <table><tr><td>foo</td></tr></table>
12279 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
12281 <table><tr><td>foo</td></tr>{{echo|</table>}}
12283 <table><tr><td>foo</td></tr></table>
12288 Templates: HTML Tables: 5. Proper fostering of categories from inside
12290 parsoid=wt2html,wt2wt
12292 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
12293 <!--Two categories (T52330)-->
12294 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
12296 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
12297 <!--Two categories (T52330)-->
12298 <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>
12302 Templates: Wiki Tables: 1a. Fostering of entire template content
12310 <tr><td></td></tr></table>
12322 Templates: Wiki Tables: 1b. Fostering of entire template content
12335 <tr><td></td></tr></table>
12349 Templates: Wiki Tables: 2. Fostering of partial template content
12359 <tr><td></td></tr></table>
12372 Templates: Wiki Tables: 3. td-content via multiple templates
12375 {{echo|{{pipe}}a}}{{echo|b}}
12386 Templates: Wiki Tables: 4. Templated tags, no content
12392 <tr><td></td></tr></table>
12397 Templates: Wiki Tables: 5. Templated tags, regular td-tags
12411 Templates: Wiki Tables: 6. Templated tags, templated td-tags
12424 ## This test case is very specific to Parsoid's internals
12425 ## and is hence only tested for Parsoid's code. Parsoid uses
12426 ## a <meta> marker tag for <ref> tags and they are expanded
12427 ## much later. We are verifying that this <meta> tag usage
12428 ## doesn't prevent foster parenting.
12430 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
12432 {{PartialTable}}<ref>foo</ref>
12437 <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">
12441 <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>
12445 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
12455 <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{{!}}}"]}'>
12456 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
12460 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
12465 Templates: Lists: Multi-line list-items via templates
12467 *{{echo|a {{nonexistent|
12469 *{{echo|b {{nonexistent|
12472 <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>
12473 <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>
12478 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
12480 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
12482 <p><i>ab</i>c<i>d</i>e
12487 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
12488 (PHP parser generates misnested html)
12490 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
12492 <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>
12496 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
12497 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
12499 parsoid=wt2html,wt2wt
12501 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
12503 <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>
12504 <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>
12505 <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>
12509 Templates: Ugly nesting: 4. Divs opened/closed across templates
12511 a<div>b{{echo|c</div>d}}e
12522 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
12528 |{{echo|foo</table>}}
12532 <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|}"]}'>
12536 <td>foo</td></tr></tbody></table><span about="#mwt1">
12537 </span><span about="#mwt1">|bar</span><span about="#mwt1">
12542 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
12552 <td>1. {{echo|foo </table>}}</td>
12554 <td>2. {{echo|baz </table>}}</td>
12567 <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>"]}'>
12572 <td>1. foo </td></tr></tbody></table></td>
12574 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
12575 </span><span about="#mwt2">
12576 </span><span about="#mwt2">
12577 </span><span about="#mwt2">abc</span><span about="#mwt2">
12578 </span><span about="#mwt2">
12579 </span><span about="#mwt2">
12580 </span><span about="#mwt2">
12581 </span><span about="#mwt2">
12582 </span><span about="#mwt2">
12583 </span><span about="#mwt2">xyz</span><span about="#mwt2">
12584 </span><span about="#mwt2">
12589 Templates: Ugly templates: 3. newline-only template parameter
12598 # This looks like a bug: a single newline triggers p/br for some reason.
12600 Templates: Ugly templates: 4. newline-only template parameter inconsistency
12609 # T66017 -- ugly wikitext with fostered content generates two template ranges that
12610 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
12612 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
12618 <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
12619 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12623 # T66017 -- ugly wikitext with fostered content generates two template ranges
12624 # that are "identical" and generate nesting cycles in the algorithm
12626 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
12628 {{echo|<table><tr><td><table>}}
12632 <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"}'>
12633 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
12634 </table></td></tr></tbody></table>
12638 Templates: Parameters substituted at the top-level
12640 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
12644 <p><i>who</i> me? <b>never!</b>
12648 <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>
12650 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
12654 Parser Functions: 1. Simple example
12663 Parser Functions: 2. Nested use (only outermost should be marked up)
12672 ### Pre-save transform tests
12675 pre-save transform: subst:
12681 This is a test template
12685 pre-save transform: normal template
12695 pre-save transform: nonexistent template
12699 {{thistemplatedoesnotexist}}
12701 {{thistemplatedoesnotexist}}
12705 pre-save transform: subst magic variables
12714 # This is T2089, which I fixed. -- wtm
12716 pre-save transform: subst: templates with parameters
12720 {{subst:paramtest|param="something else"}}
12722 This is a test template with parameter "something else"
12726 Template:nowikitest
12728 <nowiki>'''not wiki'''</nowiki>
12732 pre-save transform: nowiki in subst (T3188)
12736 {{subst:nowikitest}}
12738 <nowiki>'''not wiki'''</nowiki>
12742 Template:commenttest
12744 This template has <!-- a comment --> in it.
12748 pre-save transform: comment in subst (T3936)
12752 {{subst:commenttest}}
12754 This template has <!-- a comment --> in it.
12758 pre-save transform: unclosed tag
12762 <nowiki>'''not wiki'''
12764 <nowiki>'''not wiki'''
12768 pre-save transform: mixed tag case
12772 <NOwiki>'''not wiki'''</noWIKI>
12774 <NOwiki>'''not wiki'''</noWIKI>
12778 pre-save transform: unclosed comment in <nowiki>
12782 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12784 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
12787 # Leading @ in this template definition works around a limitation
12788 # in parsoid's parserTests which otherwise strips the <span> from the
12789 # result (confusing it for a template wrapper)
12793 @<span onmouseover="alert('crap')">Oh no</span>
12797 (confirming safety of fix for subst T3936)
12799 {{Template:dangerous}}
12801 <p>@<span>Oh no</span>
12806 pre-save transform: comment containing gallery (T7024)
12810 <!-- <gallery>data</gallery> -->
12812 <!-- <gallery>data</gallery> -->
12816 pre-save transform: comment containing extension
12820 <!-- <tag>data</tag> -->
12822 <!-- <tag>data</tag> -->
12826 pre-save transform: comment containing nowiki
12830 <!-- <nowiki>data</nowiki> -->
12832 <!-- <nowiki>data</nowiki> -->
12836 pre-save transform: <noinclude> in subst (T5298)
12846 pre-save transform: <onlyinclude> in subst (T5298)
12850 {{subst:Includes2}}
12858 {{<includeonly>subst:</includeonly>Includes}}
12862 Template:SafeSubstTest
12864 {{<includeonly>safesubst:</includeonly>Includes}}
12868 T24297: safesubst: works during PST
12872 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
12878 T24297: safesubst: works during normal parse
12887 subst: does not work during normal parse
12891 <p>{{subst:Includes}}
12896 pre-save transform: context links ("pipe trick")
12900 [[Article (context)|]]
12903 [[Bar:Article (context)|]]
12904 [[:Bar:Article (context)|]]
12906 [[|Article (context)]]
12910 [[Article (context)|Article]]
12911 [[Bar:Article|Article]]
12912 [[:Bar:Article|Article]]
12913 [[Bar:Article (context)|Article]]
12914 [[:Bar:Article (context)|Article]]
12916 [[Article (context)]]
12917 [[Bar:X (Y) Z|X (Y) Z]]
12918 [[:Bar:X (Y) Z|X (Y) Z]]
12922 pre-save transform: context links ("pipe trick") with interwiki prefix
12926 [[interwiki:Article|]]
12927 [[:interwiki:Article|]]
12928 [[interwiki:Bar:Article|]]
12929 [[:interwiki:Bar:Article|]]
12931 [[interwiki:Article|Article]]
12932 [[:interwiki:Article|Article]]
12933 [[interwiki:Bar:Article|Bar:Article]]
12934 [[:interwiki:Bar:Article|Bar:Article]]
12938 pre-save transform: context links ("pipe trick") with parens in title
12940 pst title=[[Somearticle (context)]]
12944 [[Article (context)|Article]]
12948 pre-save transform: context links ("pipe trick") with comma in title
12950 pst title=[[Someplace, Somewhere]]
12953 [[Otherplace, Elsewhere|]]
12954 [[Otherplace, Elsewhere, Anywhere|]]
12956 [[Otherplace, Somewhere|Otherplace]]
12957 [[Otherplace, Elsewhere|Otherplace]]
12958 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
12962 pre-save transform: context links ("pipe trick") with parens and comma
12964 pst title=[[Someplace (IGNORED), Somewhere]]
12967 [[Otherplace (place), Elsewhere|]]
12969 [[Otherplace, Somewhere|Otherplace]]
12970 [[Otherplace (place), Elsewhere|Otherplace]]
12974 pre-save transform: context links ("pipe trick") with comma and parens
12976 pst title=[[Who, me? (context)]]
12979 [[Me, Myself, and I (1937 song)|]]
12981 [[Yes, you. (context)|Yes, you.]]
12982 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
12986 pre-save transform: context links ("pipe trick") with namespace
12988 pst title=[[Ns:Somearticle]]
12992 [[Ns:Article|Article]]
12996 pre-save transform: context links ("pipe trick") with namespace and parens
12998 pst title=[[Ns:Somearticle (context)]]
13002 [[Ns:Article (context)|Article]]
13006 pre-save transform: context links ("pipe trick") with namespace and comma
13008 pst title=[[Ns:Somearticle, Context, Whatever]]
13012 [[Ns:Article, Context, Whatever|Article]]
13016 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13018 pst title=[[Ns:Somearticle, Context (context)]]
13022 [[Ns:Article (context)|Article]]
13026 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13028 pst title=[[Ns:Somearticle (IGNORED), Context]]
13032 [[Ns:Article, Context|Article]]
13036 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13040 [[Article(context)|]]
13041 [[Bar:Article(context)|]]
13042 [[:Bar:Article(context)|]]
13043 [[|Article(context)]]
13047 [[Article(context)|Article]]
13048 [[Bar:Article(context)|Article]]
13049 [[:Bar:Article(context)|Article]]
13050 [[Article(context)]]
13051 [[Bar:X(Y)Z|X(Y)Z]]
13052 [[:Bar:X(Y)Z|X(Y)Z]]
13056 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13060 [[Article (context)|]]
13061 [[Bar:Article (context)|]]
13062 [[:Bar:Article (context)|]]
13063 [[|Article (context)]]
13067 [[Article (context)|Article]]
13068 [[Bar:Article (context)|Article]]
13069 [[:Bar:Article (context)|Article]]
13070 [[Article (context)]]
13071 [[Bar:X (Y) Z|X (Y) Z]]
13072 [[:Bar:X (Y) Z|X (Y) Z]]
13076 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13080 [[Article(context)|]]
13081 [[Bar:Article(context)|]]
13082 [[:Bar:Article(context)|]]
13083 [[|Article(context)]]
13087 [[Article(context)|Article]]
13088 [[Bar:Article(context)|Article]]
13089 [[:Bar:Article(context)|Article]]
13090 [[Article(context)]]
13091 [[Bar:X(Y)Z|X(Y)Z]]
13092 [[:Bar:X(Y)Z|X(Y)Z]]
13096 pre-save transform: context links ("pipe trick") with commas (T23660)
13100 [[Article (context), context|]]
13101 [[Article (context),context|]]
13102 [[Bar:Article (context), context|]]
13103 [[Bar:Article (context),context|]]
13104 [[:Bar:Article (context), context|]]
13105 [[:Bar:Article (context),context|]]
13107 [[Article (context), context|Article]]
13108 [[Article (context),context|Article]]
13109 [[Bar:Article (context), context|Article]]
13110 [[Bar:Article (context),context|Article]]
13111 [[:Bar:Article (context), context|Article]]
13112 [[:Bar:Article (context),context|Article]]
13116 pre-save transform: trim trailing empty lines
13120 Empty lines are trimmed
13126 Empty lines are trimmed
13130 pre-save transform: Signature expansion
13135 * <noinclude>~~~</noinclude>
13136 * <includeonly>~~~</includeonly>
13137 * <onlyinclude>~~~</onlyinclude>
13139 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13140 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13141 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13142 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13147 pre-save transform: Signature expansion in nowiki tags (T2093)
13153 <nowiki>~~~~</nowiki>
13155 <includeonly><nowiki>~~~~</nowiki></includeonly>
13157 <noinclude><nowiki>~~~~</nowiki></noinclude>
13159 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13161 {{subst:Foo}} shall be converted to FOO
13163 As well as inside noinclude/onlyinclude
13164 <noinclude>{{subst:Foo}}</noinclude>
13165 <onlyinclude>{{subst:Foo}}</onlyinclude>
13167 But not inside includeonly
13168 <includeonly>{{subst:Foo}}</includeonly>
13172 <nowiki>~~~~</nowiki>
13174 <includeonly><nowiki>~~~~</nowiki></includeonly>
13176 <noinclude><nowiki>~~~~</nowiki></noinclude>
13178 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13180 FOO shall be converted to FOO
13182 As well as inside noinclude/onlyinclude
13183 <noinclude>FOO</noinclude>
13184 <onlyinclude>FOO</onlyinclude>
13186 But not inside includeonly
13187 <includeonly>{{subst:Foo}}</includeonly>
13191 Parsoid: Recognize nowiki with trailing space in tags
13195 <nowiki ><div>[[foo]]</nowiki >
13203 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13210 Parsoid: Recognize nowiki with odd capitalization
13214 <noWikI ><div>[[foo]]</Nowiki >
13216 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13221 Parsoid: Escape nowiki with trailing space in tags
13225 <p><nowiki > foo </nowiki ></p>
13226 <p>a<nowiki />b</p>
13227 <p>c<nowiki/ >d</p>
13229 <nowiki > foo </nowiki >
13237 Parsoid: Escape weird noWikI capitalizations
13241 <p><noWikI > foo </NoWikI ></p>
13243 <noWikI > foo </NoWikI >
13247 ### Message transform tests
13250 message transform: magic variables
13260 message transform: should not transform wiki markup
13270 message transform: <noinclude> in transcluded template (T6926)
13280 message transform: <onlyinclude> in transcluded template (T6926)
13290 {{#special:}} page name, known
13294 {{#special:Recentchanges}}
13296 Special:RecentChanges
13300 {{#special:}} page name with subpage, known
13304 {{#special:Recentchanges/param}}
13306 Special:RecentChanges/param
13310 {{#special:}} page name, unknown
13314 {{#special:foobar nonexistent}}
13316 Special:Foobar nonexistent
13320 {{#speciale:}} page name, known
13324 {{#speciale:Recentchanges}}
13326 Special:RecentChanges
13330 {{#speciale:}} page name with subpage, known
13334 {{#speciale:Recentchanges/param}}
13336 Special:RecentChanges/param
13340 {{#speciale:}} page name, unknown
13344 {{#speciale:foobar nonexistent}}
13346 Special:Foobar_nonexistent
13352 ### For Parsoid-specific tests, see
13353 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
13358 parsoid=wt2html,wt2wt,html2html
13360 [[Image:foobar.jpg]]
13362 <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>
13365 <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>
13369 Simple image (using File: namespace, now canonical)
13371 [[File:Foobar.jpg]]
13373 <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>
13376 <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>
13380 Right-aligned image
13382 [[File:Foobar.jpg|right]]
13384 <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>
13387 <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>
13393 [[File:Foobar.jpg|right|Caption text]]
13395 <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>
13398 <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>
13402 Image with caption, T55312 #1
13404 [[File:Foobar.jpg|right|Caption page stuff]]
13406 <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>
13409 <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>
13413 Image with caption, T55312 #2
13415 [[File:Foobar.jpg|right|Caption page=]]
13417 <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>
13420 <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>
13424 Image with caption, T55312 #3
13426 [[File:Foobar.jpg|right|Caption page=stuff]]
13428 <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>
13431 <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>
13435 Allow empty links in image captions (T62753)
13439 [[File:Foobar.jpg|thumb|Caption [[Link1]]
13444 <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>
13447 <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>
13449 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
13450 </figcaption></figure>
13454 Titles in unlinked images (T23454)
13456 [[File:Foobar.jpg|link=|stuff]]
13458 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
13463 Link with empty target
13472 Image with link trail
13474 Linktrails should not work for images: [[File:Foobar.jpg]]s
13476 <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
13479 <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>
13483 Image with empty attribute
13485 parsoid=wt2html,wt2wt,html2html
13487 [[File:Foobar.jpg|right||Caption text]]
13489 <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>
13492 <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>
13496 1. Block image with individual attributes from templates
13498 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
13500 <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>
13503 <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>
13507 2. Block Image with individual attributes from templates
13509 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
13511 <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>
13514 <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>
13518 3. Inline image with individual attributes from templates
13520 [[File:Foobar.jpg|{{echo|50px}}]]
13522 <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>
13525 <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>
13528 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
13529 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
13531 Image with multiple attributes from the same template
13533 [[File:Foobar.jpg|{{image_attribs}}]]
13535 <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>
13538 <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>
13542 Image with link tails
13546 123[[File:Foobar.jpg]]456
13547 123[[File:Foobar.jpg|right]]456
13548 123[[File:Foobar.jpg|thumb]]456
13550 <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
13552 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
13553 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
13556 <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>
13558 <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>
13560 <div class="thumb tright">
13561 <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>
13562 <div class="thumbcaption">
13563 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
13569 <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>
13570 <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>
13571 <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>
13575 Image with multiple captions -- only last one is accepted
13577 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
13579 <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>
13582 <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>
13586 Image with multiple widths -- use last
13588 [[File:Foobar.jpg|200px|300px|caption]]
13590 <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>
13593 <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>
13597 Image with multiple alignments -- use first (T50664)
13601 [[File:Foobar.jpg|thumb|left|right|center|caption]]
13603 [[File:Foobar.jpg|middle|text-top|caption]]
13605 <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>
13606 <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>
13609 <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>
13610 <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>
13614 Image with width attribute at different positions
13616 [[File:Foobar.jpg|200px|right|Caption]]
13617 [[File:Foobar.jpg|right|200px|Caption]]
13618 [[File:Foobar.jpg|right|Caption|200px]]
13620 <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>
13621 <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>
13622 <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>
13625 <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>
13626 <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>
13627 <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>
13630 # a sad bit of backward-compatibility
13632 Image with size specified with pxpx (T15500, T53628)
13634 parsoid=wt2html,wt2wt,html2html
13636 [[File:Foobar.jpg|20pxpx]]
13637 [[File:Foobar.jpg|200x20pxpx]]
13639 <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>
13640 <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>
13643 <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>
13647 Image with link parameter, wiki target
13649 [[File:Foobar.jpg|link=Main Page]]
13651 <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>
13654 <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>
13657 # parsoid T51293 (part 1)
13659 Image with link parameter, URL target
13661 [[File:Foobar.jpg|link=http://example.com/]]
13663 <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>
13666 <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>
13669 # parsoid T51293 (part 2)
13671 Image with link parameter, protocol-less URL target
13673 [[File:Foobar.jpg|link=//example.com/]]
13675 <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>
13678 <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>
13682 Escaping non-block captions (T107435)
13685 "modes": ["wt2wt"],
13687 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
13691 [[Image:Foobar.jpg|caption]]
13693 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
13696 # wgExternalLinkTarget not supported by Parsoid
13698 Image with link parameter, wgExternalLinkTarget
13700 [[Image:foobar.jpg|link=http://example.com/]]
13702 wgExternalLinkTarget='foobar'
13704 <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>
13709 Image with link parameter, wgNoFollowLinks set to false
13711 [[Image:foobar.jpg|link=http://example.com/]]
13713 wgNoFollowLinks=false
13715 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13720 Image with link parameter, wgNoFollowDomainExceptions
13722 [[Image:foobar.jpg|link=http://example.com/]]
13724 wgNoFollowDomainExceptions='example.com'
13726 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
13730 # wgExternalLinkTarget not supported by Parsoid
13732 Image with link parameter, wgExternalLinkTarget, unnamed parameter
13734 [[Image:foobar.jpg|link=http://example.com/|Title]]
13736 wgExternalLinkTarget='foobar'
13738 <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>
13743 Image with empty link parameter
13745 [[File:Foobar.jpg|link=]]
13747 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
13750 <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>
13754 Image with link parameter (wiki target) and unnamed parameter
13756 [[File:Foobar.jpg|link=Main_Page|Title]]
13758 <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>
13761 <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>
13765 Image with link parameter (URL target) and unnamed parameter
13767 [[File:Foobar.jpg|link=http://example.com/|Title]]
13769 <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>
13772 <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>
13776 Thumbnail image with link parameter
13779 parsoid=wt2html,wt2wt,html2html
13781 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
13783 <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>
13786 <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>
13790 Manually-specified thumbnail image
13794 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
13796 <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>
13799 <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>
13803 Manually-specified thumbnail image with explicit link to wiki page
13806 parsoid=wt2html,wt2wt,html2html
13808 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
13810 <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>
13813 <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>
13817 Manually-specified thumbnail image with explicit link to url
13820 parsoid=wt2html,wt2wt,html2html
13822 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
13824 <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>
13827 <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>
13831 Manually-specified thumbnail image with explicit no link
13834 parsoid=wt2html,wt2wt,html2html
13836 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
13838 <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>
13841 <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>
13845 Manually-specified thumbnail image with explicit link and alt text
13848 parsoid=wt2html,wt2wt,html2html
13850 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
13852 <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>
13855 <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>
13859 Image with frame and link
13861 parsoid=wt2html,wt2wt,html2html
13863 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
13865 <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>
13868 <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>
13872 Image with frame and link and explicit alt
13874 parsoid=wt2html,wt2wt,html2html
13876 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
13878 <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>
13881 <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>
13885 Image with wiki markup in implicit alt
13887 [[Image:Foobar.jpg|testing '''bold''' in alt]]
13889 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
13891 <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>
13892 </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>
13895 <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>
13897 <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>
13901 Alt image option should handle most kinds of wikitext without barfing
13903 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
13905 <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>
13908 <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>
13911 ###################
13912 # Conflicting image format options.
13913 # First option specified should 'win'.
13914 # All three cases in each test should be identical.
13917 Image with 'frameless' first.
13919 parsoid=wt2html,wt2wt,html2html
13921 [[File:Foobar.jpg|frameless|caption]]
13923 [[File:Foobar.jpg|frameless|frame|caption]]
13925 [[File:Foobar.jpg|frameless|thumb|caption]]
13927 <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>
13928 </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>
13929 </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>
13932 <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>
13933 <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>
13934 <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>
13938 Image with 'frame' first.
13940 parsoid=wt2html,wt2wt,html2html
13942 [[File:Foobar.jpg|frame|caption]]
13943 [[File:Foobar.jpg|frame|frameless|caption]]
13944 [[File:Foobar.jpg|frame|thumb|caption]]
13946 <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>
13947 <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>
13948 <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>
13951 <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>
13952 <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>
13953 <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>
13957 Image with 'thumb' first.
13959 parsoid=wt2html,wt2wt,html2html
13961 [[File:Foobar.jpg|thumb|caption]]
13962 [[File:Foobar.jpg|thumb|frameless|caption]]
13963 [[File:Foobar.jpg|thumb|frame|caption]]
13965 <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>
13966 <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>
13967 <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>
13970 <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>
13971 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
13972 <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>
13975 ###################
13977 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
13978 # and https://phabricator.wikimedia.org/T64258
13979 # Foobar has actual size of 1941x220
13980 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
13981 # a scalable format.
13982 # 2. Framed images always ignore size options; always render at default size.
13983 # 3. "Unspecified format" and border are the only types which can be
13987 Image: "unspecified format" and border enlarge
13989 parsoid=wt2html,wt2wt,html2html
13991 [[File:Foobar.jpg|2000px]]
13993 [[File:Foobar.jpg|border|2000px]]
13995 <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>
13996 </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>
13999 <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>
14000 <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>
14004 Image: "unspecified format" and border reduce
14006 parsoid=wt2html,wt2wt,html2html
14008 [[File:Foobar.jpg|1000px]]
14010 [[File:Foobar.jpg|border|1000px]]
14012 <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>
14013 </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>
14016 <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>
14017 <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>
14021 Image: thumbs reduce
14023 parsoid=wt2html,wt2wt,html2html
14025 [[File:Foobar.jpg|thumb|50px]]
14027 <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>
14030 <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>
14034 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14036 parsoid=wt2html,wt2wt,html2html
14038 [[File:Foobar.jpg|thumb|2000px]]
14040 [[File:Foobar.svg|thumb|2000px]]
14042 <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>
14043 <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>
14046 <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>
14047 <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>
14051 Image: frameless can reduce in size
14053 parsoid=wt2html,wt2wt,html2html
14055 [[File:Foobar.jpg|frameless|50px]]
14057 <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>
14060 <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>
14064 Image: bitmap frameless can't be enlarged past original size, but vector can
14066 parsoid=wt2html,wt2wt,html2html
14068 [[File:Foobar.jpg|frameless|2000px]]
14070 [[File:Foobar.svg|frameless|2000px]]
14072 <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>
14073 </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>
14076 <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>
14077 <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>
14081 Image: framed images are always unscaled.
14083 parsoid=wt2html,wt2wt,html2html
14085 [[File:Foobar.jpg|frame]]
14087 [[File:Foobar.jpg|frame|50px]]
14089 [[File:Foobar.jpg|frame|50x50px]]
14091 [[File:Foobar.jpg|frame|2000px]]
14093 <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>
14094 <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>
14095 <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>
14096 <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>
14099 <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>
14100 <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>
14101 <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>
14102 <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>
14105 ###################
14108 Link to image page- image page normally doesn't exists, hence edit link
14109 Add test with existing image page
14110 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14114 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14119 T20784 Link to non-existent image page with caption should use caption as link text
14121 [[:Image:test|caption]]
14123 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14128 Frameless image caption with a free URL
14130 [[File:Foobar.jpg|http://example.com]]
14132 <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>
14135 <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>
14139 Thumbnail image caption with a free URL
14143 [[File:Foobar.jpg|thumb|http://example.com]]
14145 <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>
14148 <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>
14152 Thumbnail image caption with a free URL and explicit alt
14155 parsoid=wt2html,wt2wt,html2html
14157 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14159 <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>
14162 <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>
14166 SVG thumbnails with no language set
14169 [[File:Foobar.svg|thumb|caption]]
14171 <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>
14174 <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>
14178 SVG thumbnails with language de
14180 parsoid=wt2html,wt2wt,html2html
14182 [[File:Foobar.svg|thumb|caption|lang=de]]
14184 <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>
14187 <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>
14191 SVG thumbnails with invalid language code
14193 parsoid=wt2html,wt2wt,html2html
14195 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
14197 <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>
14200 <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>
14204 T3887: A ISBN with a thumbnail
14206 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
14208 <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>
14211 <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>
14215 T3887: A RFC with a thumbnail
14217 [[File:Foobar.jpg|thumb|This is RFC 12354]]
14219 <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>
14222 <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>
14226 T3887: A mailto link with a thumbnail
14228 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
14230 <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>
14233 <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>
14236 # Pending resolution to T2368
14238 T2648: Frameless image caption with a link
14240 [[File:Foobar.jpg|text with a [[link]] in it]]
14242 <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>
14245 <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>
14249 T2648: Frameless image caption with a link (suffix)
14251 [[File:Foobar.jpg|text with a [[link]]foo in it]]
14253 <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>
14256 <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>
14260 T2648: Frameless image caption with an interwiki link
14262 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
14264 <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>
14267 <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>
14271 T2648: Frameless image caption with a piped interwiki link
14273 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
14275 <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>
14278 <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>
14282 T107474: Frameless image caption with <nowiki>
14284 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
14286 <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>
14290 Escape HTML special chars in image alt text
14292 [[File:Foobar.jpg|& < > "]]
14294 <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>
14297 <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>
14301 Escape HTML special chars in image alt text with LanguageConverter
14305 [[File:Foobar.jpg|& < > "]]
14307 <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>
14310 <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>
14314 Entities in file name and attributes
14316 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
14318 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
14321 <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":"missing-image","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>
14325 T2499: Alt text should have Ӓ, not &1234;
14327 [[File:Foobar.jpg|♀]]
14329 <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>
14332 <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>
14336 Broken image caption with link
14338 parsoid=wt2html,wt2wt,html2html
14340 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
14342 <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.
14345 <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>
14349 Image caption containing another image
14351 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
14353 <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>
14356 <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>
14360 Image: caption containing a newline
14362 [[File:Foobar.jpg|This
14365 <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>
14368 <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>
14372 Image: caption containing leading space
14373 (The leading space should not trigger nowiki escaping in wt2wt mode)
14375 [[File:Foobar.jpg|thumb| bar]]
14377 <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>
14380 <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>
14384 Image: caption containing a table
14386 parsoid=wt2html,wt2wt,html2html
14388 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
14394 and some more text.]]
14396 <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>
14399 <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
14402 <tr><th>Foo </th><th>Bar</th></tr>
14405 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
14409 T5090: External links other than http: in image captions
14411 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
14413 <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>
14416 <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>
14422 parsoid=wt2html,wt2wt,html2html
14424 [[Image:foobar.jpg|a|class=b]]
14426 <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>
14429 <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>
14433 Localized image handling (1).
14435 parsoid=wt2html,wt2wt,html2html
14438 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
14440 <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>
14443 <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>
14447 Localized image handling (2).
14450 parsoid=wt2html,wt2wt,html2html
14453 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
14455 <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>
14458 <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>
14462 Localized image handling (3).
14467 <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>
14469 [[File:Foobar.jpg|بندانگشتی]]
14473 "border", "frameless" and "class" attributes on an image.
14476 parsoid=wt2html,wt2wt,html2html
14478 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
14480 <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>
14483 <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>
14486 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
14488 Invalid image attributes (T64500)
14491 parsoid=wt2html,wt2wt,html2html
14493 [[File:Foobar.jpg|thumb|float|left|caption]]
14495 [[File:Foobar.jpg|thumb|righ|caption]]
14497 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
14499 <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>
14500 <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>
14501 <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>
14504 <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>
14505 <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>
14506 <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>
14512 #REDIRECT [[File:Barfoo.jpg]]
14515 # FIXME: Parsoid should run this test -- but we'd need to teach the
14516 # mockAPI about the redirected Barfoo.jpg image.
14520 [[Image:Barfoo.jpg]]
14522 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
14527 Missing image with uploads disabled
14531 [[File:Foobaz.jpg]]
14533 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
14536 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Foobaz.jpg"><img resource="./File:Foobaz.jpg" src="./Special:FilePath/Foobaz.jpg" height="220" width="220"/></a></span></p>
14539 # Parsoid-specific testing for images
14540 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14541 # Currently imperfect due to a flaw in the Parsoid testrunner
14543 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
14547 Parsoid-specific image handling - simple image with size and middle alignment
14549 [[File:Foobar.jpg|middle|50px]]
14551 <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>
14555 Parsoid-specific image handling - simple image with size, middle alignment,
14556 non-standard namespace alias
14558 parsoid=wt2wt,wt2html,html2html
14560 [[Image:Foobar.jpg|middle|50px]]
14562 <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>
14566 Parsoid-specific image handling - simple image with size and middle alignment
14569 [[File:Foobar.jpg|50px|middle]]
14571 <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>
14575 Parsoid-specific image handling - simple image with size and middle alignment
14576 and non-standard namespace name
14578 parsoid=wt2html,wt2wt,html2html
14580 [[Image:Foobar.jpg|50px|middle]]
14582 <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>
14586 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
14588 [[File:Foobar.jpg|500x10px|baseline|caption]]
14590 <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>
14594 Parsoid-specific image handling - simple image with border and size spec
14596 [[File:Foobar.jpg|50px|border|caption]]
14598 <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>
14602 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14604 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
14606 <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>
14610 Parsoid-specific image handling - thumbnail with halign, valign, and caption
14613 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
14615 <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>
14619 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
14621 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
14623 <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>
14627 Parsoid-specific image handling - thumbnail with specific size, halign,
14628 valign, and caption (existing content)
14630 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
14632 <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>
14636 Parsoid-specific image handling - framed image with specific size and caption
14639 parsoid=wt2html,wt2wt,html2html
14641 [[File:Foobar.jpg|frame|500x50px|caption]]
14643 <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>
14647 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
14650 parsoid=wt2html,wt2wt,html2html
14652 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
14654 <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>
14658 Parsoid-specific image handling - frameless image with specific size, border, and caption
14660 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
14662 <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>
14666 Parsoid-specific image handling - simple image with a formatted caption
14668 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
14670 <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>
14674 Parsoid-specific image handling - caption with a template in it
14676 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
14678 <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>
14682 Parsoid-specific image handling - caption with unbalanced tags in it
14684 parsoid=wt2html,wt2wt,html2html
14687 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
14691 <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>
14696 Parsoid-specific image handling - empty caption (1)
14698 parsoid=wt2html,wt2wt
14700 [[File:Foobar.jpg|thumb|]]
14702 <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>
14705 # empty captions don't get serialized unless we're in the "round trip" case
14707 Parsoid-specific image handling - empty caption (2)
14711 <figure class="mw-default-size" typeof="mw:Image/Thumb">
14712 <a href="./File:Foobar.jpg">
14713 <img resource="./File:Foobar.jpg"
14714 src="//example.com/images/3/3a/Foobar.jpg"
14715 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
14716 height="25" width="220"/>
14718 <figcaption></figcaption>
14721 [[File:Foobar.jpg|thumb]]
14725 Parsoid-specific image handling - whitespace caption
14727 [[File:Foobar.jpg|thumb| ]]
14729 <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>
14733 Parsoid-specific image handling - lang option
14736 [[File:Foobar.svg|lang=de|caption]]
14740 <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>
14744 ## Edge case bugs in Parsoid from T93580
14746 T93580: 1. Templated <ref> inside block images
14748 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
14752 <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>
14754 <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>
14758 T93580: 2. <ref> inside inline images
14760 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
14764 <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>
14766 <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>
14770 T93580: 3. Templated <ref> inside inline images
14772 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
14776 <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>
14778 <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>
14785 Subpage test/subpage
14793 subpage title=[[Subpage test]]
14797 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
14802 Subpage noslash link
14804 subpage title=[[Subpage test]]
14808 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
14813 Subpage test/1/2/subpage
14819 Relative subpage noslash link
14821 parsoid=wt2wt,wt2html,html2html
14822 subpage title=[[Subpage test/1/2/3/4]]
14828 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
14829 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
14832 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
14833 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
14837 Parsoid: dot-slash prefixed wikilinks
14847 </p><p>[[././baz/]]
14852 </p><p>[[././baz/]]
14857 Render invalid page names as plain text (T53090)
14870 [[{{echo|./../foo}}|bar]]
14871 [[{{echo|foo/.}}|bar]]
14872 [[{{echo|foo/..}}|bar]]
14873 [[{{echo|foo~~~~bar}}]]
14874 [[{{echo|foo>bar}}]]
14875 [[{{echo|foo././bar}}]]
14876 [[{{echo|foo{bar}}]]
14877 [[{{echo|foo}bar}}]]
14878 [[{{echo|foo[bar}}]]
14879 [[{{echo|foo]bar}}]]
14880 [[{{echo|foo<bar}}]]
14882 <p>[[./../foo|bar]]
14892 </p><p>[[./../foo|bar]]
14905 <p>[[./../foo|bar]]
14916 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
14917 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
14918 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
14919 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
14920 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
14921 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
14922 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
14923 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
14924 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
14925 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
14926 [[<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>
14934 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
14939 T2561: {{/Subpage}}
14941 subpage title=[[Page]]
14945 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
14953 Category:MediaWiki User's Guide
14961 [[:Category:MediaWiki User's Guide]]
14963 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
14972 [[Category:MediaWiki User's Guide]]
14974 cat=MediaWiki_User's_Guide sort=
14976 <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"}}'/>
14980 PAGESINCATEGORY invalid title fatal (r33546 fix)
14982 {{PAGESINCATEGORY:<bogus>}}
14989 Category with different sort key
14993 [[Category:MediaWiki User's Guide|Foo]]
14995 cat=MediaWiki_User's_Guide sort=Foo
14997 <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"}}'/>
15001 Category with identical sort key
15005 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15007 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15009 <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"}}'/>
15013 Category with empty sort key
15018 [[Category:MediaWiki User's Guide|]]
15020 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15024 Category with empty sort key and parentheses
15029 [[Category:Foo (bar)|]]
15031 [[Category:Foo (bar)|Foo]]
15035 Category with link tail
15040 123[[Category:Foo]]456
15042 123[[Category:Foo]]456
15046 Category with template
15051 [[Category:{{echo|Foo}}]]
15053 [[Category:{{echo|Foo}}]]
15057 Category with template in sort key
15062 [[Category:Foo|{{echo|Bar}}]]
15064 [[Category:Foo|{{echo|Bar}}]]
15068 Category with template in sort key and title
15073 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15075 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15078 ## We used to, but no longer wt2wt this test since the default serializer
15079 ## will normalize all categories to serialize on their own line.
15080 ## This wikitext usage is going to be fairly uncommon in production and
15081 ## selser will take care of preserving formatting in those scenarios.
15083 Category / paragraph interactions
15087 Foo [[Category:Baz]] Bar
15089 Foo [[Category:Baz]]
15097 [[Category:Baz]] Bar
15110 {{echo|[[Category:Baz]]}}
15123 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15124 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15125 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15126 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15127 <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>
15128 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15131 ## We used to, but no longer wt2wt this test since the default serializer
15132 ## will normalize all categories to serialize on their own line.
15133 ## This wikitext usage is going to be fairly uncommon in production and
15134 ## selser will take care of preserving formatting in those scenarios.
15136 ## The whitespace on the empty line is part of the test. Please do not delete
15138 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15144 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15146 {{echo|[[Category:Foo]] and so should this!}}
15148 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15153 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15155 <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>
15158 ## Parsoid will not try to wt2wt this while preserving newlines because
15159 ## it suppresses excess newlines within list items -- and we don't want to
15160 ## introduce a special case just for categories, which is, in reality somewhat
15161 ## odd behavior -- categories are unlikely to be used in list items like this
15162 ## in top-level pages and are only likely to show up in template-generated
15163 ## list items where this RT-ing is a non-issue.
15165 ## The whitespace on the empty line is part of the test. Please do not delete
15167 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15173 [[Category:Foo]] and this should be part of the same list item
15176 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15178 <ul><li>This and this should be part of the same list item</li>
15179 <li>So should this and this should be part of the same list item</li></ul>
15182 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
15183 <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>
15187 ## Newlines and categories that follow the last item of a list
15188 ## are treated differently because this (list followed by categories)
15189 ## is an extremely common pattern on wikis.
15191 3. Categories and newlines: newline suppression for last list item should RT properly
15204 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15206 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15207 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15211 4. Categories and newlines: newline suppression for last list item should RT properly
15219 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
15221 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15224 ## only wt2html for this to make sure the algo only applies to the rightmost path
15226 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
15239 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
15241 <ul><li> d</li></ul></li></ul>
15242 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
15245 ## We used to, but no longer wt2wt this test since the default serializer
15246 ## will normalize all categories to serialize on their own line.
15247 ## This wikitext usage is going to be fairly uncommon in production and
15248 ## selser will take care of preserving formatting in those scenarios.
15250 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
15254 * a [[Category:Foo]]
15256 <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>
15259 # This test also demonstrates because of newline+category tunneling
15260 # through the list hander, template wrapping doesn't expand to the
15261 # containing list when the list item swallows the category.
15263 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
15268 <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
15269 </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>
15273 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
15277 {{echo|[[Category:Foo]]
15281 <ul><li> a</li></ul>
15283 <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">
15284 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
15285 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
15289 Category links with multiple namespaces
15291 [[Category:Project:Foo]]
15293 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
15297 Parsoid: Serialize link to category page with colon escape
15303 [[:Category:Foo|Bar]]
15306 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
15307 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
15311 # We used to, but no longer wt2wt this test since the default serializer
15312 # will normalize all categories to serialize on their own line.
15313 # This wikitext usage is going to be fairly uncommon in production and
15314 # selser will take care of preventing whitespace insertion if this
15315 # occurs in an article.
15317 # html2html disabled for the same reason (whitespace insertion between
15320 # html2wt disabled because it localizes the "Category" namespace.
15322 Link prefix/suffixes aren't applied to category links
15332 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
15336 Parsoid: Serialize link to file page with colon escape
15342 [[:File:Foo.png|Bar]]
15345 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
15346 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
15351 Parsoid: Serialize a genuine category link without colon escape
15356 [[Category:Foo|Bar]]
15358 <link rel="mw:PageProp/Category" href="./Category:Foo">
15359 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
15363 Normalize hrefs properly before testing for invalid link targets (T72894)
15367 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
15369 [[Category:Toxine bactérienne]]
15373 Parsoid: Defaultsort
15375 {{DEFAULTSORT:Foo}}
15377 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
15381 Parsoid: Defaultsort (template-generated)
15383 {{{{echo|DEFAULTSORT}}:Foo}}
15385 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|DEFAULTSORT}}:Foo"},"params":{},"i":0}}]}'/>
15389 ### Inter-language links
15392 Interlanguage links
15400 es:Alimento fr:Nourriture zh:食品
15402 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
15403 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
15404 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
15408 Duplicate interlanguage links (T26502)
15419 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
15420 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
15421 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
15422 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
15429 Basic section headings
15436 ===Smaller headline===
15439 <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>
15442 <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>
15445 <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>
15451 Section headings with TOC
15454 === Subheadline 1 ===
15455 ===== Skipping a level =====
15456 ====== Skipping a level ======
15460 ===Another headline===
15462 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15464 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
15466 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
15468 <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>
15470 <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>
15477 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
15479 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
15485 <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>
15486 <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>
15487 <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>
15488 <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>
15489 <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>
15492 <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>
15497 TOC anchors don't collide
15505 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15507 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
15508 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
15509 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
15510 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
15514 <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>
15515 <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>
15516 <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>
15517 <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>
15521 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
15523 Handling of sections up to level 6 and beyond
15526 == Level 2 Heading==
15527 === Level 3 Heading===
15528 ==== Level 4 Heading====
15529 ===== Level 5 Heading=====
15530 ====== Level 6 Heading======
15531 ======= Level 7 Heading=======
15532 ======== Level 8 Heading========
15533 ========= Level 9 Heading=========
15534 ========== Level 10 Heading==========
15536 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15538 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
15540 <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>
15542 <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>
15544 <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>
15546 <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>
15548 <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>
15549 <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>
15550 <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>
15551 <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>
15552 <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>
15566 <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>
15567 <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>
15568 <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>
15569 <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>
15570 <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>
15571 <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>
15572 <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>
15573 <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>
15574 <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>
15575 <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>
15580 TOC regression (T11764)
15584 ==== title 1.1.1 ====
15589 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15591 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15593 <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>
15595 <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>
15598 <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>
15601 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15603 <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>
15609 <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>
15610 <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>
15611 <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>
15612 <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>
15613 <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>
15614 <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>
15619 TOC for heading containing <span id="..."></span> (T96153)
15622 ==<span id="old-anchor"></span>New title==
15624 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15626 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
15630 <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>
15635 TOC with wgMaxTocLevel=3 (T8204)
15641 ==== title 1.1.1 ====
15646 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15648 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15650 <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>
15651 <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>
15654 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
15656 <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>
15662 <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>
15663 <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>
15664 <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>
15665 <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>
15666 <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>
15667 <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>
15672 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
15678 ====Section 1.1.1====
15679 ====Section 1.1.1.1====
15682 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15684 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
15686 <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>
15689 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
15693 <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>
15694 <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>
15695 <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>
15696 <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>
15697 <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>
15703 Resolving duplicate section names
15708 <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>
15709 <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>
15714 Resolving duplicate section names with differing case (T12721)
15719 <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>
15720 <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>
15732 Template with sections, __NOTOC__
15739 <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>
15740 <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>
15741 <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>
15742 <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>
15747 __NOEDITSECTION__ keyword
15753 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
15754 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
15759 Link inside a section heading
15761 ==Section with a [[Main Page|link]] in it==
15763 <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>
15768 TOC regression (T14077)
15775 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15777 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
15779 <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>
15782 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
15786 <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>
15787 <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>
15788 <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>
15793 T3219 URL next to image (good)
15795 http://example.com [[File:Foobar.jpg]]
15797 <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>
15800 <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>
15804 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
15807 The line above must have a trailing space!
15810 But just in case it doesn't...
15812 <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>
15813 <p>The line above must have a trailing space!
15815 <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>
15816 <p>But just in case it doesn't...
15821 Header with special characters (T27462)
15823 The tooltips shall not show entities to the user (ie. be double escaped)
15840 <p>The tooltips shall not show entities to the user (ie. be double escaped)
15842 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15844 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
15845 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
15846 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
15847 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
15848 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
15852 <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>
15855 <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>
15858 <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>
15861 <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>
15864 <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>
15870 Header with space, plus and underscore as entity
15872 Id should not contain + for spaces
15874 == Space between Text ==
15877 == Space-Entity between Text ==
15880 == Plus+between+Text ==
15883 == Plus-Entity+between+Text ==
15886 == Underscore_between_Text ==
15889 == Underscore-Entity_between_Text ==
15892 [[#Space between Text]]
15893 [[#Space-Entity between Text]]
15894 [[#Plus+between+Text]]
15895 [[#Plus-Entity+between+Text]]
15896 [[#Underscore_between_Text]]
15897 [[#Underscore-Entity_between_Text]]
15899 <p>Id should not contain + for spaces
15901 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15903 <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>
15904 <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>
15905 <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>
15906 <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>
15907 <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>
15908 <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>
15912 <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>
15915 <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>
15918 <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>
15921 <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>
15924 <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>
15927 <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>
15929 </p><p><a href="#Space_between_Text">#Space between Text</a>
15930 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
15931 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
15932 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
15933 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
15934 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
15939 Headers with excess '=' characters
15940 (Are similar tests necessary beyond the 1st level?)
15944 =''italic'' heading==
15945 ==''italic'' heading=
15947 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15949 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
15950 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
15951 <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>
15952 <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>
15956 <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>
15957 <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>
15958 <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>
15959 <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>
15964 HTML headers vs TOC (T25393)
15965 (__NOEDITSECTION__ for clearer output, doesn't matter here)
15977 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
15979 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
15981 <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>
15982 <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>
15985 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
15987 <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>
15988 <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>
15994 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
15995 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
15996 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
15997 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
15998 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
15999 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
16004 Single-line or multiline-comments can follow headings
16006 parsoid=wt2html,wt2wt
16014 <h2><span class="mw-headline" id="foo">foo</span></h2>
16015 <h2><span class="mw-headline" id="bar">bar</span></h2>
16016 <h2><span class="mw-headline" id="baz">baz</span></h2>
16021 T3219 URL next to image (broken)
16023 http://example.com[[File:Foobar.jpg]]
16025 <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>
16028 <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>
16032 T3186 news: in the middle of text
16034 http://en.wikinews.org/wiki/Wikinews:Workplace
16036 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
16042 Namespaced link must have a title
16051 Namespaced link must have a title (bad fragment version)
16053 [[Project:#fragment]]
16055 <p>[[Project:#fragment]]
16061 ### HTML tags and HTML attributes
16065 div with no attributes
16067 <div>HTML rocks</div>
16069 <div>HTML rocks</div>
16074 div with double-quoted attribute
16076 <div id="rock">HTML rocks</div>
16078 <div id="rock">HTML rocks</div>
16083 div with single-quoted attribute
16085 <div id='rock'>HTML rocks</div>
16087 <div id="rock">HTML rocks</div>
16092 div with unquoted attribute
16094 <div id=rock>HTML rocks</div>
16096 <div id="rock">HTML rocks</div>
16101 div with illegal double attributes
16103 <div id="a" id="b">HTML rocks</div>
16105 <div id="b">HTML rocks</div>
16110 div with empty attribute value, space before equals
16112 parsoid=wt2html,html2html
16114 <div class =>HTML rocks</div>
16116 <div class="">HTML rocks</div>
16119 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16123 div with multiple empty attribute values
16125 parsoid=wt2html,html2html
16127 <div id= title=>HTML rocks</div>
16129 <div id="title.3D">HTML rocks</div>
16132 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16136 table with multiple empty attribute values
16138 parsoid=wt2html,html2html
16144 <table title="id=">
16150 <table title="id=">
16151 <tbody><tr><td> hi</td></tr>
16156 div with braces in attribute value
16158 <div title="{}">Foo</div>
16160 <div title="{}">Foo</div>
16163 <div title="{}">Foo</div>
16167 div with empty attribute value, no space before equals
16169 parsoid=wt2html,html2html
16171 <div class=>HTML rocks</div>
16173 <div class="">HTML rocks</div>
16176 <div class="">HTML rocks</div>
16180 HTML multiple attributes correction
16182 <p class="error" class="awesome">Awesome!</p>
16184 <p class="awesome">Awesome!</p>
16189 Table multiple attributes correction
16192 !+ class="error" class="awesome"| status
16197 <th class="awesome"> status
16205 <DIV ID="x">HTML ROCKS</DIV>
16207 <div id="x">HTML ROCKS</div>
16212 Non-ASCII pseudo-tags are rendered as text
16221 Pseudo-tag with URL 'name' renders as url link
16223 <http://example.com/>
16225 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
16230 text with amp in the middle of nowhere
16234 <p>Remember AT&T?
16239 text with character entity: eacute
16241 I always thought é was a cute letter.
16243 <p>I always thought é was a cute letter.
16246 <p>I always thought é was a cute letter.</p>
16250 text with entity-escaped character entity-like string: eacute
16252 I always thought &eacute; was a cute letter.
16254 <p>I always thought &eacute; was a cute letter.
16259 text with undefined character entity: xacute
16261 I always thought &xacute; was a cute letter.
16263 <p>I always thought &xacute; was a cute letter.
16270 <data value="5">five</data>
16271 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16272 <mark>This highlighted text</mark>
16274 <p><data value="5">five</data>
16275 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
16276 <mark>This highlighted text</mark>
16281 HTML tag with leading space is parsed as text
16285 <p>< div>foo< /div>
16290 ### Nesting tests (see T43545, T52604, T53081)
16293 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
16294 # Note that html2wt is considerably more difficult if we use <b> in
16295 # the test case, instead of <small>
16297 Ensure that HTML adoption agency algorithm is properly implemented.
16299 <small>X<small>Y</small>Z</small>
16301 <p><small>X<small>Y</small>Z</small>
16305 # This was T43545 in the PHP parser.
16306 # Note that tidy doesn't handle this correctly.
16310 <kbd>X<kbd>Y</kbd>Z</kbd>
16312 <p><kbd>X<kbd>Y</kbd>Z</kbd>
16316 # The following cases were T53081 in the PHP parser.
16317 # Note that there are some other nestable tags (b, i, etc) which are
16318 # not covered; see T53081 for discussion.
16320 # Note that tidy doesn't handle this correctly.
16324 <em>X<em>Y</em>Z</em>
16326 <p><em>X<em>Y</em>Z</em>
16330 # Note that tidy doesn't handle this correctly.
16332 Nesting of <strong>
16334 <strong>X<strong>Y</strong>Z</strong>
16336 <p><strong>X<strong>Y</strong>Z</strong>
16345 <p><q>X<q>Y</q>Z</q></p>
16348 # Note that tidy doesn't handle this correctly.
16352 <ruby>X<ruby>Y</ruby>Z</ruby>
16354 <p><ruby>X<ruby>Y</ruby>Z</ruby>
16358 # Note that tidy doesn't handle this correctly.
16362 <bdo>X<bdo>Y</bdo>Z</bdo>
16364 <p><bdo>X<bdo>Y</bdo>Z</bdo>
16376 [[Media:Foobar.jpg]]
16378 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
16383 Media link with text
16385 [[Media:Foobar.jpg|A neat file to look at]]
16387 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
16391 # FIXME: this is still bad HTML tag nesting
16392 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
16394 Media link with nasty text
16396 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
16398 <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>
16401 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
16402 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
16406 Media link to nonexistent file (T3702)
16408 [[Media:No such.jpg]]
16410 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
16415 Image link to nonexistent file (T3850 - good)
16417 [[File:No_such.jpg]]
16419 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
16422 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:No_such.jpg"><img resource="./File:No_such.jpg" src="./Special:FilePath/No_such.jpg" height="220" width="220"/></a></span></p>
16426 :Image link to nonexistent file (T3850 - bad)
16428 [[:Image:No such.jpg]]
16430 <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>
16433 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
16439 Character reference normalization in link text (T3938)
16441 [[Main Page|this&that]]
16443 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
16450 Test for unicode normalization
16452 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
16456 (T21451) Links should refer to the normalized form.
16464 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16465 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16466 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16467 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16468 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
16473 Empty attribute crash test (T4067)
16475 <font color="">foo</font>
16477 <p><font color="">foo</font>
16482 Empty attribute crash test single-quotes (T4067)
16484 <font color=''>foo</font>
16486 <p><font color="">foo</font>
16491 Attribute test: equals, then nothing
16493 parsoid=wt2html,html2html
16495 <font color=>foo</font>
16497 <p><font color="">foo</font>
16500 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
16504 Attribute test: unquoted value
16506 parsoid=wt2html,html2html
16508 <font color=x>foo</font>
16510 <p><font color="x">foo</font>
16513 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
16517 Attribute test: unquoted but illegal value (hash)
16519 <font color=#x>foo</font>
16521 <p><font color="#x">foo</font>
16525 # Parsoid does not serialize to empty attribute syntax,
16526 # so wt2wt and html2wt cases are skipped
16528 Attribute test: no value (T54330)
16530 parsoid=wt2html,html2html
16532 <font color>foo</font>
16534 <p><font color="">foo</font>
16537 <p><font color="">foo</font></p>
16541 T4095: link with three closing brackets
16545 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
16548 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
16552 T4095: link with pipe and three closing brackets
16554 [[Main Page|link]]]
16556 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
16559 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
16563 T4095: link with pipe and three closing brackets, version 2
16565 [[Main Page|[http://example.com/]]]
16567 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
16570 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
16579 Template:Dangerous attribute
16581 " onmouseover="alert(document.cookie)
16585 Template:Dangerous style attribute
16587 border-size: expression(alert(document.cookie))
16593 <div style="float: right; {{{1}}}">Magic div</div>
16597 T4304: HTML attribute safety (safe template; regression T4309)
16599 <div title="{{test}}"></div>
16601 <div title="This is a test template"></div>
16604 <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>
16607 # Parsoid has enough context to handle this case
16609 T4304: HTML attribute safety (dangerous template; 2309)
16611 <div title="{{dangerous attribute}}"></div>
16613 <div title=""></div>
16616 <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>
16620 T4304: HTML attribute safety (dangerous style template; 2309)
16622 <div style="{{dangerous style attribute}}"></div>
16624 <div style="/* insecure input */"></div>
16627 <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>
16631 T4304: HTML attribute safety (safe parameter; 2309)
16633 {{div style|width: 200px}}
16635 <div style="float: right; width: 200px">Magic div</div>
16638 <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>
16642 T4304: HTML attribute safety (unsafe parameter; 2309)
16644 {{div style|width: expression(alert(document.cookie))}}
16646 <div style="/* insecure input */">Magic div</div>
16649 <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>
16652 ## Parsoid output here differs; needs investigation.
16654 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
16656 {{div style|"><script>alert(document.cookie)</script>}}
16658 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16662 ## Parsoid output here differs; needs investigation.
16664 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
16666 {{div style|" ><script>alert(document.cookie)</script>}}
16668 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
16673 T4304: HTML attribute safety (link)
16675 <div title="[[Main Page]]"></div>
16677 <div title="[[Main Page]]"></div>
16682 T4304: HTML attribute safety (italics)
16684 <div title="''foobar''"></div>
16686 <div title="''foobar''"></div>
16691 T4304: HTML attribute safety (bold)
16693 <div title="'''foobar'''"></div>
16695 <div title="'''foobar'''"></div>
16700 T4304: HTML attribute safety (ISBN)
16702 <div title="ISBN 1234567890"></div>
16704 <div title="ISBN 1234567890"></div>
16709 T4304: HTML attribute safety (RFC)
16711 <div title="RFC 1234"></div>
16713 <div title="RFC 1234"></div>
16718 T4304: HTML attribute safety (PMID)
16720 <div title="PMID 1234567890"></div>
16722 <div title="PMID 1234567890"></div>
16727 T4304: HTML attribute safety (web link)
16729 <div title="http://example.com/"></div>
16731 <div title="http://example.com/"></div>
16736 T4304: HTML attribute safety (named web link)
16738 <div title="[http://example.com/ link]"></div>
16740 <div title="[http://example.com/ link]"></div>
16745 T5244: HTML attribute safety (extension; safe)
16747 <div style="<nowiki>background:blue</nowiki>"></div>
16749 <div style="background:blue"></div>
16752 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
16756 T5244: HTML attribute safety (extension; unsafe)
16758 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
16760 <div style="/* insecure input */"></div>
16763 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
16766 # More MSIE fun discovered by Tom Gilder
16769 MSIE CSS safety test: spurious slash
16771 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
16773 <div style="/* insecure input */">evil</div>
16776 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
16780 MSIE CSS safety test: hex code
16782 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
16784 <div style="/* insecure input */">evil</div>
16787 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
16791 MSIE CSS safety test: comment in url
16793 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
16795 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
16798 <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>
16802 MSIE CSS safety test: comment in expression
16804 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
16806 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
16809 <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>
16813 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
16815 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
16817 <p style="/* invalid control char */">A</p>
16820 <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>
16824 MSIE 6 CSS safety test: Fullwidth (T57332)
16826 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
16827 <div style="top:EXPRESSION(alert())">B</div>
16829 <p style="/* insecure input */">A</p>
16830 <div style="/* insecure input */">B</div>
16833 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
16834 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
16838 MSIE 6 CSS safety test: IPA extensions (T57332)
16840 <div style="background-image:uʀʟ(javascript:alert())">A</div>
16841 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
16843 <div style="/* insecure input */">A</div>
16844 <p style="/* insecure input */">B</p>
16847 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
16848 <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>
16852 MSIE 6 CSS safety test: sup/sub script (T57332)
16854 <div style="background-image:url⁽javascript:alert())">A</div>
16855 <div style="background-image:url₍javascript:alert())">B</div>
16856 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
16858 <div style="/* insecure input */">A</div>
16859 <div style="/* insecure input */">B</div>
16860 <p style="/* insecure input */">C</p>
16863 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
16864 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
16865 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
16871 parsoid=wt2html,html2html
16874 title="data:text/html,<img src=1 onerror=alert(1)>"
16875 style="-o-link:attr(title);-o-link-source:current">X</div>
16877 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
16880 <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>
16884 MSIE 6 CSS safety test: Repetition markers (T57332)
16886 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
16887 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
16888 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
16889 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
16890 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
16891 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
16892 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
16894 <p style="/* insecure input */">A</p>
16895 <p style="/* insecure input */">B</p>
16896 <p style="/* insecure input */">C</p>
16897 <p style="/* insecure input */">D</p>
16898 <p style="/* insecure input */">E</p>
16899 <p style="/* insecure input */">F</p>
16900 <p style="/* insecure input */">G</p>
16903 <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>
16904 <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>
16905 <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>
16906 <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>
16907 <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>
16908 <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>
16909 <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>
16913 Table attribute legitimate extension
16916 !+ style="<nowiki>color:blue</nowiki>"| status
16921 <th style="color:blue"> status
16927 Table attribute safety
16930 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
16935 <th style="/* insecure input */"> status
16941 CSS line continuation 1
16943 <div style="background-image: u\ rl(test.jpg);"></div>
16945 <div style="/* insecure input */"></div>
16950 CSS line continuation 2
16952 <div style="background-image: u\ rl(test.jpg); "></div>
16954 <div style="/* invalid control char */"></div>
16965 Expansion of multi-line templates in attribute values (T8255)
16967 <div style="background: {{identity|#00FF00}}">-</div>
16969 <div style="background: #00FF00">-</div>
16974 Expansion of multi-line templates in attribute values (T8255 sanity check)
16976 <div style="background:
16979 <div style="background: #00FF00">-</div>
16982 <div style="background:
16987 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
16989 <div style="background: #00FF00">-</div>
16991 <div style="background: #00FF00">-</div>
16996 Tags which are hidden from Tidy cannot pass through the Sanitizer
16998 <mw:toc><script>alert();</script></mw:toc>
17000 <p><mw:toc><script>alert();</script></mw:toc></p>
17004 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
17008 Parser hook: empty input
17019 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17022 ## Don't expect parsoid to rt this form.
17024 Parser hook: empty input using terminated empty elements
17026 parsoid=wt2html,html2html
17037 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17041 Parser hook: empty input using terminated empty elements (space before)
17052 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17056 Parser hook: basic input
17067 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17070 ## Don't expect parsoid to rt this form.
17072 Parser hook: case insensitive
17074 parsoid=wt2html,html2html
17085 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17088 ## Don't expect parsoid to rt this form.
17090 Parser hook: case insensitive, redux
17092 parsoid=wt2html,html2html
17103 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17107 Parser hook: nested tags
17109 <tag><tag></tag></tag>
17118 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
17122 Parser hook: basic arguments
17124 <tag width="200" height="100" depth="50" square=""></tag>
17137 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17140 ## Don't expect parsoid to rt this form.
17142 Parser hook: basic arguments, variations
17144 parsoid=wt2html,html2html
17146 <tag width=200 height = "100" depth = '50' square></tag>
17159 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17163 Parser hook: argument containing a forward slash (T7344)
17165 <tag filename="/tmp/bla"></tag>
17170 'filename' => '/tmp/bla',
17175 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17178 ## Don't expect parsoid to rt this form.
17180 Parser hook: empty input using terminated empty elements (T4374)
17182 parsoid=wt2html,html2html
17194 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
17197 ## </tag> should be output literally since there is no matching tag that begins it
17198 ## Don't expect parsoid to rt this form.
17200 Parser hook: basic arguments using terminated empty elements (T4374)
17204 <tag width=200 height = "100" depth = '50' square/>
17221 <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
17225 ## Don't expect parsoid to rt this form.
17227 Parser hook: Don't allow unclosed extension tags
17233 this is a '''test'''
17235 <p>test <tag>123
17236 </p><p>this is a <b>test</b>
17239 <p>test <tag>123</p>
17241 <p>this is a <b>test</b></p>
17245 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
17249 Parser hook: static parser hook not inside a comment
17251 <statictag>hello, world</statictag>
17253 <statictag action="flush" />
17259 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
17260 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
17264 Parser hook: static parser hook inside a comment
17266 <!-- <statictag>hello, world</statictag> -->
17267 <statictag action="flush" />
17272 <!-- <statictag>hello, world</statictag> -->
17273 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
17276 # Nested template calls; this case was broken by Parser.php rev 1.506,
17280 Template:One-parameter
17282 (My parameter is: {{{1}}})
17286 Template:Map-one-parameter
17288 {{{{{1}}}|{{{2}}}}}
17292 Nested template calls
17294 {{Map-one-parameter|One-parameter|param}}
17296 <p>(My parameter is: param)
17305 # HTML+Tidy effectively strips out the empty tags completely
17306 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
17307 # which Tidy would have done for the PHP parser had there been content inside it.
17309 Sanitizer: Closing of open tags
17311 <s></s><table></table>
17313 <s></s><table></table>
17316 <p><s></s></p><table></table>
17320 Sanitizer: Closing of open but not closed tags
17329 Sanitizer: Closing of closed but not open tags
17339 Sanitizer: Closing of closed but not open table tags
17343 Table not started</td></tr></table>
17345 <p>Table not started</p>
17347 <p>Table not started</p>
17351 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
17353 <span id="æ: v">byte</span>[[#æ: v|backlink]]
17355 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
17358 <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>
17361 # In HTML5, the restrictions are that id must contain at least one character,
17362 # and must not contain any space characters.
17364 Sanitizer: Validating the contents of the id attribute (T6515)
17368 <br id="" /><br id="a space" />
17373 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
17375 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
17379 <br id="foo" /><br id="foo" />
17381 Something need to be done. foo-2 ?
17385 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
17388 <meta itemprop="hello" content="world">
17389 <meta http-equiv="refresh" content="5">
17390 <meta itemprop="hello" http-equiv="refresh" content="5">
17391 <link itemprop="hello" href="{{SERVER}}">
17392 <link rel="stylesheet" href="{{SERVER}}">
17393 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
17397 <p> <meta itemprop="hello" content="world" />
17398 <meta http-equiv="refresh" content="5">
17399 <meta itemprop="hello" content="5" />
17401 <link itemprop="hello" href="http://example.org" />
17402 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
17403 <link itemprop="hello" href="http://example.org" />
17409 Language converter: output gets cut off unexpectedly (T7757)
17413 this bit is safe: }-
17415 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
17417 then we get cut off here: }-
17419 all additional text is vanished
17421 <p>this bit is safe: }-
17422 </p><p>but if we add a conversion instance: xxx
17423 </p><p>then we get cut off here: }-
17424 </p><p>all additional text is vanished
17429 Self closed html pairs (T7487)
17432 <center><font id="bug" />Centered text</center>
17433 <div><font id="bug2" />In div text</div>
17435 <center><font id="bug" />Centered text</center>
17436 <div><font id="bug2" />In div text</div>
17445 Punctuation: nbsp before exclamation
17449 <p>C'est grave !
17454 Punctuation: CSS !important (T13874)
17456 <div style="width:50% !important">important</div>
17458 <div style="width:50% !important">important</div>
17463 Punctuation: CSS ! important (T13874; with space after)
17465 <div style="width:50% ! important">important</div>
17467 <div style="width:50% ! important">important</div>
17472 HTML bullet list, closed tags (T7497)
17485 <ul data-parsoid='{"stx":"html"}'>
17486 <li data-parsoid='{"stx":"html"}'>One</li>
17487 <li data-parsoid='{"stx":"html"}'>Two</li>
17493 HTML bullet list, unclosed tags (T7497)
17505 <ul data-parsoid='{"stx":"html"}'>
17506 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17507 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17513 HTML ordered list, closed tags (T7497)
17526 <ol data-parsoid='{"stx":"html"}'>
17527 <li data-parsoid='{"stx":"html"}'>One</li>
17528 <li data-parsoid='{"stx":"html"}'>Two</li>
17534 HTML ordered list, unclosed tags (T7497)
17547 <ol data-parsoid='{"stx":"html"}'>
17548 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
17549 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
17555 HTML nested bullet list, closed tags (T7497)
17578 <ul data-parsoid='{"stx":"html"}'>
17579 <li data-parsoid='{"stx":"html"}'>One</li>
17580 <li data-parsoid='{"stx":"html"}'>Two:
17581 <ul data-parsoid='{"stx":"html"}'>
17582 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
17583 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
17590 HTML nested bullet list, open tags (T7497)
17627 HTML nested ordered list, closed tags (T7497)
17652 HTML nested ordered list, open tags (T7497)
17689 HTML ordered list item with parameters oddity
17691 <ol><li id="fragment">One</li>
17694 <ol><li id="fragment">One</li>
17699 # parsoid doesn't explicitly mark autonumbered links, see T55505
17701 T7918: autonumbering
17703 [http://first/] [http://second] [ftp://ftp]
17707 [mailto:enclosed@mail.tld With target]
17709 [mailto:enclosed@mail.tld]
17711 mailto:inline@mail.tld
17713 <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>
17714 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
17715 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
17716 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
17717 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
17720 <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>
17721 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
17722 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
17723 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
17724 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
17729 # Security and HTML correctness
17730 # From Nick Jenkins' fuzz testing
17734 Fuzz testing: Parser13
17749 Fuzz testing: Parser14
17754 <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>
17755 http://<div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
17757 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17763 <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>
17765 <div id="toc" class="toc">
17766 <div id="toctitle" class="toctitle">
17770 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
17777 Fuzz testing: Parser14-table
17779 parsoid=wt2html,html2html
17784 <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>
17785 <table style="__TOC__">
17790 <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>
17791 <table style="__TOC__">
17798 <table style="__TOC__"></table>
17801 # Known to produce bogus xml (extra </td>)
17803 Fuzz testing: Parser16
17830 Fuzz testing: Parser21
17833 ! irc://{{ftp://a" onmouseover="alert('hello world');"
17838 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
17848 Fuzz testing: Parser22
17850 http://===r:::https://b
17854 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
17862 # Known to produce bad XML for now
17864 Fuzz testing: Parser24
17871 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
17872 <br style="onmouseover='alert(document.cookie);' " />
17874 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17879 <u class="|">}}}} >
17880 <br style="onmouseover='alert(document.cookie);'" />
17882 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
17890 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
17891 <u class="|" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}":""},"autoInsertedEnd":true}' data-mw='{"attribs":[[{"txt":"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}}","html":"{<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[21,79,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->&lt;noinclude>\"},\"params\":{},\"i\":0}}]}'>{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}</span>}"},{"html":""}]]}'>
17892 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/></u></p><p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><u class="|" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}":""},"autoInsertedEnd":true,"autoInsertedStart":true}' data-mw='{"attribs":[[{"txt":"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}}","html":"{<span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[21,79,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->&lt;noinclude>\"},\"params\":{},\"i\":0}}]}'>{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}</span>}"},{"html":""}]]}'>MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p><table data-parsoid='{"autoInsertedEnd":true}'>
17896 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
17899 # Note: the current result listed for this is not what the original one was,
17900 # but the original bug was JavaScript injection, which is fixed in any case.
17901 # It's not clear that the original result listed was any more correct than the
17902 # current one. Original result:
17905 # <li class="||">
17906 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17908 Fuzz testing: Parser25 (T8055)
17914 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
17916 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
17919 <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"]}'>
17920 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
17924 Fuzz testing: URL adjacent extension (with space, clean)
17926 http://example.com <nowiki>junk</nowiki>
17928 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
17931 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
17935 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
17937 http://example.com<nowiki>junk</nowiki>
17939 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
17942 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
17946 Fuzz testing: URL adjacent extension (no space, dirty; pre)
17948 http://example.com<pre>junk</pre>
17950 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
17953 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
17958 <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>
17962 Fuzz testing: image with bogus manual thumbnail
17964 [[Image:foobar.jpg|thumbnail= ]]
17966 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
17969 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' data-mw='{"errors":[{"key":"missing-thumbnail","message":"This thumbnail does not exist.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
17973 Fuzz testing: encoded newline in generated HTML replacements (T8577)
17975 <pre dir=" "></pre>
17977 <pre dir=" "></pre>
17980 <pre typeof="mw:Extension/pre" about="#mwt2" dir="&#10;" data-mw='{"name":"pre","attrs":{"dir":"&#10;"},"body":{"extsrc":""}}'></pre>
17984 Parsing optional HTML elements (T8171)
17989 <td> Some tabular data</td>
17990 <td> More tabular data ...
17991 <td> And yet som tabular data</td>
17997 <td> Some tabular data</td>
17998 <td> More tabular data ...
17999 </td><td> And yet som tabular data</td>
18006 Correct handling of <td>, <tr> (T8171)
18011 <td> Some tabular data</td>
18012 <td> More tabular data ...</td>
18013 <td> And yet som tabular data</td>
18019 <td> Some tabular data</td>
18020 <td> More tabular data ...</td>
18021 <td> And yet som tabular data</td>
18029 Parsing crashing regression (fr:JavaScript)
18033 <p></body></x>
18038 Inline wiki vs wiki block nesting
18044 <p><b>Bold paragraph</b>
18045 </p><p>New wiki paragraph
18049 # FIXME: The current php output is documented
18050 # and desired output is the parsoid target.
18052 Inline HTML vs wiki block nesting
18058 <p><b>Bold paragraph
18059 </p><p>New wiki paragraph</b>
18062 <p><b>Bold paragraph</b>
18063 </p><p>New wiki paragraph
18067 # Original result was this:
18068 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
18070 # While that might be marginally more intuitive, maybe, the six-apostrophe
18071 # construct is clearly pathological and the result stated here (which is what
18072 # the parser actually does) is about as reasonable as anything.
18074 Mixing markup for italics and bold
18077 '''bold''''''bold''bolditalics'''''
18079 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
18087 Article for special page transclusion test
18091 Special page transclusion
18094 {{Special:Prefixindex/Xyzzyx}}
18096 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18102 Special page transclusion twice (T7021)
18105 {{Special:Prefixindex/Xyzzyx}}
18106 {{Special:Prefixindex/Xyzzyx}}
18108 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18110 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
18116 Transclusion of default MediaWiki message
18118 {{MediaWiki:Mainpage}}
18125 Transclusion of nonexistent MediaWiki message
18127 {{MediaWiki:Mainpagexxx}}
18129 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
18134 Transclusion of MediaWiki message with underscore
18136 {{MediaWiki:history_short}}
18143 Transclusion of MediaWiki message with space
18145 {{MediaWiki:history short}}
18152 Invalid header with following text
18162 Section extraction test (section 0)
18182 Section extraction test (section 1)
18204 Section extraction test (section 2)
18225 Section extraction test (section 3)
18245 Section extraction test (section 4)
18269 Section extraction test (section 5)
18289 Section extraction test (section 6)
18310 Section extraction test (section 7)
18330 Section extraction test (section 8)
18350 Section extraction test (section 9)
18371 Section extraction test (section 10)
18391 Section extraction test (nonexistent section 11)
18410 Section extraction test with bogus heading (section 1)
18415 ==bogus== not a legal section
18419 ==bogus== not a legal section
18423 Section extraction test with bogus heading (section 2)
18428 ==bogus== not a legal section
18435 Section extraction test with comment after heading (section 1)
18447 Section extraction test with comment after heading (section 2)
18459 Section extraction test with bogus <nowiki> heading (section 1)
18464 ==bogus== <nowiki>not a legal section</nowiki>
18468 ==bogus== <nowiki>not a legal section</nowiki>
18472 Section extraction test with bogus <nowiki> heading (section 2)
18477 ==bogus== <nowiki>not a legal section</nowiki>
18483 # Formerly testing for T4587, now resolved by the use of unmarked sections
18484 # instead of respecting commented sections
18486 Section extraction prefixed by comment (section 1)
18497 Section extraction prefixed by comment (section 2)
18507 # Formerly testing for T4607, now resolved by the use of unmarked sections
18508 # instead of respecting HTML-style headings
18510 Section extraction, mixed wiki and html (section 1)
18526 Section extraction, mixed wiki and html (section 2)
18542 # Formerly testing for T5342
18544 Section extraction, heading surrounded by <noinclude>
18548 <noinclude>==unmarked==</noinclude>
18554 # Test behavior of T21910
18556 Sectiion with all-equals
18561 The line above must have a trailing space
18564 But just in case it doesn't...
18568 But just in case it doesn't...
18572 Section replacement test (section 0)
18603 Section replacement test (section 1)
18632 Section replacement test (section 2)
18662 Section replacement test (section 3)
18693 Section replacement test (section 4)
18720 Section replacement test (section 5)
18751 Section replacement test (section 6)
18781 Section replacement test (section 7)
18812 Section replacement test (section 8)
18843 Section replacement test (section 9)
18872 Section replacement test (section 10)
18902 Section replacement test with initial whitespace (T15728)
18906 Preformatted initial line
18910 Preformatted initial line
18917 Section extraction, heading followed by pre with 20 spaces (T8398)
18929 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
18942 Section extraction, <pre> around bogus header (T12309)
18959 Section replacement, <pre> around bogus header (T12309)
18980 Handling of 
 in URLs
18984 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18987 <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>
18991 Handling of %0A in URLs
18995 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
18998 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19001 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
19003 5 quotes, code coverage +1 line
19010 <p><b><i></i></b></p>
19013 # same html as previous, but wikitext adjusted to match parsoid html2wt
19014 # note that wt2html and html2html will put the <i> before the <b>
19016 5 quotes, code coverage +1 line w/ nowiki (1)
19018 parsoid=wt2wt,html2wt
19020 '''''<nowiki/>'''''
19025 <p><b><i></i></b></p>
19028 # same as previous, just swapping the <i> and <b>
19030 5 quotes, code coverage +1 line w/ nowiki (2)
19032 '''''<nowiki/>'''''
19037 <p><i><b></b></i></p>
19041 Special:Search page linking.
19045 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
19050 {{!}} is a magic word
19052 {{!}} is a magic word there and {{!}} is still a magic word here
19053 | is not a magic word here but {{!}} is still a magic word here
19055 <p>| is a magic word there and | is still a magic word here
19056 | is not a magic word here but | is still a magic word here
19059 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
19060 | is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
19067 title=[[Parser test]]
19072 * {{FULLPAGENAMEE}}
19074 * {{BASEPAGENAMEE}}
19078 * {{ROOTPAGENAMEE}}
19080 * {{TALKPAGENAMEE}}
19081 * {{SUBJECTPAGENAME}}
19082 * {{SUBJECTPAGENAMEE}}
19085 * {{NAMESPACENUMBER}}
19089 * {{SUBJECTSPACEE}}
19090 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
19092 <ul><li> Parser test</li>
19093 <li> Parser_test</li>
19094 <li> Parser test</li>
19095 <li> Parser_test</li>
19096 <li> Parser test</li>
19097 <li> Parser_test</li>
19098 <li> Parser test</li>
19099 <li> Parser_test</li>
19100 <li> Parser test</li>
19101 <li> Parser_test</li>
19102 <li> Talk:Parser test</li>
19103 <li> Talk:Parser_test</li>
19104 <li> Parser test</li>
19105 <li> Parser_test</li>
19113 <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>
19116 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
19119 Gallery with valid attributes
19121 <gallery type="123" summary="345">
19122 File:File:Foobar.jpg
19125 <ul class="gallery mw-gallery-traditional" type="123">
19126 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19127 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
19128 <div class="gallerytext">
19134 <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"}}'>
19135 <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>
19139 ## Parsoid thinks the "centre" here is a property, not a caption.
19144 "modes": ["wt2html"],
19145 "nativeGallery": true
19153 image4 |300px| centre
19154 image5.svg| http://///////
19159 <ul class="gallery mw-gallery-traditional">
19160 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19161 <div class="thumb" style="height: 150px;">Image1.png</div>
19162 <div class="gallerytext">
19165 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19166 <div class="thumb" style="height: 150px;">Image2.gif</div>
19167 <div class="gallerytext">
19170 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19171 <div class="thumb" style="height: 150px;">Image3</div>
19172 <div class="gallerytext">
19175 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19176 <div class="thumb" style="height: 150px;">Image4</div>
19177 <div class="gallerytext">
19182 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19183 <div class="thumb" style="height: 150px;">Image5.svg</div>
19184 <div class="gallerytext">
19185 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
19189 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19190 <div class="thumb" style="height: 150px;">* image6</div>
19191 <div class="gallerytext">
19197 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19198 <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>
19199 <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>
19200 <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>
19201 <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>
19202 <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>
19203 <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>
19208 Gallery (with options, html)
19211 "modes": ["wt2html", "html2html"],
19212 "nativeGallery": true
19215 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19216 File:Nonexistent.jpg|caption
19217 File:Nonexistent.jpg
19218 image:foobar.jpg|some '''caption''' [[Main Page]]
19220 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19223 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19224 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19225 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19226 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19227 <div class="gallerytext">
19232 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19233 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19234 <div class="gallerytext">
19237 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19238 <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>
19239 <div class="gallerytext">
19240 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19244 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19245 <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>
19246 <div class="gallerytext">
19249 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19250 <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>
19251 <div class="gallerytext">
19259 <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":{}}'>
19260 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19261 <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>
19262 <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>
19263 <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>
19264 <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>
19265 <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>
19270 Gallery (with options, extsrc)
19273 "nativeGallery": false
19276 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
19277 File:Nonexistent.jpg|caption
19278 File:Nonexistent.jpg
19279 image:foobar.jpg|some '''caption''' [[Main Page]]
19281 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
19284 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
19285 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
19286 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19287 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19288 <div class="gallerytext">
19293 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19294 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
19295 <div class="gallerytext">
19298 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19299 <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>
19300 <div class="gallerytext">
19301 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19305 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19306 <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>
19307 <div class="gallerytext">
19310 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
19311 <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>
19312 <div class="gallerytext">
19320 <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"}}'>
19321 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
19322 <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>
19323 <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>
19324 <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>
19325 <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>
19326 <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>
19331 Gallery with link that has fragment
19334 "modes": ["wt2html", "html2html"],
19335 "nativeGallery": true
19339 image:foobar.jpg|link=Main_Page
19340 image:foobar.jpg|link=Main_Page#section
19341 image:foobar.jpg|link=Main Page#section|caption
19344 <ul class="gallery mw-gallery-traditional">
19345 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19346 <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>
19347 <div class="gallerytext">
19350 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19351 <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>
19352 <div class="gallerytext">
19355 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19356 <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>
19357 <div class="gallerytext">
19365 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19366 <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>
19367 <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>
19368 <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>
19372 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
19374 Gallery with template inside caption
19377 "nativeGallery": true
19380 <gallery caption="{{echo|hi}}">
19381 File:Foobar.jpg|{{echo|ho}}
19384 <ul class="gallery mw-gallery-traditional">
19385 <li class='gallerycaption'>{{echo|hi}}</li>
19386 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19387 <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>
19388 <div class="gallerytext">
19396 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19397 <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>
19398 <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>
19403 Gallery with wikitext inside caption
19406 "nativeGallery": true
19410 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
19411 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
19414 <ul class="gallery mw-gallery-traditional">
19415 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19416 <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>
19417 <div class="gallerytext">
19418 <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>
19422 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19423 <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>
19424 <div class="gallerytext">
19425 <p>This is a test template
19432 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19433 <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>
19434 <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>
19439 Gallery (with showfilename option)
19442 "nativeGallery": true
19445 <gallery showfilename="">
19446 File:Nonexistent.jpg|caption
19447 File:Nonexistent.jpg
19448 File:Foobar.jpg|some '''caption''' [[Main Page]]
19452 <ul class="gallery mw-gallery-traditional">
19453 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19454 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19455 <div class="gallerytext">
19456 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19461 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19462 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19463 <div class="gallerytext">
19464 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
19468 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19469 <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>
19470 <div class="gallerytext">
19471 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19472 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
19476 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19477 <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>
19478 <div class="gallerytext">
19479 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
19486 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
19487 <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>
19488 <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>
19489 <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>
19490 <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>
19494 ## Should Parsoid be preserving these variations?
19496 Gallery (with namespace-less filenames)
19499 "modes": ["wt2html", "html2html"],
19500 "nativeGallery": true
19504 File:Nonexistent.jpg
19510 <ul class="gallery mw-gallery-traditional">
19511 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19512 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19513 <div class="gallerytext">
19516 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19517 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
19518 <div class="gallerytext">
19521 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19522 <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>
19523 <div class="gallerytext">
19526 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19527 <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>
19528 <div class="gallerytext">
19534 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19535 <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>
19536 <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>
19537 <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>
19538 <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>
19543 Gallery override link with WikiLink (T36852)
19546 "nativeGallery": true
19550 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
19553 <ul class="gallery mw-gallery-traditional">
19554 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19555 <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>
19556 <div class="gallerytext">
19562 <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":{}}'>
19563 <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>
19568 Gallery override link with absolute external link (T36852)
19571 "nativeGallery": true
19575 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
19578 <ul class="gallery mw-gallery-traditional">
19579 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19580 <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>
19581 <div class="gallerytext">
19587 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19588 <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>
19593 Gallery override link with absolute external link with LanguageConverter
19598 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
19601 <ul class="gallery mw-gallery-traditional">
19602 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19603 <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>
19604 <div class="gallerytext">
19614 Gallery override link with malicious javascript (T36852)
19617 "modes": ["wt2html", "html2html"],
19618 "nativeGallery": true
19622 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
19625 <ul class="gallery mw-gallery-traditional">
19626 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19627 <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>
19628 <div class="gallerytext">
19634 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19635 <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>
19640 Gallery with invalid title as link (T45964)
19643 "modes": ["wt2html", "html2html"],
19644 "nativeGallery": true
19648 File:Foobar.jpg|link=<
19651 <ul class="gallery mw-gallery-traditional">
19652 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19653 <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>
19654 <div class="gallerytext">
19660 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
19661 <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>
19666 Serialize gallery without attrs in data-mw
19669 "modes": ["html2wt"],
19670 "nativeGallery": true
19673 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
19674 <li class="gallerycaption">123</li>
19675 <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>
19678 <gallery caption="123">
19684 Gallery with class and style attributes
19687 "nativeGallery": true
19690 <gallery class="center" style="text-align: center;">
19694 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
19695 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19696 <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>
19697 <div class="gallerytext">
19703 <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":{}}'>
19704 <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>
19709 Gallery in slideshow mode
19712 "nativeGallery": true
19715 <gallery mode="slideshow" showthumbnails="">
19719 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
19720 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
19721 <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>
19722 <div class="gallerytext">
19728 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
19729 <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>
19734 HTML Hex character encoding (spells the word "JavaScript")
19736 parsoid=wt2html,wt2wt,html2html
19738 JavaScript
19740 <p>JavaScript
19745 <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>
19749 HTML Hex character encoding bogus encoding (T28437 regression check)
19753 <p>&#xsee;&#XSEE;
19756 <p>&#xsee;&#XSEE;</p>
19760 HTML Hex character encoding mixed case
19762 parsoid=wt2html,wt2wt,html2html
19771 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
19774 # See: https://www.w3.org/TR/html5/syntax.html#character-references
19775 # Note that U+000C (form feed) is not a valid XML character, so
19776 # it is banned even though allowed in HTML5.
19778 Illegal character references (T106578)
19783 ; Control (low): 
19784 ; Control (high):  Ÿ
19785 ; Surrogate: ��
19786 ; This is an okay astral character: 💩
19795 <dt>Control (low)</dt>
19797 <dt>Control (high)</dt>
19798 <dd>&#x7F; &#x9F;</dd>
19800 <dd>&#xD83D;&#xDCA9;</dd>
19801 <dt>This is an okay astral character</dt>
19807 __FORCETOC__ override
19819 ISBN 978-0-1234-56 789
19821 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
19824 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
19826 <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>
19830 ISBN followed by 5 spaces
19841 ISBN ISBN 1234567890
19843 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19846 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
19849 # Uppercase X and lowercase x as well
19860 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
19861 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
19862 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
19863 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
19864 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
19865 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
19868 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
19869 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
19870 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
19871 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
19872 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
19873 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
19877 ISBN with empty prefix (parsoid test)
19881 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
19884 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
19888 T24905: <abbr> followed by ISBN followed by </a>
19890 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
19892 <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>
19895 <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>
19903 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
19908 Double RFC with a wiki link
19912 <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>
19921 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
19924 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
19928 Centre-aligned image
19930 [[Image:foobar.jpg|centre]]
19932 <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>
19939 [[Image:foobar.jpg|none]]
19941 <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>
19946 Width + Height sized image (using px) (height is ignored)
19948 [[Image:foobar.jpg|640x480px]]
19950 <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>
19955 Width-sized image (using px, no following whitespace)
19957 [[Image:foobar.jpg|640px]]
19959 <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>
19964 Width-sized image (using px, with following whitespace - test regression from r39467)
19966 [[Image:foobar.jpg|640px ]]
19968 <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>
19973 Width-sized image (using px, with preceding whitespace - test regression from r39467)
19975 [[Image:foobar.jpg| 640px]]
19977 <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>
19982 Image with page parameter
19986 [[File:LoremIpsum.djvu|page=2]]
19988 <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>
19991 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"page","ak":"page=2"}]}'><a href="./File:LoremIpsum.djvu" data-parsoid='{"a":{"href":"./File:LoremIpsum.djvu"},"sa":{}}'><img resource="./File:LoremIpsum.djvu" src="//example.com/images/5/5f/LoremIpsum.djvu" data-file-width="2480" data-file-height="3508" data-file-type="bitmap" height="3508" width="2480" data-parsoid='{"a":{"resource":"./File:LoremIpsum.djvu","height":"3508","width":"2480"},"sa":{"resource":"File:LoremIpsum.djvu"}}'/></a></span></p>
19995 Another italics / bold test
20003 # FIXME: The php output seems broken. It's interleaving some open/close tags.
20009 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
20012 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
20016 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
20018 Images with the "|" character in the comment
20020 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
20022 <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>
20025 <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>
20029 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
20031 <html><script>alert(1);</script></html>
20033 <p><html><script>alert(1);</script></html>
20038 HTML with raw HTML ($wgRawHtml==true)
20042 <html><script>alert(1);</script></html>
20044 <p><script>alert(1);</script>
20049 Parents of subpages, one level up
20051 subpage title=[[Subpage test/L1/L2/L3]]
20055 <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>
20061 Parents of subpages, one level up, not named
20063 subpage title=[[Subpage test/L1/L2/L3]]
20067 <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>
20074 Parents of subpages, two levels up
20076 subpage title=[[Subpage test/L1/L2/L3]]
20082 <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
20083 </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>
20088 Parents of subpages, two levels up, without trailing slash or name.
20090 subpage title=[[Subpage test/L1/L2/L3]]
20099 Parents of subpages, two levels up, with lots of extra trailing slashes.
20101 subpage title=[[Subpage test/L1/L2/L3]]
20105 <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>
20110 Subpage test/L1/L2/L3Sibling
20116 Transclusion of a sibling page (one level up)
20118 subpage title=[[Subpage test/L1/L2/L3]]
20127 Transclusion of a child page
20129 subpage title=[[Subpage test/L1/L2]]
20137 # This is wt2html only in Parsoid because we add <nowiki>
20138 # because of {{..}} and we don't expect to fix that to
20139 # eliminate the nowikis selective for {{..}} markup.
20141 Non-transclusion because of too many up levels
20143 subpage title=[[Subpage test/L1/L2/L3]]
20146 {{../../../../More than parent}}
20148 <p>{{../../../../More than parent}}
20151 <p>{{../../../../More than parent}}</p>
20155 Definition list code coverage
20161 <dl><dt> title  </dt>
20163 <dt> title </dt>
20169 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20170 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
20171 <dt>title</dt><dd> def</dd></dl>
20175 Don't fall for the self-closing div
20177 <div>hello world</div/>
20179 <div>hello world</div>
20188 <p>[[:Template:Msg]]
20197 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
20201 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
20203 Always escape literal '>' in output, not just after '<'
20217 <p>This is a test template
20218 This is a test template
20230 Inclusion of !userCanEdit() content
20234 <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>
20240 Out-of-order TOC heading levels
20249 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
20251 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
20253 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
20254 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
20257 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
20259 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
20260 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
20266 <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>
20267 <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>
20268 <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>
20269 <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>
20270 <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>
20271 <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>
20277 ISBN with a dummy number
20287 ISBN with space-delimited number
20291 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
20297 ISBN with multiple spaces, no number
20316 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20317 </p><p>ISBN 12345678901
20323 ISBN with trailing year (T9110)
20325 ISBN 1-234-56789-0 - 2006
20327 ISBN 1 234 56789 0 - 2006
20329 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
20330 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
20338 {{anchorencode:foo bar©#%n}}
20340 <p>foo_bar.C2.A9.23.25n
20345 anchorencode trims spaces
20347 {{anchorencode: __pretty__please__}}
20354 anchorencode deals with links
20356 {{anchorencode: [[hello|world]] [[hi]]}}
20363 anchorencode deals with templates
20365 {{anchorencode: {{Foo}} }}
20372 anchorencode encodes like the TOC generator: (T20431)
20374 === _ +:.3A%3A&&]] ===
20375 {{anchorencode: _ +:.3A%3A&&]] }}
20378 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
20379 <p>.2B:.3A.253A.26.26.5D.5D
20384 T8200: blockquotes and paragraph formatting
20405 T10293: Use of center tag ruins paragraph formatting
20426 Parsing of overlapping (improperly nested) inline html tags
20428 <span><s>x</span></s>
20430 <p><span><s>x</span></s></span>
20433 <p><span><s>x</s></span>
20438 ### Language variants related tests
20441 Self-link in language variants
20443 title=[[Dunav]] language=sr
20445 Both [[Dunav]] and [[Дунав]] are names for this river.
20447 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
20458 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
20460 title=[[Duna]] language=sr
20462 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
20464 <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.
20469 Link to a section of a variant of this title shouldn't be parsed as self-link
20471 title=[[Duna]] language=sr
20473 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
20475 <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.
20480 Link to pages in language variants
20484 Main Page can be written as [[Маин Паге]]
20486 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
20492 Multiple links to pages in language variants
20496 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
20498 <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>.
20504 Simple template in language variants
20510 <p>This is a test template
20516 Template with explicit namespace in language variants
20522 <p>This is a test template
20528 Basic test for template parameter in language variants
20532 {{парамтест|param=foo}}
20534 <p>This is a test template with parameter foo
20539 Simple category in language variants
20543 [[Category:МедиаWики Усер'с Гуиде]]
20545 cat=МедиаWики_Усер'с_Гуиде sort=
20547 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
20562 ## We used to, but no longer wt2wt this test since the default serializer
20563 ## will normalize all categories to serialize on their own line.
20564 ## This wikitext usage is going to be fairly uncommon in production and
20565 ## selser will take care of preserving formatting in those scenarios.
20567 Don't convert blue categorylinks to another variant (T35210)
20573 [[A]][[Category:分类]]
20577 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
20578 <link rel="mw:PageProp/Category" href="./Category:分类"/>
20582 Stripping -{}- tags (language variants)
20586 Latin proverb: -{Ne nuntium necare}-
20588 <p>Latin proverb: Ne nuntium necare
20594 Prevent conversion with -{}- tags (language variants)
20596 language=sr variant=sr-ec
20598 Latinski: -{Ne nuntium necare}-
20600 <p>Латински: Ne nuntium necare
20606 Prevent conversion of text with -{}- tags (language variants)
20608 language=sr variant=sr-ec
20610 Latinski: -{Ne nuntium necare}-
20612 <p>Латински: Ne nuntium necare
20618 Prevent conversion of links with -{}- tags (language variants)
20620 language=sr variant=sr-ec
20624 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20630 -{}- tags within headlines (within html for parserConvert())
20632 language=sr variant=sr-ec
20636 <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>
20642 Explicit definition of language variant alternatives
20644 language=zh variant=zh-tw
20646 -{zh:China;zh-tw:Taiwan}-, not China
20648 <p>Taiwan, not China
20654 Conversion around HTML tags
20656 language=sr variant=sr-ec
20658 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
20659 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
20662 <span title="ЛаCтин">ски</span>
20668 Explicit session-wise language variant mapping (A flag and - flag)
20670 language=zh variant=zh-tw
20672 Taiwan is not China.
20673 But -{A|zh:China;zh-tw:Taiwan}- is China,
20674 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
20675 and -{China}- is China.
20677 <p>Taiwan is not China.
20678 But Taiwan is Taiwan,
20679 (This should be stripped!)
20680 and China is China.
20685 Explicit session-wise language variant mapping (H flag for hide)
20687 language=zh variant=zh-tw
20689 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
20692 <p>(This should be stripped!)
20698 Adding explicit conversion rule for title (T flag)
20700 language=zh variant=zh-tw showtitle
20702 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20705 <p>Should be stripped!
20710 Testing that changing the language variant here in the tests actually works
20712 language=zh variant=zh showtitle
20714 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20717 <p>Should be stripped!
20722 Recursive conversion of alt and title attrs shouldn't clear converter state
20724 language=zh variant=zh-cn showtitle
20726 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
20727 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
20731 Should be stripped<span title="Exclamation">!</span>
20736 T26072: more test on conversion rule for title
20738 language=zh variant=zh-tw showtitle
20740 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
20741 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
20744 <p>This should be stripped!
20745 This won't take interferes with the title rule.
20750 Partly disable title conversion if variant == main language code
20752 language=zh variant=zh title=[[ZH]] showtitle
20754 -{T|zh-cn:CN;zh-tw:TW}-
20762 Partly disable title conversion if variant == main language code, more
20764 language=zh variant=zh title=[[ZH]] showtitle
20774 Raw output of variant escape tags (R flag)
20776 language=zh variant=zh-tw
20778 Raw: -{R|zh:China;zh-tw:Taiwan}-
20780 <p>Raw: zh:China;zh-tw:Taiwan
20785 Strings evaluating false shouldn't be ignored by Language converter (T51072)
20787 language=zh variant=zh-cn
20789 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
20796 Conversion rules from [numeric-only string] to [something else] (T48634)
20798 language=zh variant=zh-cn
20800 -{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
20807 Bidirectional converter rule entries with an empty value should be ignored (T53551)
20809 language=zh variant=zh-cn
20811 -{H|zh-cn:foo;zh-tw:;}-foobar
20818 Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
20820 language=zh variant=zh-cn
20822 -{H|=>zh-cn:foo;}-foobar
20829 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
20831 language=zh variant=zh-cn
20840 Nested using of manual convert syntax
20842 language=zh variant=zh-hk
20844 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
20846 <p>Nested: Hello Hong Kong!
20851 HTML markups with conversion syntax in attribs, nested in other conversion blocks
20853 language=zh variant=zh-cn
20855 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
20857 <p><span title="X">A</span>
20862 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet)
20864 language=zh variant=zh-cn disabled
20866 -{<span title="-{X}-">A</span>}-
20868 <p><span title="X">A</span>
20872 # Since Parsoid is starting to emit canonical wikitext for links,
20873 # [http://example.com http://example.com] will not RT back to that
20876 Proper conversion of text in external links
20878 language=sr variant=sr-ec
20881 http://www.google.com
20882 gopher://www.google.com
20883 [http://www.google.com http://www.google.com]
20884 [gopher://www.google.com gopher://www.google.com]
20885 [https://www.google.com irc://www.google.com]
20886 [ftp://www.google.com www.google.com/ftp://dir]
20887 [//www.google.com www.google.com]
20889 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20890 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20891 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
20892 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
20893 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
20894 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20895 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
20898 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20899 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20900 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
20901 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
20902 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
20903 <a rel="mw:ExtLink" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
20904 <a rel="mw:ExtLink" href="//www.google.com">www.гоогле.цом</a></p>
20908 Do not convert roman numbers to language variants
20910 language=sr variant=sr-ec
20914 <p>Фридрих IV је цар.
20919 Unclosed language converter markup "-{"
20930 Don't convert raw rule "-{R|=>}-" to "=>"
20941 Don't break link parsing if language converter markup is in the caption.
20943 language=sr variant=sr-ec
20945 [[Main Page|-{R|main page}-]]
20947 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
20951 # FIXME: This test is currently broken in the PHP parser T153761
20953 T146304: Don't break template parsing if language converter markup is in the parameter.
20955 language=sr variant=sr-ec
20965 T146305: Don't break image parsing if language converter markup is in the caption.
20969 [[File:Foobar.jpg|thumb|-{R|caption:}-]]
20971 <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>
20974 <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>
20978 T146305: Don't break image parsing if nested language converter markup is in the caption.
20980 language=zh variant=zh-cn
20982 [[File:Foobar.jpg|thumb|-{zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
20984 <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>
20987 <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>
20991 Don't break gallery if language converter markup is inside.
20996 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
20997 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
21000 <ul class="gallery mw-gallery-traditional">
21001 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21002 <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>
21003 <div class="gallerytext">
21004 <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>
21008 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21009 <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>
21010 <div class="gallerytext">
21011 <p>This is a test template
21020 T153135: Don't break list handling if language converter markup is in the item.
21022 language=zh variant=zh-cn
21024 ;-{zh-cn:AAA;zh-tw:BBB}-
21028 <dt>foo:bar</dt></dl>
21032 <dt><span typeof="mw:LanguageVariant" data-mw='{"bidir":[{"l":"zh-cn","t":"AAA"},{"l":"zh-tw","t":"BBB"}],"show":true}'></span></dt>
21033 <dt><span typeof="mw:LanguageVariant" data-mw='{"disabled":true,"show":true,"text":"foo:bar"}'></span></dt>
21037 // Note that parsoid does not protect colons unless language converter
21038 // markup is properly nested, because it is a backtracking parser.
21040 T153135: Unclosed markup in definition list (code coverage)
21042 language=zh variant=zh-cn
21047 <dl><dt><b>foo:bar</dt>
21048 <dt>-{zh-cn:AAA</b></dt></dl>
21052 <dt><b>foo:bar</b></dt>
21060 T153135: Nested language converter markup in definition list (code coverage)
21062 language=zh variant=zh-cn
21064 ;-{zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
21066 <dl><dt>AAA foo:bar bat:baz</dt>
21071 <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>
21077 T153140: Don't break table handling if language converter markup is in the cell.
21079 language=sr variant=sr-ec
21102 T2529: Uncovered bullet
21111 # Plain MediaWiki does not remove empty lists, but tidy actually does.
21112 # Templates in Wikipedia rely on this behavior, as tidy has always been
21113 # enabled there. These tests are normally run *without* tidy, so specify the
21114 # full output here.
21115 # To test realistic parsing behavior, apply a tidy-like transformation to both
21116 # the expected output and your parser's output.
21118 T2529: Uncovered bullet leaving empty list, normally removed by tidy
21120 ******* Foo {{bullet}}
21122 <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>
21128 T2529: Uncovered table already at line-start
21151 T2529: Uncovered bullet in parser function result
21153 * Foo {{lc:{{bullet}} }}
21161 T7678: Double-parsed template argument
21163 {{lc:{{{1}}}|hello}}
21170 T7678: Double-parsed template invocation
21172 {{lc:{{paramtest {{!}} param = hello }} }}
21174 <p>{{paramtest | param = hello }}
21179 Case insensitivity of parser functions for non-ASCII characters (T10143)
21182 title=[[Main Page]]
21184 {{PRVNÍVELKÉ:ěščř}}
21185 {{prvnívelké:ěščř}}
21205 Morwen/13: Unclosed link followed by heading
21212 <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>
21217 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
21224 <h1><span class="mw-headline" id="heading">heading</span></h1>
21229 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
21236 <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>
21251 Paragraphs inside divs (no extra line breaks)
21263 Paragraphs inside divs (extra line break on open)
21278 Paragraphs inside divs (extra line break on close)
21293 Paragraphs inside divs (extra line break on open and close)
21310 Nesting tags, paragraphs on lines which begin with <div>
21312 <div></div><strong>A
21315 <p><strong>A</strong></p>
21316 <p><strong>B</strong></p>
21324 # T8200: <blockquote> should behave like <div> with respect to line breaks
21326 T8200: paragraphs inside blockquotes (no extra line breaks)
21328 <blockquote>Line one
21330 Line two</blockquote>
21332 <blockquote>Line one
21333 Line two</blockquote>
21337 <p>Line one Line two</p>
21342 T8200: paragraphs inside blockquotes (extra line break on open)
21347 Line two</blockquote>
21352 Line two</blockquote>
21357 Line two</blockquote>
21361 T8200: paragraphs inside blockquotes (extra line break on close)
21363 <blockquote>Line one
21368 <blockquote>Line one
21381 T8200: paragraphs inside blockquotes (extra line break on open and close)
21403 Paragraphs inside blockquotes/divs (no extra line breaks)
21405 <blockquote><div>Line one
21407 Line two</div></blockquote>
21409 <blockquote><div>Line one
21410 Line two</div></blockquote>
21415 Paragraphs inside blockquotes/divs (extra line break on open)
21420 Line two</div></blockquote>
21425 Line two</div></blockquote>
21430 Paragraphs inside blockquotes/divs (extra line break on close)
21432 <blockquote><div>Line one
21435 </div></blockquote>
21437 <blockquote><div>Line one
21440 </div></blockquote>
21445 Paragraphs inside blockquotes/divs (extra line break on open and close)
21451 </div></blockquote>
21457 </div></blockquote>
21462 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
21464 wgLinkHolderBatchSize=0
21470 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
21471 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
21472 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
21477 Free external link invading image caption
21479 [[Image:Foobar.jpg|thumb|http://x|hello]]
21481 <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>
21486 T17196: localised external link numbers
21490 [http://en.wikipedia.org/]
21492 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
21495 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
21499 Multibyte character in padleft
21501 {{padleft:-Hello|7|Æ}}
21508 Multibyte character in padright
21510 {{padright:Hello-|7|Æ}}
21517 formatdate parser function
21519 {{#formatdate:2009-03-24}}
21521 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
21526 formatdate parser function, with default format
21528 {{#formatdate:2009-03-24|mdy}}
21530 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
21535 Spacing of numbers in formatted dates
21537 {{#formatdate:January 15}}
21539 <p><span class="mw-formatted-date" title="01-15">January 15</span>
21544 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
21546 language=nl title=[[MediaWiki:Common.css]]
21548 {{#formatdate:2009-03-24|dmy}}
21550 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
21563 Edit comment with link
21567 I like the [[Main Page]] a lot
21569 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
21573 Edit comment with link and link text
21577 I like the [[Main Page|best pages]] a lot
21579 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21583 Edit comment with link and link text with suffix
21587 I like the [[Main Page|best page]]s a lot
21589 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
21593 Edit comment with section link (non-local, eg in history list)
21595 comment title=[[Main Page]]
21597 /* External links */ removed bogus entries
21599 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21603 Edit comment with section link and text before it (non-local, eg in history list)
21605 comment title=[[Main Page]]
21607 pre-comment text /* External links */ removed bogus entries
21609 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>
21613 Edit comment with section link (local, eg in diff view)
21615 comment local title=[[Main Page]]
21617 /* External links */ removed bogus entries
21619 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
21623 Edit comment with subpage link (T16080)
21627 title=[[Subpage test]]
21629 Poked at a [[/subpage]] here...
21631 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
21635 Edit comment with subpage link and link text (T16080)
21639 title=[[Subpage test]]
21641 Poked at a [[/subpage|neat little page]] here...
21643 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
21647 Edit comment with bogus subpage link in non-subpage NS (T16080)
21650 title=[[Subpage test]]
21652 Poked at a [[/subpage]] here...
21654 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
21658 Edit comment with bare anchor link (local, as on diff)
21662 title=[[Main Page]]
21666 <a href="#section">#section</a>
21670 Edit comment with bare anchor link (non-local, as on history)
21673 title=[[Main Page]]
21677 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
21681 Anchor starting with underscore
21687 <p><a href="#_ref">One</a>
21690 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
21694 Id starting with underscore
21696 <div id="_ref"></div>
21698 <div id="_ref"></div>
21703 Edit comment with link with more than one pipe (T99346)
21707 [[Main Page|Many|pipes]]
21709 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
21713 Complex edit comment with link with more than one pipe (T99346)
21717 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
21719 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..."
21723 Space normalisation on autocomment (T24784)
21726 title=[[Main Page]]
21728 /* __hello__world__ */
21730 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
21734 percent-encoding and + signs in comments (T28410)
21738 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
21740 <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>
21743 # Parsoid doesn't support this yet: see T75581
21744 # but it *should* omit the 'src' attribute if the image is bad.
21745 # PHP side of tests was disabled in
21746 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
21747 # because of issues in the PHP parserTests infrastructure
21748 # (but the output below is indeed what the PHP side emits)
21750 Bad images - basic functionality
21753 !! DISABLED/html/php
21755 <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>
21759 Bad images - T18039: text after bad image disappears
21764 !! DISABLED/html/php
21770 <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>
21775 Verify that displaytitle works (T24501) no displaytitle
21779 wgAllowDisplayTitle=true
21780 wgRestrictDisplayTitle=false
21782 this is not the the title
21785 <p>this is not the the title
21790 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
21795 wgAllowDisplayTitle=true
21796 wgRestrictDisplayTitle=false
21798 this is not the the title
21799 {{DISPLAYTITLE:whatever}}
21802 <p>this is not the the title
21807 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
21812 wgAllowDisplayTitle=true
21813 wgRestrictDisplayTitle=true
21815 this is not the the title
21816 {{DISPLAYTITLE:whatever}}
21819 <p>this is not the the title
21824 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
21829 wgAllowDisplayTitle=true
21830 wgRestrictDisplayTitle=true
21832 this is not the the title
21833 {{DISPLAYTITLE:screen}}
21836 <p>this is not the the title
21841 Verify that displaytitle works (T24501) AllowDisplayTitle=false
21846 wgAllowDisplayTitle=false
21848 this is not the the title
21849 {{DISPLAYTITLE:screen}}
21852 <p>this is not the the title
21853 <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>
21858 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
21863 wgAllowDisplayTitle=false
21865 this is not the the title
21868 <p>this is not the the title
21873 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
21878 wgAllowDisplayTitle=true
21879 wgRestrictDisplayTitle=true
21881 this is not the the title
21882 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
21884 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
21885 <p>this is not the the title
21890 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
21895 wgAllowDisplayTitle=true
21896 wgRestrictDisplayTitle=true
21898 this is not the the title
21899 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
21901 <span style="color: red;">s</span>creen
21902 <p>this is not the the title
21907 Page status indicators: Empty name is invalid
21911 <indicator name=" "></indicator>
21912 <indicator></indicator>
21914 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21915 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
21920 Page status indicators: Weird syntaxes that are okay
21924 <indicator name="empty" />
21925 <indicator name="name"></indicator>
21934 Page status indicators: Torture test
21938 <indicator name="01">hello world</indicator>
21939 <indicator name="02">[[Main Page]]</indicator>
21940 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
21941 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
21942 <indicator name="05">* foo
21944 <indicator name="06"><nowiki>foo</nowiki></indicator>
21945 <indicator name="07"> Preformatted</indicator>
21946 <indicator name="08"><div>Broken tag</indicator>
21947 <indicator name="09">{| class=wikitable
21950 <indicator name="10">Two
21952 paragraphs</indicator>
21955 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21956 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" />
21957 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>
21958 05=<ul><li> foo</li>
21962 07=<pre>Preformatted
21964 08=<div>Broken tag</div>
21966 09=<table class="wikitable">
21983 preload: check <noinclude> and <includeonly>
21987 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
21993 preload: check <onlyinclude>
21997 Goodbye <onlyinclude>Hello world</onlyinclude>
22003 preload: can pass tags through if we want to
22007 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
22009 <includeonly>Hello world</includeonly>
22013 preload: check that it doesn't try to do tricks
22017 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
22019 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
22023 Play a bit with r67090 and T5158
22025 <div style="width:50% !important"> </div>
22026 <div style="width:50% !important"> </div>
22027 <div style="width:50% !important"> </div>
22028 <div style="border : solid;"> </div>
22030 <div style="width:50% !important"> </div>
22031 <div style="width:50% !important"> </div>
22032 <div style="width:50% !important"> </div>
22033 <div style="border : solid;"> </div>
22036 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
22037 <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>
22038 <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>
22039 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
22044 HTML5 data attributes
22046 <span data-foo="bar">Baz</span>
22047 <p data-abc-def_hij="">Quuz</p>
22049 <p><span data-foo="bar">Baz</span>
22051 <p data-abc-def_hij="">Quuz</p>
22054 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
22055 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
22059 Strip reserved data attributes
22061 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
22063 <div data-ok="fred">d</div>
22066 <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>
22070 percent-encoding and + signs in internal links (T28410)
22072 [[User:+%]] [[Page+title%]]
22073 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
22074 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
22075 [[%33%45]] [[%33%45+]]
22077 <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>
22078 <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>
22079 <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>
22080 <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>
22083 <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>
22084 <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>
22085 <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":"missing-image","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>
22086 <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>
22090 Special characters in embedded file links (T29679)
22092 [[File:Contains & ampersand.jpg]]
22093 [[File:Does not exist.jpg|Title with & ampersand]]
22095 <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>
22096 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
22099 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}]}'><a href="./File:Contains_&_ampersand.jpg"><img resource="./File:Contains_&_ampersand.jpg" src="./Special:FilePath/Contains_&_ampersand.jpg" height="220" width="220"/></a></span>
22100 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"missing-image","message":"This image does not exist."}],"caption":"Title with &amp; ampersand"}'><a href="./File:Does_not_exist.jpg"><img resource="./File:Does_not_exist.jpg" src="./Special:FilePath/Does_not_exist.jpg" height="220" width="220"/></a></span></p>
22104 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
22106 Text's been normalized?
22108 <p>Text's been normalized?
22113 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
22115 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
22117 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
22122 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
22124 [http://www.example.org/ ideograms]
22126 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
22131 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
22133 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
22135 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
22159 T33098 Template which includes system messages which includes the template
22163 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22164 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
22169 T33490 Turkish: ucfirst 'blah'
22180 T33490 Turkish: ucfirst 'ix'
22191 T33490 Turkish: lcfirst 'BLAH'
22202 T33490 Turkish: ucfırst (with a dotless i)
22208 <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>
22213 T33490 ucfırst (with a dotless i) with English language
22219 <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>
22224 T28375: TOC with italics
22226 title=[[Main Page]]
22229 == ''Lost'' episodes ==
22231 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22233 <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>
22237 <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>
22242 T28375: TOC with bold
22244 title=[[Main Page]]
22247 == '''should be bold''' then normal text ==
22249 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22251 <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>
22255 <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>
22260 T35845: Headings become cursive in TOC when they contain an image
22262 title=[[Main Page]]
22265 == Image [[Image:foobar.jpg]] ==
22267 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22269 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
22273 <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>
22278 T35845 (2): Headings become bold in TOC when they contain a blockquote
22280 title=[[Main Page]]
22283 == <blockquote>Quote</blockquote> ==
22285 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22287 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22291 <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>
22295 <div id="toc" class="toc">
22296 <div id="toctitle" class="toctitle">
22300 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
22304 <h2><span class="mw-headline" id="Quote"></span></h2>
22306 <p><span class="mw-headline" id="Quote">Quote</span></p>
22308 <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>
22312 Unclosed tags in TOC
22314 title=[[Main Page]]
22318 <small>Hanc marginis exiguitas non caperet.</small>
22321 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22323 <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>
22327 <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>
22328 <p><small>Hanc marginis exiguitas non caperet.</small>
22334 Multiple tags in TOC
22337 == <i>Foo</i> <b>Bar</b> ==
22339 == <i>Foo</i> <blockquote>Bar</blockquote> ==
22341 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22343 <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>
22344 <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>
22348 <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>
22349 <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>
22353 <div id="toc" class="toc">
22354 <div id="toctitle" class="toctitle">
22358 <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>
22359 <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>
22363 <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>
22364 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
22366 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
22368 <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>
22371 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
22372 # html5 tag parsing.
22374 Tags with parameters in TOC
22379 == <sup class="in-h2">Hello</sup> ==
22381 == <sup class="a > b">Evilbye</sup> ==
22383 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22385 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
22386 <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>
22390 <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>
22391 <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>
22394 <meta property="mw:PageProp/toc" />
22395 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
22397 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
22401 span tags with directionality in TOC
22404 == <span dir="ltr">C++</span> ==
22406 == <span dir="rtl">זבנג!</span> ==
22408 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
22410 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
22412 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
22414 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22416 <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>
22417 <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>
22418 <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>
22419 <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>
22420 <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>
22424 <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>
22425 <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>
22426 <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>
22427 <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>
22428 <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>
22433 T74884: bdi element in ToC
22436 == <bdi>test</bdi> ==
22438 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22440 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
22444 <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>
22449 T35715: s/strike element in ToC
22452 == <s>test</s> test <strike>test</strike> ==
22454 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22456 <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>
22460 <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>
22464 # Note that the html output does not have the <p></p>, but the
22465 # html+tidy output *does*. This is because the empty <p></p> is
22466 # removed by the sanitizer, but only when tidy is *not* enabled (!).
22468 Empty <p> tag in TOC, removed by Sanitizer (T92892)
22473 <div id="toc" class="toc"><div id="toctitle" class="toctitle"><h2>Contents</h2></div>
22475 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22479 <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>
22483 <div id="toc" class="toc">
22484 <div id="toctitle" class="toctitle">
22488 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
22492 <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>
22498 == {{int:headline_sample}} ==
22502 T34057: Title needed when expanding <h> nodes.
22504 title=[[Main Page]]
22508 <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>
22513 Strip marker in urlencode
22515 {{urlencode:x<nowiki/>y}}
22516 {{urlencode:x<nowiki/>y|wiki}}
22517 {{urlencode:x<nowiki/>y|path}}
22518 {{urlencode:x<pre id="one">two</pre>y}}
22546 Strip marker in formatNum
22548 {{formatnum:1<nowiki/>2}}
22549 {{formatnum:1<nowiki/>2|R}}
22557 Check noCommafy in formatNum
22561 {{formatnum:123456.78}}
22562 {{formatnum:123456.78|NOSEP}}
22570 Wrong option for formatNum (T58199)
22572 {{formatnum:1,234.56|Random}}
22573 {{formatnum:1,234.56|EVERYTHING}}
22574 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
22583 Strip marker in grammar
22587 {{grammar:elative|foo<nowiki/>bar}}
22594 Strip marker in padleft
22596 {{padleft:|2|x<nowiki/>y}}
22603 Strip marker in padright
22605 {{padright:|2|x<nowiki/>y}}
22612 Strip marker in anchorencode
22614 {{anchorencode:x<nowiki/>y}}
22621 nowiki inside link inside heading (T20295)
22623 ==[[foo|x<nowiki>y</nowiki>z]]==
22625 <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>
22630 new support for bdi element (T33817)
22632 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22634 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
22639 Ignore pipe between table row attributes
22643 |- id=foo | style='color: red'
22651 <tr id="foo" style="color: red">
22658 Language parser function
22667 Padleft and padright as substr
22669 {{padleft:|3|abcde}}
22670 {{padright:|3|abcde}}
22678 Special parser function
22680 {{#special:RandomPage}}
22681 {{#special:BaDtItLe}}
22682 {{#special:Foobar}}
22691 T36939 - Case insensitive link parsing ([HttP://])
22693 [HttP://MediaWiki.Org/]
22695 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
22698 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
22702 T36939 - Case insensitive link parsing ([HttP:// title])
22704 [HttP://MediaWiki.Org/ MediaWiki]
22706 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
22711 T36939 - Case insensitive link parsing (HttP://)
22713 HttP://MediaWiki.Org/
22715 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
22718 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
22736 <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>
22737 <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>
22738 <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>
22739 <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>
22740 <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>
22746 ### Parsoid-specific tests
22747 ### Parsoid-PHP parser incompatibilities
22750 1. SOL-sensitive wikitext tokens as template-args
22752 parsoid=wt2html,wt2wt
22758 <span about="#mwt1" typeof="mw:Transclusion">
22759 </span><ul about="#mwt1"><li>a</li>
22761 <span about="#mwt2" typeof="mw:Transclusion">
22762 </span><ol about="#mwt2"><li>a</li>
22764 <span about="#mwt3" typeof="mw:Transclusion">
22765 </span><dl about="#mwt3"><dd>a</dd>
22769 #### -----------------------------------------------------------------
22770 #### Parsoid-specific functionality tests
22771 #### -----------------------------------------------------------------
22773 # T65642/T68749: Formatting elt fixup around images is cleaned up.
22774 # We know wt2wt will fail, but we expect selser to pass.
22775 # Due to the nature of our testing, wt2wt and selser tests will enter the
22776 # blacklist and we'll catch selser regressions based on changes to the
22777 # blacklist entries for selser tests.
22779 1. Bad treebuilder fixup of formatting elt is cleaned up
22781 parsoid=wt2html,wt2wt
22786 [[Image:Foobar.jpg|right|Test]]
22793 <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>
22800 2. Bad treebuilder fixup of formatting elt is cleaned up
22802 parsoid=wt2html,wt2wt
22804 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
22806 <small>[[Image:Foobar.jpg|right|300px]]</small>
22810 <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>
22812 <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>
22816 3. Bad treebuilder fixup of formatting elt is cleaned up
22818 parsoid=wt2html,wt2wt
22820 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
22822 <p><small><b>foo</b></small></p>
22823 <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>
22824 <p><small><b>bar</b></small></p>
22828 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
22830 parsoid=wt2html,wt2wt
22832 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
22834 <p><b><small></small></b></p>
22835 <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>
22839 #### ----------------------------------------------------------------
22840 #### Parsoid-only testing of Parsoid's impl of LST
22841 #### Not implemented yet, see
22842 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
22843 #### ----------------------------------------------------------------
22845 ## We still need to support serializing the older format while content is stored.
22847 LST Sections: Backwards compatibility
22850 "suppressErrors": true,
22851 "modes": ["html2wt"]
22854 <section begin="2011-05-16" />
22855 <section end="2014-04-10 (MW 1.23wmf22)" />
22857 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
22858 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
22861 ## The unconventional output is the result of `usePHPPreProcessor` being
22862 ## disabled in parserTests.js. This test is mainly just to show <section> is
22863 ## recognized as an extension tag w/o a native handler.
22865 LST Sections: Newfangled approach
22867 <section begin="2011-05-16" />
22868 <section end="2014-04-10 (MW 1.23wmf22)" />
22870 <p><span typeof="mw:Error mw:Extension/section" about="#mwt1" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null,"errors":[{"key":"mw-api-extexpand-error","message":"Could not expand extension source."}]}'><section begin="2011-05-16" /></span>
22871 <span typeof="mw:Error mw:Extension/section" about="#mwt2" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null,"errors":[{"key":"mw-api-extexpand-error","message":"Could not expand extension source."}]}'><section end="2014-04-10 (MW 1.23wmf22)" /></span></p>
22874 #--------- Test stripping of empty nodes in template content ----------
22876 Empty LI and TR nodes should be stripped from template content
22881 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
22885 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
22898 Empty LI and TR nodes should not be stripped from top-level content
22925 Empty TR nodes should not be stripped if they have any attributes set
22927 {{EmptyTRWithHTMLAttrTest}}
22929 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
22930 <tr align="center"></tr>
22931 <tr><td>foo</td></tr>
22932 <tr align="center"></tr>
22933 <tr><td>bar</td></tr>
22937 #### ----------------------------------------------------------------
22938 #### The following section of tests are primarily to test
22939 #### wikitext escaping capabilities of Parsoid. Given that
22940 #### escaping can be done any number of ways, the wikitext (input)
22941 #### is always adjusted to reflect how Parsoid adds nowiki
22944 #### We are marking several tests as parsoid-only since the
22945 #### HTML in the result section is different from what the
22946 #### PHP parser generates for it.
22947 #### ----------------------------------------------------------------
22950 #### --------------- Headings ---------------
22952 #### 1. Nested inside html <h1>=foo=</h1>
22953 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
22954 #### 3. Nested inside html with wikitext split by html tags
22955 #### 4. No escape needed
22956 #### 5. Empty headings <h1></h1>
22957 #### 6. Heading chars in SOL context
22958 #### ----------------------------------------
22960 Headings: 0. Unnested
22970 <p>=foo<i>a</i>=</p>
22972 <nowiki>=foo=</nowiki>
22974 <nowiki> </nowiki>=foo=
22976 <nowiki>=foo=</nowiki>
22978 =foo''a''<nowiki>=</nowiki>
22981 # New headings and existing headings are handled differently
22983 Headings: 1. Nested inside html
22991 <h1 data-parsoid=''>=foo=</h1>
22992 <h2 data-parsoid=''>=foo=</h2>
22993 <h3 data-parsoid=''>=foo=</h3>
22994 <h4 data-parsoid=''>=foo=</h4>
22995 <h5 data-parsoid=''>=foo=</h5>
22996 <h6 data-parsoid=''>=foo=</h6>
23004 =<nowiki>=foo=</nowiki>=
23005 ==<nowiki>=foo=</nowiki>==
23006 ===<nowiki>=foo=</nowiki>===
23007 ====<nowiki>=foo=</nowiki>====
23008 =====<nowiki>=foo=</nowiki>=====
23009 ======<nowiki>=foo=</nowiki>======
23014 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
23023 <nowiki>*</nowiki>bar
23029 <nowiki>=bar=</nowiki>
23033 Headings: 3. Nested inside html with wikitext split by html tags
23037 <h1>=<b>bold</b>foo=</h1>
23039 = ='''bold'''foo= =
23043 Headings: 4a. No escaping needed (testing just h1 and h2)
23054 <h1><i>=</i>foo=</h1>
23074 Headings: 4b. No escaping needed (inside p-tags)
23089 Headings: 5. Empty headings
23093 <h1 data-parsoid='{}'></h1>
23095 <h2 data-parsoid='{}'></h2>
23097 <h3 data-parsoid='{}'></h3>
23099 <h4 data-parsoid='{}'></h4>
23101 <h5 data-parsoid='{}'></h5>
23103 <h6 data-parsoid='{}'></h6>
23113 =====<nowiki/>=====
23115 ======<nowiki/>======
23119 Headings: 6a. Heading chars in SOL context (with trailing spaces)
23129 <nowiki>=a=</nowiki>
23131 <nowiki>=a=</nowiki>
23133 <nowiki>=a=</nowiki>
23137 Headings: 6b. Heading chars in SOL context (with trailing newlines)
23150 <nowiki>=a=</nowiki>
23153 <nowiki>=a=</nowiki>
23156 <nowiki>=a=</nowiki>
23161 Headings: 6c. Heading chars in SOL context (leading newline break)
23169 <nowiki>=b=</nowiki>
23173 Headings: 6d. Heading chars in SOL context (with interspersed comments)
23177 <!--c0--><p>=a=</p>
23179 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
23181 <!--c0--><nowiki>=a=</nowiki>
23183 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
23187 Headings: 6d. Heading chars in SOL context (No escaping needed)
23197 Headings: 7. Insert a newline between new content and headings
23203 <h2 data-parsoid='{}'>A</h2>
23204 <p data-parsoid='{}'>a</p>
23214 #### --------------- Lists ---------------
23215 #### 0. Outside nests (*foo, etc.)
23216 #### 1. Nested inside html <ul><li>*foo</li></ul>
23217 #### 2. Inside definition lists
23218 #### 3. Only bullets at start should be escaped
23219 #### 4. No escapes needed
23220 #### 5. No unnecessary escapes
23221 #### 6. Escape bullets in SOL position
23222 #### 7. Escape bullets in a multi-line context
23223 #### ----------------------------------------
23226 Lists: 0. Outside nests
23236 <nowiki>*</nowiki>foo
23238 <nowiki>#</nowiki>foo
23240 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
23243 ## Making these next 3 tests Parsoid-only since they are html2wt tests
23244 ## to test wikitext escaping, and insignificant whitespace diffs
23245 ## cause PHP parser tests to barf
23247 Lists: 1. Nested inside html (No unnecessary escapes)
23256 <li data-parsoid='{}'>*foo</li>
23257 <li data-parsoid='{}'>#foo</li>
23258 <li data-parsoid='{}'>:foo</li>
23259 <li data-parsoid='{}'>;foo</li>
23267 <li data-parsoid='{}'>*foo</li>
23268 <li data-parsoid='{}'>#foo</li>
23269 <li data-parsoid='{}'>:foo</li>
23270 <li data-parsoid='{}'>;foo</li>
23277 *<nowiki>*foo</nowiki>
23278 *<nowiki>#foo</nowiki>
23279 *<nowiki>:foo</nowiki>
23280 *<nowiki>;foo</nowiki>
23286 #<nowiki>*foo</nowiki>
23287 #<nowiki>#foo</nowiki>
23288 #<nowiki>:foo</nowiki>
23289 #<nowiki>;foo</nowiki>
23293 Lists: 2. Inside definition lists
23297 <dl><dt>;foo</dt></dl>
23298 <dl><dt>:foo</dt></dl>
23301 <dl><dd>:foo</dd></dl>
23305 ; <nowiki>:foo</nowiki>
23307 ; <nowiki>:foo</nowiki>
23314 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
23320 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
23324 *<nowiki>*foo</nowiki>''it''*bar
23328 Lists: 4. No escapes needed
23341 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
23345 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
23359 Lists: 5. No unnecessary escapes
23363 <ul><li> bar <span>[[foo]]</span></li></ul>
23364 <ul><li> =bar <span>[[foo]]</span></li></ul>
23365 <ul><li> [[bar <span>[[foo]]</span></li></ul>
23366 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
23367 <ul><li> =bar <span>foo]]</span>=</li></ul>
23368 <ul><li> <s></s>: a</li></ul>
23369 <ul><li> <i>* foo</i></li></ul>
23372 * bar <span><nowiki>[[foo]]</nowiki></span>
23374 * =bar <span><nowiki>[[foo]]</nowiki></span>
23376 * [[bar <span><nowiki>[[foo]]</nowiki></span>
23378 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
23380 * =bar <span>foo]]</span>=
23388 Lists: 6. Escape bullets in SOL position
23392 <p><!--cmt-->*foo</p>
23394 <!--cmt--><nowiki>*</nowiki>foo
23398 Lists: 7. Escape bullets in a multi-line context
23407 <nowiki>*</nowiki>b
23411 Lists: 8. Escape colons only if not present in tags
23415 <dl><dt>a:b<i>c:d</i></dt></dl>
23417 ; <nowiki>a:b</nowiki>''c:d''
23420 #### --------------- HRs ---------------
23421 #### 1. Single line
23422 #### -----------------------------------
23425 HRs: 1. Single line
23433 ----<nowiki>----</nowiki>
23438 #### --------------- Tables ---------------
23439 #### 1a. Simple example
23440 #### 1b. No escaping needed (!foo)
23441 #### 1c. No escaping needed (|foo)
23442 #### 1d. No escaping needed (|}foo)
23444 #### 2a. Nested in td (<td>foo|bar</td>)
23445 #### 2b. Nested in td (<td>foo||bar</td>)
23446 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
23448 #### 3a. Nested in th (<th>foo!bar</th>)
23449 #### 3b. Nested in th (<th>foo!!bar</th>)
23450 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
23454 #### 4c. No escaping needed
23455 #### --------------------------------------
23458 Tables: 1a. Simple example
23466 <nowiki>{|</nowiki>
23471 Tables: 1b. No escaping needed
23482 Tables: 1c. No escaping needed
23493 Tables: 1d. No escaping needed
23504 Tables: 2a. Nested in td
23509 <td>foo|bar</td></tr>
23510 <tr><td>x<div>a|b</div></td>
23514 |<nowiki>foo|bar</nowiki>
23516 |x<div><nowiki>a|b</nowiki></div>
23532 Tables: 2b. Nested in td
23538 <td>a<i>b||c</i></td>
23539 <td>a<i><div>b||c</div></i></td>
23540 </tr></tbody></table>
23543 |<nowiki>foo||bar</nowiki>
23544 |a''<nowiki>b||c</nowiki>''
23545 |a''<div><nowiki>b||c</nowiki></div>''
23554 <td>a<i><div>b||c</div></i>
23560 Tables: 2c. Nested in td -- no escaping needed
23576 Tables: 3a. Nested in th
23592 Tables: 3b. Nested in th
23597 <tr><th>foo!!bar</th>
23598 <th><i>foo|bar</i></th>
23599 <th><i>foo!!bar</i></th>
23600 <th><i><span>foo!!bar</span></i></th>
23601 </tr></tbody></table>
23604 !<nowiki>foo!!bar</nowiki>
23605 !''<nowiki>foo|bar</nowiki>''
23606 !''<nowiki>foo!!bar</nowiki>''
23607 !''<span><nowiki>foo!!bar</nowiki></span>''
23616 <th><i>foo!!bar</i>
23618 <th><i><span>foo!!bar</span></i>
23624 Tables: 3c. Nested in th
23629 <tr><th>foo||bar</th>
23630 <th><span typeof="mw:Nowiki">foo||bar</span></th>
23631 </tr></tbody></table>
23634 !<nowiki>foo||bar</nowiki>
23635 !<nowiki>foo||bar</nowiki>
23648 Tables: 4a. Escape -
23664 |<nowiki>-bar</nowiki>
23669 Tables: 4b. Escape +
23685 |<nowiki>+bar</nowiki>
23690 Tables: 4c. No escaping needed
23695 <tr><td>foo-bar</td><td>foo+bar</td></tr>
23696 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
23702 <div>a|b</div></td>
23747 Tables: 4d. No escaping needed
23752 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
23753 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
23754 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
23765 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
23775 T97430: Don't emit empty nowiki pairs around marker meta tags
23779 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23780 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
23782 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
23783 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
23787 Unclosed xmlish element in table line shouldn't eat end delimiters
23792 <tbody><tr><td> <foo</td>
23793 <td> bar></td></tr>
23810 #### --------------- Links ----------------
23811 #### 1. Quote marks in link text
23812 #### 2. Wikilinks: Escapes needed
23813 #### 3. Wikilinks: No escapes needed
23814 #### 4. Extlinks: Escapes needed
23815 #### 5. Extlinks: No escapes needed
23816 #### --------------------------------------
23818 Links 1. WikiLinks: No escapes needed
23822 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
23823 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
23824 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
23828 [[Foo|x [Foobar] x]]
23830 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
23831 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
23832 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
23837 Links 2. WikiLinks: Escapes needed
23841 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
23842 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
23843 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
23844 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
23845 <a href="Foo" rel="mw:WikiLink">|Bar</a>
23846 <a href="Foo" rel="mw:WikiLink">]]bar</a>
23847 <a href="Foo" rel="mw:WikiLink">[[bar</a>
23848 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
23849 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
23850 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
23852 [[Foo|<nowiki>Foobar]</nowiki>]]
23853 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
23854 [[Foo|<nowiki>[[Bar]]</nowiki>]]
23855 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
23856 [[Foo|<nowiki>|Bar</nowiki>]]
23857 [[Foo|<nowiki>]]bar</nowiki>]]
23858 [[Foo|<nowiki>[[bar</nowiki>]]
23859 [[Foo|<nowiki>x [[ y</nowiki>]]
23860 [[Foo|<nowiki>x ]] y</nowiki>]]
23861 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
23863 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
23864 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
23865 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
23866 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
23867 <a href="/wiki/Foo" title="Foo">|Bar</a>
23868 <a href="/wiki/Foo" title="Foo">]]bar</a>
23869 <a href="/wiki/Foo" title="Foo">[[bar</a>
23870 <a href="/wiki/Foo" title="Foo">x [[ y</a>
23871 <a href="/wiki/Foo" title="Foo">x ]] y</a>
23872 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
23877 Links 3. WikiLinks: No escapes needed
23881 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
23882 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
23887 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
23888 <a href="/wiki/Foo" title="Foo">foo|bar</a>
23893 Links 4. ExtLinks: Escapes needed
23897 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
23898 <a rel="mw:ExtLink" href="http://google.com">google]</a>
23899 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
23900 <p>[http://google.com]</p>
23901 <p>[http://google.com google]</p>
23902 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
23903 <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>
23905 [http://google.com <nowiki>[google]</nowiki>]
23906 [http://google.com <nowiki>google]</nowiki>]
23907 [http://google.com <nowiki>goog] le</nowiki>]
23909 <nowiki>[http://google.com]</nowiki>
23911 <nowiki>[http://google.com google]</nowiki>
23913 [http://google.com<nowiki>]</nowiki>
23915 [{{echo|http://google.com}}<nowiki>]</nowiki>
23917 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
23918 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
23919 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
23920 </p><p>[http://google.com]
23921 </p><p>[http://google.com google]
23922 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23923 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
23928 Links 5. ExtLinks: No escapes needed
23932 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
23933 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
23935 [http://google.com [google]
23937 [[http://google.com]]
23939 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
23940 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
23945 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
23949 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
23950 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
23951 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
23952 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
23953 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
23954 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
23955 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23956 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
23957 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
23958 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
23959 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
23960 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
23961 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
23964 x<nowiki/>http://example.com<nowiki/>y
23965 http://example.com<nowiki/>?x
23966 http://example.com<nowiki/>&x
23967 http://example.com<nowiki/>'x
23968 http://example.com<nowiki/>,x
23969 http://example.com<nowiki/>.x
23970 http://example.com<nowiki/>;x
23971 http://example.com<nowiki/>:x
23972 http://example.com<nowiki/>;x
23973 http://example.com<nowiki/>!x
23974 http://example.com<nowiki/>=x
23975 http://example.com<nowiki/>(x)
23976 http://example.com(x<nowiki/>)
23980 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
23985 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
23987 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
23988 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
23989 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
23990 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
23991 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
23997 "http://example.com"
23998 (http://example.com)
23999 (http://example.com) foo
24000 http://example.com,
24001 http://example.com, foo
24004 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
24006 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
24007 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
24008 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
24009 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
24010 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
24015 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
24019 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
24020 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
24022 http://example.com.,;:!?\
24023 -http://example.com:
24025 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
24026 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
24031 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
24035 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
24036 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
24037 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
24041 X<nowiki/>RFC 123<nowiki/>y
24045 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
24049 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
24050 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
24051 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
24058 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
24059 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
24060 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
24065 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
24069 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
24070 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24071 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
24075 X<nowiki/>PMID 123<nowiki/>y
24079 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
24083 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
24084 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
24085 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
24092 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
24093 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
24094 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
24099 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
24103 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
24104 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
24105 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
24108 ISBN 1234567890<nowiki/>1
24109 ISBN 1234567890<nowiki/>x
24110 a<nowiki/>ISBN 1234567890<nowiki/>b
24114 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
24118 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
24122 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
24127 Links 14. Protect link-like plain text. (Parsoid bug T78425)
24131 <p>this is not a link: http://example.com
24134 this is not a link: <nowiki>http://example.com</nowiki>
24138 Links 15. Link trails can't become link prefixes.
24143 <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>
24145 [[Söfnuður]]-[[00]]
24147 <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>
24151 #### --------------- Quotes ---------------
24152 #### 1. Quotes inside <b> and <i>
24153 #### 2. Link fragments separated by <i> and <b> tags
24154 #### 3. Link fragments inside <i> and <b>
24155 #### 4. No escaping needed
24156 #### --------------------------------------
24158 1a. Quotes inside <b> and <i>
24169 <b>foo'<i>bar'</i>baz</b>
24178 <i>fools'<span> errand</span></i>
24179 <i><span>fool</span>'s errand</i>
24180 '<i>foo</i> bar '<i>baz</i>
24181 a|!*#-:;+-~[]{}b'<i>x</i>
24185 ''<nowiki>''foo''</nowiki>''
24186 ''<nowiki>'''foo'''</nowiki>''
24188 '''<nowiki/>'foo''''
24189 '''<nowiki>''foo''</nowiki>'''
24190 '''<nowiki>'''foo'''</nowiki>'''
24191 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
24192 '''foo'''<nowiki/>'s
24198 '''foo'''<nowiki/>'
24199 ''''foo'''<nowiki/>'
24200 ''fools'<span> errand</span>''
24201 ''<span>fool</span>'s errand''
24202 '<nowiki/>''foo'' bar '''baz''
24203 a|!*#-:;+-~[]{}b'''x''
24207 1b. Quotes inside <b> and <i> with other tags on same line
24211 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24212 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
24213 <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>
24214 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
24215 '<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>
24216 '<i>foo</i> <div title="name">test</div>
24217 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
24218 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
24219 <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>
24222 '''a'' foo ''[[bar]]''
24223 ''a''' foo ''[[bar]]''
24224 ''a''' foo '''{{echo|[[bar]]}}'''
24225 [[foo]] x'''[[bar]]''
24226 '''foo'' <ref>test</ref>
24227 '''foo'' <div title="name">test</div>
24228 '''foo'' and <br> bar
24233 2. Link fragments separated by <i> and <b> tags
24237 <p>[[<i>foo</i>hello]]</p>
24238 <p>[[<b>foo</b>hello]]</p>
24240 [[''foo''<nowiki>hello]]</nowiki>
24242 [['''foo'''<nowiki>hello]]</nowiki>
24245 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
24246 # this is one of the shortcomings of this format
24248 3. Link fragments inside <i> and <b>
24252 <p><i>[[foo</i>]]</p>
24253 <p><b>[[foo</b>]]</p>
24255 ''[[foo''<nowiki>]]</nowiki>
24257 '''[[foo'''<nowiki>]]</nowiki>
24261 4. No escaping needed
24265 <p>'<span><i>bar</i></span>'
24266 '<span><b>bar</b></span>'
24270 '<span>''bar''</span>'
24271 '<span>'''bar'''</span>'
24275 #### ----------- Paragraphs ---------------
24276 #### 1. No unnecessary escapes
24277 #### --------------------------------------
24280 1. No unnecessary escapes
24284 <p>bar <span>[[foo]]</span>
24285 </p><p>=bar <span>[[foo]]</span>
24286 </p><p>[[bar <span>[[foo]]</span>
24287 </p><p>]]bar <span>[[foo]]</span>
24288 </p><p>=bar <span>foo]]</span>=
24291 bar <span><nowiki>[[foo]]</nowiki></span>
24293 =bar <span><nowiki>[[foo]]</nowiki></span>
24295 [[bar <span><nowiki>[[foo]]</nowiki></span>
24297 ]]bar <span><nowiki>[[foo]]</nowiki></span>
24299 =bar <span>foo]]</span><nowiki>=</nowiki>
24302 #### ----------------------- PRE --------------------------
24303 #### 1. Leading whitespace in SOL context should be escaped
24304 #### ------------------------------------------------------
24306 1. Leading whitespace in SOL context should be escaped
24329 <nowiki> </nowiki>a
24331 <nowiki> </nowiki> a
24335 <nowiki> </nowiki> a
24337 <nowiki> </nowiki>a
24340 <nowiki> </nowiki>b
24363 2. Leading whitespace in non-indent-pre contexts should not be escaped
24367 <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>
24368 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
24369 <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>
24379 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
24398 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
24402 <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>
24404 [[File:Foobar.jpg|thumb|caption]]
24408 5. Nowiki escaping should account for indent-pres
24418 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
24431 #### --------------- Behavior Switches --------------------
24434 1. Valid behavior switches should be escaped
24441 <nowiki>__TOC__</nowiki>
24442 ''<nowiki>__TOC__</nowiki>''
24446 2. Invalid behavior switches should not be escaped
24457 # We use indent-pre as an indirect way to test for sol-transparent behavior.
24459 Behavior switches should be SOL-transparent
24463 <meta property="mw:PageProp/toc" />
24465 <!-- this one's bogus -->
24468 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
24470 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
24474 <!-- this one's bogus -->
24483 #### --------------- HTML tags ---------------
24486 #### 3. multi-line html tag
24487 #### 4. extension tags
24488 #### -----------------------------------------
24494 <a href="http://google.com">google</a>
24496 <a href="http://google.com">google</a>
24504 <ul><li> <div>foo</div></li>
24505 <li> <div style="color:red">foo</div></li>
24506 <li> <td></li></ul>
24509 * <nowiki><div>foo</div></nowiki>
24510 * <nowiki><div style="color:red">foo</div></nowiki>
24511 * <nowiki><td></nowiki>
24515 3. multi-line html tag
24534 <p><ref>foo</ref>
24535 </p><p><ref>bar
24536 </p><p>baz</ref>
24539 <nowiki><ref>foo</ref></nowiki>
24541 <nowiki><ref>bar</nowiki>
24543 baz<nowiki></ref></nowiki>
24546 #### --------------- Others ---------------
24552 <p><nowiki>foo</nowiki>
24555 <nowiki>foo</nowiki>
24558 ## The quote-char in the input is necessary for triggering the bug
24560 (T54035) Nowiki-escaping should not get tripped by " :" in text
24569 #----------- End of wikitext escaping tests --------------
24573 Tag-like HTML structures are passed through as text
24595 </p><p>1<d e>f
24600 HTML tag with necessary entities in attributes
24602 <span title="&amp;">foo</span>
24604 <p><span title="&amp;">foo</span>
24609 HTML tag with 'unnecessary' entity encoding in attributes
24611 <span title="&">foo</span>
24613 <p><span title="&">foo</span>
24618 HTML tag with broken attribute value quoting
24620 parsoid=wt2html,html2html
24622 <span title="Hello world>Foo</span>
24624 <p><span title="Hello world">Foo</span>
24627 <p><span title="Hello world">Foo</span></p>
24631 Self-closed tag with broken attribute value quoting
24633 parsoid=wt2html,html2html
24635 <div title="Hello world />Foo
24637 <div title="Hello world"></div>
24640 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
24644 Table with broken attribute value quoting
24646 parsoid=wt2html,html2html
24649 | title="Hello world|Foo
24654 <td title="Hello world">Foo
24660 <td title="Hello world">Foo
24666 Table with broken attribute value quoting on consecutive lines
24668 parsoid=wt2html,html2html
24671 | title="Hello world|Foo
24672 | style="color:red|Bar
24677 <td title="Hello world">Foo
24679 <td style="color:red">Bar
24685 <td title="Hello world">Foo
24686 </td><td style="color: red">Bar
24687 </td></tr></tbody></table>
24692 Accept empty td cell attribute
24695 | align="center" | foo || |
24700 <td align="center"> foo </td>
24707 Non-empty attributes in th-cells
24710 ! Foo !! style="color: red" | Bar
24716 <th style="color: red"> Bar
24722 Accept empty attributes in th-cells
24737 Empty table rows go away
24758 ### Parsoid-centric tests for testing RTing of inter-element separators
24759 ### Edge cases not tested by existing parser tests and specific to
24760 ### Parsoid-specific serialization strategies.
24764 RT-ed inter-element separators should be valid separators
24776 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
24780 # Parsoid-only since PHP parser relies on Tidy for correct output
24782 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
24796 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
24797 <p>bar</p></small></td></tr>
24801 <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>
24805 # Note that the "style" attribute is really a template parameter here.
24806 # The = would have to be {{=}} if you wanted the literal.
24808 Empty TD followed by TD with tpl-generated attribute
24813 |{{echo|style='color:red'}}|foo
24827 Indented table with an empty td
24845 ## We have some newline diffs RT-ing this edge case
24846 ## and it is not important enough -- we seem to be emitting
24847 ## at most 2 newlines after a </tr> and this is unrelated to
24848 ## the issue from T85627 that this is testing.
24850 Indented table with blank lines in between (T85627)
24869 Indented block & table
24883 <div data-parsoid='{"stx":"html"}'>foo</div>
24885 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
24890 Indent and comment before table row
24905 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
24906 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
24910 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
24912 Empty TR followed by a template-generated TR
24918 {{echo|<tr><td>foo</td></tr>}}
24924 <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}}]}'>
24929 ## PHP and parsoid output differ for this, and since this is primarily
24930 ## for testing Parsoid's serializer, marking this Parsoid only
24932 Empty TR followed by mixed-ws-comment line should RT correctly
24948 <!--c--> </tr><!--d-->
24954 Multi-line image caption generated by templates with/without trailing newlines
24956 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
24957 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
24959 <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>
24960 <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>
24964 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
24968 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
24970 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
24972 <includeonly>foo</includeonly>
24980 ## PHP emits broken html for this, and since this is primarily
24981 ## a Parsoid serializer test, marking this Parsoid only
24983 Improperly nested inline or quotes tags with whitespace in between
24985 <span> <s>x</span> </s>
24988 <p><span> <s>x</s></span><s> </s>
24989 <b> <i>x</i></b><i> </i>
24994 Encapsulate protected attributes from wt
24996 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
24998 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
25002 <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>
25004 <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">
25005 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
25009 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
25010 ## Having nested or stray pre tags results in the attempt to add duplicates,
25011 ## causing an assertion fail. This test tries to prevent that situation.
25013 Ensure ParagraphWrapper can deal with stray closing pre tags
25023 1. Ensure fostered text content is wrapped in element nodes
25027 <table>hi</table><table>ho</table>
25036 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
25038 parsoid=wt2html,wt2wt
25047 <tbody><tr><td> a</td></tr>
25052 Encapsulation properly handles null DSR information from foster box
25054 parsoid=wt2html,wt2wt
25056 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
25058 <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>
25062 1. Encapsulate foster-parented transclusion content
25064 parsoid=wt2wt,wt2html
25066 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
25068 <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>
25078 2. Encapsulate foster-parented transclusion content
25080 parsoid=wt2wt,wt2html
25082 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
25084 <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>
25095 3. Encapsulate foster-parented transclusion content
25097 parsoid=wt2wt,wt2html
25099 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25101 <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>"]}">
25114 4. Encapsulate foster-parented transclusion content
25116 parsoid=wt2wt,wt2html
25118 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
25120 <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>"]}">
25133 5. Encapsulate foster-parented transclusion content
25135 parsoid=wt2wt,wt2html
25137 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
25139 <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>
25154 6. Encapsulate foster-parented transclusion content
25156 parsoid=wt2wt,wt2html
25158 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
25160 <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>
25176 7. Encapsulate foster-parented transclusion content
25178 parsoid=wt2wt,wt2html
25180 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
25182 <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>
25192 # Note that the wt is broken on purpose: the = should be {{=}} if you
25193 # don't want it to be a template parameter key.
25195 8. Encapsulate foster-parented transclusion content
25197 parsoid=wt2wt,wt2html
25200 }}{|{{echo|style='color:red'}}
25205 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
25207 <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>
25218 9. Encapsulate foster-parented transclusion content
25220 parsoid=wt2wt,wt2html
25222 <table>{{echo|hi</table>hello}}
25224 <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>
25228 Table in fosterable position
25239 <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">
25241 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
25247 # Parsoid only for T66747
25249 Properly encapsulate empty-content transclusions in fosterable positions
25257 <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"}]]}'>
25263 Always encapsulate foster box when template range is expanded to table
25276 T115289: Unclosed table
25278 {{echo|<table>}}<!--c-->[[Category:Two]]
25280 <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>
25284 T115289: Don't migrate newlines out of tables with fostered content
25286 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
25288 <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>
25292 T73074: More fostering fun
25294 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
25296 <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>
25300 Support <object> element with .data attribute
25304 <object data="test.swf"></object>
25306 <object data="test.swf"></object>
25310 Don't block XML namespace declaration
25312 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25314 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
25317 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
25320 # -----------------------------------------------------------------
25321 # The following section of tests are primarily to spec requirements
25322 # around Parsoid's serialization (old, new, edited content)
25324 # All these tests are marked Parsoid html2wt and html2html only
25325 # ----------------------------------------------------------------
25328 Ignore rel attribute in a-tags during serialization to url-links
25332 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
25333 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
25334 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
25336 http://en.wikipedia.org/wiki/Foobar
25337 http://en.wikipedia.org/wiki/Foobar
25338 http://en.wikipedia.org/wiki/Foobar
25341 # 'mi' is a localinterwiki prefix as well as a language
25343 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
25347 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
25354 New wikilinks should be serialized properly
25358 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
25359 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
25360 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
25361 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
25362 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
25366 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
25367 http://en.wikipedia.org/wiki/Foo
25368 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
25372 New wiki links (href variations)
25376 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25377 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
25378 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
25379 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
25384 [[Toxine bactérienne]]
25388 New wiki links (content string variations)
25392 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
25393 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
25394 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
25398 [[Foo_bar|./Foo_bar]]
25402 New category links (href variations)
25406 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
25407 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
25408 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
25410 [[Category:Toxine bactérienne]]
25411 [[Category:Toxine bactérienne]]
25412 [[Category:Toxine bactérienne]]
25416 New sol transparent links don't need indent-pre nowiki protection
25421 <link rel="mw:PageProp/redirect" href="./Main_Page">
25422 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
25423 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
25425 #WEITERLEITUNG [[Main Page]]
25426 <!-- this is good --> [[Category:Good]]
25427 <!-- this is great --> [[Kategorie:Great]]
25431 New interlanguage links (href variations)
25435 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
25436 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
25437 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
25439 [[es:Toxine bactérienne]]
25440 [[es:Toxine_bactérienne]]
25441 [[es:Toxine_bactérienne]]
25445 Image: Modifying size of an image (1)
25448 "modes": ["wt2wt"],
25450 ["img[height]", "attr", "height", "22"],
25451 ["img[width]", "attr", "width", "200"]
25455 [[Image:Foobar.jpg|230x230px]]
25457 [[Image:Foobar.jpg|200x200px]]
25461 Image: Modifying size of an image (2)
25464 "modes": ["wt2wt"],
25466 ["img[height]", "attr", "height", "100"],
25467 ["img[width]", "attr", "width", "500"]
25471 [[Image:Foobar.jpg|230x230px]]
25473 [[Image:Foobar.jpg|500x500px]]
25476 # Change in size is ignored so long as class='mw-default-size'
25478 Image: Modifying size of an image (3)
25481 "modes": ["wt2wt"],
25483 ["figure[class]", "removeClass", "mw-default-size"],
25484 ["figure img", "attr", "height", "19"],
25485 ["figure img", "attr", "width", "170"]
25489 [[Image:Foobar.jpg|thumb]]
25491 [[Image:Foobar.jpg|thumb|170x170px]]
25495 Image: Modifying alignment of an image (T50665)
25498 "modes": ["wt2wt"],
25500 ["figure[class]", "removeClass", "mw-halign-right"],
25501 ["figure[class]", "addClass", "mw-halign-left"]
25505 [[Image:Foobar.jpg|thumb|caption|right]]
25507 [[Image:Foobar.jpg|thumb|caption|left]]
25511 Image: Modifying mw-default-size of an frameless image (T64805)
25514 "modes": ["wt2wt"],
25516 ["figure.mw-default-size", "removeClass", "mw-default-size"]
25520 [[Image:Foobar.jpg|frameless|right]]
25522 [[Image:Foobar.jpg|frameless|right|220x220px]]
25526 Image: Modifying valign of an image (T51221)
25529 "modes": ["wt2wt"],
25531 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
25532 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
25536 [[File:Foobar.jpg|20px|middle]]
25538 [[File:Foobar.jpg|20px|text-top]]
25542 Image: Modifying alt attribute of an image (T58400)
25545 "modes": ["wt2wt"],
25547 ["img[alt]", "attr", "alt", "some alternate edited text"]
25551 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
25553 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
25557 Image: Modifying caption of an image
25560 "modes": ["wt2wt"],
25562 ["figcaption", "text", "new caption"]
25566 [[Image:Foobar.jpg|thumb|original caption]]
25568 [[Image:Foobar.jpg|thumb|new caption]]
25572 Image: empty alt attribute (T50924)
25576 [[File:Foobar.jpg|thumb|alt=|bar]]
25578 <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>
25582 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
25588 <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>
25590 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
25594 Image: Block level image should have \n before and after
25597 [[File:Foobar.jpg|right|thumb|150x150px]]
25601 <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>
25606 Image: New block level image should have \n before and after (existing content)
25609 [[File:Foobar.jpg|right|thumb|150x150px]]
25613 <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>
25618 Image: upright option (parsoid)
25620 [[File:Foobar.jpg|thumb|upright|caption]]
25621 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
25622 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
25624 <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>
25625 <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>
25626 <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>
25630 Image: upright option is ignored on inline and frame images (parsoid)
25632 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
25634 <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>
25638 Image: from basic HTML (1)
25642 <span typeof="mw:Image">
25643 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25646 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25650 Image: from basic HTML (2)
25654 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
25656 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
25660 Image: from basic HTML (3)
25664 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
25666 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
25670 Image: from basic HTML (4)
25674 <img src="./File:Foobar.jpg">
25676 [[File:Foobar.jpg|link=]]
25680 Image: Invalid title as link
25682 [[File:Foobar.jpg|link=<]]
25684 <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>
25687 <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>
25691 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
25696 <li><p>foo</p></li>
25703 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
25707 <ul> <li>foo</li></ul>
25713 Don't strip leading whitespace when handling indent-pre suppressing tags
25718 <tr><td> indented row</td></tr>
25721 <b>This is very bold of you!</b>
25724 indented cell (no pre-wrapping!)
25734 '''This is very bold of you!'''
25738 indented cell (no pre-wrapping!)
25746 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
25768 <nowiki> </nowiki></span>bar2
25771 <nowiki> </nowiki><span>bar</span>
25774 <nowiki> </nowiki><span>foo</span>
25779 Lists: Dont insert newlines in a serialized list item.
25783 <ul><li>a<br>b</li><li>c</li></ul>
25790 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
25793 "modes": ["html2wt"],
25794 "scrubWikitext": false
25797 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25798 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25800 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25801 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25803 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
25805 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25807 == hello there [[Category:A1]] ==
25809 == [[Category:A2]] hi pal ==
25811 == <!--foo--> [[Category:A3]] how goes it ==
25813 == it goes well [[Category:A4]] <!--bar--> ==
25815 ==howdy [[Category:A5]]==
25821 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
25824 "modes": ["html2wt"],
25825 "scrubWikitext": true
25828 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
25829 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
25831 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
25832 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
25834 <h2><meta property="mw:PageProp/toc" /> ok</h2>
25842 <!--foo--> [[Category:A3]]
25847 [[Category:A4]] <!--bar-->
25855 Headings: Don't hoist metas that come from templates
25858 "modes": ["html2wt"],
25859 "scrubWikitext": true
25862 <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>
25864 == {{echo|foo [[Category:Foo]]}} ==
25868 Headings: Category in ref isn't hoisted
25871 "modes": ["html2wt"],
25872 "scrubWikitext": true
25875 <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>
25877 <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>
25880 [[Category:Baz]] </ref> ==
25886 Parsoid: Serialize positional parameters with = in them as named parameter
25890 <p about="#mwt1" typeof="mw:Transclusion"
25891 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
25893 <p about="#mwt1" typeof="mw:Transclusion"
25894 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
25896 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25897 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25898 <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>
25902 {{echo|1=f=oo|2=bar}}
25904 <!--Orig params with data-parsoid has heuristics for handling = chars-->
25905 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
25906 {{echo|<nowiki>f=oo</nowiki>|bar}}
25910 Parsoid: Serialize positional parameters with = in extlink as named parameter
25914 <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>
25916 {{echo|1=http://stuff?is=ok}}
25920 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
25924 <div>a<p>b</p></div>
25945 Substrings resembling wikitext in hrefs should not get nowiki escapes
25949 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
25955 Enforce single-line context in the serializer
25962 <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">
25963 </span><span about="#mwt1">you</span> </h2>
25965 <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>
25967 <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
25968 there</span></li></ol>
25980 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
25987 </tbody></table></dd></dl>
25991 == hi {{bogus|there
26002 * foo '''bar''' baz
26014 Serialize new placeholder space without spans
26018 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
26020 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
26022 <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>
26028 <ref>foo : bar</ref>ok
26032 #-----------------------
26033 # Tag minimization tests
26034 #-----------------------
26037 1. I/B quote minimization: wikitext-only tags should be combined
26041 <p><i>A</i><i>B</i></p>
26042 <p><b>A</b><b>B</b></p>
26043 <p><i>A</i><b><i>B</i></b></p>
26044 <p><b>A</b><i><b>B</b></i></p>
26045 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
26046 <p><i><b>A</b></i><i><b>B</b></i></p>
26047 <p><i><b>A</b></i><b><i>B</i></b></p>
26048 <p><b><i>A</i></b><i><b>B</b></i></p>
26068 2. I/B quote minimization: wikitext and html tags should not be combined
26072 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
26073 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
26077 ''A''<nowiki/>'''<i>B</i>'''
26081 3. I/B quote minimization: templated content stops minimization
26085 <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>
26086 <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>
26088 ''A''{{echo|''B''}}
26090 ''A''{{echo|'''''B'''''}}
26094 4. I/B quote minimization: new content should be mimimized with adjacent old content
26098 <p><i>A</i><i>B</i></p>
26099 <p><b>A</b><b>B</b></p>
26100 <p><i>A</i><b><i>B</i></b></p>
26110 5a. Merge adjacent quote nodes if they've been edited
26113 "modes": ["wt2wt", "selser"],
26115 ["p", "contents", "remove", ":contains('b')"]
26125 5b. Merge adjacent quote nodes if they've been edited
26128 "modes": ["wt2wt", "selser"],
26134 ''a''<span id="x">b</span>''c''
26140 1. Merge adjacent link nodes as long as at least one element is new
26143 "modes": ["html2wt"],
26144 "scrubWikitext": true
26147 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26148 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26149 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
26153 [[Football|Foot]][[Football|ball]]
26157 2. Merge adjacent link nodes and enable additional normalizations
26160 "modes": ["html2wt"],
26161 "scrubWikitext": true
26164 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
26166 [[Football|''Football'']]
26170 3. Don't merge adjacent link nodes if scrubWikitext is false
26173 "modes": ["html2wt"],
26174 "scrubWikitext": false
26177 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
26179 [[Football|Foot]][[Football|ball]]
26182 #------------------------------
26183 # End of tag minimization tests
26184 #------------------------------
26187 T56262: New entities
26191 <span typeof="mw:Entity"> </span>
26196 ## Note that there is no wikitext output for 'unknownproperty' ##
26197 ## Unknown magic words are silently dropped ##
26204 <meta property='mw:PageProp/toc' />
26205 <meta property='mw:PageProp/notoc' />
26206 <meta property='mw:PageProp/forcetoc' />
26207 <meta property='mw:PageProp/index' />
26208 <meta property='mw:PageProp/noindex' />
26209 <meta property='mw:PageProp/nogallery' />
26210 <meta property='mw:PageProp/noeditsection' />
26211 <meta property='mw:PageProp/notitleconvert' />
26212 <meta property='mw:PageProp/nocontentconvert' />
26213 <meta property='mw:PageProp/unknownproperty' />
26223 __NOCONTENTCONVERT__
26227 Consecutive <pre>s should not get merged
26229 parsoid=html2wt,html2html
26231 <pre>a</pre><pre>b</pre>
26259 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
26263 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
26265 [[Special:BookSources/1234567890|ISBN 1234567895]]
26269 Edited RFC links not serializable as RFC links should serialize as extlinks
26273 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
26275 [//tools.ietf.org/html/rfc123 New RFC]
26279 Edited PMID links not serializable as PMID links should serialize as extlinks
26283 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
26285 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
26289 WTS of autolinks with trailing/surrounding context
26293 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
26294 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
26295 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
26296 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
26297 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
26298 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
26300 http://cscott.net'''foo'''
26302 http://cscott.net<b>foo</b>
26304 '''http://cscott.net'''
26306 '''http://cscott.net '''
26308 '''http://cscott.net<nowiki/>x'''
26310 http://cscott.net<nowiki/>x
26314 WTS of autolinks with nowikis (round-trip)
26316 x<nowiki/>http://cscott.net<nowiki/>x
26318 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
26321 # this is the "easy" test because it leaves in place all the
26322 # data-parsoid information indicating this is an autolink
26324 WTS of autolinks with escapes (editing)
26327 "modes": ["wt2wt"],
26329 [ "span", "remove" ]
26333 x<nowiki/>http://cscott.net<nowiki/>x
26335 x<nowiki/>http://cscott.net<nowiki/>x
26339 WTS of edited autolink-like text (T103364)
26342 "modes": ["wt2wt"],
26344 [ "span[typeof]", "removeAttr", "typeof" ]
26348 Not a link: <nowiki>http://example.com</nowiki>.
26350 Not a link: <span><nowiki>http://example.com</nowiki></span>.
26354 WTS of newly-authored autolink-like text (T103364)
26358 <p>http://example.com is not a link.</p>
26360 <nowiki>http://example.com</nowiki> is not a link.
26364 WTS of autolink-like text after an autolink (T108563)
26368 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
26370 http://example.com <nowiki>http://example.com</nowiki> is not a link.
26374 Magic links inside links (not autolinked)
26376 [[Foo|http://example.com]]
26379 [[Foo|ISBN 123456789x]]
26381 [http://foo.com http://example.com]
26382 [http://foo.com RFC 1234]
26383 [http://foo.com PMID 1234]
26384 [http://foo.com ISBN 123456789x]
26386 <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>
26387 <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>
26389 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
26390 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
26391 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
26392 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
26394 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
26395 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
26396 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
26397 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
26401 Magic links inside image captions (autolinked)
26403 [[File:Foobar.jpg|thumb|http://example.com]]
26404 [[File:Foobar.jpg|thumb|RFC 1234]]
26405 [[File:Foobar.jpg|thumb|PMID 1234]]
26406 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
26408 <div class="thumb tright">
26409 <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>
26410 <div class="thumbcaption">
26411 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26412 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
26415 <div class="thumb tright">
26416 <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>
26417 <div class="thumbcaption">
26418 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26419 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
26422 <div class="thumb tright">
26423 <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>
26424 <div class="thumbcaption">
26425 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26426 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
26429 <div class="thumb tright">
26430 <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>
26431 <div class="thumbcaption">
26432 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
26433 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
26437 <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>
26438 <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>
26439 <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>
26440 <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>
26444 WTS of magic word text (T109371)
26449 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
26450 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
26452 <nowiki>RFC 1234</nowiki>
26454 [http://foo.com RFC 1234]
26460 Edited Redirect link should emit a non-piped wikitext link
26464 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
26470 T75121: Infer extension name from typeOf if data-mw is not present
26472 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26474 <div typeOf="mw:Extension/foo"></div>
26479 # Note that the <p> wrapping isn't present in PHP parser output
26480 # The important thing for this test is that P-wrapping doesn't
26481 # interfere with the <nowiki> protection for leading - in <td>
26482 # (which isn't necessary for <th>).
26484 T88318: p-wrapped dash in table.
26486 parsoid=html2wt,wt2wt
26489 <tr><th><p>-</p></th><th><p>- </p></th></tr>
26490 <tr><td><p>-</p></td><td><p>- </p></td></tr>
26491 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
26498 |<nowiki>-</nowiki>
26499 |<nowiki>- </nowiki>
26518 <td><small>-</small></td>
26530 T149209: WTS: Handle newlines in table cells properly
26538 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
26540 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
26546 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
26548 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
26570 T149209: Selser: Handle newlines in table cells properly
26573 "modes": ["selser"],
26575 [ "#h1", "html", "a\nb\n" ],
26576 [ "#h2", "html", "a\nb\n" ],
26577 [ "#c1", "html", "a\nb\n" ],
26578 [ "#c2", "html", "<p>a</p>" ],
26579 [ "#c3", "html", "<p>a</p>" ],
26580 [ "#c4", "html", "edit-me<p>a</p>" ]
26585 ! id="h1" |edit-me!!1
26587 ! id="h2" |edit-me||2
26589 | id="c1" |edit-me||3
26591 | id="c2" |edit-me||4
26593 | id="c3" |edit-me||p||q||r
26595 | id="c4" |edit-me||p||q||r
26624 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
26629 <td id='mwAc'>foo</td>
26630 <td id='serialize-this'>bar</td>
26635 | id="serialize-this" |bar
26640 Parsoid-like element ids should not be serialized to wikitext unless shadowed
26644 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
26646 <div id="hello">ok</div>
26653 "modes": ["wt2wt"],
26655 [ "#xyz", "before", "<b>before</b> stuff " ],
26656 [ "#xyz", "after", " stuff <i>after</i>" ],
26657 [ "#xyz", "html", "x <b>y</b> z" ]
26661 <span id="xyz">hello</span>
26663 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
26667 Never serialize a-tag as html, regardless of what data-parsoid has to say
26669 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26671 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
26676 ## SSS FIXME: This is broken output nevertheless.
26677 ## What might be a reasonable non-broken output for this?
26678 ## This is an edge case unlikely to be seen in production
26679 ## that I am not wasting more time on this right now.
26681 Never serialize a-tag as html, no matter what attributes it has
26683 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
26685 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
26687 [http://boo.org http://boohoo.org]
26690 # Misnested is an indication that selser can reuse the source but these have
26691 # shown to sneak through on occasion. See T101768.
26692 # The original wikitext here is: [http://test.com [[one]] two three]
26694 Strip span tags added to mark misnested links
26698 <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>
26700 [http://test.com][[one]] two three
26704 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
26708 <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|}"]}'>
26720 ## This test verifies the presence and computation of this attribute indirectly
26721 ## by making an edit and ensuring that the serialization is correct (which it would be
26722 ## only if firstWikitextNode is properly set).
26724 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
26727 "modes": ["wt2wt"],
26729 [ "div#x", "remove" ],
26730 [ "div", "before", "<div>new</div>" ]
26734 <div id="x">foo</div>
26736 {{echo|<div>boo</div>
26744 {{echo|<div>boo</div>
26750 # --------------------------------------------
26751 # Tests spec'ing wikitext serialization norms |
26752 # --------------------------------------------
26755 Serialize multi-line indent-pre starting with wikitext syntax
26769 1. Categories should always be serialized on their own line
26773 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
26781 2. Categories that are part of templates should not introduce a line break
26783 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
26785 <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>
26788 # Careful while editing these next 2 tests. There are \u200f characters
26789 # before and after the <link> tags in the HTML and following some
26790 # of the categories in wikitext
26791 # Do not remove these characters in edits.
26793 # As part of the serialization, these bidi characters will get stripped.
26795 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
26798 "modes": ["html2wt"],
26799 "scrubWikitext": true
26802 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
26803 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
26806 [[קטגוריה: שיטות משפט]]
26810 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
26813 "modes": ["html2wt"],
26814 "scrubWikitext": true
26817 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
26824 Lists: Add space after bullets
26831 <li><span> baz</span></li>
26836 * <span> baz</span>
26840 1. Headings: Add space before/after == (T53744)
26847 <h2><span> baz</span></h2>
26855 == <span> baz</span> ==
26859 2. Headings: Add space before/after == even after hoisted content
26862 "modes": ["html2wt"],
26863 "scrubWikitext": true
26866 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
26874 1. Headings: suppress newly created empty headings
26877 "modes": ["html2wt"],
26878 "scrubWikitext": true
26886 2. Headings: don't suppress empty headings if scrubWikitext is false
26896 3. Headings: suppress empty headings on edits
26899 "modes": ["selser"],
26900 "scrubWikitext": true,
26906 ==<span id="x">foo</span>==
26911 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
26914 "modes": ["html2wt"],
26915 "scrubWikitext": true
26918 <h2>foo<br/>bar</h2>
26919 <h2>foo <span><br/>bar</span> baz</h2>
26923 == foo <span> bar</span> baz ==
26927 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
26930 "modes": ["html2wt"],
26931 "scrubWikitext": false
26934 <h2>foo<br/>bar</h2>
26940 1. WT Quote Tags: suppress newly created empty style tags
26943 "modes": ["html2wt"],
26944 "scrubWikitext": true
26952 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
26958 ''<nowiki/>'''''<nowiki/>'''
26962 3. WT Quote Tags: suppress empty style tags on edits
26965 "modes": ["selser"],
26966 "scrubWikitext": true,
26972 '''<span id="x">foo</span>'''
26977 1. Anchors: suppress newly created empty anchors
26980 "modes": ["html2wt"],
26981 "scrubWikitext": true
26984 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
26989 2. Anchors: don't suppress empty anchors if scrubWikitext is false
26992 "modes": ["html2wt"],
26993 "scrubWikitext": false
26996 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
27002 3. Anchors: suppress empty anchors on edits
27005 "modes": ["selser"],
27006 "scrubWikitext": true,
27012 [[Test|<span id="x">foo</span>]]
27017 3a. Anchors: do not suppress numbered extlinks
27020 "modes": ["wt2wt"],
27021 "scrubWikitext": true
27026 <a rel="mw:ExtLink" href="http://foo.com"></a>
27030 3b. Anchors: do not suppress numbered extlinks
27033 "modes": ["wt2wt"],
27034 "scrubWikitext": true,
27040 [http://foo.com <span id="x">foo</span>]
27046 Normalizations should be restricted to edited content
27049 "modes": ["selser"],
27050 "scrubWikitext": true,
27052 [ "h1", "before", "<i></i>"]
27066 1. Multiple normalizations (html2wt)
27069 "modes": ["html2wt"],
27070 "scrubWikitext": true
27074 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
27075 </a><b><i></i></b>x</p>
27084 2. Multiple normalizations (selser)
27087 "modes": ["selser"],
27088 "scrubWikitext": true,
27090 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
27094 <span id="x">foo</span>
27096 <span id="x">foo</span>
27102 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
27105 "modes": ["html2wt"],
27106 "scrubWikitext": true
27118 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
27125 <nowiki> </nowiki>hi
27127 <nowiki> </nowiki> hello
27131 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
27134 "modes": ["html2wt"],
27135 "scrubWikitext": true
27144 baz bang</td></tr></table>
27150 bar<span>boo</span></p>
27166 bar<span>boo</span>
27170 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
27173 "modes": ["selser"],
27174 "scrubWikitext": true,
27176 [ "p", "html", " a\n b" ]
27187 1. New links that end in spaces
27190 "modes": ["html2wt"],
27191 "scrubWikitext": false
27194 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27195 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27196 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27198 [[Berlin ]]<nowiki/>is the capital of Germany.
27202 [[Boston ]] is a city.
27206 2. New links that end in spaces
27209 "modes": ["html2wt"],
27210 "scrubWikitext": true
27213 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
27214 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
27215 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
27217 [[Berlin]] is the capital of Germany.
27221 [[Boston]] is a city.
27225 1. Table cells with escapable prefixes
27228 "modes": ["html2wt"],
27229 "scrubWikitext": false
27233 <tr><td>a</td></tr>
27234 <tr><td>-</td></tr>
27235 <tr><td>+</td></tr>
27241 |<nowiki>-</nowiki>
27243 |<nowiki>+</nowiki>
27248 2. Table cells with escapable prefixes
27251 "modes": ["html2wt"],
27252 "scrubWikitext": true
27256 <tr><td>a</td></tr>
27257 <tr><td>-</td></tr>
27258 <tr><td>+</td></tr>
27271 3a. Table cells with escapable prefixes after edits
27274 "modes": ["selser"],
27275 "scrubWikitext": true,
27277 [ "table tbody tr:first-child td:first-child", "remove"]
27291 3b. Table cells with escapable prefixes after edits
27294 "modes": ["selser"],
27295 "scrubWikitext": true,
27297 [ "table tbody tr:first-child td:first-child", "html", "-" ],
27304 |<span id="x">foo</span>+
27313 # FIXME: This test will fail because
27314 # normalization doesn't realize that the id attribute
27315 # will eliminate the escapable scenario
27317 4a. Table cells without escapable prefixes after edits
27320 "modes": ["selser"],
27321 "scrubWikitext": true,
27323 [ "#x", "html", "-" ]
27336 ## This tests normalizer's ability to discriminate between
27337 ## cells having identical content.
27339 4b. Table cells without escapable prefixes after edits
27342 "modes": ["selser"],
27343 "scrubWikitext": true,
27345 [ "td", "html", "-" ]
27358 ## This tests normalizer's ability to not be tripped by
27359 ## comments (and whitespace)
27361 4c. Table cells without escapable prefixes after edits
27364 "modes": ["selser"],
27365 "scrubWikitext": true,
27367 [ "table tbody tr td:first-child", "remove" ]
27382 ## This tests normalizer's ability to handle HTML cells
27384 4d. Table cells without escapable prefixes after edits
27387 "modes": ["selser"],
27388 "scrubWikitext": true,
27390 [ "td", "html", "-" ]
27395 <tr><td>a</td></tr>
27399 <tr><td>-</td></tr>
27403 ## T111151 Remove font elements without attributes
27405 5a. font tags without attributes should be dropped in scrubWikitext mode
27408 "modes": ["html2wt"],
27409 "scrubWikitext": true
27413 <font><font>bar</font></font>
27414 <font class="x">boo</font>
27418 <font class="x">boo</font>
27422 5b. font tags should not be dropped without scrubWikitext being enabled
27425 "modes": ["html2wt"],
27426 "scrubWikitext": false
27435 Escape nowiki DOM elements
27439 <nowiki><i>foo</i></nowiki>
27441 <nowiki>''foo''</nowiki>
27444 # This is meant to be an interim fix while we go about figuring out
27445 # how to not introduce these trailing <nowiki/>s in the first place.
27447 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
27451 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
27453 <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>
27454 <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>
27467 # ---------------------------------------------------
27468 # End of tests spec'ing wikitext serialization norms |
27469 # ---------------------------------------------------
27473 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
27481 <td><b>c</b><p>d</p></td>
27500 Anchor without href scenarios
27502 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
27505 <a class="no">dice</a>
27510 <span name="foo"></span>
27513 # -----------------------------------------------------------------
27514 # End of section for Parsoid-only html2wt tests for serialization
27516 # -----------------------------------------------------------------
27518 # -----------------------------------------------------------------
27519 # The following section of tests are primarily to spec behavior of
27520 # the selective serializer. All these tests have manual selser
27521 # changes. The automated selser changes for all tests handle the
27522 # wide variation of changes, but these tests here capture specs
27523 # deterministically.
27524 # ----------------------------------------------------------------
27528 Selser: New comments should not be lost
27531 "modes": ["selser"],
27533 [ "#a", "after", "<!--c1-->" ],
27534 [ "#b", "before", "<!--c2-->" ]
27538 <span id="a">a</span>
27540 <span id="b">b</span>
27542 <span id="a">a</span><!--c1-->
27544 <!--c2--><span id="b">b</span>
27549 Selser: Check for validity of DSR before using it
27552 "modes": ["selser"],
27554 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
27558 <span id="a">a</span>
27560 {{DISPLAYTITLE:foo}}
27561 <span id="a">a</span>
27565 1. DOMDiff: Changes to <ref> content should be looked up using id
27568 "modes": ["selser"],
27570 ["#X", "after", "bar"],
27571 ["#Y", "after", "baz"]
27575 X <ref><span id="X">foo</span></ref>
27578 <ref name="a"><span id="Y">foo</span></ref>
27581 X <ref><span id="X">foo</span>bar</ref>
27584 <ref name="a"><span id="Y">foo</span>baz</ref>
27589 2. DOMDiff: Changes to <ref> content should be looked up using id
27592 "modes": ["selser"],
27594 ["#Z", "after", "bar"]
27598 A <ref>foo bar for a</ref>
27599 B <ref group="X" name="b" />
27603 <references group="X">
27604 <ref name="b"><span id="Z">foo</span></ref>
27607 A <ref>foo bar for a</ref>
27608 B <ref group="X" name="b" />
27612 <references group="X">
27613 <ref name="b"><span id="Z">foo</span>bar</ref>
27618 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
27621 "modes": ["selser"],
27623 [ "div:first-child", "text", "bar" ]
27627 <div style="{{1x|color:red;}}%">foo</div>
27629 <div style="{{1x|color:red;}}%">bar</div>
27642 <li class="mw-empty-elt"></li>
27643 <li class="mw-empty-elt"></li>
27651 [[File:Thumb.png|thumb]]
27653 <div class="thumb tright">
27654 <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>
27655 <div class="thumbcaption">
27656 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
27663 unclosed internal link XSS (T137264)
27665 [[#%3Cscript%3Ealert(1)%3C/script%3E|
27667 <p>[[#<script>alert(1)</script>|
27670 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>