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]]
112 // For Serbian; localize Template namespace
120 Template:echo_with_span
126 Template:echo_with_div
139 Template:table_attribs
142 |</noinclude>style="color:red;"|Foo
146 Template:table_attribs_2
149 |</noinclude>style="color:red;"|Foo
154 Template:table_attribs_3
157 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
161 Template:table_attribs_4
163 | style="background-color:#DC241f;" width="10px" |
167 Template:table_attribs_5
170 |</noinclude>style="color:red;"||Bar
174 Template:table_attribs_6
176 style="background: <nowiki>
183 Template:table_attribs_7
186 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
190 Template:table_header_cells
192 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
198 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
202 Template:PartialTable
209 Template:image_attribs
212 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
215 ## See T48811 for details
217 Template:mixed_attr_content_template
219 style="color:red;" title="T48811"
225 Template:definition_list
272 Template:EmptyTRWithHTMLAttrTest
275 <tr align="center"></tr>
276 <tr><td>foo</td></tr>
277 <tr align="center"></tr>
278 <tr><td>bar</td></tr>
285 <ref>{{CircularRef}}</ref>
309 <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>
310 <ol class="mw-references 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>
316 This is a simple paragraph.
318 <p>This is a simple paragraph.
323 Paragraphs with extra newline spacing
346 Paragraphs with newline spacing with comment lines in between
354 <!--foo--><!--More than 1 comment, still stripped-->
358 <!--foo--> <!----> <!-- bar -->
419 Paragraphs with newline spacing with non-empty white-space lines in between
446 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
454 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
493 Extra newlines: More paragraphs with indented comment
508 Extra newlines followed by heading
523 <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>
524 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
527 <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>
532 Extra newlines between heading and content are swallowed
540 <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>
541 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
546 Heading with line break in nowiki
553 <h2><span class="mw-headline" id="A_B.0AC">A B
554 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>
557 <h2 id="A_B.0AC">A <span typeof="mw:Nowiki">B
564 http://fr.wikipedia.org/wiki/🍺
565 <!-- EasterEgg we love beer, better be able be able to link to it -->
567 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
571 # Note that the html+tidy output removes the spaces after the <li>,
572 # which is a bug (https://sourceforge.net/p/tidy/bugs/945/, etc).
573 # This is an issue for all tests with lists. We intentionally do
574 # *not* add html+tidy clauses for these, as we don't want to
575 # document/test the broken behavior. (Parsoid matches the non-tidy
576 # output in these cases.)
585 <li> Item 2</li></ul>
593 * plain''italic''plain
594 * plain''italic''plain''italic''plain
595 * plain'''bold'''plain
596 * plain'''bold'''plain'''bold'''plain
597 * plain''italic''plain'''bold'''plain
598 * plain'''bold'''plain''italic''plain
599 * plain''italic'''bold-italic'''italic''plain
600 * plain'''bold''bold-italic''bold'''plain
601 * plain'''''bold-italic'''italic''plain
602 * plain'''''bold-italic''bold'''plain
603 * plain''italic'''bold-italic'''''plain
604 * plain'''bold''bold-italic'''''plain
605 * plain l'''italic''plain
606 * plain l''''bold''' plain
609 <li> plain<i>italic</i>plain</li>
610 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
611 <li> plain<b>bold</b>plain</li>
612 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
613 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
614 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
615 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
616 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
617 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
618 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
619 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
620 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
621 <li> plain l'<i>italic</i>plain</li>
622 <li> plain l'<b>bold</b> plain</li></ul>
626 # this example taken from the [[simple:Moon]] article (T49326)
628 Italics and possessives (1)
630 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
632 <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
636 # this example taken from [[en:Flaming Pie]] (T51926)
638 Italics and possessives (2)
640 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
642 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
646 # this example taken from [[en:Dictionary]] (T51926)
648 Italics and possessives (3)
650 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''.
652 <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>.
658 ### 2-quote opening sequence tests
661 Italics and bold: 2-quote opening sequence: (2,2)
670 Italics and bold: 2-quote opening sequence: (2,3)
679 Italics and bold: 2-quote opening sequence: (2,4)
689 # same html as previous, but wikitext adjusted to match parsoid html2wt
691 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
693 ''foo<nowiki>''</nowiki>''
699 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
701 Italics and bold: 2-quote opening sequence: (2,5)
714 # same html as previous, but wikitext adjusted to match parsoid html2wt
716 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
718 ''foo'''''<nowiki/>'''
729 ### 3-quote opening sequence tests
733 Italics and bold: 3-quote opening sequence: (3,2)
742 Italics and bold: 3-quote opening sequence: (3,3)
751 Italics and bold: 3-quote opening sequence: (3,4)
759 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
761 Italics and bold: 3-quote opening sequence: (3,5)
774 # same html as previous, but wikitext adjusted to match parsoid html2wt
776 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
778 '''foo'''''<nowiki/>''
789 ### 4-quote opening sequence tests
793 Italics and bold: 4-quote opening sequence: (4,2)
803 # same html as previous, but wikitext adjusted to match parsoid html2wt
805 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
807 <nowiki>''</nowiki>''foo''
814 Italics and bold: 4-quote opening sequence: (4,3)
823 Italics and bold: 4-quote opening sequence: (4,4)
833 # same html as previous, but wikitext adjusted to match parsoid html2wt
835 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
843 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
845 Italics and bold: 4-quote opening sequence: (4,5)
854 <p>'<b>foo</b><i></i>
858 # same html as previous, but wikitext adjusted to match parsoid html2wt
860 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
862 '<nowiki/>'''foo'''''<nowiki/>''
867 <p>'<b>foo</b><i></i>
873 ### 5-quote opening sequence tests
877 Italics and bold: 5-quote opening sequence: (5,2)
887 # same html as previous, but wikitext adjusted to match parsoid html2wt
889 Italics and bold: 5-quote opening sequence: (5,2+3)
898 Italics and bold: 5-quote opening sequence: (5,3)
908 # same html as previous, but wikitext adjusted to match parsoid html2wt
910 Italics and bold: 5-quote opening sequence: (5,3+2)
919 Italics and bold: 5-quote opening sequence: (5,4)
925 <p><i><b>foo'</b></i>
930 Italics and bold: 5-quote opening sequence: (5,5)
939 Italics and bold: 5-quote opening sequence: (5,6)
943 <p><i><b>foo'</b></i>
948 ### multiple quote sequences in a line
952 Italics and bold: multiple quote sequences: (2,4,2)
958 <p><i>foo'<b>bar</b></i>
962 # same html as previous, but wikitext adjusted to match parsoid html2wt
964 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
966 ''foo'<nowiki/>'''bar'''''
968 <p><i>foo'<b>bar</b></i>
973 Italics and bold: multiple quote sequences: (2,4,3)
979 <p><i>foo'<b>bar</b></i>
983 # same html as previous, but wikitext adjusted to match parsoid html2wt
985 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
987 ''foo'<nowiki/>'''bar'''''
989 <p><i>foo'<b>bar</b></i>
994 Italics and bold: multiple quote sequences: (2,4,4)
1000 <p><i>foo'<b>bar'</b></i>
1004 # same html as previous, but wikitext adjusted to match parsoid html2wt
1006 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1008 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1010 <p><i>foo'<b>bar'</b></i>
1014 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1016 Italics and bold: multiple quote sequences: (3,4,2)
1025 <p><b>foo'</b>bar<i></i>
1029 # same html as previous, but wikitext adjusted to match parsoid html2wt
1031 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1033 '''foo''''bar''<nowiki/>''
1038 <p><b>foo'</b>bar<i></i>
1042 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1044 Italics and bold: multiple quote sequences: (3,4,3)
1053 <p><b>foo'</b>bar<b></b>
1057 # same html as previous, but wikitext adjusted to match parsoid html2wt
1059 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1061 '''foo''''bar'''<nowiki/>'''
1066 <p><b>foo'</b>bar<b></b>
1071 ### other quote tests
1074 Italics and bold: other quote tests: (2,3,5)
1076 ''this is about '''foo's family'''''
1078 <p><i>this is about <b>foo's family</b></i>
1084 Italics and bold: other quote tests: (2,(3,3),2)
1086 ''this is about '''foo's''' family''
1088 <p><i>this is about <b>foo's</b> family</i>
1094 Italics and bold: other quote tests: (3,2,3,2)
1098 '''this is about ''foo'''s family''
1100 <p><b>this is about <i>foo</i></b><i>s family</i>
1105 # same html as previous, but wikitext adjusted to match parsoid html2wt
1107 Italics and bold: other quote tests: (3,2,3+2+2,2)
1109 '''this is about ''foo'''''<nowiki/>''s family''
1111 <p><b>this is about <i>foo</i></b><i>s family</i>
1117 Italics and bold: other quote tests: (3,2,3,3)
1119 '''this is about ''foo'''s family'''
1121 <p>'<i>this is about </i>foo<b>s family</b>
1127 Italics and bold: other quote tests: (3,(2,2),3)
1129 '''this is about ''foo's'' family'''
1131 <p><b>this is about <i>foo's</i> family</b>
1137 Italicized possessive
1139 The ''[[Main Page]]'''s talk page.
1141 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1144 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1148 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1149 (Requires tidy for PHP parser output to be fixed up)
1151 parsoid=wt2html,wt2wt
1168 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1169 <td><i>a</i></td><td><i>b</i></td></tr>
1178 Non-html5 tags should be accepted
1180 <center>''foo''</center>
1182 <font>''foo''</font>
1183 <strike>''foo''</strike>
1186 <center><i>foo</i></center>
1187 <p><big><i>foo</i></big>
1188 <font><i>foo</i></font>
1189 <strike><i>foo</i></strike>
1195 <wbr> is valid wikitext (T54468)
1203 # <strike> is HTML4, <s> is HTML4/5.
1205 <s> or <strike> for strikethrough
1207 <strike>strike</strike>
1211 <p><strike>strike</strike>
1219 Text-level semantic html elements in wikitext
1222 <strong>text</strong>
1238 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1245 <strong>text</strong>
1261 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1269 # test cases taken from
1270 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1272 Ruby markup (W3C-style)
1274 ; Mono-ruby for individual base characters
1275 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1277 : <ruby>今日<rt>きょう</rt></ruby>
1279 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1281 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1283 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1285 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1286 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1287 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1290 <dl><dt> Mono-ruby for individual base characters</dt>
1291 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1292 <dt> Group ruby</dt>
1293 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1294 <dt> Jukugo ruby</dt>
1295 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1296 <dt> Inline ruby</dt>
1297 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1298 <dt> Double-sided ruby</dt>
1299 <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>
1301 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1302 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1303 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1308 # The next two test different paths in the sanitizer.
1310 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1312 <blockquote|>a</blockquote>
1314 <b→> doesn't terminate </b→>
1316 <bä> doesn't terminate </bä>
1318 <boo> doesn't terminate </boo>
1320 <s.foo> doesn't terminate </s.foo>
1324 <p><blockquote|>a</blockquote>
1325 </p><p><b→> doesn't terminate </b→>
1326 </p><p><bä> doesn't terminate </bä>
1327 </p><p><boo> doesn't terminate </boo>
1328 </p><p><s.foo> doesn't terminate </s.foo>
1329 </p><p><sub-ID#1>
1333 # There is a tidy bug here: https://sourceforge.net/p/tidy/bugs/946/
1334 # If the non-word-character tag made it through the sanitizer, tidy
1335 # would munge it up.
1337 Non-word characters don't terminate tag names + tidy
1339 <blockquote|>a</blockquote>
1341 <b→> doesn't terminate </b→>
1343 <bä> doesn't terminate </bä>
1345 <boo> doesn't terminate </boo>
1347 <s.foo> doesn't terminate </s.foo>
1351 <p><blockquote|>a</p>
1352 <p><b→> doesn't terminate </b→></p>
1353 <p><bä> doesn't terminate </bä></p>
1354 <p><boo> doesn't terminate </boo></p>
1355 <p><s.foo> doesn't terminate </s.foo></p>
1356 <p><sub-ID#1></p>
1360 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1361 ### This checks that HTML5 tags (with non-word characters in the tag
1362 ### name) make it safely through the parser -- the Sanitizer will
1363 ### munge them later, as it should.
1366 Non-word characters are valid in extension tags (T19663)
1377 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1381 Isolated close tags should be treated as literal text (T54760)
1389 <p><s.foo>s</p>
1391 <p><s.foo>s</p>
1395 ### Special characters
1399 Bare pipe character (T54363)
1408 Bare pipe character from a template (T54363)
1417 ### <nowiki> test cases
1421 <nowiki> unordered list
1423 <nowiki>* This is not an unordered list item.</nowiki>
1425 <p>* This is not an unordered list item.
1428 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1434 <nowiki>Lorem ipsum dolor
1442 <p>Lorem ipsum dolor
1451 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1461 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1463 <nowiki><span class="error"></nowiki>
1465 <p><span class="error">
1468 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1474 :There is not nowiki.
1475 :There is <nowiki>nowiki</nowiki>.
1477 #There is not nowiki.
1478 #There is <nowiki>nowiki</nowiki>.
1480 *There is not nowiki.
1481 *There is <nowiki>nowiki</nowiki>.
1483 <dl><dd>There is not nowiki.</dd>
1484 <dd>There is nowiki.</dd></dl>
1485 <ol><li>There is not nowiki.</li>
1486 <li>There is nowiki.</li></ol>
1487 <ul><li>There is not nowiki.</li>
1488 <li>There is nowiki.</li></ul>
1491 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1492 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1494 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1495 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1497 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1498 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1502 Entities inside <nowiki>
1504 <nowiki><</nowiki>
1509 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1513 Entities inside template parameters
1519 <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>
1523 Properly escape nowiki when combined with other wiki markup
1527 <p>* </nowiki> tag</p>
1529 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1533 T93824: Put escaped HTML tags inside nowiki
1537 <p><h2>foo</h2></p>
1539 <nowiki><h2>foo</h2></nowiki>
1543 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1547 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1548 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1549 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1551 This text: L'[[Foo]]
1552 This text: L<nowiki>''</nowiki>[[Foo]]
1553 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1556 # This test fails because wikitext whitespace is not normalized before comparing.
1558 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1562 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1565 This text : L<nowiki>''</nowiki>[[Foo]]
1568 # This test and the next one are html2wt only as they test that incorrect wikitext
1569 # passed in template arguments gets escaped or wrapped in nowikis where required.
1571 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1575 <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>
1576 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1578 {{echo|foo{{!}}bar}}
1579 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1583 T53961: Output correct nowikis in template arguments
1587 <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>
1588 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1589 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1590 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1591 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1594 {{echo|<nowiki>a }} b</nowiki>}}
1595 {{echo|<nowiki>a [[ b</nowiki>}}
1596 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1597 {{echo|a <nowiki>}</nowiki>}}
1601 Cases where "!!" needs nowiki protection
1606 <tr><th>this needs protection !! here</th></tr>
1610 <tr><th>this does not need
1611 protection !! here</th></tr>
1615 !<nowiki>this needs protection !! here</nowiki>
1628 Comments and Indent-Pre
1630 <!-- comment 1 --> asdf
1632 <!-- comment 1 --> asdf
1635 <!-- comment 1 --> asdf
1636 <!-- comment 2 -->xyz
1638 <!-- comment 1 --> asdf
1639 <!-- comment 2 --> xyz
1695 asdf<!-- comment 1 -->jkl
1705 <!-- foo --> b <!-- bar -->
1719 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1725 Comment semantics and delimiters
1727 <!-- --><!----><!-----><!------>
1731 <!-- --><!----><!-----><!------>
1735 Comment semantics and delimiters, redux
1737 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1738 -- foo -- funky huh? ... -->
1742 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1743 -- foo -- funky huh? ... -->
1747 Comment semantics and delimiters: directors cut
1749 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1750 everything starting with < followed by !-- until the first -- and > we see,
1751 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1757 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1758 everything starting with < followed by !-- until the first -- and > we see,
1759 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1764 Comment semantics: nesting
1766 <!--<!-- no, we're not going to do anything fancy here -->-->
1771 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1774 # Parsoid closes the unclosed comment, even if it means a slight
1777 Comment semantics: unclosed comment at end
1779 parsoid=wt2html,html2html
1781 <!--This comment will run out to the end of the document
1785 <!--This comment will run out to the end of the document-->
1789 Comment semantics: normalize comments to play nice with XML and browsers
1791 <!-- Browsers --!> think this is closed -->
1792 <!--> This would normally be text -->
1793 <!---> As would this -->
1794 <!-- XML doesn't like trailing dashes -------->
1795 <!-- Nor doubled hyphens -- anywhere in the data -->
1796 But this is not a comment.
1798 <p>But this is not a comment.
1801 <!-- Browsers --!> think this is closed -->
1802 <!--> This would normally be text -->
1803 <!---> As would this -->
1804 <!-- XML doesn't like trailing dashes -------->
1805 <!-- Nor doubled hyphens -- anywhere in the data -->
1806 <p>But this is not a comment.</p>
1810 Comment semantics: round-trip even text which contains encoded -->
1812 <!-- hello & goodbye - > --> --&gt; --&xx -->
1814 <!-- hello & goodbye - > --> --&gt; --&xx -->
1818 Comment in template title
1827 Comment on its own line post-expand
1839 Comment on its own line post-expand with non-significant whitespace
1851 Multiple comments should still parse as SOL-transparent
1853 parsoid=wt2html,wt2wt
1856 <!--c2--><!--c3--><!--c4-->*b
1865 <!--c2--><!--c3--><!--c4-->
1871 ## Make sure ">" gets escaped in comments to avoid XSS
1873 IE conditional comments
1876 <script>alert('hi');</script>
1879 <!--[if lt IE 9]>
1880 <script>alert('hi');</script>
1885 ### paragraph wrapping tests
1900 Block tag on one line (<div>)
1916 No p-wrappable content
1918 <span><div>x</div></span>
1919 <span><s><div>x</div></s></span>
1920 <small><em></em></small><span><s><div>x</div></s></span>
1922 <div><span>x</span></div>
1923 <div><span><s>x</s></span></div>
1924 <div><span><s>x</s></span></div>
1926 <span><div>x</div></span>
1927 <span><s><div>x</div></s></span>
1928 <small><em></em></small><span><s><div>x</div></s></span>
1931 # T177612: Parsoid-only test
1933 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
1935 {{echo|<span><div>x</div></span>}}
1938 <span 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":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
1943 Block tag on one line (<blockquote>)
1945 a <blockquote>foo</blockquote>
1949 a <blockquote>foo</blockquote>
1961 Block tag on both lines (<div>)
1978 Block tag on both lines (<blockquote>)
1980 a <blockquote>foo</blockquote>
1982 b <blockquote>foo</blockquote>
1984 a <blockquote>foo</blockquote>
1985 b <blockquote>foo</blockquote>
1999 Multiple lines without block tags
2023 # Tidy strips out the empty <div> tags. Parsoid doesn't.
2024 # So, we have a separate section for Parsoid. We don't want
2025 # to mimic this stripping behavior in Parsoid. It affects
2026 # editing experience and also requires us to maintain additional
2029 Empty lines between lines with block tags
2067 <div data-parsoid='{"stx":"html"}'></div>
2070 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2073 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2075 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2078 <div data-parsoid='{"stx":"html"}'>e</div>
2081 ## PHP parser emits output which is broken
2083 Unclosed HTML p-tags should be handled properly
2096 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2101 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2102 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2105 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2109 a [[Category:A1]] [[Category:A2]]
2114 <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"/>
2118 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2124 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2128 ### Preformatted text
2137 And a [[Main Page|link]]
2143 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2148 Tabs don't trigger preformatted text
2152 This is preformatted text.
2158 <pre>This is preformatted text.
2163 preformatted text.</p>
2164 <pre>This is preformatted text.
2169 Space before tab needs nowiki pre protection
2175 <nowiki> </nowiki> a
2179 Ident preformatting with inline content
2190 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2207 Regression with preformatted in <center>
2221 T54763: Preformatted in <blockquote>
2227 indented cell (no pre-wrapping!)
2237 <p> indented cell (no pre-wrapping!)
2245 T53086: Double newlines in blockquotes should be turned into paragraphs
2262 T17491: <ins>/<del> in blockquote
2265 Foo <del>bar</del> <ins>baz</ins> quux
2269 <p>Foo <del>bar</del> <ins>baz</ins> quux
2275 # Note that the p-wrapping is newline sensitive, which could be
2276 # considered a bug: tidy will wrap only the 'Foo' in the example
2277 # below in a <p> tag. (see comment 23-25 of T8200)
2279 T17491: <ins>/<del> in blockquote (2)
2281 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2284 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2290 <del>bar</del> <ins>baz</ins> quux</blockquote>
2294 <pre> with attributes (T5202)
2296 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2298 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2303 <pre> with width attribute (T5202)
2305 <pre width="8">Narrow screen goodies</pre>
2307 <pre width="8">Narrow screen goodies</pre>
2312 <pre> with forbidden attribute (T5202)
2314 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2316 <pre width="8">Narrow screen goodies</pre>
2321 Entities inside <pre>
2330 <pre> with forbidden attribute values (T5202)
2332 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2334 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2339 <nowiki> inside <pre> (T15238)
2347 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2355 <pre><nowiki>Foo</nowiki></pre>
2360 <nowiki> inside of #tag:pre
2362 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2364 <pre>Foo →bar</pre>
2367 <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>
2370 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2371 ## aren't enclosed in nowikis.
2373 <nowiki> and <pre> preference (first one wins)
2404 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2409 <p><span typeof="mw:Nowiki">
2417 </pre> inside nowiki
2419 <nowiki></pre></nowiki>
2425 # Parsoid doesn't strip empty tags, like Tidy does.
2427 Empty pre; pre inside other HTML tags (T56946)
2452 <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
2454 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2458 HTML pre followed by indent-pre
2468 # Note that tidy removes the empty <p> tags from the start and end.
2469 # Parsoid does not, by design.
2473 <p><pre>foo</pre></p>
2479 <p class='mw-empty-elt' 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 class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2483 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2491 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2501 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2513 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2534 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2538 {{echo| foo}}{{echo| bar}}
2543 {{echo|<!--cmt--> foo}}
2545 <!--cmt-->{{echo| foo}}
2547 {{echo|{{echo| }}bar}}
2565 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2601 ## Hmm, should Parsoid rt this?
2603 Pres with newline attributes
2605 parsoid=wt2html,html2html
2610 <pre class="one two">hi</pre>
2613 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2617 Things that look like <pre> tags aren't treated as such
2619 Barack Obama <President> of the United States
2620 <President></President>
2622 <p>Barack Obama <President> of the United States
2623 <President></President>
2628 Handle broken pre-like tags (T66025)
2632 {{echo|<pre <pre>x</pre>}}
2634 <table><pre </table>
2637 <table><pre </table>
2645 <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>
2654 Parsoid: handle pre with space after attribute
2658 <pre style="width:50%;" >{{echo|foo}}</pre>
2660 <pre style="width:50%;">{{echo|foo}}</pre>
2663 <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>
2666 # TODO / maybe: fix wt2wt for this
2668 Parsoid: Don't paragraph-wrap fosterable content
2694 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2722 #--------------------------------------------------------------------
2723 # Transclusion parameter whitespace stripping tests
2724 # Behavior is different for positional and named parameters
2725 #--------------------------------------------------------------------
2727 Templates: Strip leading and trailing whitespace from named-param values
2731 {{echo|1= {{echo|b}} }}
2744 <ul><li> d</li></ul>
2749 Templates: Don't strip whitespace from positional-param values
2753 {{echo|{{echo|b}} }}
2785 <ul><li> f</li></ul>
2793 Templates: Don't recognize targets split by newlines
2809 Templates: Recognize targets when newlines and comments don't split the target
2814 <!--X--> ech<!--X-->o<!--X-->
2822 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech<!--X-->o<!--X--> \n <!--X--> <!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2826 Templates: Handle empty comment-and-ws-only lines correctly
2829 <!--should be ignored-->
2830 <!--should be ignored as well-->
2837 <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>
2841 Templates: Handle comments in the target
2844 <!-- should be ignored -->
2848 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2851 {{echo<!-- should be ignored -->
2854 {{echo<!-- should be ignored -->|foo}}
2856 {{<!-- should be ignored -->echo|foo}}
2865 <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>
2867 <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>
2869 <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>
2871 <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>
2873 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2877 Templates: Handle comments in parameter names (T69657)
2880 <!-- should be ignored -->
2884 <!-- should be ignored -->
2887 {{echo|1<!-- should be ignored -->=foo}}
2889 {{echo|<!-- should be ignored -->1=foo}}
2897 <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>
2899 <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>
2901 <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>
2903 <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>
2907 Templates: Other wikitext in parameter names (T69657)
2914 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2918 Templates: With colons
2922 <p>Template with colon
2925 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"With: Colon","href":"./Template:With:_Colon"},"params":{},"i":0}}]}'>Template with colon</p>
2928 #--------------------------------------------------------------------
2929 # Transclusion parameter escaping tests
2930 #--------------------------------------------------------------------
2933 Templates: Parsoid parameter escaping test 1
2935 {{echo|[foo]|{{echo|[bar]}}}}
2939 <p about="#mwt1" typeof="mw:Transclusion"
2940 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2944 Parsoid: Pipes in external links in template parameter
2946 {{echo|[{{echo|http://example.com}} link]}}
2948 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2950 <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>
2954 Parsoid: pipe in transclusion parameter
2956 {{echo|http://foo.com/a|b}}
2958 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2960 <p><a rel="mw:ExtLink" href="http://foo.com/a%7Cb" about="#mwt1"
2961 typeof="mw:Transclusion"
2962 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>
2966 Parsoid: Pipe in external link target and content in template parameter
2968 parsoid=html2wt,wt2wt
2970 {{echo|[http://foo.com/a|b a|b]}}
2972 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2974 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2975 typeof="mw:Transclusion"
2976 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2977 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2981 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2985 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2987 <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>
2991 Templates: Don't escape already nowiki-escaped text in template parameters
2993 parsoid=html2wt,wt2wt
2995 {{echo|foo<nowiki>|</nowiki>bar}}
2996 {{echo|<nowiki><div></nowiki>}}
2997 {{echo|<nowiki></nowiki>}}
2999 <p>foo|bar <div></p>
3001 <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>
3002 <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>
3003 <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>
3009 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3011 parsoid=html2wt,wt2wt
3013 {{echo|{{echo|1=bar}}}}
3017 <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>
3022 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3028 <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>
3033 Templates: Preserve blank parameter names
3039 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3043 Templates: Preserve blank parameter names in other positions
3045 {{blank_param|bar|=foo}}
3049 <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
3054 ### Parsoid-centric tests for testing RT edge cases for pre
3058 1a. Indent-Pre and Comments
3071 1b. Indent-Pre and Comments
3084 1c. Indent-Pre and Comments
3097 1d. Indent-Pre and Comments
3098 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3111 2a. Indent-Pre and tables
3132 2b. Indent-Pre and tables
3148 2c. Indent-Pre and tables (T44252)
3165 2d. Indent-Pre and tables
3182 <tbody><tr><td> b</td></tr>
3187 2e. Indent-Pre and table-line syntax
3200 2f. Indent-pre started by table-line syntax
3219 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3224 Text that should be rendered preformatted
3232 <pre>Text that should be rendered preformatted
3241 3a. Indent-Pre and block tags (single-line html)
3245 c <blockquote> foo </blockquote>
3250 c <blockquote> foo </blockquote>
3251 <pre><span> foo </span>
3254 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3255 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3256 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3257 <pre><span> foo </span>
3274 3b. Indent-Pre and block tags (multi-line html)
3279 <pre>a <span>foo</span>
3284 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3285 b <div data-parsoid='{"stx":"html"}'> foo </div>
3295 3c. Indent-Pre and block tags (pre-content on separate line)
3359 4. Indent-Pre and extension tags
3370 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3374 5. Indent-Pre and html pre
3376 <pre class="123">hi</pre>
3378 <pre class="123">hi</pre>
3381 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3385 Render paragraphs when indent-pre is suppressed in blocklevels
3402 4. Multiple spaces at start-of-line
3420 ## NOTE: the leading white-space chars on empty line are significant
3422 5a. White-space in indent-pre
3434 ## NOTE: the leading white-space chars on empty line are significant
3436 5b. White-space in indent-pre
3455 5c. White-space in indent-pre
3468 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3491 7a. Indent-pre and category links
3493 parsoid=wt2html,wt2wt
3495 [[Category:foo]] <!-- No pre-wrapping -->
3496 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3499 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3500 <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 -->
3503 ## We used to, but no longer wt2wt this test since the default serializer
3504 ## will normalize all categories to serialize on their own line.
3505 ## This wikitext usage is going to be fairly uncommon in production and
3506 ## selser will take care of preserving formatting in those scenarios.
3508 7b. Indent-pre and category links
3513 [[Category:foo]] {{echo|b}}
3515 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3516 <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>
3520 Indent-Pre: Newlines in comments shouldn't affect sol state
3534 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3538 HTML-pre: 1. embedded newlines
3573 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3575 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3578 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3583 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3591 HTML-pre: big spaces
3627 <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"}}'>
3646 HTML-pre: 2: indented text
3659 HTML-pre: 3: other wikitext
3678 <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
3687 ### Definition lists
3694 <dl><dt> name </dt>
3695 <dd> Definition</dd></dl>
3700 Definition list for indentation only
3704 <dl><dd> Indented text</dd></dl>
3709 Definition list with no space
3714 <dd>Definition</dd></dl>
3719 Definition list with URL link
3721 ; http://example.com/ : definition
3723 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3724 <dd> definition</dd></dl>
3729 Definition list with bracketed URL link
3731 ;[http://www.example.com/ Example]:Something about it
3733 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3734 <dd>Something about it</dd></dl>
3739 Definition list with wikilink containing colon
3741 ; [[Help:FAQ]]: The least-read page on Wikipedia
3743 <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>
3744 <dd> The least-read page on Wikipedia</dd></dl>
3748 # At Brion's and JeLuF's insistence... :)
3750 Definition list with news link containing colon
3752 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3754 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3755 <dd> This isn't even a real newsgroup!</dd></dl>
3758 <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>
3762 Malformed definition list with colon
3764 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3766 <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>
3771 Definition lists: colon in external link text
3773 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3775 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3776 <dd> OK, I made that up</dd></dl>
3781 Definition lists: colon in HTML attribute
3783 ;<b style="display: inline">bold</b>
3785 <dl><dt><b style="display: inline">bold</b></dt></dl>
3790 Definition lists: self-closed tag
3792 ;one<br/>two : two-line fun
3794 <dl><dt>one<br />two </dt>
3795 <dd> two-line fun</dd></dl>
3800 Definition lists: ignore colons inside tags
3802 ;one <b>two : tag <i>fun:</i>:</b>: def
3804 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3810 Definition lists: excess closed tags
3812 ;one</b>two : bad tag fun
3815 <dt>onetwo </dt>
3816 <dd>bad tag fun</dd>
3821 <dd>bad tag fun</dd>
3826 T13748: Literal closing tags
3830 <dd>test test test test test</dd>
3832 <dd>test test test test test</dd>
3837 <dd>test test test test test</dd>
3839 <dd>test test test test test</dd>
3845 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3848 ; term : description
3853 <dl><dt> term </dt>
3854 <dd> description</dd></dl>
3855 <ul><li> unordered</li></ul>
3861 Definition list with empty definition and following paragraph
3873 Nested definition lists using html syntax
3886 Definition Lists: No nesting: Multiple dd's
3899 Definition Lists: Indentation: Regular
3907 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3912 Definition Lists: Indentation: Missing 1st level
3918 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3923 Definition Lists: Indentation: Multi-level indent
3927 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3932 Definition Lists: Hacky use to indent tables
3939 should be left alone
3941 <dl><dd><dl><dd><table>
3946 </td></tr></table></dd></dl></dd></dl>
3948 should be left alone
3953 Definition Lists: Hacky use to indent tables, with comments (T65979)
3961 should be left alone
3964 <dl><dd><dl><dd><table><tr>
3967 </tr></table><!-- bar --></dd></dl></dd></dl>
3969 should be left alone</p>
3973 Definition Lists: Hacky use to indent tables, with comment before table
3979 <dl><dd><dl><dd><!-- foo --><table><tr>
3981 </tr></table></dd></dl></dd></dl>
3984 # The trailing whitespace in this test is to catch a regression in
3985 # Parsoid after T54473.
3987 Definition Lists: Hacky use to indent tables (WS-insensitive)
3996 </td></tr></table></dd></dl>
4000 <tbody><tr><td>a</td></tr>
4001 </tbody></table> </dd></dl>
4004 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4005 ## as an empty dt item. It also ignores all but the last ";" when followed
4006 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4007 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4010 ## Ex: ";;t2 ::d2" is transformed into:
4022 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4023 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4034 ## All Parsoid only definition list tests have this difference.
4036 ## See also: https://phabricator.wikimedia.org/T8569
4037 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4040 Table / list interaction: indented table with lists in table contents
4055 <ul><li> b</li></ul>
4059 <ul><li> d</li></ul>
4060 </td></tr></table></dd></dl>
4065 Table / list interaction: lists nested in tables nested in indented lists
4088 </td></tr></table></dd></dl>
4095 Definition Lists: Nesting: Multi-level (Parsoid only)
4125 Definition Lists: Nesting: Test 2 (Parsoid only)
4152 Definition Lists: Nesting: Test 3 (Parsoid only)
4195 Definition Lists: Nesting: Test 4
4200 <dl><dd><dl><dd><dl><dt>t3</dt>
4201 <dd>d3</dd></dl></dd></dl></dd></dl>
4206 ## The Parsoid team believes the following three test exposes a
4207 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4208 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4209 ## It also exposes a "misfeature" in tidy, which doesn't like
4210 ## <dl> tags with a single <dt> child; it converts the <dt> into
4211 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4213 Definition Lists: Mixed Lists: Test 1
4219 <dl><dd><dl><dt><ul><li> foo</li>
4220 <li> bar</li></ul></dt></dl>
4221 <dl><dt> baz</dt></dl></dd></dl>
4256 Definition Lists: Mixed Lists: Test 2
4261 <ul><li><dl><dd> d1</dd>
4262 <dd> d2</dd></dl></li></ul>
4268 Definition Lists: Mixed Lists: Test 3
4273 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4274 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4280 Definition Lists: Mixed Lists: Test 4
4285 <ul><li><dl><dt>d1 </dt>
4288 <dd>d4</dd></dl></li></ul>
4294 Definition Lists: Mixed Lists: Test 5
4300 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4306 Definition Lists: Mixed Lists: Test 6
4311 <ol><li><ul><li><dl><dd>d1
4312 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4318 Definition Lists: Mixed Lists: Test 7
4323 <dl><dd><ul><li> d1</li>
4324 <li> d2</li></ul></dd></dl>
4330 Definition Lists: Mixed Lists: Test 8
4335 <dl><dd><ul><li> d1</li></ul>
4336 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4342 Definition Lists: Mixed Lists: Test 9
4346 <ul><li><dl><dt>foo </dt>
4347 <dd>bar</dd></dl></li></ul>
4353 Definition Lists: Mixed Lists: Test 10
4357 <ul><li><ol><li><dl><dt>foo </dt>
4358 <dd>bar</dd></dl></li></ol></li></ul>
4362 # This is a regression test for T175099
4363 # html/php+tidy is insufficient since Tidy covers up the bug.
4364 # But once Tidy is replaced with RemexHTML, html/php+tidy is good enough
4366 Definition Lists: Mixed Lists: Test 11
4373 <ul><li> b</li></ul></dd></dl>
4377 # The Parsoid team disagrees with the PHP parser's seemingly-random
4378 # rules regarding dd/dt on the next two tests. Parsoid is more
4379 # consistent, and recognizes the shared nesting and keeps the
4380 # still-open tags around until the nesting is complete.
4381 # (And tidy again converts <dt> to <dd> before 'bar'.)
4384 Definition Lists: Mixed Lists: Test 12
4389 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4390 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4391 <dl><dt>boo </dt>
4392 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4447 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4448 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4452 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4453 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4462 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4464 # * The test is wrong, there are two colons where there should be :;
4465 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4467 Definition Lists: Weird Ones: Test 1
4469 *#;*::;; foo : bar (who uses this?)
4471 <ul><li><ol><li><dl><dt> foo </dt>
4472 <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>
4491 <dt>bar (who uses this?)</dt>
4523 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4524 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4536 Definition Lists: colons occurring in tags
4554 <dt><span>a:b</span></dt>
4581 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4583 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4584 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4585 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4586 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4588 <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>
4589 <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>
4590 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4594 Definition Lists: colons and tables 1
4606 </td></tr></table></dd></dl>
4610 </td></tr></table></dd></dl>
4614 # Parsoid's output (as documented below) differs from php's in this case.
4615 # This is probably a bug. If we fixup parsoid to match php's output, the
4616 # above test should pass and the below test case can be removed. It is
4617 # unclear which output is more desirable.
4620 Definition Lists: colons and tables 2
4632 </td></tr></table></dd>
4636 </td></tr></table></dd></dl>
4640 Definition Lists: template interaction
4642 ::{{definition_list}}
4645 ::{{definition_list}}
4650 <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">
4651 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4653 <dl><dd data-parsoid='{}'>one
4654 <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">
4655 </span><dd about="#mwt2">two
4657 <dd>three</dd></dl></dd>
4658 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4666 External links: non-bracketed
4668 Non-bracketed: http://example.com
4670 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4674 # parsoid doesn't explicitly mark autonumbered links, see T55505
4676 External links: numbered
4678 Numbered: [http://example.com]
4679 Numbered: [http://example.net]
4680 Numbered: [http://example.com]
4682 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4683 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4684 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4687 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4688 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4689 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4693 External links: specified text
4695 Specified text: [http://example.com link]
4697 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4702 External links: trail
4704 Linktrails should not work for external links: [http://example.com link]s
4706 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4711 External links: dollar sign in URL
4713 http://example.com/1$2345
4715 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4719 # parsoid doesn't explicitly mark autonumbered links, see T55505
4721 External links: dollar sign in URL (autonumber)
4723 [http://example.com/1$2345]
4725 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4728 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4732 External links: open square bracket forbidden in URL (T6377)
4734 parsoid=wt2html,wt2wt,html2html
4736 http://example.com/1[2345
4738 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4741 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4745 External links: open square bracket forbidden in URL (named) (T6377)
4747 parsoid=wt2html,html2html
4749 [http://example.com/1[2345]
4751 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4754 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4757 # parsoid adds a space before the link name
4759 External links: open square bracket forbidden in URL (named) (T6377)
4762 [http://example.com/1 [2345]
4764 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4769 External links: nowiki in URL link text (T8230)
4771 [http://example.com/ <nowiki>''example site''</nowiki>]
4773 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4778 External links: newline forbidden in text (T8230 regression check)
4780 [http://example.com/ first
4783 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4789 External links: Pipe char between url and text
4791 [http://example.com | link]
4793 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4798 External links: protocol-relative URL in brackets
4800 [//example.com/ Test]
4802 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4806 # parsoid doesn't explicitly mark autonumbered links, see T55505
4808 External links: protocol-relative URL in brackets without text
4812 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4815 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4819 External links: protocol-relative URL in free text is left alone
4823 <p>//example.com/Foo
4828 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4830 foo//example.com/Foo
4832 <p>foo//example.com/Foo
4836 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4838 External links: with no contents
4840 parsoid=wt2html,wt2wt
4842 [http://en.wikipedia.org/wiki/Foo]
4844 [[wikipedia:Foo|Bar]]
4846 [[wikipedia:Foo|<span>Bar</span>]]
4848 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4849 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4850 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4853 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4854 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4855 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4859 External links: Free with trailing punctuation
4869 http://example.com/url_with_(brackets)
4870 (http://example.com/url_without_brackets)
4871 http://example.com/url_with_entity&
4872 http://example.com/url_with_entity&
4873 http://example.com/url_with_entity&
4874 http://example.com/url_with_entity
4875 http://example.com/url_with_entity 
4876 http://example.com/url_with_entity 
4877 http://example.com/url_with_entity<
4878 http://example.com/url_with_entity<
4879 http://example.com/url_with_entity<
4881 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4882 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4883 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4884 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4885 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4886 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4887 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4888 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4889 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4890 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4891 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4892 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4893 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4894 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4895 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4896 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4897 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4898 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4899 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4902 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4903 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4904 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4905 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4906 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4907 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4908 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4909 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4910 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4911 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4912 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4913 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4914 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4915 <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>
4916 <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>
4917 <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>
4918 <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>
4919 <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>
4920 <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>
4924 External links: tricky Parsoid html2html case
4926 parsoid=wt2html,wt2wt,html2html
4928 http://example.com/url_with_entity&amp;
4930 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4933 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4937 External links: Free with trailing quotes (T113666)
4939 '''News:''' Stuff here
4943 <p><b>News:</b> Stuff here
4944 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4947 <p><b>News:</b> Stuff here</p>
4948 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4952 External links: with entity
4954 [http:// www.librarieswithoutborders.org Libraries without borders]
4956 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4959 <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>
4963 External links: Lone protocols are never linked (T105697)
4982 External links: No preceding word characters allowed (T67278)
4984 NOPEhttp://example.com
4985 N0http://example.com
4986 ok:http://example.com
4987 ok-http://example.com
4989 <p>NOPEhttp://example.com
4990 N0http://example.com
4991 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4992 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4997 External links: nofollow domain exception
4999 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5001 <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>.
5008 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5010 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5015 External image from https
5017 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5019 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5024 External image (when not allowed)
5026 wgAllowExternalImages=0
5028 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5030 <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>
5035 Link to non-http image, no img tag
5037 Link to non-http image, no img tag: ftp://example.com/test.jpg
5039 <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>
5044 External links: terminating separator
5046 Terminating separator: http://example.com/thing,
5048 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5053 External links: intervening separator
5055 Intervening separator: http://example.com/1,2,3
5057 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5062 External links: old bug with URL in query
5064 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5066 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5071 External links: old URL-in-URL bug, mixed protocols
5073 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5075 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5079 # Since Parsoid is starting to emit canonical wikitext for links,
5080 # [http://example.com http://example.com] will not RT back to that
5083 External links: URL in text
5087 URL in text: [http://example.com http://example.com]
5089 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5092 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5096 External links: Clickable images
5098 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5100 <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>
5103 <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>
5107 External links: raw ampersand
5109 Old & use: http://x&y
5111 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5116 External links: encoded ampersand
5118 Old & use: http://x&y
5120 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5123 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
5127 External links: encoded equals (T8102)
5129 http://example.com/?foo=bar
5131 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5134 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5138 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5139 ## does it number them. As discussed in T55505, we can identify
5140 ## autonumbered links via CSS.
5144 External links: [raw ampersand]
5146 Old & use: [http://x&y]
5148 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5151 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5154 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5155 # mode will return the [raw ampersand] wikitext
5157 External links: [encoded ampersand]
5159 parsoid=wt2html,wt2wt,html2html
5161 Old & use: [http://x&y]
5163 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5166 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5170 External links: [raw equals]
5172 [http://example.com/?foo=bar]
5174 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5177 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5180 # note that parsoid html is identical to [raw equals] case; so html2wt
5181 # mode will return the [raw equals] wikitext
5183 External links: [encoded equals] (T8102)
5185 parsoid=wt2html,wt2wt,html2html
5187 [http://example.com/?foo=bar]
5189 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5192 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5195 # xxx parsoid strips the IDN character, so the round-trip tests will
5196 # obviously fail and are disabled. --cscott
5198 External links: [IDN ignored character reference in hostname; strip it right off]
5200 parsoid=wt2html,wt2wt,html2html
5202 [http://e‌xample.com/]
5204 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5207 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5210 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5211 # Where an external link could easily circumvent the sanitization of the text of
5212 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5213 # test demands a higher standard. That's a bit strange.
5217 # http://example.com -> [http://example.com|http://example.com]
5218 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5220 # The first example is sanitized, but the second is not. Any security benefits
5221 # from this production are trivial to circumvent. Either remove this test and
5222 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5223 # the test accordingly.
5227 # xxx parsoid strips the IDN character, so the round-trip tests will
5228 # obviously fail and are disabled. --cscott
5230 External links: IDN ignored character reference in hostname; strip it right off
5232 parsoid=wt2html,html2html
5234 http://e‌xample.com/
5236 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5239 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5243 External links: www.jpeg.org (T2554)
5247 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5251 # parsoid doesn't explicitly mark autonumbered links, see T55505
5253 External links: URL within URL (T2002)
5255 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5257 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5260 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5264 T2361: URL inside bracketed URL
5266 [http://www.example.com/foo http://www.example.com/bar]
5268 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5273 T2361: URL within URL, not bracketed
5275 http://www.example.com/foo?=http://www.example.com/bar
5277 <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>
5282 T2289: ">"-token in URL-tail
5284 http://www.example.com/<hello>
5286 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5291 T2289: literal ">"-token in URL-tail
5293 http://www.example.com/<b>html</b>
5295 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5298 <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>
5302 T2289: ">"-token in bracketed URL
5304 [http://www.example.com/<hello> stuff]
5306 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5311 T2289: literal ">"-token in bracketed URL
5313 [http://www.example.com/<b>html</b> stuff]
5315 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5320 T2289: literal double quote at end of URL
5322 http://www.example.com/"hello"
5324 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5329 T2289: literal double quote in bracketed URL
5331 [http://www.example.com/"hello" stuff]
5333 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5338 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5340 [http://www.example.com test]
5342 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5347 External links: link text with spaces
5349 [http://www.example.com a b c]
5350 [http://www.example.com ''a'' ''b'']
5352 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5353 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5358 External links: wiki links within external link (T5695)
5360 parsoid=wt2html,html2html
5362 [http://example.com [[wikilink]] embedded in ext link]
5364 <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>
5367 <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>
5371 T2787: Links with one slash after the url protocol are invalid
5375 [http:/example.com title]
5377 <p>http:/example.com
5378 </p><p>[http:/example.com title]
5383 Bracketed external links with template-generated invalid target
5385 [{{echo|http:/example.com}} title]
5387 <p>[http:/example.com title]
5391 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5393 Broken wikilinks (but not external links) prevent templates from closing
5397 [http://example.com x
5399 {{echo|[http://example.com x}}
5405 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5406 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5408 </p><p>{{echo|[[Foo}}
5411 <p>[<a rel="mw:ExtLink" href="http://example.com">http://example.com</a> x</p>
5412 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://example.com x"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://example.com">http://example.com</a> x</p>
5414 <p>{{echo|[[Foo}}</p>
5418 Wikilinks with embedded newlines are not broken
5429 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[ Foo\nB\nC]]"}},"i":0}}]}'>[[ Foo B C]]</p>
5441 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5445 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5446 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5450 T4702: Mismatched <i>, <b> and <a> tags are invalid
5452 ''[http://example.com text'']
5453 [http://example.com '''text]'''
5454 ''Something [http://example.com in italic'']
5455 ''Something [http://example.com mixed''''', even bold]'''
5456 '''''Now [http://example.com both''''']
5458 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5459 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5460 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5461 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5462 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5470 http://www.example.com/?title=AT%26T
5472 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5475 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5478 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5479 # % is actually legal in HTML5. Any change in output would need testing though.
5481 T6781, T7267: %25 in URL
5483 http://www.example.com/?title=100%25_Bran
5485 <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>
5488 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5492 T6781, T7267: %28, %29 in URL
5494 http://www.example.com/?title=Ben-Hur_%281959_film%29
5496 <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>
5499 <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>
5504 T6781: %26 in autonumber URL
5506 [http://www.example.com/?title=AT%26T]
5508 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5511 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5515 T6781, T7267: %26 in autonumber URL
5517 [http://www.example.com/?title=100%25_Bran]
5519 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5522 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5526 T6781, T7267: %28, %29 in autonumber URL
5528 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5530 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5533 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5538 T6781: %26 in bracketed URL
5540 [http://www.example.com/?title=AT%26T link]
5542 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5545 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5549 T6781, T7267: %25 in bracketed URL
5551 [http://www.example.com/?title=100%25_Bran link]
5553 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5558 T6781, T7267: %28, %29 in bracketed URL
5560 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5562 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5565 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5569 External link containing a period in the anchor. (T65947)
5571 [//foo.org/bar#baz. bang]
5573 [//foo.org/bar. bang]
5575 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5576 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5579 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5580 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5584 External link containing a single quote. (T65947)
5588 [//foo.org/bar'baz bang]
5590 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5591 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5594 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5595 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5599 External link containing double-single-quotes in text '' (T6598 sanity check)
5601 Some [http://example.com/ pretty ''italics'' and stuff]!
5603 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5608 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5610 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5612 <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>
5617 External link containing double-single-quotes with no space separating the url from text in italics
5619 [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]].]
5621 <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>
5624 <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>
5626 <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>
5630 External link with comments in link text
5632 [http://www.google.com Google <!-- comment -->]
5634 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5637 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5641 External link to bare IPv4 address
5643 [http://192.168.0.1 Link]
5645 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5648 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5652 URL-encoding in URL functions (single parameter)
5654 {{localurl:Some page|amp=&}}
5656 <p>/index.php?title=Some_page&amp=&
5661 URL-encoding in URL functions (multiple parameters)
5663 {{localurl:Some page|q=?&=&}}
5665 <p>/index.php?title=Some_page&q=?&amp=&
5672 http://example.com/index.php?foozoid%5B%5D=bar
5674 http://example.com/index.php?foozoid[]=bar
5676 <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>
5677 </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>
5680 <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>
5682 <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>
5686 IPv6 urls, autolink format (T23261)
5688 http://[2404:130:0:1000::187:2]/index.php
5690 Examples from RFC 2373, section 2.2:
5691 * http://[1080::8:800:200C:417A]/unicast
5692 * http://[FF01::101]/multicast
5693 * http://[::1]/loopback
5694 * http://[::]/unspecified
5695 * http://[::13.1.68.3]/ipv4compat
5696 * http://[::FFFF:129.144.52.38]/ipv4compat
5698 Examples from RFC 2732, section 2:
5699 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5700 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5701 * http://[3ffe:2a00:100:7031::1]
5702 * http://[1080::8:800:200C:417A]/foo
5703 * http://[::192.9.5.5]/ipng
5704 * http://[::FFFF:129.144.52.38]:80/index.html
5705 * http://[2010:836B:4179::836B:4179]
5708 <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>
5709 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5711 <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>
5712 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5713 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5714 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5715 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5716 <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>
5717 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5719 <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>
5720 <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>
5721 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5722 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5723 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5724 <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>
5725 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5728 <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>
5730 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5731 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5732 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5733 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5734 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5735 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5736 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5738 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5739 <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>
5740 <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>
5741 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5742 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5743 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5744 <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>
5745 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5749 IPv6 urls, bracketed format (T23261)
5751 [http://[2404:130:0:1000::187:2]/index.php test]
5753 Examples from RFC 2373, section 2.2:
5754 * [http://[1080::8:800:200C:417A] unicast]
5755 * [http://[FF01::101] multicast]
5756 * [http://[::1]/ loopback]
5757 * [http://[::] unspecified]
5758 * [http://[::13.1.68.3] ipv4compat]
5759 * [http://[::FFFF:129.144.52.38] ipv4compat]
5761 Examples from RFC 2732, section 2:
5762 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5763 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5764 * [http://[3ffe:2a00:100:7031::1] 3]
5765 * [http://[1080::8:800:200C:417A]/foo 4]
5766 * [http://[::192.9.5.5]/ipng 5]
5767 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5768 * [http://[2010:836B:4179::836B:4179] 7]
5771 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5772 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5774 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5775 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5776 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5777 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5778 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5779 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5780 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5782 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5783 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5784 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5785 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5786 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5787 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5788 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5791 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5793 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5794 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5795 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5796 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5797 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5798 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5799 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5801 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5802 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5803 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5804 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5805 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5806 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5807 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5808 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5812 Non-extlinks in brackets
5821 [{{echo|foo}} ''bar'']
5822 [{{echo|foo}}l's] errand
5823 [{{echo|foo}}l's errand]
5825 [url=http://example.com]
5826 [http:// bare protocols don't count]
5839 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5840 [http:// bare protocols don't count]
5848 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5849 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5850 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5851 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5852 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5853 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5854 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5855 [http:// bare protocols don't count]</p>
5859 Percent encoding in external links
5861 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5863 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5866 <p><a rel="mw:ExtLink"
5867 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5871 Use url link syntax for links where the content is equal the link target
5875 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5878 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5882 Parenthesis in external links, especially URL links
5886 http://example.com/test)
5888 http://example.com/(test)
5890 http://example.com/((test)
5892 (http://example.com/(test))
5894 (http://example.com/(test)))))
5896 http://example.com/a)b
5898 [http://example.com) foo]
5900 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5901 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5902 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5903 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5904 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5905 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5906 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5907 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5910 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5911 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5912 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5913 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5914 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5915 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5916 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5917 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5921 Parenthesis in external links, w/ transclusion or comment
5923 (http://example.com/{{echo|hi}})
5925 (http://example.com<!-- hi -->)
5927 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5928 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5931 <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>
5933 <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>
5937 Serialize <a> tags with invalid link targets as plain text
5939 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5941 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5942 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5943 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5944 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5947 <nowiki>*</nowiki>text
5948 <nowiki>[[foo]]</nowiki>
5949 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5953 mw:ExtLink -vs- mw:WikiLink (T94723)
5957 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5958 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5959 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5960 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5962 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5963 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5971 [[:en:European_Robin|European Robin]]
5972 [[:en:European_Robin|European Robin]]
5976 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5980 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5982 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5993 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5995 Normal text. '''''Bold italic text.''''' Normal text.
5997 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5998 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6003 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6004 # parser strips. The wikitext contains just the first half of the bold
6007 Unclosed and unmatched quotes
6009 '''''Bold italic text '''with bold deactivated''' in between.'''''
6011 '''''Bold italic text ''with italic deactivated'' in between.'''''
6015 ..spanning two paragraphs (should not work).'''
6017 '''Bold tag left open
6019 ''Italic tag left open
6023 <!-- Unmatching number of opening, closing tags: -->
6024 '''This year''''s election ''should'' beat '''last year''''s.
6026 ''Tom'''s car is bigger than ''Susan'''s.
6028 Plain ''italic'''s plain
6030 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6031 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6032 </p><p><b>Bold text..</b>
6033 </p><p>..spanning two paragraphs (should not work).
6034 </p><p><b>Bold tag left open</b>
6035 </p><p><i>Italic tag left open</i>
6037 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6038 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6039 </p><p>Plain <i>italic'</i>s plain
6042 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6043 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6044 </p><p><b>Bold text..</b>
6045 </p><p>..spanning two paragraphs (should not work).<b></b>
6046 </p><p><b>Bold tag left open</b>
6047 </p><p><i>Italic tag left open</i>
6050 <!-- Unmatching number of opening, closing tags: -->
6051 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6052 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6053 </p><p>Plain <i>italic'</i>s plain
6060 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6063 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6064 # is the bare minimum required by the spec, see:
6065 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6066 # Parsoid team replies: empty table tags are legal in HTML5
6068 A table with no data.
6081 A table with stray table end tags on start tag line (wt2html)
6085 {|style="color: red;"|}
6087 {|style="color: red;" |}
6091 {|style="color: red;"|} id="foo"
6095 {|style="color: red;" |} id="foo"
6099 <table style="color: red;"></table>
6101 <table style="color: red;">
6107 <table style="color: red;" id="foo">
6113 <table style="color: red;" id="foo">
6122 A table with no data (take 2)
6130 # A table with nothing but a caption is invalid XHTML, we might want to render
6131 # this as <p>caption</p>
6132 # Parsoid team replies: table with only a caption is legal in HTML5
6134 A table with nothing but a caption
6142 </caption><tr><td></td></tr></table>
6145 <table><caption> caption</caption></table>
6149 A table with caption with default-spaced attributes and a table row
6152 |+ style="color: red;" | caption1
6158 <caption style="color: red;"> caption1
6167 A table with captions with non-default spaced attributes and a table row
6170 |+style="color: red;"|caption2
6171 |+ style="color: red;"| caption3
6177 <caption style="color: red;">caption2
6179 <caption style="color: red;"> caption3
6188 Table td-cell syntax variations
6192 | foo bar foo || baz
6193 | style='color:red;' | baz
6194 | style='color:red;' || baz
6201 <td> foo bar foo </td>
6204 <td style="color:red;"> baz
6206 <td> style='color:red;' </td>
6234 Simple table but with multiple dashes for row wikitext
6253 Multiplication table
6255 {| border="1" cellpadding="2"
6256 |+Multiplication table
6258 ! × !! 1 !! 2 !! 3
6276 <table border="1" cellpadding="2">
6277 <caption>Multiplication table
6324 Accept "||" in table headings
6339 Accept "!!" in table data
6353 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6358 Accept "||" in indented table headings
6368 </th></tr></table></dd></dl>
6373 Accept "!!" in templates
6387 <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>
6391 Accept "!!" in table headings after newline
6408 <p>b!!c</p></th></tr>
6413 Accept "!!" in table data of mixed wikitext / html syntax
6417 <tr><td>b!!c</td></tr>
6430 <tbody><tr><th>a</th></tr>
6431 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6436 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6453 Accept "| !" at start of line in tables (ignore !-attribute)
6457 | !style="color:red" | bar
6469 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 +/-
6473 |style='color:red;'|+1
6474 |style='color:blue;'|-1
6486 <td style="color:red;">+1
6488 <td style="color:blue;">-1
6512 |rowspan=2| Cell 2, row 1 (and 2)
6523 <td rowspan="2"> Cell 2, row 1 (and 2)
6541 {| bgcolor=#ABCDEF border=2
6546 |the original table again
6554 <table bgcolor="#ABCDEF" border="2">
6562 <td>the original table again
6568 Invalid attributes in table cell (T3830)
6582 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6586 | title="foo<nowiki>|</nowiki>" |bar
6587 | title="foo<nowiki>|</nowiki>" bar
6594 <td title="foo|">bar
6596 <td> title="foo|" bar
6601 <tbody><tr><td title="foo">bar</td>
6602 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6603 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6607 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6608 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6609 # *2wt modes will fail.
6611 Table security: embedded pipes
6613 parsoid=wt2html,html2html
6616 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6620 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6621 <td>]" onmouseover="alert(document.cookie)">test
6629 <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":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6633 Element attributes with double ! should not be broken up by <th>
6636 ! hi <div class="!!">ha</div> ho
6641 <th> hi <div class="!!">ha</div> ho
6646 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6651 ! and || in element attributes should not be parsed as <th>/<td>
6654 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6659 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6664 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6668 # FIXME: The output seems broken. Filed as T110268.
6670 ! and || in td attributes should not be parsed as <th>/<td>
6675 | style="color: red !important;" data-contrived="put this here ||" | foo
6680 <td> style="color: red !important;" data-contrived="put this here </td>
6686 <tbody><tr><td> style="color: red !important;" data-contrived="put this here </td><td data-parsoid='{"stx":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'> foo</td></tr>
6691 Break on | in element attribute in template
6693 parsoid=wt2html,html2html
6695 {{echo|1=<div class="hi|ho">ha</div>}}
6697 <p>ho">ha</div>
6700 <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>
6704 Break on | in element attribute name in template
6706 {{echo|<div cla|ss="hiho">ha</div>}}
6708 <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>
6712 Don't break on | in extension attribute in template
6714 {{echo|<ref name="hi|ho">ha</ref>}}
6718 <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>
6720 <ol class="mw-references 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>
6723 ## We don't support roundtripping of these attributes in Parsoid.
6724 ## Selective serialization takes care of preventing dirty diffs.
6725 ## But, on edits, we dirty-diff the invalid attribute text.
6727 Invalid text in table attributes should be discarded
6731 {| <span>boo</span> style='border:1px solid black'
6732 | <span>boo</span> style='color:blue' | 1
6733 |<span>boo</span> style='color:blue'| 2
6736 <table style="border:1px solid black">
6738 <td style="color:blue"> 1
6740 <td style="color:blue"> 2
6744 <table style="border:1px solid black">
6746 <td style="color:blue"> 1</td>
6747 <td style="color:blue"> 2</td>
6753 Invalid text in table attributes should be preserved by selective serializer
6756 "modes": ["selser"],
6758 ["td:first-child", "text", "abc"],
6759 ["td + td", "text", "xyz"]
6763 {| <span>boo</span> style='border:1px solid black'
6764 | <span>boo</span> style='color:blue' | 1
6765 |<span>boo</span> style='color:blue'| 2
6768 {| <span>boo</span> style='border:1px solid black'
6769 | <span>boo</span> style='color:blue' |abc
6770 |<span>boo</span> style='color:blue'|xyz
6775 1. Template-generated table cell attributes and cell content
6780 || {{table_attribs_5}}
6781 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6782 |align=center {{table_attribs}}
6783 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6788 <td style="color:red;">Foo
6790 <td style="color:red;">Foo
6792 <td> style="color:red;"</td>
6795 <td style="color:red;">Foo
6797 <td align="center" style="color:red;">Foo
6799 <td align="center" style="color:red;">Foo
6805 2. Template-generated table cell attributes and cell content
6808 |{{table_attribs_2}}
6813 <td style="color:red;">Foo
6821 <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>
6822 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6827 3. Template-generated table cell attributes and cell content
6830 !align=center {{table_header_cells}}
6832 |align=center {{table_cells}}
6837 <th align="center" style="color:red;">Foo</th>
6838 <th style="color:red;"><i>Bar</i></th>
6839 <th style="color:brown;"><i>Foo</i> and Baz
6842 <td align="center" style="color:red;">Foo</td>
6843 <td style="color:red;"><i>Bar</i></td>
6844 <td style="color:brown;"><i>Foo</i> and Baz
6849 <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>
6850 <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>
6855 4. Template-generated table cell attributes and cell content inside a templated table
6858 !align=center {{table_header_cells}}
6860 |align=center {{table_cells}}
6865 <th align="center" style="color:red;">Foo</th>
6866 <th style="color:red;"><i>Bar</i></th>
6867 <th style="color:brown;"><i>Foo</i> and Baz
6870 <td align="center" style="color:red;">Foo</td>
6871 <td style="color:red;"><i>Bar</i></td>
6872 <td style="color:brown;"><i>Foo</i> and Baz
6876 <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}}]}'>
6877 <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>
6879 <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>
6883 ## Edge case fix to prevent future regressions
6885 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6888 |{{table_attribs_7}}
6893 <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>
6895 <ol class="mw-references 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>
6899 Table with row followed by newlines and table heading
6901 parsoid=wt2html,html2html
6919 Table with empty line following the start tag
6921 parsoid=wt2html,html2html
6939 Table attributes with empty value
6941 parsoid=wt2html,html2html
6954 <tbody><tr><td style=""> hello</td></tr>
6959 Wikitext table with a lot of comments
6982 Wikitext table comments represented in parsoid dom
6984 {|<!--c1--><!--c2-->
6995 <table><!--c1--><!--c2-->
6996 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6997 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
7002 Wikitext table with double-line table cell
7019 Table cell with a single comment
7036 Table-cell after a comment-only-empty-line
7053 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7055 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
7061 Build table with {{!}}
7063 {{{!}} class="wikitable"
7066 {{!}}- style="color:red;"
7067 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
7070 <table class="wikitable">
7076 <tr style="color:red;">
7078 <td style="color:red;"> second data
7084 Build table with pipe as data
7086 {| class="wikitable"
7089 |- style="color:red;"
7090 | data || style="color:red;" | second data
7092 | style="color:red;" | data with | || style="color:red;" | second data with |
7094 || data with | ||| second data with |
7097 <table class="wikitable">
7103 <tr style="color:red;">
7105 <td style="color:red;"> second data
7108 <td style="color:red;"> data with | </td>
7109 <td style="color:red;"> second data with |
7112 <td> data with | </td>
7113 <td> second data with |
7119 Build table with wikilink
7121 {| class="wikitable"
7122 ! header || second header
7123 |- style="color:red;"
7124 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
7126 | data || second data [[Main Page|link|text with pipe]]
7129 <table class="wikitable">
7134 <tr style="color:red;">
7135 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
7136 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7140 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7145 # The expected HTML structure in this test is debatable. The PHP parser does
7146 # not parse this kind of table at all. The main focus for Parsoid is on
7147 # round-tripping, so this output is ok for now. TODO: revisit!
7149 Wikitext table with html-syntax row
7159 <td>foo</td></tr></tbody></table>
7163 Implicit <td> after a |-
7165 parsoid=wt2html,html2html
7180 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7181 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7183 </tr></tbody></table>
7187 Lists should be recognized in an implicit <td> context
7189 parsoid=wt2html,html2html
7206 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7207 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7209 </tr></tbody></table>
7213 Table cells not properly parsed in an implicit-td context
7217 {{table_attribs_4}} || a || b
7222 <td style="background-color:#DC241f;" width="10px"></td>
7229 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7230 <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>
7234 Parsoid: Round-trip tables directly followed by content (T53219)
7236 parsoid=wt2html,wt2wt
7261 Parsoid: Default to a newline after tables in new content (T53219)
7266 <tr><td>foo</td></tr></tbody></table> bar
7268 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7273 <nowiki> </nowiki>bar
7281 Parsoid: newline inducing block nodes don't suppress <nowiki>
7293 Parsoid: Row-syntax table headings followed by comment & table cells
7295 parsoid=wt2html,wt2wt
7299 <!-- foo --> || baz || quux
7313 <tbody><tr><th> foo </th><th> bar
7314 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7319 Parsoid: Recover better from broken table attributes
7339 <p>foo</p></td></tr>
7344 Tables: Digest broken attributes on table and tr tag
7355 <tr class='mw-empty-elt'></tr>
7356 <tr class='mw-empty-elt'></tr>
7360 # T137406: Whitespace in the HTML
7362 1. Generate correct wikitext for tables with thead/tbody/tfoot
7367 <caption>Test</caption>
7408 <caption>Test</caption>
7428 # T137406: No whitespace in the HTML
7430 2. Generate correct wikitext for tables with thead/tbody/tfoot
7434 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7444 Testing serialization after deletion in references
7453 hi <ref><div id="x">ho</div></ref>
7463 Testing serialization after deletion of table cells
7466 "modes": ["wt2wt", "selser"],
7474 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7484 Testing selser after addition of new row before first row (T125419)
7487 "modes": ["wt2wt", "selser"],
7489 [ "tr", "before", "<tr><td>X</td></tr>" ]
7505 Serialize new table rows in a HTML table using HTML tags
7508 "modes": ["wt2wt", "selser"],
7510 [ "tr", "before", "<tr><td>X</td></tr>" ]
7514 <table><tr><td>a</td></tr></table>
7516 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7520 Serialize new table cells in a HTML row using HTML tags
7523 "modes": ["wt2wt", "selser"],
7525 [ "td", "before", "<td>X</td>" ]
7529 <table><tr><td>a</td></tr></table>
7531 <table><tr><td>X</td><td>a</td></tr></table>
7535 Wikitext tables can be nested inside HTML tables
7539 <table data-parsoid='{"stx":"html"}'>
7542 <tr><td>foo</td></tr>
7557 Serialize wikitext list items as HTML list items when embedded in a HTML list
7561 <ul data-parsoid='{"stx": "html"}'>
7562 <li data-parsoid='{}'>a</li>
7572 # SSS FIXME: Is this actually a good thing given the
7573 # odd nested list output that is generated by MW?
7574 # <ul><li>foo<ul>..</ul></li></ul> instead of
7575 # <ul><li>foo</li><ul>..</ul></ul>
7577 Wikitext lists can be nested inside HTML lists
7581 <ul data-parsoid='{"stx": "html"}'>
7582 <li data-parsoid='{"stx": "html"}'>a
7587 <ul data-parsoid='{"stx": "html"}'>
7610 Plain link, capitalized
7614 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7619 Plain link, uncapitalized
7623 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7630 [[Main Page|The Main Page]]
7632 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7637 Piped link with comment in link text
7639 [[Main Page|The Main<!--front--> Page]]
7641 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7646 Piped link with multiple pipe characters in link text
7648 [[Main Page||The|Main|Page|]]
7650 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7653 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7657 Piped link with no link text
7659 [[Thomas Bek (bishop of St David's)|]]
7661 <p>[[Thomas Bek (bishop of St David's)|]]
7664 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7668 Piped link with empty link text
7670 [[Main Page|<nowiki/>]] - empty nowiki
7671 [[Main Page| ]] - empty space
7672 [[Main Page| ]] - empty non breaking space
7674 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7675 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7676 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7679 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7680 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7681 <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>
7689 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7694 Broken link with fragment
7696 [[Zigzagzogzagzig#zug]]
7698 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7703 Special page link with fragment
7705 [[Special:Version#anchor]]
7707 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7712 Nonexistent special page link with fragment
7714 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7716 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7723 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7725 <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>
7732 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7734 <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>!!!
7745 T45661: Piped links with identical prefixes
7747 [[prefixed article|prefixed articles with spaces]]
7749 [[prefixed article|prefixed articlesaoeu]]
7751 [[Main Page|Main Page test]]
7753 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7754 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7755 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7761 Link with HTML entity in suffix / tail
7763 [[Main Page]]", [[Main Page]]a
7765 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7768 <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>
7772 Link with 3 brackets
7783 Link with 4 brackets
7787 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7792 Piped link with 3 brackets
7794 [[[main page|the main page]]]
7796 <p>[[[main page|the main page]]]
7801 Piped link with extlink-like text
7804 [[Main Page|This is a [bar]]]
7807 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7808 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7809 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7812 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7813 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7814 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7818 Link with multiple pipes
7820 [[Main Page|The|Main|Page]]
7822 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7827 Anchor containing a #. (T65430)
7829 [[Main Page#And#Link]]
7831 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7834 <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>
7840 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7842 <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>
7847 Link with space in namespace
7849 [[User talk:Foo bar]]
7851 <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>
7856 MemoryAlpha:AlphaTest
7858 This is an article in the MemoryAlpha namespace
7859 (which shadows the memoryalpha interwiki link).
7863 Namespace takes precedence over interwiki link (T53680)
7865 [[MemoryAlpha:AlphaTest]]
7867 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7871 # The previous test doesn't work correctly in html2*, due to not recognizing the
7872 # link as an internal one. This one checks for the correct behavior.
7874 Link to namespace preferred over interwiki with correct rel attribute
7876 parsoid=html2wt,html2html
7878 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7880 [[MemoryAlpha:AlphaTest]]
7884 Piped link to namespace
7886 [[Meta:Disclaimers|The disclaimers]]
7888 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7895 [[Usually caused by a typo (oops}]]
7897 <p>[[Usually caused by a typo (oops}]]
7904 Just a test of an article title containing a percent.
7908 Link containing % (not as a hex sequence)
7911 [[7% Solution|7%25 Solution]]
7913 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7914 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7917 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7918 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7921 # note that the parsoid HTML is identical to the previous test output,
7922 # so the previous test ensures that the html2wt mode will generate the
7923 # "not as a hex sequence" wikitext.
7925 Link containing % as a single hex sequence interpreted to char
7927 parsoid=wt2wt,wt2html,html2html
7930 [[7%25 Solution|7%25 Solution]]
7932 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7933 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7936 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7937 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7941 Link containing % as a double hex sequence interpreted to hex sequence
7945 <p>[[7%2525 Solution]]
7949 ## Example for such a section: == < ==
7951 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7953 [[%23%3c]][[%23%3e]]
7955 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7958 <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>
7962 Link containing "<#" and ">#" as a hex sequences
7964 [[%3c%23]][[%3e%23]]
7966 <p>[[%3c%23]][[%3e%23]]
7971 Link containing an equals sign
7973 [[Special:BookSources/isbn=4-00-026157-6]]
7975 <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>
7978 <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>
7984 Just a test of an article title containing a tilde.
7987 # note that links containing signatures, like [[Foo~~~~]], are
7988 # massaged by the pre-save transform (PST) and so the tildes are never
7989 # seen by the parser.
7991 Link containing a tilde
7995 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7998 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8002 Link containing double-single-quotes '' (T6598)
8004 [[Lista d''e paise d''o munno]]
8006 <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>
8009 <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>
8013 Link containing double quotes and spaces
8017 <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>
8020 <p><a rel="mw:WikiLink" href="./Cool_%22Gator%22" title='Cool "Gator"'>Cool "Gator"</a></p>
8024 File containing double quotes and spaces
8026 [[File:Cool "Gator".png]]
8028 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Cool_%22Gator%22.png" data-parsoid='{"a":{"href":"./File:Cool_%22Gator%22.png"},"sa":{"href":"File:Cool \"Gator\".png"}}'><img resource='./File:Cool_"Gator".png' src="./Special:FilePath/Cool_%22Gator%22.png" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Cool_\"Gator\".png","height":"220","width":"220","src":"./Special:FilePath/Cool_%22Gator%22.png"},"sa":{"resource":"File:Cool \"Gator\".png","src":"./Special:FilePath/Cool_\"Gator\".png"}}'/></a></span></p>
8032 Redirect containing double quotes and spaces
8034 #REDIRECT [[Cool "Gator"]]
8036 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8040 Link containing double-single-quotes '' in text (T6598 sanity check)
8042 Some [[Link|pretty ''italics'' and stuff]]!
8044 <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>!
8047 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8051 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8053 ''Some [[Link|pretty ''italics'' and stuff]]!''
8055 <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>
8060 Link with double quotes in title part (literal) and alternate part (interpreted)
8062 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8066 [[''Pentecoste''|Pentecoste]]
8068 [[''Pentecoste''|''Pentecoste'']]
8070 <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>
8071 </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>
8072 </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>
8073 </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>
8076 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Denys_Savchenko_''Pentecoste''.jpg"><img resource="./File:Denys_Savchenko_''Pentecoste''.jpg" src="./Special:FilePath/Denys_Savchenko_''Pentecoste''.jpg" height="220" width="220"/></a></span></p>
8077 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8078 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8079 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8083 Broken image links with HTML captions (T41700)
8085 [[File:Nonexistent|<script></script>]]
8086 [[File:Nonexistent|100x100px|<script></script>]]
8087 [[File:Nonexistent|<]]
8088 [[File:Nonexistent|a<i>b</i>c]]
8090 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8091 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8092 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8093 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8096 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
8097 <span typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"<script></script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;script>&lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"100","width":"100"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
8098 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[107,111,null,null]}'>&lt;</span>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span>
8099 <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a<i>b</i>c"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"a<i data-parsoid='{\"stx\":\"html\",\"dsr\":[134,142,3,4]}'>b</i>c"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></span></p>
8105 [[http://www.example.com]]
8107 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8110 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
8114 Plain link to URL with link text
8116 [[http://www.example.com Link text]]
8118 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8123 Plain link to protocol-relative URL
8125 [[//www.example.com]]
8127 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8130 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
8134 Plain link to protocol-relative URL with link text
8136 [[//www.example.com Link text]]
8138 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8143 Plain link to page with question mark in title
8149 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8150 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8154 # I'm fairly sure the expected result here is wrong.
8155 # We want these to be URL links, not pseudo-pages with URLs for titles....
8156 # However the current output is also pretty screwy.
8159 # I'm changing it to match the current output--it arguably makes more
8160 # sense in the light of the test above. Old expected result was:
8161 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8163 # But I think this test is bordering on "garbage in, garbage out" anyway.
8168 Piped link to URL: [[http://www.example.com|an example URL]]
8170 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8173 <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>
8177 Plain link in template argument
8181 {{echo|[http://www.example.com |123]}}
8183 {{echo|[[http://www.example.com |123]]}}
8185 {{echo|[[http://www.example.com |123]}}
8187 {{echo|[http://www.example.com |123]]}}
8189 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8190 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8191 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8192 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8195 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://www.example.com">http://www.example.com</a> </p>
8197 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[http://www.example.com |123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://www.example.com">|123</a>]</p>
8199 <p>{{echo|[<a rel="mw:ExtLink" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
8201 <p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" href="http://www.example.com">http://www.example.com</a> </p>
8205 T2002: [[page|http://url/]] should link to page, not http://url/
8207 [[Main Page|http://url/]]
8209 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8212 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8215 # Parsoid does not mark self-links, by design.
8217 T2337: Escaped self-links should be bold
8221 [[Bug462]] [[Bug462]]
8223 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8226 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a></p>
8228 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8232 Self-link to section should not be bold
8236 [[Main Page#section]]
8238 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8249 Self-link to numeric title
8255 <p><a class="mw-selflink selflink">0</a>
8260 Link to numeric-equivalent title
8266 <p><a href="/wiki/00" title="00">00</a>
8271 <nowiki> inside a link
8273 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8275 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8280 Non-breaking spaces in title
8282 [[ Main Page ]]
8284 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8288 # Add new article for the test below so that it doesn't red-link
8296 Multiple spaces in titles should normalize to a single underscore
8298 parsoid=wt2html,wt2wt
8304 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8305 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8306 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8309 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8310 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8311 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8316 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8322 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8327 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8333 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8338 Internal link with en linktrail: no apostrophes (T29473)
8344 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8349 Internal link with ca linktrail with apostrophes (T29473)
8355 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8360 Internal link with kaa linktrail with apostrophes (T29473)
8366 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8371 Link with multiple ":" in a subpage-supporting namespace (T65636)
8373 [[User:Foo/Test/63636:Bar|Test]]
8375 <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>
8378 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8381 ## Mainly a sanity check for Parsoid
8383 Handle title parsing for subpages
8403 Link to a subpage from a namespace other than main
8410 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8413 <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>
8417 Ensure that transclusion titles are not url-decoded
8419 subpage title=[[Test]]
8422 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8424 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8427 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8431 Purely hash wikilink
8433 title=[[User:Test/123]]
8438 <p><a href="#a">b</a>
8441 <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>
8445 Serialization of purely hash wikilink
8447 title=[[User:Test/123]]
8451 <p><a href="#a">[[</a></p>
8453 [[#a|<nowiki>[[</nowiki>]]
8455 <p><a href="#a">[[</a>
8460 1. Interaction of linktrail and template encapsulation
8464 <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>
8468 2. Interaction of linktrail and template encapsulation
8472 {{echo|Some [[Fool]]}}s
8474 <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>
8478 3. Interaction of linktrail and template encapsulation
8482 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8484 <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>
8494 Internal link with is link prefix
8498 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8500 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8511 Internal link with is link trail and link prefix
8515 [[mótmælendatrú|xxx]]ar
8517 mótmælenda[[söfnuður]]
8518 mótmælenda[[söfnuður|söfnuðir]]
8519 mótmælenda[[söfnuður|söfnuðir]]xxx
8521 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8522 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8523 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8524 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8525 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8530 Parsoid link trail escaping
8532 parsoid=html2wt,html2html
8534 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8540 Parsoid link prefix escaping
8543 parsoid=html2wt,html2html
8545 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8547 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8551 Parsoid link bracket escaping
8553 parsoid=html2wt,html2html
8555 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8556 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8557 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8558 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8559 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8560 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8568 [[[<nowiki/>[[Test]]]]]
8572 [[[[[<nowiki/>[[Test]]]]]]]
8576 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8584 [http://wp.org ''foo'']
8586 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8587 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8588 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8589 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8594 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8596 [[Foo|{{echo|a}} b {{echo|c}}]]
8598 <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>
8602 Link with angle bracket after anchor
8606 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8609 <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>
8613 ### Interwiki links (see maintenance/interwiki.sql)
8617 Inline interwiki link
8619 parsoid=wt2html,wt2wt,html2html
8621 [[MeatBall:SoftSecurity]]
8623 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8626 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8630 Inline interwiki link with empty title (T4372)
8632 parsoid=wt2html,wt2wt,html2html
8636 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8639 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8642 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8644 Interwiki link encoding conversion (T3636)
8646 parsoid=wt2html,wt2wt
8648 *[[Wikipedia:ro:Olteniţa]]
8649 *[[Wikipedia:ro:Olteniţa]]
8651 <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>
8652 <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>
8656 <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>
8657 <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>
8661 <li><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8662 <li><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8667 Interwiki link with fragment (T4130)
8669 [[MeatBall:SoftSecurity#foo]]
8671 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8676 Link scenarios with escaped fragments
8679 [[Foo#Is this great?]]
8680 [[meatball:Foo#Is this great?]]
8682 <p><a href="#Is_this_great.3F">#Is this great?</a>
8683 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8684 <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>
8687 <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>
8688 <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>
8689 <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>
8692 # Ideally the wikipedia: prefix here should be proto-relative too
8693 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8694 # define the 'en' prefix, and originally the test used 'wikipedia',
8695 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8698 Different interwiki prefixes mapping to the same URL
8706 [[:wikipedia:Foo|Foo]]
8708 [[wikipedia:en:Foo]]
8710 [[:wikipedia:en:Foo]]
8714 <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>
8716 <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>
8718 <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>
8720 <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>
8722 <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>
8724 <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>
8726 <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>
8730 Interwiki links that cannot be represented in wiki syntax
8733 [[meatball:ok#foo|ok with fragment]]
8734 [[meatball:ok_as_well?|ok ending with ? mark]]
8735 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8736 [http://de.wikipedia.org/wiki/#foo is just fragment]
8739 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8740 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8741 <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>
8742 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8743 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8746 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8747 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8748 <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>
8749 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8750 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8754 Interwiki links: trail
8756 [[wikipedia:Foo|Ba]]r
8758 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8761 <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>
8765 Local interwiki link
8767 parsoid=wt2html,wt2wt,html2html
8769 [[local:Template:Foo]]
8771 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8774 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8777 # Parsoid does not mark self-links, by design.
8779 Local interwiki link: self-link to current page
8782 parsoid=wt2html,wt2wt,html2html
8786 <p><a class="mw-selflink selflink">local:Main Page</a>
8789 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8793 Local interwiki link: prefix only (T66167)
8795 parsoid=wt2html,wt2wt,html2html
8799 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8802 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8806 Local interwiki link: with additional interwiki prefix (T63357)
8808 parsoid=wt2html,wt2wt,html2html
8810 [[local:meatball:Hello]]
8812 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8815 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8819 Multiple local interwiki link prefixes
8821 [[local:local:local:local:mi:local:Foo]]
8823 parsoid=wt2html,wt2wt,html2html
8825 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8828 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8832 ### Interlanguage links
8833 ### Language links (so that searching for '### language' matches..)
8845 <p>Blah blah blah</p>
8846 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8849 ## parsoid html2wt will lose the space variations
8851 Interlanguage link with spacing
8853 parsoid=wt2html,wt2wt,html2html
8861 <p>Blah blah blah</p>
8862 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8866 Double interlanguage link
8875 <p>Blah blah blah</p>
8876 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8877 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8880 ## parsoid html2wt will lose the space variations
8882 Interlanguage link variations
8884 parsoid=wt2html,wt2wt,html2html
8894 <p>Blah blah blah</p>
8895 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8896 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8897 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8901 Escaping of interlanguage links (T129218, T156308)
8905 [[ : zh : Chinese ]]
8908 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8909 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8913 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8914 <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8918 Multiple colons escaping interlanguage links
8926 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8931 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8933 [[:::es:Spanish]]</p>
8936 ## parsoid html2wt will normalize the space to _
8938 Space and question mark encoding in interlanguage links (T95473)
8940 parsoid=wt2html,wt2wt,html2html
8948 <p>Blah blah blah</p>
8949 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8953 Interlanguage link, with prefix links
8963 <p>Blah blah blah</p>
8964 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8968 Double interlanguage link, with prefix links (T10897)
8979 <p>Blah blah blah</p>
8980 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8981 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8985 "Extra" interlanguage links (T34189 / gerrit 111390)
8993 <p>Blah blah blah</p>
8994 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8997 ## PHP parser tests script needs an update
8998 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9000 Language links render as inline links if $wgInterwikiMagic=false
9002 wgInterwikiMagic=false
9003 parsoid=wt2html,wt2wt,html2html
9008 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9011 ## PHP parser tests script needs an update
9012 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9014 Language links render as inline links in the Talk namespace
9017 parsoid=wt2html,wt2wt,html2html
9022 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9026 Parsoid-specific test: Wikilinks with should RT properly
9032 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9037 Parsoid T55221: Wikilinks should be properly entity-escaped
9039 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9041 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9042 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9044 He&nbsp;llo [[Foo|He&nbsp;llo]]
9046 He&nbsp;llo He&nbsp;llo
9048 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9049 </p><p>He&nbsp;llo He&nbsp;llo
9053 # html2wt will fail because of title normalization without data-parsoid
9055 Parsoid: handle constructor well
9057 parsoid=wt2html,wt2wt
9063 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9064 </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>
9067 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9069 <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>
9078 # Note that `ko` isn't a known interlanguage prefix
9080 Parsoid: recognize interlanguage links without a target page
9090 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9092 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9095 # Note that `ko` isn't a known interwiki prefix
9097 Parsoid: recognize interwiki links without a target page
9099 parsoid=wt2html,wt2wt,html2html
9105 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9106 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9109 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9110 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9114 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9118 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9121 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9125 Interlanguage link with preceding local interwiki link (T70085)
9127 parsoid=wt2html,wt2wt,html2html
9130 [[local:es:Spanish]]
9133 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9137 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9141 Looks like an interlanguage link, but is actually a local interwiki
9143 parsoid=wt2html,wt2wt,html2html
9149 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9153 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9157 ### Redirects, Parsoid-only
9161 1. Simple redirect to page
9163 #REDIRECT [[Main Page]]
9165 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9169 2. Other redirect variants
9171 #REDIRECT [[Main_Page]]
9173 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9176 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9177 # This tests the Parsoid bail-out code.
9179 3. Other redirect variants
9181 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9183 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
9187 4. Redirect to a templated destination
9189 #REDIRECT [[{{echo|Foo}}bar]]
9191 <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"}]]}'/>
9197 parsoid=wt2html,wt2wt
9202 <li>REDIRECT [[]]</li></ol>
9206 Optional colon in #REDIRECT
9208 # the colon is archaic syntax. we support it for wt2html, but we
9209 # don't care that it roundtrips back to the modern syntax.
9210 parsoid=wt2html,html2html
9212 #REDIRECT:[[Main Page]]
9214 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9218 Whitespace in #REDIRECT with optional colon
9220 # the colon and gratuitous whitespace is archaic syntax. we support
9221 # it for wt2html, but we don't care that it roundtrips back to the
9222 # modern syntax (without extra whitespace)
9223 parsoid=wt2html,html2html
9230 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9234 Piped link in #REDIRECT
9236 # content after piped link is ignored. we support this syntax,
9237 # but don't care that the piped link is lost when we roundtrip this.
9240 #REDIRECT [[Main Page|bar]]
9242 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9246 Redirect to category (T104502)
9248 parsoid=wt2html,wt2wt
9250 #REDIRECT [[Category:Foo]]
9252 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9256 Redirect to category with URL encoding (T104502)
9260 #REDIRECT [[Category%3AFoo]]
9262 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9266 Redirect to category page
9268 #REDIRECT [[:Category:Foo]]
9270 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9274 Redirect to image page (1)
9276 #REDIRECT [[File:Wiki.png]]
9278 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9282 Redirect to image page (2)
9284 #REDIRECT [[Image:Wiki.png]]
9286 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9289 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9290 # Next test confirms this.
9292 Redirect to language (1) (T104918)
9294 parsoid=wt2html,wt2wt,html2html
9296 #REDIRECT [[en:File:Wiki.png]]
9298 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9302 Redirect to language (2) (T104918)
9304 #REDIRECT [[:en:File:Wiki.png]]
9306 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9310 Redirect to interwiki (T104918)
9312 #REDIRECT [[meatball:File:Wiki.png]]
9314 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9318 Non-English #REDIRECT
9322 #TILVÍSUN [[Main Page]]
9324 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9328 Redirect syntax under text isn't considered a redirect
9331 #redirect [[Main Page]]
9334 <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>
9342 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9349 Redirect followed by block on the same line
9353 #REDIRECT [[Main Page]]<!-- haha -->== hi ==
9355 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi"> hi </h2>
9359 Redirect followed by a newline
9361 #REDIRECT [[Main Page]]
9364 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9369 Redirect followed by multiple newlines
9371 #REDIRECT [[Main Page]]
9376 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9383 Drop duplicate redirects
9387 <link rel="mw:PageProp/redirect" href="./Foo"/>
9388 <link rel="mw:PageProp/redirect" href="./Bar"/>
9389 <link rel="mw:PageProp/redirect" href="./Baz"/>
9408 Broken br tag sanitization
9416 # TODO: Fix html2html mode (T53055)!
9418 Parsoid: Broken br tag recognition
9431 Incorrecly removing closing slashes from correctly formed XHTML
9433 <br style="clear:both;" />
9435 <p><br style="clear:both;" />
9440 Failing to transform badly formed HTML into correct XHTML
9442 <br style="clear: left;">
9443 <br style="clear: right;">
9444 <br style="clear: both;">
9446 <p><br style="clear: left;" />
9447 <br style="clear: right;" />
9448 <br style="clear: both;" />
9452 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9453 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9455 Handling html with a div self-closing tag
9464 <p><div title />
9468 <p><div title=bar />
9469 <div title=bar/>
9471 <div title="bar/"></div>
9475 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9476 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9477 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9478 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9479 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9480 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9484 Handling html with a br self-closing tag
9511 Horizontal ruler (should it add that extra space?)
9526 Horizontal ruler -- 4+ dashes render hr
9535 Horizontal ruler -- eats additional dashes on the same line
9544 Horizontal ruler -- does not collapse dashes on consecutive lines
9555 Horizontal ruler -- <4 dashes render as plain text
9564 Horizontal ruler -- Supports content following dashes on same line
9576 ### Block-level elements
9585 <ul><li>Common list</li>
9587 <li>item 3</li></ul>
9598 <ol><li>Numbered list</li>
9600 <li> item 3</li></ol>
9614 ***#Number on level 4
9616 **#Number on level 3
9617 **#Number on level 3
9621 #** Level 3, but ordered
9624 <ol><li> with numbers</li></ol>
9625 <ul><li> and bullets</li></ul>
9626 <ol><li> and numbers</li></ol></li>
9628 <ul><li>bullet level 2
9629 <ul><li>bullet level 3
9630 <ol><li>Number on level 4</li></ol></li></ul></li>
9632 <ol><li>Number on level 3</li>
9633 <li>Number on level 3</li></ol></li></ul>
9634 <ol><li>number level 2</li></ol></li>
9636 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9637 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9642 1. Nested mixed wikitext and html list
9645 * <ul><li>ho</li></ul>
9650 <li> <ul><li>ho</li></ul></li>
9652 <ul><li> ho</li></ul></li></ul>
9656 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9658 <ul><li> ho</li></ul></li></ul>
9662 2. Nested mixed wikitext and html list (incompatible)
9665 : {{echo|<li>ho</li>}}
9668 <dd> <li>ho</li></dd></dl>
9672 <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>
9682 <ul><li>bar</li></ul></li></ul>
9692 <ul><li><ul><li>foo</li></ul></li>
9698 Nested lists 3 (first element empty)
9704 <ul><li>bar</li></ul></li></ul>
9709 Nested lists 4 (first element empty)
9714 <ul><li><ul><li></li></ul></li>
9720 Nested lists 5 (both elements empty)
9725 <ul><li><ul><li></li></ul></li>
9731 Nested lists 6 (both elements empty)
9737 <ul><li></li></ul></li></ul>
9742 Nested lists 7 (skip initial nesting levels)
9746 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9751 Nested lists 8 (multiple nesting transitions)
9759 <ul><li><ul><li> bar</li></ul></li>
9760 <li> baz</li></ul></li>
9766 Nested lists 9 (extension interaction)
9772 <ul><li data-parsoid='{}'><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9776 1. Lists with start-of-line-transparent tokens before bullets: Comments
9789 2. Lists with start-of-line-transparent tokens before bullets: Template close
9794 <ul><li>foo bar</li>
9800 List items are not parsed correctly following a <pre> block (T2785)
9806 <ul><li> <pre>foo</pre></li>
9807 <li> <pre>bar</pre></li>
9811 <ul><li> <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9812 <li> <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9817 List items from template
9828 * notSOL{{inner list}}
9831 <ul><li> item 1</li>
9832 <li> item 2</li></ul>
9833 <ul><li> item 0</li>
9835 <li> item 2</li></ul>
9836 <ul><li> item 0</li>
9839 <li> item 2</li></ul>
9844 List interrupted by empty line or heading
9852 <ul><li> foo</li></ul>
9853 <ul><li><ul><li> bar</li></ul></li></ul>
9854 <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>
9855 <ul><li> Another list item</li></ul>
9860 Multiple list tags generated by templates
9881 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9884 <!--This line will NOT split the list-->
9886 <!--This line will NOT split the list either-->
9888 <!--foo--> <!----> <!--This line NOT split the list either-->
9899 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9902 <!--This line will NOT split the list-->
9904 <!--This line will NOT split the list either-->
9906 <!--foo--> <!----> <!--This line NOT split the list
9919 (The PHP parser relies on Tidy for the hack)
9921 parsoid=wt2html,wt2wt
9925 * {{echo|<li>templated li-hack}}
9926 * <!--foo--> <li> unsupported li-hack with preceding comments
9929 <li><li>not a li-hack
9936 <li>templated li-hack</li>
9937 <li>unsupported li-hack with preceding comments</li>
9940 <li>not a li-hack</li>
9944 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"* "}'>li-hack</li>
9945 <li 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":"<li>templated li-hack"}},"i":0}}]}'>templated li-hack</li>
9946 <li data-parsoid='{"autoInsertedEnd":true}'> <!--foo--> </li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'> unsupported li-hack with preceding comments</li></ul>
9948 <ul data-parsoid='{"stx":"html"}'>
9949 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
9956 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9983 Parsoid: Test of whitespace serialization with Templated bullets
9990 <li class="mw-empty-elt"> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9994 # ------------------------------------------------------------------------
9995 # The next set of tests are about Parsoid's ability to handle badly nested
9996 # tags (parse, minimize scope of fixup, and roundtrip back)
9997 # ------------------------------------------------------------------------
10000 Unbalanced closing block tags break a list
10001 (php parser relies on Tidy to fix up)
10019 # Parsoid fails this test, but it might be tricky to support properly.
10022 Unbalanced closing non-block tags don't break a list
10023 (php parser relies on Tidy to fix up)
10030 <li><span>a</span></li>
10031 <li><span>b</span></li>
10045 Unclosed formatting tags that straddle lists are closed and reopened
10046 (php parser relies on Tidy to fix up)
10048 parsoid=wt2html,wt2wt,html2html
10058 <ol><li> <s> a</s></li>
10059 <li><s> b </s></li></ol>
10064 1. List embedded in a formatting tag
10071 <li><small>foo</small></li>
10081 ## Ugly Parsoid output here
10082 ## Not sure what the right output is.
10084 2. List embedded in a formatting tag
10091 <li><small>a</small></li>
10092 <li><small>b</small></li>
10099 <li><small>b</small></li>
10103 # Ugly Parsoid and PHP parser output here
10104 # Not sure if we want to make this a test!
10107 ## 3. Unclosed formatting tags in list elements
10111 ## !! html/php+tidy
10113 ## <li><small>a</small></li>
10114 ## <li><small><small>b</small></small></li>
10118 ## <li><small>a</small></li>
10120 ## <li><small>b</small></li>
10124 # This is a bug in the PHP parser + tidy combination.
10125 # (The </tr> tag gets parsed as text and html-escaped by PHP,
10126 # and then fostered out of the table by tidy.)
10127 # We believe the Parsoid output to be correct.
10129 Table with missing opening <tr> tag
10131 parsoid=wt2html,wt2wt
10149 # Note that the current date is hard-coded as
10150 # 1970-01-01T00:02:03Z (a Thursday)
10151 # when running parser tests. The timezone is also fixed to GMT, so
10152 # local date will be identical to current date.
10155 Magic Word: {{CURRENTDAY}}
10164 Magic Word: {{CURRENTDAY2}}
10173 Magic Word: {{CURRENTDAYNAME}}
10182 Magic Word: {{CURRENTDOW}}
10191 Magic Word: {{CURRENTMONTH}}
10200 Magic Word: {{CURRENTMONTH1}}
10209 Magic Word: {{CURRENTMONTHABBREV}}
10211 {{CURRENTMONTHABBREV}}
10218 Magic Word: {{CURRENTMONTHNAME}}
10220 {{CURRENTMONTHNAME}}
10227 Magic Word: {{CURRENTMONTHNAMEGEN}}
10229 {{CURRENTMONTHNAMEGEN}}
10236 Magic Word: {{CURRENTTIME}}
10245 Magic Word: {{CURRENTHOUR}}
10254 Magic Word: {{CURRENTWEEK}} (T6594)
10263 Magic Word: {{CURRENTYEAR}}
10272 Magic Word: {{CURRENTTIMESTAMP}}
10274 {{CURRENTTIMESTAMP}}
10281 Magic Words LOCAL (UTC)
10285 * {{LOCALMONTHNAME}}
10286 * {{LOCALMONTHNAMEGEN}}
10287 * {{LOCALMONTHABBREV}}
10296 * {{LOCALTIMESTAMP}}
10311 <li> 19700101000203</li></ul>
10316 Magic Word: {{FULLPAGENAME}}
10318 title=[[User:Ævar Arnfjörð Bjarmason]]
10319 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10323 <p>User:Ævar Arnfjörð Bjarmason
10328 Magic Word: {{FULLPAGENAMEE}}
10330 title=[[User:Ævar Arnfjörð Bjarmason]]
10331 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10335 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10340 Magic Word: {{TALKSPACE}}
10342 title=[[User:Ævar Arnfjörð Bjarmason]]
10343 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10352 Magic Word: {{TALKSPACE}}, same namespace
10354 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10355 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10364 Magic Word: {{TALKSPACE}}, main namespace
10366 title=[[Parser Test]]
10367 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10376 Magic Word: {{TALKSPACEE}}
10378 title=[[User:Ævar Arnfjörð Bjarmason]]
10379 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10388 Magic Word: {{SUBJECTSPACE}}
10390 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10391 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10400 Magic Word: {{SUBJECTSPACE}}, same namespace
10402 title=[[User:Ævar Arnfjörð Bjarmason]]
10403 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10412 Magic Word: {{SUBJECTSPACE}}, main namespace
10414 title=[[Parser Test]]
10415 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10423 Magic Word: {{SUBJECTSPACEE}}
10425 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10426 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10435 Magic Word: {{NAMESPACE}}
10437 title=[[User:Ævar Arnfjörð Bjarmason]]
10438 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10447 Magic Word: {{NAMESPACEE}}
10449 title=[[User:Ævar Arnfjörð Bjarmason]]
10450 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10459 Magic Word: {{NAMESPACENUMBER}}
10461 title=[[User:Ævar Arnfjörð Bjarmason]]
10462 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10464 {{NAMESPACENUMBER}}
10471 Magic Word: {{SUBPAGENAME}}
10473 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10474 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10483 Magic Word: {{SUBPAGENAMEE}}
10485 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10486 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10495 Magic Word: {{ROOTPAGENAME}}
10497 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10498 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10502 <p>Ævar Arnfjörð Bjarmason
10507 Magic Word: {{ROOTPAGENAMEE}}
10509 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10510 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10514 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10519 Magic Word: {{BASEPAGENAME}}
10521 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10522 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10526 <p>Ævar Arnfjörð Bjarmason
10531 Magic Word: {{BASEPAGENAMEE}}
10533 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10534 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10538 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10543 Magic Word: {{TALKPAGENAME}}
10545 title=[[User:Ævar Arnfjörð Bjarmason]]
10546 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10550 <p>User talk:Ævar Arnfjörð Bjarmason
10555 Magic Word: {{TALKPAGENAMEE}}
10557 title=[[User:Ævar Arnfjörð Bjarmason]]
10558 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10562 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10567 Magic Word: {{SUBJECTPAGENAME}}
10569 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10570 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10572 {{SUBJECTPAGENAME}}
10574 <p>User:Ævar Arnfjörð Bjarmason
10579 Magic Word: {{SUBJECTPAGENAMEE}}
10581 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10582 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10584 {{SUBJECTPAGENAMEE}}
10586 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10591 Magic Word: {{NUMBEROFFILES}}
10593 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10602 Magic Word: {{PAGENAME}}
10604 title=[[User:Ævar Arnfjörð Bjarmason]]
10605 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10609 <p>Ævar Arnfjörð Bjarmason
10614 Magic Word: {{PAGENAME}} with metacharacters
10616 title=[['foo & bar = baz']]
10617 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10621 <p><i>'foo & bar = baz'</i>
10624 <p><i>'foo & bar = baz'</i></p>
10628 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10630 title=[[*RFC 1234 http://example.com/]]
10631 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10635 <p>*RFC 1234 http://example.com/
10638 <p>*RFC 1234 http://example.com/</p>
10642 Magic Word: {{PAGENAMEE}}
10644 title=[[User:Ævar Arnfjörð Bjarmason]]
10645 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10649 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10654 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10656 title=[[*RFC 1234 http://example.com/]]
10657 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10661 <p>*RFC_1234_http://example.com/
10664 <p>*RFC_1234_http://example.com/</p>
10668 Magic Word: {{REVISIONID}}
10670 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10677 flags=vary-revision-id
10681 Magic Word: {{SCRIPTPATH}}
10683 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10691 Magic Word: {{STYLEPATH}}
10693 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10702 Magic Word: {{SERVER}}
10704 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10708 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10713 Magic Word: {{SERVERNAME}}
10715 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10724 Magic Word: {{SITENAME}}
10726 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10735 Magic Word: {{PAGELANGUAGE}}
10738 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10747 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10749 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10758 Case-sensitive magic words, when cased differently, should just be template transclusions
10765 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10766 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10767 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10768 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10773 Case-insensitive magic words should still work with weird casing.
10783 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10787 # From plwiki:PLOS_ONE
10789 Parsoid: Page property magic word with magic word contents
10791 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10793 <meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:''{{PAGENAME}}''}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"DISPLAYTITLE:<i data-parsoid='{\"dsr\":[15,31,2,2]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Main Page</span></i>"}]]}'/>
10796 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10797 # But, this is a limitation of our representation and is documented in
10798 # TemplateHandler.js in processSpecialMagicWord
10800 Parsoid: Template-generated DISPLAYTITLE
10802 {{{{echo|DISPLAYTITLE}}:Foo}}
10806 wgAllowDisplayTitle=true
10807 wgRestrictDisplayTitle=false
10812 <meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:ExpandedAttrs" data-parsoid='{"pi":[[]]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DISPLAYTITLE\"}},\"i\":0}}]}'>DISPLAYTITLE</span>:Foo"}]]}'/>
10816 Namespace 1 {{ns:1}}
10825 Namespace 1 {{ns:01}}
10834 Namespace 0 {{ns:0}} (T6783)
10842 Namespace 0 {{ns:00}} (T6783)
10850 Namespace -1 {{ns:-1}}
10859 Namespace User {{ns:User}}
10868 Namespace User talk {{ns:User_talk}}
10877 Namespace User talk {{ns:uSeR tAlK}}
10886 Namespace File {{ns:File}}
10895 Namespace File {{ns:Image}}
10904 Namespace (lang=de) Benutzer {{ns:User}}
10915 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10921 <p>Benutzer Diskussion
10928 {{urlencode:hi world?!}}
10929 {{urlencode:hi world?!|WIKI}}
10930 {{urlencode:hi world?!|PATH}}
10931 {{urlencode:hi world?!|QUERY}}
10941 Magic Word: prioritize type info over data-parsoid
10945 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10951 Magic Word: serialize on separate line (parsoid)
10953 parsoid=wt2wt,html2wt
10959 foo<meta property="mw:PageProp/notoc"/>bar
10963 Magic Word: rt non-english wikis
10970 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10974 __proto__ is treated as normal wikitext (T105997)
10986 Magic links: internal link to RFC (T2479)
10990 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10993 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10997 Magic links: RFC (T2479)
11001 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11004 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
11008 Magic links: RFC (T67278)
11010 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11012 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
11015 <p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
11019 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11021 RFC      822
11025 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11030 <p><a href="https://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>
11036 Magic links: ISBN (T3937)
11040 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11043 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11047 Magic links: ISBN (T67278)
11049 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11051 <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.
11054 <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>
11058 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11060 ISBN      978 0 316 09811 3
11066 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11073 <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>
11081 Magic links: PMID incorrectly converts space to underscore
11085 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11088 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
11092 Magic links: PMID (T67278)
11094 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11096 <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.
11099 <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>
11103 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11105 PMID      1234
11109 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11114 <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>
11119 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11120 # since these are ExtLinkText, not MagicLinkText
11122 Magic links: use appropriate serialization for "almost" magic links.
11124 X[[Special:BookSources/0978739256|foo]]
11126 X[https://tools.ietf.org/html/rfc1234 foo]
11128 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11129 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11132 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11133 <p>X<a rel="mw:ExtLink" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11137 Magic links: All disabled (T47942)
11139 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11145 <p>ISBN 0-306-40615-2
11156 Nonexistent template
11158 {{thistemplatedoesnotexist}}
11160 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11165 Template with invalid target containing tags
11167 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11169 <p>{{a<b>b</b>|foo|a=b|a = b}}
11174 Template with invalid target containing unclosed tag
11176 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11178 <p>{{a<b>|foo|a=b|a = b}}</b>
11183 Template with invalid target containing wikilink
11187 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11190 <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>
11194 Template with just whitespace in it, T70421
11198 <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>
11204 This is a test template
11212 <p>This is a test template
11217 Template with explicit namespace
11221 <p>This is a test template
11229 This is a test template with parameter {{{param}}}
11235 {{paramtest|param=foo}}
11237 <p>This is a test template with parameter foo
11242 Template:paramtestnum
11244 [[{{{1}}}|{{{2}}}]]
11248 Template unnamed parameter
11250 {{paramtestnum|Main Page|the main page}}
11252 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11257 Template:templatesimple
11263 Template:templateredirect
11265 #redirect [[Template:templatesimple]]
11269 Template:templateasargtestnum
11275 Template:templateasargtest
11277 {{template{{{templ}}}}}
11281 Template:templateasargtest2
11287 Template with template name as unnamed argument
11289 {{templateasargtestnum|templatesimple}}
11296 Template with template name as argument
11298 {{templateasargtest|templ=simple}}
11305 Template with template name as argument (2)
11307 {{templateasargtest2|templ=templatesimple}}
11314 Template:templateasargtestdefault
11316 {{{{{templ|templatesimple}}}}}
11326 Template with default value
11328 {{templateasargtestdefault}}
11335 Template with default value (value set)
11337 {{templateasargtestdefault|templ=templa}}
11346 {{templateredirect}}
11351 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11355 Template with argument in separate line
11357 {{ templateasargtest |
11365 Template with complex template as argument
11368 param ={{ templateasargtest |
11369 templ = simple }}}}
11371 <p>This is a test template with parameter (test)
11376 Templates with templated name
11378 {{{{echo|echo}}|foo}}
11379 {{{{echo|inner list}} }}
11383 <ul><li> item 1</li></ul>
11386 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|echo}}","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
11387 <ul about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|inner list}} ","href":"./Template:Inner_list"},"params":{},"i":0}}]}'><li> item 1</li></ul>
11390 ## Regression test; the output here isn't really that interesting.
11392 Templates with templated name and top level template args
11394 {{1{{2{{{3}}}|4=5}}}}
11396 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1{{2{{{3}}}|4=5}}"},"params":{},"i":0}}]}'>{{1{{2{{{3}}}|4=5}}}}</p>
11399 # Parsoid markup is deliberate "broken". This is an edge case.
11400 # See long comment in TemplateHandler.js:convertAttribsToString.
11402 Templates with invalid templated targets
11413 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11418 Template with thumb image (with link in description)
11420 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11422 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>
11425 <p>This is a test template with parameter</p>
11426 <div class="thumb tright">
11427 <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>
11428 <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>
11432 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"paramtest","href":"./Template:Paramtest"},"params":{"param":{"wt":"[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]"}},"i":0}}]}'>This is a test template with parameter </p><figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" about="#mwt1" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Noimage.png" ><img resource="./File:Noimage.png" src="./Special:FilePath/Noimage.png" height="220" width="220"/></a><figcaption><a rel="mw:WikiLink" href="./No_link" title="No link">link</a> <a rel="mw:WikiLink" href="./No_link" title="No link">caption</a></figcaption></figure>
11436 Template:complextemplate
11438 {{{1}}} {{paramtest|
11439 param ={{{param}}}}}
11443 Template with complex arguments
11446 param ={{ templateasargtest |
11447 templ = simple }}|[[Template:complextemplate|link]]}}
11449 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11454 T2553: link with two variables in a piped link
11457 |[[{{{1}}}|{{{2}}}]]
11462 <td>[[{{{1}}}|{{{2}}}]]
11467 <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>
11473 Abort table cell attribute parsing on wikilink
11476 | testing [[one|two]] | three || four
11477 | testing one two | three || four
11478 | testing="[[one|two]]" | three || four
11483 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11489 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11495 <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":"row","autoInsertedEnd":true}'> four</td>
11496 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'> three </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'> four</td>
11497 <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":"row","autoInsertedEnd":true}'> four</td></tr>
11502 Don't abort table cell attribute parsing if wikilink is found in template arg
11505 | Test {{#tag:ref|One two "[[three]]" four}}
11509 <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>
11514 Magic variable as template parameter
11516 {{paramtest|param={{SITENAME}}}}
11518 <p>This is a test template with parameter MediaWiki
11525 [[{{{param}}}|link]]
11529 Template parameter as link source
11531 {{linktest|param=Main Page}}
11533 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11538 Template:paramtest2
11540 including another template, {{paramtest|param={{{arg}}}}}
11544 Template passing argument to another template
11546 {{paramtest2|arg='hmm'}}
11548 <p>including another template, This is a test template with parameter 'hmm'
11559 Template as link source
11563 [[{{linktest2}}|Main Page]]
11565 [[{{linktest2}}]]Page
11567 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11568 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11569 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11587 Template infinite loop
11591 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11596 Template from main namespace
11615 T2529: Template with table, not included at beginning of line
11634 T2523: Template shouldn't eat newline (or add an extra one before table)
11654 T2041: Template parameters shown as broken links
11663 Template with targets containing wikilinks
11669 {{[[{{echo|foo}}]]}}
11671 {{{{echo|[[foo}}]]}}
11673 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11674 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11678 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11679 <p>{{<a typeof="mw:ExpandedAttrs" rel="mw:WikiLink" href="./Foo" title="Foo" data-mw='{"attribs":[[{"txt":"href"},{"html":"<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[17,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>"}]]}'>foo</a>}}</p>
11680 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11690 Templates: Double quotes as template target
11697 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11701 ## This test is about making sure Parsoid's data-mw is well formed in the
11702 ## face of multiple templates with intersecting and overlapping ranges. The
11703 ## wikitext itself is wretched.
11705 Templates with intersecting and overlapping ranges
11730 <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":""}]]}'>
11732 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11734 <tbody><tr><td>hi</td></tr>
11739 Template:MSGNW test
11741 ''None'' of '''this''' should be
11743 but rather passed unmodified
11751 # hmm, fix this or just deprecate msgnw and document its behavior?
11755 {{msgnw:MSGNW test}}
11757 <p>''None'' of '''this''' should be
11759  but rather passed unmodified
11760 {{test}}
11764 <!-- comment -->
11771 {{int:youhavenewmessages|lots of money|not!}}
11773 <p>You have lots of money (not!).
11778 int keyword - non-existing message
11789 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11793 <includeonly> and <noinclude> being included
11804 <onlyinclude>Foo</onlyinclude>bar
11808 <onlyinclude> being included
11820 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11824 <onlyinclude> and <includeonly> being included
11833 <includeonly> and <noinclude> on a page
11835 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11842 Un-closed <noinclude>
11849 <onlyinclude> on a page
11851 <onlyinclude>Foo</onlyinclude>bar
11858 Un-closed <onlyinclude>
11865 Self-closed noinclude, includeonly, onlyinclude tags
11876 Unbalanced includeonly and noinclude tags
11880 |b</noinclude></noinclude>
11881 |c</noinclude></includeonly>
11882 |d</includeonly></includeonly>
11891 <td>c</includeonly>
11893 <td>d</includeonly></includeonly>
11899 Template:Includeonly section
11902 ==Includeonly section==
11908 T8563: Edit link generation for section shown by <includeonly>
11910 {{includeonly section}}
11912 <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>
11913 <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>
11917 # Uses same input as the contents of [[Template:Includeonly section]]
11919 T8563: Section extraction for section shown by <includeonly>
11924 ==Includeonly section==
11932 T8563: Edit link generation for section suppressed by <includeonly>
11935 ==Includeonly section==
11939 <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>
11944 T8563: Section extraction for section suppressed by <includeonly>
11949 ==Includeonly section==
11957 Un-closed <includeonly>
11962 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11965 ## We used to, but no longer wt2wt this test since the default serializer
11966 ## will normalize the include directives to serialize on their own line.
11967 ## Selser will take care of preserving formatting in scenarios where they
11968 ## intermingled with other wikitext.
11970 Includes and comments at SOL
11972 parsoid=wt2html,html2html
11974 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11978 </noinclude>* stuff
11981 <includeonly>can have stuff</includeonly>=== here ===
11984 <h2><span class="mw-headline" id="hu">hu</span></h2>
11987 <ul><li> stuff</li>
11988 <li> here</li></ul>
11989 <h3><span class="mw-headline" id="here">here</span></h3>
11992 <!-- 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>
11994 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11996 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11997 <li> here</li></ul>
11999 <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>
12003 # TODO: test with DOM fragment reuse!
12005 Parsoid: DOM fragment reuse
12007 parsoid=wt2wt,wt2html
12009 a{{echo|b<table></table>c}}d
12021 <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>
12023 <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">
12024 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12025 </span><p about="#mwt2">cd</p>
12027 <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">
12029 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12031 </span><p about="#mwt3">b</p>
12035 Parsoid: Merge double tds (T52603)
12040 |{{echo|{{!}} foo}}
12044 <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>
12049 Parsoid: Merge double tds in nested transclusion content (T52603)
12055 |{{echo|{{!}} foo}}
12059 <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}}]}'>
12061 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12067 ### <includeonly> and <noinclude> in attributes
12070 0. includeonly around the entire attribute
12072 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12074 <p><span id="v2">bar</span>
12079 1. includeonly in html attr key
12081 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12083 <p><span id="foo">bar</span>
12088 2. includeonly in html attr value
12090 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12091 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12093 <p><span id="v1">bar</span>
12094 <span id="v1">bar</span>
12099 3. includeonly in part of an attr value
12101 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12103 <p><span style="color:red;">bar</span>
12108 4. includeonly in table attributes
12132 ### Preprocessor precedence tests
12133 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12135 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12137 Preprocessor precedence 1: link is rightmost opening
12143 But close-brace is not a valid character in a link title:
12146 However, we can still tell this was handled as a link in the preprocessor:
12147 {{echo|[[Foo}}|bar]]|bat}}
12149 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12150 </p><p>But close-brace is not a valid character in a link title:
12152 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12156 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12157 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12158 <p>However, we can still tell this was handled as a link in the preprocessor: <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo}}|bar]]"},"2":{"wt":"bat"}},"i":0}}]}'>[[Foo}}|bar]]</span></p>
12162 Preprocessor precedence 2: template is rightmost opening
12171 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12175 Preprocessor precedence 3: language converter is rightmost opening
12191 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12192 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12193 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12197 Preprocessor precedence 4: left-most angle bracket
12208 Template:Precedence5
12214 Preprocessor precedence 5: tplarg takes precedence over template
12216 {{Precedence5|Bullet}}
12218 <ul><li> Bar</li></ul>
12221 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li> Bar</li></ul>
12225 Preprocessor precedence 6: broken link is rightmost opening
12231 {{echo|[[Foo|bar|bat=baz}}
12234 </p><p>{{echo|[[Foo|bar|bat=baz}}
12237 <p>{{echo|[[Foo}}</p>
12238 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12241 # This next test exposes a difference between PHP and Parsoid:
12242 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12243 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12244 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12245 # outer `[[Foo` extends until the `y]]`
12246 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12247 # intermediate result (after template expansion), and link processing
12248 # happens on this intermediate result, which moves the wikilink
12249 # boundary leftward to `[[Foo|Bar]]`
12250 # 2b) Parsoid works in a single step, so it's going to keep the
12251 # wikilink as extending to the `y]]`
12252 # 3a) Then PHP does linktrail processing which slurps up the trailing
12253 # `xy` inside the link.
12254 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12255 # `z` inside the link.
12256 # This is "correct" behavior. Parsoid's basic worldview is that the
12257 # `]]` inside the template shouldn't be allowed to leak out to affect
12258 # the surrounding wikilink. PHP may match Parsoid (in the future)
12259 # if you use {{#balance}} (T114445).
12262 Preprocessor precedence 7: broken template is rightmost opening
12268 [[Foo|{{echo|Bar]]-x}}-y]]-z
12270 Careful: linktrails can move the end of the wikilink:
12271 [[Foo|{{echo|y']]a}}l]]l
12273 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12274 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12275 </p><p>Careful: linktrails can move the end of the wikilink:
12276 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12279 <p>[[Foo|{{echo|Bar]]</p>
12280 <p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar]]-x"}},"i":0}}]}'>Bar]]-x</span>-y</a>-z</p>
12281 <p>Careful: linktrails can move the end of the wikilink:
12282 <a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"y']]a"}},"i":0}}]}'>y']]a</span>ll</a></p>
12286 Preprocessor precedence 8: broken language converter is rightmost opening
12297 Template:Preprocessor_precedence_9
12302 ;7: {{{{{{{4}}}}}}}
12306 Preprocessor precedence 9: groups of braces
12308 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12314 <ul><li> Bar</li></ul>
12318 <dd> {Bullet}</dd></dl>
12321 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 9","href":"./Template:Preprocessor_precedence_9"},"params":{"1":{"wt":"Four"},"2":{"wt":"Bullet"},"3":{"wt":"1"},"4":{"wt":"2"}},"i":0}}]}'>
12326 </dl><ul about="#mwt1">
12328 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12337 Template:Preprocessor_precedence_10
12344 ;6: -{{{{{{4}}}}}}-
12345 ;7: -{{{{{{{5}}}}}}}-
12349 Preprocessor precedence 10: groups of braces with leading dash
12353 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12359 <ul><li> Bar-</li></ul>
12366 <ul><li> Bar-</li></ul>
12370 <dd> raw2</dd></dl>
12373 <dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 10","href":"./Template:Preprocessor_precedence_10"},"params":{"1":{"wt":"Three"},"2":{"wt":"raw2"},"3":{"wt":"Bullet"},"4":{"wt":"1"},"5":{"wt":"2"}},"i":0}}]}'>
12375 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12378 </dl><ul about="#mwt1">
12380 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12384 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12387 </dl><ul about="#mwt1">
12389 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12393 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12398 Preprocessor precedence 11: found during visual diff testing
12400 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12402 {{echo|-{{echo|-{{echo|x}}}}}}
12404 {{echo|-{{echo|x}}}}
12406 <p><span>-<span>-x</span></span>
12411 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"#tag:span","function":"tag"},"params":{"1":{"wt":"-{{#tag:span|-{{echo|x}}}}"}},"i":0}}]}'>-<span>-x</span></span></p>
12413 <p about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|-{{echo|x}}}}"}},"i":0}}]}'>--x</p>
12415 <p about="#mwt7" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|x}}"}},"i":0}}]}'>-x</p>
12419 Preprocessor precedence 12: broken language converter closed by brace.
12423 This form breaks the template, which is unfortunate:
12424 * {{echo|foo-{bar}bat}}
12426 But if the broken language converter markup is inside an extension
12427 tag, nothing bad happens:
12428 * <nowiki>foo-{bar}bat</nowiki>
12429 * {{echo|<nowiki>foo-{bar}bat</nowiki>}}
12430 * <pre>foo-{bar}bat</pre>
12431 * {{echo|<pre>foo-{bar}bat</pre>}}
12433 <tag>foo-{bar}bat</tag>
12434 {{echo|<tag>foo-{bar}bat</tag>}}
12437 <p>This form breaks the template, which is unfortunate:</p>
12439 <li>{{echo|foo-{bar}bat}}</li>
12441 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12443 <li>foo-{bar}bat</li>
12444 <li>foo-{bar}bat</li>
12465 <p>This form breaks the template, which is unfortunate:</p>
12467 <li>{{echo|foo-{bar}bat}}</li>
12469 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12471 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12472 <li><span typeof="mw:Transclusion mw:Nowiki" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>foo-{bar}bat</nowiki>"}},"i":0}}]}'>foo-{bar}bat</span></li>
12473 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12474 <li><pre typeof="mw:Transclusion mw:Extension/pre" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<pre>foo-{bar}bat</pre>"}},"i":0}}]}'>foo-{bar}bat</pre></li>
12476 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'></pre> <pre typeof="mw:Extension/tag mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tag>foo-{bar}bat</tag>"}},"i":0}}]}'></pre>
12480 Preprocessor precedence 13: broken language converter in external link
12484 * [http://example.com/-{foo Example in URL]
12485 * [http://example.com Example in -{link} description]
12486 * {{echo|[http://example.com/-{foo Breaks template, however]}}
12489 <li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12490 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12491 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12495 <li><a rel="mw:ExtLink" href="http://example.com/-{foo">Example in URL</a></li>
12496 <li><a rel="mw:ExtLink" href="http://example.com">Example in -{link} description</a></li>
12497 <li>{{echo|<a rel="mw:ExtLink" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12502 Preprocessor precedence 14: broken language converter in comment
12504 * <!--{{foo}}--> ...should be ok
12505 * <!---{{foo}}--> ...extra dashes
12506 * {{echo|foo<!-- -{bar} -->bat}} ...should be ok
12509 <li>...should be ok</li>
12510 <li>...extra dashes</li>
12511 <li>foobat ...should be ok</li>
12515 <li><!--{{foo}}--> ...should be ok</li>
12516 <li><!---{{foo}}--> ...extra dashes</li>
12517 <li><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<!-- -{bar} -->bat"}},"i":0}}]}'>foo</span><span about="#mwt1"><!-- -{bar} --></span><span about="#mwt1">bat</span> ...should be ok</li>
12522 Preprocessor precedence 15: broken brace markup in headings
12526 __NOTOC__ __NOEDITSECTION__
12535 ===5 foo{{{bar 5===
12540 <h3><span class="mw-headline" id="1_foo.5Bbar_1">1 foo[bar 1</span></h3>
12542 <h3><span class="mw-headline" id="2_foo.5B.5Bbar_2">2 foo[[bar 2</span></h3>
12544 <h3><span class="mw-headline" id="3_foo.7Bbar_3">3 foo{bar 3</span></h3>
12546 <h3><span class="mw-headline" id="4_foo.7B.7Bbar_4">4 foo{{bar 4</span></h3>
12548 <h3><span class="mw-headline" id="5_foo.7B.7B.7Bbar_5">5 foo{{{bar 5</span></h3>
12550 <h3><span class="mw-headline" id="6_foo-.7Bbar_6">6 foo-{bar 6</span></h3>
12553 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/
12555 <h3>1 foo[bar 1</h3>
12557 <h3>2 foo[[bar 2</h3>
12559 <h3>3 foo{bar 3</h3>
12561 <h3>4 foo{{bar 4</h3>
12563 <h3>5 foo{{{bar 5</h3>
12565 <h3>6 foo-{bar 6</h3>
12570 Preprocessor precedence 16: matching closing braces to opening braces
12575 -{{{echo|foo}}bar}-
12580 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>bar"}}'></span></p>
12584 ### Token Stream Patcher tests
12586 ### These tests won't always pass wt2wt and other modes because
12587 ### on serialization, the table will be output on a new line.
12588 ### For now, we are blacklisting them, and using this to test selser.
12592 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12594 parsoid=wt2html,wt2wt
12596 {{echo|}}{| width = '100%'
12600 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12601 <tbody><tr><td>foo</td></tr>
12605 ## We used to, but no longer wt2wt this test since the default serializer
12606 ## will normalize the include directives to serialize on their own line.
12607 ## Selser will take care of preserving formatting in scenarios where they
12608 ## intermingled with other wikitext.
12610 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12614 <includeonly>a</includeonly>{| {{{b}}}
12618 <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":""}]]}'>
12619 <tbody><tr><td>c</td></tr>
12624 Table wikitext syntax outside wiki-tables
12628 ! not a table heading
12631 | class="foo bar" | baz
12639 ! not a table heading
12642 | class="foo bar" | baz
12651 ### Testing parsing of templates where a template arg
12652 ### has the same name as the template itself.
12658 {{{quote|{{{1}}}}}}
12662 Templates: Template Name/Arg clash: 1. Use of positional param
12671 Templates: Template Name/Arg clash: 2. Use of named param
12673 {{quote|quote=foo}}
12680 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12689 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12693 Templates: 1. Simple use
12702 Templates: 2. Inside a block tag
12704 <div>{{echo|Foo}}</div>
12705 <blockquote>{{echo|Foo}}</blockquote>
12708 <blockquote>Foo</blockquote>
12718 Templates: P-wrapping: 1a. Templates on consecutive lines
12729 Templates: P-wrapping: 1b. Templates on consecutive lines
12743 Templates: P-wrapping: 1c. Templates on consecutive lines
12746 {{echo|bar}} <div>baz</div>
12759 Templates: P-wrapping: 1d. Template preceded by comment-only line
12768 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12772 Templates: Inline Text: 1. Multiple template uses
12774 {{echo|Foo}}bar{{echo|baz}}
12781 Templates: Inline Text: 2. Back-to-back template uses
12783 {{echo|Foo}}{{echo|bar}}
12790 Templates: Block Tags: 1. Multiple template uses
12792 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12794 <div>Foo</div><div>bar</div><div>baz</div>
12799 Templates: Block Tags: 2. Back-to-back template uses
12801 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12803 <div>Foo</div><div>bar</div>
12807 # This is an edge case relating to paragraph wrapping.
12809 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12814 <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
12819 Templates: Links: 1. Simple example
12821 {{echo|[[Foo|bar]]}}
12823 <p><a href="/wiki/Foo" title="Foo">bar</a>
12828 Templates: Links: 2. Generation of link href
12830 [[{{echo|Foo}}|bar]]
12832 <p><a href="/wiki/Foo" title="Foo">bar</a>
12837 Templates: Links: 3. Generation of part of a link href
12839 [[Fo{{echo|o}}|bar]]
12841 [[Foo{{echo|bar}}]]
12843 [[Foo{{echo|bar}}baz]]
12845 [[Foo{{echo|bar}}|bar]]
12847 [[:Foo{{echo|bar}}]]
12849 [[:Foo{{echo|bar}}|bar]]
12851 <p><a href="/wiki/Foo" title="Foo">bar</a>
12852 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12853 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12854 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12855 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12856 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12861 Templates: Links: 4. Multiple templates generating link href
12863 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12865 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12870 Templates: Links: 5. Generation of link text
12872 [[Foo|{{echo|bar}}]]
12874 <p><a href="/wiki/Foo" title="Foo">bar</a>
12879 Templates: Links: 5. Nested templates (only outermost template should be marked)
12881 {{echo|[[{{echo|Foo}}|bar]]}}
12883 <p><a href="/wiki/Foo" title="Foo">bar</a>
12888 Templates: HTML Tag: 1. Generation of HTML attr. key
12890 <div {{echo|style}}="color:red;">foo</div>
12892 <div style="color:red;">foo</div>
12897 Templates: HTML Tag: 2. Generation of HTML attr. value
12899 <div style={{echo|'color:red;'}}>foo</div>
12901 <div style="color:red;">foo</div>
12906 Templates: HTML Tag: 3. Generation of HTML attr key and value
12908 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12910 <div style="color:red;">foo</div>
12915 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12917 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12919 <div title="This is a long title with just one piece templated">foo</div>
12924 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12926 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12928 <div title="This is a long title with just one piece templated">foo</div>
12933 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12935 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12937 <div title="This is a long title with just one piece templated">foo</div>
12941 # SSS FIXME: While it is great we added support for all this,
12942 # do we want to make this part of the spec? Maybe we want to
12943 # deprecate this kind of usage in the future?
12945 Templates: HTML Tag: 7. Generation of partial attribute key string
12947 <div st{{echo|yle}}="color:red;">foo</div>
12949 <div style="color:red;">foo</div>
12954 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12956 <div {{echo|1=id="v1"}}>bar</div>
12958 <div id="v1">bar</div>
12963 Templates: HTML Tag: 9. Multiple template-generated attributes
12965 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12967 <div id="v1" title="foo">bar</div>
12972 Templates: Support for templates generating attributes and content
12974 {| {{mixed_attr_content_template}}
12979 <table style="color:red;" title="T48811">
12989 <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|}"]}'>
12998 1. Entities and nowikis inside templated attributes should be handled correctly
13000 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13002 <div style="background:#f9f9f9;">foo</div>
13005 <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>
13009 2. Entities and nowikis inside templated attributes should be handled correctly
13012 |{{table_attribs_3}}
13017 <td style="background:#f9f9f9;">Foo
13022 <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>
13027 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13030 |{{table_attribs_3}}
13035 <td style="background:#f9f9f9;">Foo
13039 <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}}]}'>
13040 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13046 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13049 | {{table_attribs_6}} hi
13054 <td style="background: red;"> hi
13059 <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>
13064 Templates: HTML Tables: 1. Generating start of a HTML table
13066 {{echo|<table><tr><td>foo</td>}}</tr></table>
13068 <table><tr><td>foo</td></tr></table>
13073 Templates: HTML Tables: 2a. Generating middle of a HTML table
13075 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13077 <table><tr><td>foo</td></tr></table>
13082 Templates: HTML Tables: 2b. Generating middle of a HTML table
13084 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13086 <table><tr><td>foo</td></tr></table>
13091 Templates: HTML Tables: 3. Generating end of a HTML table
13093 <table><tr>{{echo|<td>foo</td></tr></table>}}
13095 <table><tr><td>foo</td></tr></table>
13100 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13102 {{echo|<table>}}<tr><td>foo</td></tr></table>
13104 <table><tr><td>foo</td></tr></table>
13109 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13111 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13113 <table><tr><td>foo</td></tr></table>
13118 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13120 <table><tr>{{echo|<td>}}foo</td></tr></table>
13122 <table><tr><td>foo</td></tr></table>
13127 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13129 <table><tr><td>foo{{echo|</td>}}</tr></table>
13131 <table><tr><td>foo</td></tr></table>
13136 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13138 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13140 <table><tr><td>foo</td></tr></table>
13145 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13147 <table><tr><td>foo</td></tr>{{echo|</table>}}
13149 <table><tr><td>foo</td></tr></table>
13154 Templates: HTML Tables: 5. Proper fostering of categories from inside
13156 parsoid=wt2html,wt2wt
13158 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13159 <!--Two categories (T52330)-->
13160 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13162 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13163 <!--Two categories (T52330)-->
13164 <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>
13168 Templates: Wiki Tables: 1a. Fostering of entire template content
13176 <tr><td></td></tr></table>
13188 Templates: Wiki Tables: 1b. Fostering of entire template content
13201 <tr><td></td></tr></table>
13215 Templates: Wiki Tables: 2. Fostering of partial template content
13225 <tr><td></td></tr></table>
13238 Templates: Wiki Tables: 3. td-content via multiple templates
13241 {{echo|{{pipe}}a}}{{echo|b}}
13252 Templates: Wiki Tables: 4. Templated tags, no content
13258 <tr><td></td></tr></table>
13263 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13277 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13290 ## This test case is very specific to Parsoid's internals
13291 ## and is hence only tested for Parsoid's code. Parsoid uses
13292 ## a <meta> marker tag for <ref> tags and they are expanded
13293 ## much later. We are verifying that this <meta> tag usage
13294 ## doesn't prevent foster parenting.
13296 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13298 {{PartialTable}}<ref>foo</ref>
13303 <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">
13307 <ol class="mw-references 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>
13311 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13321 <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{{!}}}"]}'>
13322 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13326 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13331 Templates: Lists: Multi-line list-items via templates
13333 *{{echo|a {{nonexistent|
13335 *{{echo|b {{nonexistent|
13338 <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>
13339 <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>
13344 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13346 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13348 <p><i>ab</i>c<i>d</i>e
13353 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13354 (PHP parser generates misnested html)
13356 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13358 <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>
13362 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13363 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13365 parsoid=wt2html,wt2wt
13367 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13369 <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>
13370 <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>
13371 <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>
13375 Templates: Ugly nesting: 4. Divs opened/closed across templates
13377 a<div>b{{echo|c</div>d}}e
13388 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
13394 |{{echo|foo</table>}}
13398 <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|}"]}'>
13402 <td>foo</td></tr></tbody></table><span about="#mwt1">
13403 </span><span about="#mwt1">|bar</span><span about="#mwt1">
13408 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
13418 <td>1. {{echo|foo </table>}}</td>
13420 <td>2. {{echo|baz </table>}}</td>
13433 <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>"]}'>
13438 <td>1. foo </td></tr></tbody></table></td>
13440 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
13441 </span><span about="#mwt2">
13442 </span><span about="#mwt2">
13443 </span><span about="#mwt2">abc</span><span about="#mwt2">
13444 </span><span about="#mwt2">
13445 </span><span about="#mwt2">
13446 </span><span about="#mwt2">
13447 </span><span about="#mwt2">
13448 </span><span about="#mwt2">
13449 </span><span about="#mwt2">xyz</span><span about="#mwt2">
13450 </span><span about="#mwt2">
13455 Templates: Ugly templates: 3. newline-only template parameter
13464 # This looks like a bug: a single newline triggers p/br for some reason.
13466 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13475 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13476 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13478 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13484 <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
13485 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13489 # T66017 -- ugly wikitext with fostered content generates two template ranges
13490 # that are "identical" and generate nesting cycles in the algorithm
13492 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13494 {{echo|<table><tr><td><table>}}
13498 <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"}'>
13499 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13500 </table></td></tr></tbody></table>
13504 Templates: Parameters substituted at the top-level
13506 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13510 <p><i>who</i> me? <b>never!</b>
13514 <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>
13516 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13520 Templates: Param with empty arg in the final position
13524 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13528 Parser Functions: 1. Simple example
13537 Parser Functions: 2. Nested use (only outermost should be marked up)
13546 ### Pre-save transform tests
13549 pre-save transform: subst:
13555 This is a test template
13559 pre-save transform: normal template
13569 pre-save transform: nonexistent template
13573 {{thistemplatedoesnotexist}}
13575 {{thistemplatedoesnotexist}}
13579 pre-save transform: subst magic variables
13588 # This is T2089, which I fixed. -- wtm
13590 pre-save transform: subst: templates with parameters
13594 {{subst:paramtest|param="something else"}}
13596 This is a test template with parameter "something else"
13600 Template:nowikitest
13602 <nowiki>'''not wiki'''</nowiki>
13606 pre-save transform: nowiki in subst (T3188)
13610 {{subst:nowikitest}}
13612 <nowiki>'''not wiki'''</nowiki>
13616 Template:commenttest
13618 This template has <!-- a comment --> in it.
13622 pre-save transform: comment in subst (T3936)
13626 {{subst:commenttest}}
13628 This template has <!-- a comment --> in it.
13632 pre-save transform: unclosed tag
13636 <nowiki>'''not wiki'''
13638 <nowiki>'''not wiki'''
13642 pre-save transform: mixed tag case
13646 <NOwiki>'''not wiki'''</noWIKI>
13648 <NOwiki>'''not wiki'''</noWIKI>
13652 pre-save transform: unclosed comment in <nowiki>
13656 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13658 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13661 # Leading @ in this template definition works around a limitation
13662 # in parsoid's parserTests which otherwise strips the <span> from the
13663 # result (confusing it for a template wrapper)
13667 @<span onmouseover="alert('crap')">Oh no</span>
13671 (confirming safety of fix for subst T3936)
13673 {{Template:dangerous}}
13675 <p>@<span>Oh no</span>
13680 pre-save transform: comment containing gallery (T7024)
13684 <!-- <gallery>data</gallery> -->
13686 <!-- <gallery>data</gallery> -->
13690 pre-save transform: comment containing extension
13694 <!-- <tag>data</tag> -->
13696 <!-- <tag>data</tag> -->
13700 pre-save transform: comment containing nowiki
13704 <!-- <nowiki>data</nowiki> -->
13706 <!-- <nowiki>data</nowiki> -->
13710 pre-save transform: <noinclude> in subst (T5298)
13720 pre-save transform: <onlyinclude> in subst (T5298)
13724 {{subst:Includes2}}
13732 {{<includeonly>subst:</includeonly>Includes}}
13736 Template:SafeSubstTest
13738 {{<includeonly>safesubst:</includeonly>Includes}}
13742 T24297: safesubst: works during PST
13746 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13752 T24297: safesubst: works during normal parse
13761 subst: does not work during normal parse
13765 <p>{{subst:Includes}}
13770 pre-save transform: context links ("pipe trick")
13774 [[Article (context)|]]
13777 [[Bar:Article (context)|]]
13778 [[:Bar:Article (context)|]]
13780 [[|Article (context)]]
13784 [[Article (context)|Article]]
13785 [[Bar:Article|Article]]
13786 [[:Bar:Article|Article]]
13787 [[Bar:Article (context)|Article]]
13788 [[:Bar:Article (context)|Article]]
13790 [[Article (context)]]
13791 [[Bar:X (Y) Z|X (Y) Z]]
13792 [[:Bar:X (Y) Z|X (Y) Z]]
13796 pre-save transform: context links ("pipe trick") with interwiki prefix
13800 [[interwiki:Article|]]
13801 [[:interwiki:Article|]]
13802 [[interwiki:Bar:Article|]]
13803 [[:interwiki:Bar:Article|]]
13805 [[interwiki:Article|Article]]
13806 [[:interwiki:Article|Article]]
13807 [[interwiki:Bar:Article|Bar:Article]]
13808 [[:interwiki:Bar:Article|Bar:Article]]
13812 pre-save transform: context links ("pipe trick") with parens in title
13814 pst title=[[Somearticle (context)]]
13818 [[Article (context)|Article]]
13822 pre-save transform: context links ("pipe trick") with comma in title
13824 pst title=[[Someplace, Somewhere]]
13827 [[Otherplace, Elsewhere|]]
13828 [[Otherplace, Elsewhere, Anywhere|]]
13830 [[Otherplace, Somewhere|Otherplace]]
13831 [[Otherplace, Elsewhere|Otherplace]]
13832 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13836 pre-save transform: context links ("pipe trick") with parens and comma
13838 pst title=[[Someplace (IGNORED), Somewhere]]
13841 [[Otherplace (place), Elsewhere|]]
13843 [[Otherplace, Somewhere|Otherplace]]
13844 [[Otherplace (place), Elsewhere|Otherplace]]
13848 pre-save transform: context links ("pipe trick") with comma and parens
13850 pst title=[[Who, me? (context)]]
13853 [[Me, Myself, and I (1937 song)|]]
13855 [[Yes, you. (context)|Yes, you.]]
13856 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13860 pre-save transform: context links ("pipe trick") with namespace
13862 pst title=[[Ns:Somearticle]]
13866 [[Ns:Article|Article]]
13870 pre-save transform: context links ("pipe trick") with namespace and parens
13872 pst title=[[Ns:Somearticle (context)]]
13876 [[Ns:Article (context)|Article]]
13880 pre-save transform: context links ("pipe trick") with namespace and comma
13882 pst title=[[Ns:Somearticle, Context, Whatever]]
13886 [[Ns:Article, Context, Whatever|Article]]
13890 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13892 pst title=[[Ns:Somearticle, Context (context)]]
13896 [[Ns:Article (context)|Article]]
13900 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13902 pst title=[[Ns:Somearticle (IGNORED), Context]]
13906 [[Ns:Article, Context|Article]]
13910 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13914 [[Article(context)|]]
13915 [[Bar:Article(context)|]]
13916 [[:Bar:Article(context)|]]
13917 [[|Article(context)]]
13921 [[Article(context)|Article]]
13922 [[Bar:Article(context)|Article]]
13923 [[:Bar:Article(context)|Article]]
13924 [[Article(context)]]
13925 [[Bar:X(Y)Z|X(Y)Z]]
13926 [[:Bar:X(Y)Z|X(Y)Z]]
13930 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13934 [[Article (context)|]]
13935 [[Bar:Article (context)|]]
13936 [[:Bar:Article (context)|]]
13937 [[|Article (context)]]
13941 [[Article (context)|Article]]
13942 [[Bar:Article (context)|Article]]
13943 [[:Bar:Article (context)|Article]]
13944 [[Article (context)]]
13945 [[Bar:X (Y) Z|X (Y) Z]]
13946 [[:Bar:X (Y) Z|X (Y) Z]]
13950 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13954 [[Article(context)|]]
13955 [[Bar:Article(context)|]]
13956 [[:Bar:Article(context)|]]
13957 [[|Article(context)]]
13961 [[Article(context)|Article]]
13962 [[Bar:Article(context)|Article]]
13963 [[:Bar:Article(context)|Article]]
13964 [[Article(context)]]
13965 [[Bar:X(Y)Z|X(Y)Z]]
13966 [[:Bar:X(Y)Z|X(Y)Z]]
13970 pre-save transform: context links ("pipe trick") with commas (T23660)
13974 [[Article (context), context|]]
13975 [[Article (context),context|]]
13976 [[Bar:Article (context), context|]]
13977 [[Bar:Article (context),context|]]
13978 [[:Bar:Article (context), context|]]
13979 [[:Bar:Article (context),context|]]
13981 [[Article (context), context|Article]]
13982 [[Article (context),context|Article]]
13983 [[Bar:Article (context), context|Article]]
13984 [[Bar:Article (context),context|Article]]
13985 [[:Bar:Article (context), context|Article]]
13986 [[:Bar:Article (context),context|Article]]
13990 Parsoid: backwards pipe trick
13997 <p>[[|<b>bar</b>]]</p>
14001 pre-save transform: trim trailing empty lines
14005 Empty lines are trimmed
14011 Empty lines are trimmed
14015 pre-save transform: Signature expansion
14022 * <noinclude>~~~</noinclude>
14023 * <includeonly>~~~</includeonly>
14024 * <onlyinclude>~~~</onlyinclude>
14026 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14027 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14028 * 00:02, 1 January 1970 (UTC)
14029 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14030 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14031 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14036 ParserOutput flags from signature expansion (T84843)
14043 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14044 flags=user-signature
14049 pre-save transform: Signature expansion in nowiki tags (T2093)
14055 <nowiki>~~~~</nowiki>
14057 <includeonly><nowiki>~~~~</nowiki></includeonly>
14059 <noinclude><nowiki>~~~~</nowiki></noinclude>
14061 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14063 {{subst:Foo}} shall be converted to FOO
14065 As well as inside noinclude/onlyinclude
14066 <noinclude>{{subst:Foo}}</noinclude>
14067 <onlyinclude>{{subst:Foo}}</onlyinclude>
14069 But not inside includeonly
14070 <includeonly>{{subst:Foo}}</includeonly>
14074 <nowiki>~~~~</nowiki>
14076 <includeonly><nowiki>~~~~</nowiki></includeonly>
14078 <noinclude><nowiki>~~~~</nowiki></noinclude>
14080 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14082 FOO shall be converted to FOO
14084 As well as inside noinclude/onlyinclude
14085 <noinclude>FOO</noinclude>
14086 <onlyinclude>FOO</onlyinclude>
14088 But not inside includeonly
14089 <includeonly>{{subst:Foo}}</includeonly>
14093 Parsoid: Recognize nowiki with trailing space in tags
14097 <nowiki ><div>[[foo]]</nowiki >
14105 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14112 Parsoid: Recognize nowiki with odd capitalization
14116 <noWikI ><div>[[foo]]</Nowiki >
14118 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14123 Parsoid: Escape nowiki with trailing space in tags
14127 <p><nowiki > foo </nowiki ></p>
14128 <p>a<nowiki />b</p>
14129 <p>c<nowiki/ >d</p>
14131 <nowiki > foo </nowiki >
14139 Parsoid: Escape weird noWikI capitalizations
14143 <p><noWikI > foo </NoWikI ></p>
14145 <noWikI > foo </NoWikI >
14149 ### Message transform tests
14152 message transform: magic variables
14162 message transform: should not transform wiki markup
14172 message transform: <noinclude> in transcluded template (T6926)
14182 message transform: <onlyinclude> in transcluded template (T6926)
14192 {{#special:}} page name, known
14196 {{#special:Recentchanges}}
14198 Special:RecentChanges
14202 {{#special:}} page name with subpage, known
14206 {{#special:Recentchanges/param}}
14208 Special:RecentChanges/param
14212 {{#special:}} page name, unknown
14216 {{#special:foobar nonexistent}}
14218 Special:Foobar nonexistent
14222 {{#speciale:}} page name, known
14226 {{#speciale:Recentchanges}}
14228 Special:RecentChanges
14232 {{#speciale:}} page name with subpage, known
14236 {{#speciale:Recentchanges/param}}
14238 Special:RecentChanges/param
14242 {{#speciale:}} page name, unknown
14246 {{#speciale:foobar nonexistent}}
14248 Special:Foobar_nonexistent
14254 ### For Parsoid-specific tests, see
14255 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14260 parsoid=wt2html,wt2wt,html2html
14262 [[Image:foobar.jpg]]
14264 <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>
14267 <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>
14271 Serialize simple image with figure-inline wrapper
14275 <p><figure-inline 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></figure-inline></p>
14277 [[File:Foobar.jpg]]
14281 Simple image (using File: namespace, now canonical)
14283 [[File:Foobar.jpg]]
14285 <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>
14288 <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>
14292 Right-aligned image
14294 [[File:Foobar.jpg|right]]
14296 <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>
14299 <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>
14305 [[File:Foobar.jpg|right|Caption text]]
14307 <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>
14310 <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>
14314 Image with caption, T55312 #1
14316 [[File:Foobar.jpg|right|Caption page stuff]]
14318 <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>
14321 <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>
14325 Image with caption, T55312 #2
14327 [[File:Foobar.jpg|right|Caption page=]]
14329 <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>
14332 <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>
14336 Image with caption, T55312 #3
14338 [[File:Foobar.jpg|right|Caption page=stuff]]
14340 <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>
14343 <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>
14347 Image caption with pipe entity
14349 [[File:Foobar.jpg|thumb|one | two]]
14350 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14352 <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>one | two</div></div></div>
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>one <i>two</i> | three</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>one <span typeof="mw:Entity">|</span> two</figcaption></figure>
14357 <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>one <i>two</i> <span typeof="mw:Entity">|</span> three</figcaption></figure>
14361 Allow empty links in image captions (T62753)
14365 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14370 <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>
14373 <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>
14375 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14376 </figcaption></figure>
14380 Titles in unlinked images (T23454)
14382 [[File:Foobar.jpg|link=|stuff]]
14384 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14389 Link with empty target
14398 Image with link trail
14400 Linktrails should not work for images: [[File:Foobar.jpg]]s
14402 <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
14405 <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>
14409 Image with empty attribute
14411 parsoid=wt2html,wt2wt,html2html
14413 [[File:Foobar.jpg|right||Caption text]]
14415 <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>
14418 <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>
14422 1. Block image with individual attributes from templates
14424 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14426 <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>
14429 <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>
14433 2. Block Image with individual attributes from templates
14435 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14437 <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>
14440 <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>
14444 3. Inline image with individual attributes from templates
14446 [[File:Foobar.jpg|{{echo|50px}}]]
14448 <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>
14451 <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>
14454 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14455 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14457 Image with multiple attributes from the same template
14459 [[File:Foobar.jpg|{{image_attribs}}]]
14461 <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>
14464 <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>
14468 Image with link tails
14472 123[[File:Foobar.jpg]]456
14473 123[[File:Foobar.jpg|right]]456
14474 123[[File:Foobar.jpg|thumb]]456
14476 <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
14478 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
14479 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
14482 <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>
14484 <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>
14486 <div class="thumb tright">
14487 <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>
14488 <div class="thumbcaption">
14489 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
14495 <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>
14496 <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>
14497 <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>
14501 Image with multiple captions -- only last one is accepted
14503 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14505 <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>
14508 <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>
14512 Image with multiple widths -- use last
14514 [[File:Foobar.jpg|200px|300px|caption]]
14516 <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>
14519 <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>
14523 Image with multiple alignments -- use first (T50664)
14527 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14529 [[File:Foobar.jpg|middle|text-top|caption]]
14531 <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>
14532 <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>
14535 <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>
14536 <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>
14540 Image with width attribute at different positions
14542 [[File:Foobar.jpg|200px|right|Caption]]
14543 [[File:Foobar.jpg|right|200px|Caption]]
14544 [[File:Foobar.jpg|right|Caption|200px]]
14546 <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>
14547 <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>
14548 <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>
14551 <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>
14552 <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>
14553 <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>
14556 # a sad bit of backward-compatibility
14558 Image with size specified with pxpx (T15500, T53628)
14560 parsoid=wt2html,wt2wt,html2html
14562 [[File:Foobar.jpg|20pxpx]]
14563 [[File:Foobar.jpg|200x20pxpx]]
14565 <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>
14566 <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>
14569 <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>
14573 Image with link parameter, wiki target
14575 [[File:Foobar.jpg|link=Main Page]]
14577 <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>
14580 <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>
14583 # parsoid T51293 (part 1)
14585 Image with link parameter, URL target
14587 [[File:Foobar.jpg|link=http://example.com/]]
14589 <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>
14592 <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>
14595 # parsoid T51293 (part 2)
14597 Image with link parameter, protocol-less URL target
14599 [[File:Foobar.jpg|link=//example.com/]]
14601 <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>
14604 <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>
14608 Escaping non-block captions (T107435)
14611 "modes": ["wt2wt"],
14613 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14617 [[Image:Foobar.jpg|caption]]
14619 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14622 # wgExternalLinkTarget not supported by Parsoid
14624 Image with link parameter, wgExternalLinkTarget
14626 [[Image:foobar.jpg|link=http://example.com/]]
14628 wgExternalLinkTarget='foobar'
14630 <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>
14635 Image with link parameter, wgNoFollowLinks set to false
14637 [[Image:foobar.jpg|link=http://example.com/]]
14639 wgNoFollowLinks=false
14641 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14646 Image with link parameter, wgNoFollowDomainExceptions
14648 [[Image:foobar.jpg|link=http://example.com/]]
14650 wgNoFollowDomainExceptions='example.com'
14652 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14656 # wgExternalLinkTarget not supported by Parsoid
14658 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14660 [[Image:foobar.jpg|link=http://example.com/|Title]]
14662 wgExternalLinkTarget='foobar'
14664 <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>
14669 Image with empty link parameter
14671 [[File:Foobar.jpg|link=]]
14673 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14676 <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>
14680 Image with link parameter (wiki target) and unnamed parameter
14682 [[File:Foobar.jpg|link=Main_Page|Title]]
14684 <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>
14687 <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>
14691 Image with link parameter (URL target) and unnamed parameter
14693 [[File:Foobar.jpg|link=http://example.com/|Title]]
14695 <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>
14698 <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>
14702 Thumbnail image with link parameter
14705 parsoid=wt2html,wt2wt,html2html
14707 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14709 <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>
14712 <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>
14716 Manually-specified thumbnail image
14720 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14722 <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>
14725 <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>
14729 Manually-specified thumbnail image with explicit link to wiki page
14732 parsoid=wt2html,wt2wt,html2html
14734 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14736 <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>
14739 <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>
14743 Manually-specified thumbnail image with explicit link to url
14746 parsoid=wt2html,wt2wt,html2html
14748 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14750 <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>
14753 <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>
14757 Manually-specified thumbnail image with explicit no link
14760 parsoid=wt2html,wt2wt,html2html
14762 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14764 <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>
14767 <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>
14771 Manually-specified thumbnail image with explicit link and alt text
14774 parsoid=wt2html,wt2wt,html2html
14776 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14778 <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>
14781 <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>
14785 Image with frame and link
14787 parsoid=wt2html,wt2wt,html2html
14789 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14791 <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>
14794 <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>
14798 Image with frame and link and explicit alt
14800 parsoid=wt2html,wt2wt,html2html
14802 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14804 <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>
14807 <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>
14811 Image with wiki markup in implicit alt
14813 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14815 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14817 <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>
14818 </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>
14821 <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>
14823 <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>
14827 Alt image option should handle most kinds of wikitext without barfing
14829 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14831 <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>
14834 <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\":\"&apos;&apos;bold template&apos;&apos;\"}},\"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>
14838 Image with table with attributes in caption
14840 parsoid=wt2html,html2html
14842 [[File:Foobar.jpg|thumb|
14849 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{| class=\"123\" |\n|- class=\"456\" |\n| ha\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"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>
14850 <table class="123">
14851 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14854 </figcaption></figure>
14858 Image with table with rows from templates in caption
14860 [[File:Foobar.jpg|thumb|
14866 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{|\n{{echo|{{!}} hi}}\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"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>
14868 <tbody about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} hi"}},"i":0}},"\n"]}'><tr><td> hi</td></tr>
14870 </figcaption></figure>
14874 Image with nested tables in caption
14876 [[File:Foobar.jpg|thumb|Foo<br />
14885 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Foo<br/>\n{|\n|\n{|\n|z\n|}\n|}\n"}]}'><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 data-parsoid='{"dsr":[null,50,null,null]}'>Foo<br data-parsoid='{"stx":"html","selfClose":true}'/>
14889 <tbody><tr><td>z</td></tr>
14890 </tbody></table></td></tr>
14892 </figcaption></figure>
14895 ###################
14896 # Conflicting image format options.
14897 # First option specified should 'win'.
14898 # All three cases in each test should be identical.
14901 Image with 'frameless' first.
14903 parsoid=wt2html,wt2wt,html2html
14905 [[File:Foobar.jpg|frameless|caption]]
14907 [[File:Foobar.jpg|frameless|frame|caption]]
14909 [[File:Foobar.jpg|frameless|thumb|caption]]
14911 <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>
14912 </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>
14913 </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>
14916 <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>
14917 <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>
14918 <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>
14922 Image with 'frame' first.
14924 parsoid=wt2html,wt2wt,html2html
14926 [[File:Foobar.jpg|frame|caption]]
14927 [[File:Foobar.jpg|frame|frameless|caption]]
14928 [[File:Foobar.jpg|frame|thumb|caption]]
14930 <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>
14931 <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>
14932 <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>
14935 <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>
14936 <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>
14937 <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>
14941 Image with 'thumb' first.
14943 parsoid=wt2html,wt2wt,html2html
14945 [[File:Foobar.jpg|thumb|caption]]
14946 [[File:Foobar.jpg|thumb|frameless|caption]]
14947 [[File:Foobar.jpg|thumb|frame|caption]]
14949 <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>
14950 <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>
14951 <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>
14954 <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>
14955 <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>
14956 <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>
14959 ###################
14961 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14962 # and https://phabricator.wikimedia.org/T64258
14963 # Foobar has actual size of 1941x220
14964 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14965 # a scalable format.
14966 # 2. Framed images always ignore size options; always render at default size.
14967 # 3. "Unspecified format" and border are the only types which can be
14971 Image: unspecified format and border enlarge
14973 parsoid=wt2html,wt2wt,html2html
14975 [[File:Foobar.jpg|2000px]]
14977 [[File:Foobar.jpg|border|2000px]]
14979 <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>
14980 </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>
14983 <p><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></span></p>
14984 <p><span class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></span></p>
14988 Image: "unspecified format" and border reduce
14990 parsoid=wt2html,wt2wt,html2html
14992 [[File:Foobar.jpg|1000px]]
14994 [[File:Foobar.jpg|border|1000px]]
14996 <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>
14997 </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>
15000 <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>
15001 <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>
15005 Image: thumbs reduce
15007 parsoid=wt2html,wt2wt,html2html
15009 [[File:Foobar.jpg|thumb|50px]]
15011 <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>
15014 <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>
15018 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15020 parsoid=wt2html,wt2wt,html2html
15022 [[File:Foobar.jpg|thumb|2000px]]
15024 [[File:Foobar.svg|thumb|2000px]]
15026 <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>
15027 <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>
15030 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
15031 <figure typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure>
15035 Image: frameless can reduce in size
15037 parsoid=wt2html,wt2wt,html2html
15039 [[File:Foobar.jpg|frameless|50px]]
15041 <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>
15044 <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>
15048 Image: bitmap frameless can't be enlarged past original size, but vector can
15050 parsoid=wt2html,wt2wt,html2html
15052 [[File:Foobar.jpg|frameless|2000px]]
15054 [[File:Foobar.svg|frameless|2000px]]
15056 <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>
15057 </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>
15060 <p><span typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
15061 <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/2000px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></span></p>
15065 Image: framed images are always unscaled.
15067 parsoid=wt2html,wt2wt,html2html
15069 [[File:Foobar.jpg|frame]]
15071 [[File:Foobar.jpg|frame|50px]]
15073 [[File:Foobar.jpg|frame|50x50px]]
15075 [[File:Foobar.jpg|frame|2000px]]
15077 <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>
15078 <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>
15079 <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>
15080 <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>
15083 <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>
15084 <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>
15085 <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>
15086 <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>
15089 ###################
15092 Link to image page- image page normally doesn't exists, hence edit link
15093 Add test with existing image page
15094 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15098 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15103 T20784 Link to non-existent image page with caption should use caption as link text
15105 [[:Image:test|caption]]
15107 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15112 Frameless image caption with a free URL
15114 [[File:Foobar.jpg|http://example.com]]
15116 <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>
15119 <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>
15123 Thumbnail image caption with a free URL
15127 [[File:Foobar.jpg|thumb|http://example.com]]
15129 <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>
15132 <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>
15136 Thumbnail image caption with a free URL and explicit alt
15139 parsoid=wt2html,wt2wt,html2html
15141 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15143 <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>
15146 <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>
15150 SVG thumbnails with no language set
15153 [[File:Foobar.svg|thumb|caption]]
15155 <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>
15158 <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.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
15162 SVG thumbnails with language de
15164 parsoid=wt2html,wt2wt,html2html
15166 [[File:Foobar.svg|thumb|caption|lang=de]]
15168 <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>
15171 <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.png" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
15175 SVG thumbnails with invalid language code
15177 parsoid=wt2html,wt2wt,html2html
15179 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15181 <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>
15184 <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.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>lang=invalid:language:code</figcaption></figure>
15188 T3887: A ISBN with a thumbnail
15190 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15192 <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>
15195 <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>
15199 T3887: A RFC with a thumbnail
15201 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15203 <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="https://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
15206 <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="https://tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
15210 T3887: A mailto link with a thumbnail
15212 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15214 <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>
15217 <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>
15220 # Pending resolution to T2368
15222 T2648: Frameless image caption with a link
15224 [[File:Foobar.jpg|text with a [[link]] in it]]
15226 <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>
15229 <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>
15233 T2648: Frameless image caption with a link (suffix)
15235 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15237 <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>
15240 <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>
15244 T2648: Frameless image caption with an interwiki link
15246 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15248 <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>
15251 <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>
15255 T2648: Frameless image caption with a piped interwiki link
15257 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15259 <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>
15262 <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>
15266 T107474: Frameless image caption with <nowiki>
15268 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15270 <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>
15274 Escape HTML special chars in image alt text
15276 [[File:Foobar.jpg|& < > "]]
15278 <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>
15281 <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>
15285 Escape HTML special chars in image alt text with LanguageConverter
15289 [[File:Foobar.jpg|& < > "]]
15291 <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>
15294 <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>
15298 Entities in file name and attributes
15300 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15302 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15305 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"manualthumb=7%25 solution.gif"},{"ck":"link","ak":"link=7%25 solution"},{"ck":"caption","ak":"[[7%25 solution]]"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./7%25_solution\" title=\"7% solution\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./7%25_solution\"},\"sa\":{\"href\":\"7%25 solution\"},\"dsr\":[74,91,2,2]}'>7% solution</a>"}'><a href="./7%25_solution" data-parsoid='{"a":{"href":"./7%25_solution"},"sa":{"href":"link=7%25 solution"}}'><img resource="./File:7%25_solution.gif" src="./Special:FilePath/7%25_solution.gif" height="220" width="220" data-parsoid='{"a":{"resource":"./File:7%25_solution.gif","height":"220","width":"220"},"sa":{"resource":"File:7%25 solution.gif"}}'/></a></span></p>
15309 T2499: Alt text should have Ӓ, not &1234;
15311 [[File:Foobar.jpg|♀]]
15313 <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>
15316 <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>
15320 Broken image caption with link
15322 parsoid=wt2html,wt2wt,html2html
15324 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15326 <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.
15329 <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>
15333 Image caption containing another image
15335 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15337 <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>
15340 <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>
15344 Image: caption containing a newline
15346 [[File:Foobar.jpg|This
15349 <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>
15352 <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>
15356 Image: caption containing leading space
15357 (The leading space should not trigger nowiki escaping in wt2wt mode)
15359 [[File:Foobar.jpg|thumb| bar]]
15361 <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>
15364 <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>
15368 Image: caption containing a table
15370 parsoid=wt2html,wt2wt,html2html
15372 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15378 and some more text.]]
15380 <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>
15383 <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
15386 <tr><th>Foo </th><th>Bar</th></tr>
15389 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15393 T5090: External links other than http: in image captions
15395 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15397 <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>
15400 <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>
15406 parsoid=wt2html,wt2wt,html2html
15408 [[Image:foobar.jpg|a|class=b]]
15410 <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>
15413 <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>
15417 Localized image handling (1).
15419 parsoid=wt2html,wt2wt,html2html
15422 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15424 <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>
15427 <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>
15431 Localized image handling (2).
15434 parsoid=wt2html,wt2wt,html2html
15437 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15439 <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>
15442 <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>
15446 Localized image handling (3).
15451 <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>
15453 [[File:Foobar.jpg|بندانگشتی]]
15457 "border", "frameless" and "class" attributes on an image.
15460 parsoid=wt2html,wt2wt,html2html
15462 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15464 <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>
15467 <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>
15470 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15472 Invalid image attributes (T64500)
15475 parsoid=wt2html,wt2wt,html2html
15477 [[File:Foobar.jpg|thumb|float|left|caption]]
15479 [[File:Foobar.jpg|thumb|righ|caption]]
15481 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15483 <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>
15484 <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>
15485 <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>
15488 <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>
15489 <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>
15490 <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>
15496 #REDIRECT [[File:Barfoo.jpg]]
15499 # FIXME: Parsoid should run this test -- but we'd need to teach the
15500 # mockAPI about the redirected Barfoo.jpg image.
15504 [[Image:Barfoo.jpg]]
15506 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15511 Missing image with uploads disabled
15515 [[File:Foobaz.jpg]]
15517 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15520 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Foobaz.jpg"><img resource="./File:Foobaz.jpg" src="./Special:FilePath/Foobaz.jpg" height="220" width="220"/></a></span></p>
15523 # Parsoid-specific testing for images
15524 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15525 # Currently imperfect due to a flaw in the Parsoid testrunner
15527 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15531 Parsoid-specific image handling - simple image with size and middle alignment
15533 [[File:Foobar.jpg|middle|50px]]
15535 <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>
15539 Parsoid-specific image handling - simple image with size, middle alignment,
15540 non-standard namespace alias
15542 parsoid=wt2wt,wt2html,html2html
15544 [[Image:Foobar.jpg|middle|50px]]
15546 <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>
15550 Parsoid-specific image handling - simple image with size and middle alignment
15553 [[File:Foobar.jpg|50px|middle]]
15555 <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>
15559 Parsoid-specific image handling - simple image with size and middle alignment
15560 and non-standard namespace name
15562 parsoid=wt2html,wt2wt,html2html
15564 [[Image:Foobar.jpg|50px|middle]]
15566 <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>
15570 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15572 [[File:Foobar.jpg|500x10px|baseline|caption]]
15574 <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>
15578 Parsoid-specific image handling - simple image with border and size spec
15580 [[File:Foobar.jpg|50px|border|caption]]
15582 <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>
15586 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15588 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15590 <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>
15594 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15597 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15599 <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>
15603 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15605 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15607 <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>
15611 Parsoid-specific image handling - thumbnail with specific size, halign,
15612 valign, and caption (existing content)
15614 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15616 <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>
15620 Parsoid-specific image handling - framed image with specific size and caption
15623 parsoid=wt2html,wt2wt,html2html
15625 [[File:Foobar.jpg|frame|500x50px|caption]]
15627 <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>
15631 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15634 parsoid=wt2html,wt2wt,html2html
15636 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15638 <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>
15642 Parsoid-specific image handling - frameless image with specific size, border, and caption
15644 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15646 <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>
15650 Parsoid-specific image handling - simple image with a formatted caption
15652 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15654 <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>
15658 Parsoid-specific image handling - caption with a template in it
15660 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15662 <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>
15666 Parsoid-specific image handling - caption with unbalanced tags in it
15668 parsoid=wt2html,wt2wt,html2html
15671 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15675 <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>
15680 Parsoid-specific image handling - empty caption (1)
15682 parsoid=wt2html,wt2wt
15684 [[File:Foobar.jpg|thumb|]]
15686 <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>
15689 # empty captions don't get serialized unless we're in the "round trip" case
15691 Parsoid-specific image handling - empty caption (2)
15695 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15696 <a href="./File:Foobar.jpg">
15697 <img resource="./File:Foobar.jpg"
15698 src="//example.com/images/3/3a/Foobar.jpg"
15699 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15700 height="25" width="220"/>
15702 <figcaption></figcaption>
15705 [[File:Foobar.jpg|thumb]]
15709 Parsoid-specific image handling - whitespace caption
15711 [[File:Foobar.jpg|thumb| ]]
15713 <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>
15717 Parsoid-specific image handling - lang option
15720 [[File:Foobar.svg|lang=de|caption]]
15724 <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>
15728 ## Edge case bugs in Parsoid from T93580
15730 T93580: 1. Templated <ref> inside block images
15732 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15736 <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>
15738 <ol class="mw-references 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>
15742 T93580: 2. <ref> inside inline images
15744 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15748 <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>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
15750 <ol class="mw-references 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>
15754 T93580: 3. Templated <ref> inside inline images
15756 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15760 <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>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
15762 <ol class="mw-references 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">foo</span></li></ol>
15769 Subpage test/subpage
15777 subpage title=[[Subpage test]]
15781 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15786 Subpage noslash link
15788 subpage title=[[Subpage test]]
15792 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15797 Subpage test/1/2/subpage
15803 Relative subpage noslash link
15805 parsoid=wt2wt,wt2html,html2html
15806 subpage title=[[Subpage test/1/2/3/4]]
15812 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15813 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15816 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15817 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15821 Parsoid: dot-slash prefixed wikilinks
15831 </p><p>[[././baz/]]
15836 </p><p>[[././baz/]]
15841 Render invalid page names as plain text (T53090)
15853 [[foo[http://example.com]xyz]]
15855 [[{{echo|./../foo}}|bar]]
15856 [[{{echo|foo/.}}|bar]]
15857 [[{{echo|foo/..}}|bar]]
15858 [[{{echo|foo~~~~bar}}]]
15859 [[{{echo|foo>bar}}]]
15860 [[{{echo|foo././bar}}]]
15861 [[{{echo|foo{bar}}]]
15862 [[{{echo|foo}bar}}]]
15863 [[{{echo|foo[bar}}]]
15864 [[{{echo|foo]bar}}]]
15865 [[{{echo|foo<bar}}]]
15867 <p>[[./../foo|bar]]
15877 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15878 </p><p>[[./../foo|bar]]
15891 <p>[[./../foo|bar]]
15901 [[foo<a rel="mw:ExtLink" href="http://example.com"></a>xyz]]</p>
15903 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15904 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15905 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15906 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15907 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15908 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15909 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15910 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15911 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15912 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15913 [[<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>
15921 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15926 T2561: {{/Subpage}}
15928 subpage title=[[Page]]
15932 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15940 Category:MediaWiki User's Guide
15948 [[:Category:MediaWiki User's Guide]]
15950 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15959 [[Category:MediaWiki User's Guide]]
15961 cat=MediaWiki_User's_Guide sort=
15963 <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"}}'/>
15967 PAGESINCATEGORY invalid title fatal (r33546 fix)
15969 {{PAGESINCATEGORY:<bogus>}}
15976 Category with different sort key
15980 [[Category:MediaWiki User's Guide|Foo]]
15982 cat=MediaWiki_User's_Guide sort=Foo
15984 <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"}}'/>
15988 Category with identical sort key
15992 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15994 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15996 <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"}}'/>
16000 Category with empty sort key
16005 [[Category:MediaWiki User's Guide|]]
16007 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16011 Category with empty sort key and parentheses
16016 [[Category:Foo (bar)|]]
16018 [[Category:Foo (bar)|Foo]]
16022 Category with link tail
16027 123[[Category:Foo]]456
16029 123[[Category:Foo]]456
16033 Category with template
16038 [[Category:{{echo|Foo}}]]
16040 [[Category:{{echo|Foo}}]]
16044 Category with template in sort key
16049 [[Category:Foo|{{echo|Bar}}]]
16051 [[Category:Foo|{{echo|Bar}}]]
16055 Category with template in sort key and title
16060 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16062 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16065 ## We used to, but no longer wt2wt this test since the default serializer
16066 ## will normalize all categories to serialize on their own line.
16067 ## This wikitext usage is going to be fairly uncommon in production and
16068 ## selser will take care of preserving formatting in those scenarios.
16070 Category / paragraph interactions
16074 Foo [[Category:Baz]] Bar
16076 Foo [[Category:Baz]]
16084 [[Category:Baz]] Bar
16097 {{echo|[[Category:Baz]]}}
16110 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16111 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16112 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16113 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16114 <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>
16115 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16118 ## We used to, but no longer wt2wt this test since the default serializer
16119 ## will normalize all categories to serialize on their own line.
16120 ## This wikitext usage is going to be fairly uncommon in production and
16121 ## selser will take care of preserving formatting in those scenarios.
16123 ## The whitespace on the empty line is part of the test. Please do not delete
16125 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16131 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16133 {{echo|[[Category:Foo]] and so should this!}}
16135 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16140 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16142 <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>
16145 ## Parsoid will not try to wt2wt this while preserving newlines because
16146 ## it suppresses excess newlines within list items -- and we don't want to
16147 ## introduce a special case just for categories, which is, in reality somewhat
16148 ## odd behavior -- categories are unlikely to be used in list items like this
16149 ## in top-level pages and are only likely to show up in template-generated
16150 ## list items where this RT-ing is a non-issue.
16152 ## The whitespace on the empty line is part of the test. Please do not delete
16154 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16160 [[Category:Foo]] and this should be part of the same list item
16163 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16165 <ul><li>This and this should be part of the same list item</li>
16166 <li>So should this and this should be part of the same list item</li></ul>
16169 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16170 <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>
16174 ## Newlines and categories that follow the last item of a list
16175 ## are treated differently because this (list followed by categories)
16176 ## is an extremely common pattern on wikis.
16178 3. Categories and newlines: newline suppression for last list item should RT properly
16191 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16193 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16194 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16198 4. Categories and newlines: newline suppression for last list item should RT properly
16206 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
16208 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16211 ## only wt2html for this to make sure the algo only applies to the rightmost path
16213 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16226 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16228 <ul><li> d</li></ul></li></ul>
16229 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16232 ## We used to, but no longer wt2wt this test since the default serializer
16233 ## will normalize all categories to serialize on their own line.
16234 ## This wikitext usage is going to be fairly uncommon in production and
16235 ## selser will take care of preserving formatting in those scenarios.
16237 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16241 * a [[Category:Foo]]
16243 <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>
16246 # This test also demonstrates because of newline+category tunneling
16247 # through the list hander, template wrapping doesn't expand to the
16248 # containing list when the list item swallows the category.
16250 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16255 <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
16256 </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>
16260 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16264 {{echo|[[Category:Foo]]
16268 <ul><li> a</li></ul>
16270 <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">
16271 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16272 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16276 9. Categories and newlines: should behave properly with linkprefix (T87753)
16291 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16292 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16296 10. No regressions on internal links following category (T174639)
16298 parsoid=wt2html,html2html
16300 [[Category:Foo]]<div>a
16305 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16308 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16310 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16313 # Note that Parsoid differs slightly from PHP due to T175421
16315 11. Special case where only newlines separate links (T175416)
16317 parsoid=wt2html,html2html
16321 [[Foo]][[es:Alimento]]
16326 <a href="/wiki/Foo" title="Foo">Foo</a>
16327 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16330 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16332 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16334 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16338 Category links with multiple namespaces
16340 [[Category:Project:Foo]]
16342 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16346 Parsoid: Serialize link to category page with colon escape
16352 [[:Category:Foo|Bar]]
16355 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16356 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16360 # We used to, but no longer wt2wt this test since the default serializer
16361 # will normalize all categories to serialize on their own line.
16362 # This wikitext usage is going to be fairly uncommon in production and
16363 # selser will take care of preventing whitespace insertion if this
16364 # occurs in an article.
16366 # html2html disabled for the same reason (whitespace insertion between
16369 # html2wt disabled because it localizes the "Category" namespace.
16371 Link prefix/suffixes aren't applied to category links
16381 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16385 Link prefix/suffixes aren't applied to language links
16395 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16399 Parsoid: Serialize link to file page with colon escape
16405 [[:File:Foo.png|Bar]]
16408 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16409 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16414 Parsoid: Serialize a genuine category link without colon escape
16419 [[Category:Foo|Bar]]
16421 <link rel="mw:PageProp/Category" href="./Category:Foo">
16422 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16426 Normalize hrefs properly before testing for invalid link targets (T72894)
16430 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16432 [[Category:Toxine bactérienne]]
16436 Parsoid: Defaultsort
16438 {{DEFAULTSORT:Foo}}
16440 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16443 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16444 # But, this is a limitation of our representation and is documented in
16445 # TemplateHandler.js in processSpecialMagicWord
16447 Parsoid: Defaultsort (template-generated)
16449 {{{{echo|DEFAULTSORT}}:Foo}}
16451 <meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{{{echo|DEFAULTSORT}}:Foo}}","dsr":[0,26,null,null]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,22,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DEFAULTSORT\"}},\"i\":0}}]}'>DEFAULTSORT</span>:Foo"}]]}'/>
16455 ### Inter-language links
16458 Interlanguage links
16466 es:Alimento fr:Nourriture zh:食品
16468 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16469 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16470 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16474 Duplicate interlanguage links (T26502)
16485 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16486 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16487 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16488 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16495 Basic section headings
16502 ===Smaller headline===
16505 <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>
16508 <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>
16511 <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>
16517 Section headings with TOC
16520 === Subheadline 1 ===
16521 ===== Skipping a level =====
16522 ====== Skipping a level ======
16526 ===Another headline===
16528 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16530 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16532 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16534 <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>
16536 <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>
16543 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16545 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16551 <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>
16552 <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>
16553 <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>
16554 <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>
16555 <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>
16558 <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>
16563 TOC anchors don't collide
16571 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16573 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16574 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16575 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16576 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16580 <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>
16581 <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>
16582 <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>
16583 <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>
16587 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16589 Handling of sections up to level 6 and beyond
16592 == Level 2 Heading==
16593 === Level 3 Heading===
16594 ==== Level 4 Heading====
16595 ===== Level 5 Heading=====
16596 ====== Level 6 Heading======
16597 ======= Level 7 Heading=======
16598 ======== Level 8 Heading========
16599 ========= Level 9 Heading=========
16600 ========== Level 10 Heading==========
16602 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16604 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16606 <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>
16608 <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>
16610 <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>
16612 <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>
16614 <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>
16615 <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>
16616 <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>
16617 <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>
16618 <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>
16632 <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>
16633 <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>
16634 <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>
16635 <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>
16636 <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>
16637 <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>
16638 <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>
16639 <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>
16640 <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>
16641 <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>
16646 TOC regression (T11764)
16650 ==== title 1.1.1 ====
16655 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16657 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16659 <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>
16661 <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>
16664 <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>
16667 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16669 <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>
16675 <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>
16676 <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>
16677 <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>
16678 <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>
16679 <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>
16680 <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>
16685 TOC for heading containing <span id="..."></span> (T96153)
16688 ==<span id="old-anchor"></span>New title==
16690 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16692 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16696 <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>
16701 TOC with wgMaxTocLevel=3 (T8204)
16707 ==== title 1.1.1 ====
16712 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16714 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16716 <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>
16717 <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>
16720 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16722 <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>
16728 <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>
16729 <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>
16730 <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>
16731 <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>
16732 <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>
16733 <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>
16738 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16744 ====Section 1.1.1====
16745 ====Section 1.1.1.1====
16748 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16750 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16752 <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>
16755 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16759 <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>
16760 <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>
16761 <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>
16762 <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>
16763 <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>
16769 Resolving duplicate section names
16774 <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>
16775 <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>
16780 Resolving duplicate section names with differing case (T12721)
16785 <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>
16786 <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>
16798 Template with sections, __NOTOC__
16805 <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>
16806 <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>
16807 <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>
16808 <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>
16813 __NOEDITSECTION__ keyword
16819 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16820 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16825 Link inside a section heading
16827 ==Section with a [[Main Page|link]] in it==
16829 <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>
16834 TOC regression (T14077)
16841 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16843 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16845 <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>
16848 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16852 <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>
16853 <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>
16854 <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>
16859 T3219 URL next to image (good)
16861 http://example.com [[File:Foobar.jpg]]
16863 <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>
16866 <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>
16870 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16873 The line above must have a trailing space!
16876 But just in case it doesn't...
16878 <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>
16879 <p>The line above must have a trailing space!
16881 <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>
16882 <p>But just in case it doesn't...
16887 Header with special characters (T27462)
16889 The tooltips shall not show entities to the user (ie. be double escaped)
16906 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16908 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16910 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16911 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16912 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16913 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16914 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16918 <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>
16921 <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>
16924 <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>
16927 <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>
16930 <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>
16936 Header with space, plus and underscore as entity
16938 Id should not contain + for spaces
16940 == Space between Text ==
16943 == Space-Entity between Text ==
16946 == Plus+between+Text ==
16949 == Plus-Entity+between+Text ==
16952 == Underscore_between_Text ==
16955 == Underscore-Entity_between_Text ==
16958 [[#Space between Text]]
16959 [[#Space-Entity between Text]]
16960 [[#Plus+between+Text]]
16961 [[#Plus-Entity+between+Text]]
16962 [[#Underscore_between_Text]]
16963 [[#Underscore-Entity_between_Text]]
16965 <p>Id should not contain + for spaces
16967 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16969 <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>
16970 <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>
16971 <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>
16972 <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>
16973 <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>
16974 <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>
16978 <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>
16981 <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>
16984 <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>
16987 <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>
16990 <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>
16993 <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>
16995 </p><p><a href="#Space_between_Text">#Space between Text</a>
16996 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
16997 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
16998 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
16999 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17000 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17005 Headers with excess '=' characters
17006 (Are similar tests necessary beyond the 1st level?)
17010 =''italic'' heading==
17011 ==''italic'' heading=
17013 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
17015 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17016 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17017 <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>
17018 <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>
17022 <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>
17023 <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>
17024 <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>
17025 <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>
17030 HTML headers vs TOC (T25393)
17031 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17043 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
17045 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17047 <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>
17048 <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>
17051 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17053 <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>
17054 <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>
17060 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17061 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17062 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17063 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
17064 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17065 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17070 Single-line or multiline-comments can follow headings
17072 parsoid=wt2html,wt2wt
17080 <h2><span class="mw-headline" id="foo">foo</span></h2>
17081 <h2><span class="mw-headline" id="bar">bar</span></h2>
17082 <h2><span class="mw-headline" id="baz">baz</span></h2>
17087 T3219 URL next to image (broken)
17089 http://example.com[[File:Foobar.jpg]]
17091 <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>
17094 <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>
17098 T3186 news: in the middle of text
17100 http://en.wikinews.org/wiki/Wikinews:Workplace
17102 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17108 Namespaced link must have a title
17117 Namespaced link must have a title (bad fragment version)
17119 [[Project:#fragment]]
17121 <p>[[Project:#fragment]]
17127 ### HTML tags and HTML attributes
17131 div with no attributes
17133 <div>HTML rocks</div>
17135 <div>HTML rocks</div>
17140 div with double-quoted attribute
17142 <div id="rock">HTML rocks</div>
17144 <div id="rock">HTML rocks</div>
17149 div with single-quoted attribute
17151 <div id='rock'>HTML rocks</div>
17153 <div id="rock">HTML rocks</div>
17158 div with unquoted attribute
17160 <div id=rock>HTML rocks</div>
17162 <div id="rock">HTML rocks</div>
17167 div with illegal double attributes
17169 <div id="a" id="b">HTML rocks</div>
17171 <div id="b">HTML rocks</div>
17176 div with empty attribute value, space before equals
17178 parsoid=wt2html,html2html
17180 <div class =>HTML rocks</div>
17182 <div class="">HTML rocks</div>
17185 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17189 div with multiple empty attribute values
17191 parsoid=wt2html,html2html
17193 <div id= title=>HTML rocks</div>
17195 <div id="title.3D">HTML rocks</div>
17198 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17202 table with multiple empty attribute values
17204 parsoid=wt2html,html2html
17210 <table title="id=">
17216 <table title="id=">
17217 <tbody><tr><td> hi</td></tr>
17222 div with braces in attribute value
17224 <div title="{}">Foo</div>
17226 <div title="{}">Foo</div>
17229 <div title="{}">Foo</div>
17233 div with empty attribute value, no space before equals
17235 parsoid=wt2html,html2html
17237 <div class=>HTML rocks</div>
17239 <div class="">HTML rocks</div>
17242 <div class="">HTML rocks</div>
17246 HTML multiple attributes correction
17248 <p class="error" class="awesome">Awesome!</p>
17250 <p class="awesome">Awesome!</p>
17255 Table multiple attributes correction
17258 !+ class="error" class="awesome"| status
17263 <th class="awesome"> status
17271 <DIV ID="x">HTML ROCKS</DIV>
17273 <div id="x">HTML ROCKS</div>
17278 Non-ASCII pseudo-tags are rendered as text
17287 Pseudo-tag with URL 'name' renders as url link
17289 <http://example.com/>
17291 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17296 text with amp in the middle of nowhere
17300 <p>Remember AT&T?
17305 text with character entity: eacute
17307 I always thought é was a cute letter.
17309 <p>I always thought é was a cute letter.
17312 <p>I always thought é was a cute letter.</p>
17316 text with entity-escaped character entity-like string: eacute
17318 I always thought &eacute; was a cute letter.
17320 <p>I always thought &eacute; was a cute letter.
17325 text with undefined character entity: xacute
17327 I always thought &xacute; was a cute letter.
17329 <p>I always thought &xacute; was a cute letter.
17336 <data value="5">five</data>
17337 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17338 <mark>This highlighted text</mark>
17340 <p><data value="5">five</data>
17341 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17342 <mark>This highlighted text</mark>
17347 HTML tag with leading space is parsed as text
17351 <p>< div>foo< /div>
17355 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17356 ## the HTML5 parsing spec.
17358 Element with broken attribute syntax
17362 <div style=" style="123">hi</div>
17365 <div style="123">hi</div>
17369 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17370 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17374 ### Nesting tests (see T43545, T52604, T53081)
17377 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17378 # Note that html2wt is considerably more difficult if we use <b> in
17379 # the test case, instead of <small>
17381 Ensure that HTML adoption agency algorithm is properly implemented.
17383 <small>X<small>Y</small>Z</small>
17385 <p><small>X<small>Y</small>Z</small>
17389 # This was T43545 in the PHP parser.
17390 # Note that tidy doesn't handle this correctly.
17394 <kbd>X<kbd>Y</kbd>Z</kbd>
17396 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17400 # The following cases were T53081 in the PHP parser.
17401 # Note that there are some other nestable tags (b, i, etc) which are
17402 # not covered; see T53081 for discussion.
17404 # Note that tidy doesn't handle this correctly.
17408 <em>X<em>Y</em>Z</em>
17410 <p><em>X<em>Y</em>Z</em>
17414 # Note that tidy doesn't handle this correctly.
17416 Nesting of <strong>
17418 <strong>X<strong>Y</strong>Z</strong>
17420 <p><strong>X<strong>Y</strong>Z</strong>
17429 <p><q>X<q>Y</q>Z</q></p>
17432 # Note that tidy doesn't handle this correctly.
17436 <ruby>X<ruby>Y</ruby>Z</ruby>
17438 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17442 # Note that tidy doesn't handle this correctly.
17446 <bdo>X<bdo>Y</bdo>Z</bdo>
17448 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17460 [[Media:Foobar.jpg]]
17461 [[Media:Video.ogv]]
17462 [[:Media:Video.ogv]]
17464 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17465 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17466 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17469 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17470 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17471 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv" data-parsoid='{"a":{"namespace":"Media"},"sa":{"namespace":":Media"}}'>Media:Video.ogv</a></p>
17475 Media link with text
17477 [[Media:Foobar.jpg|A neat file to look at]]
17479 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17482 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17485 # FIXME: this is still bad HTML tag nesting
17486 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17488 Media link with nasty text
17490 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17492 <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>
17495 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
17496 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
17498 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true}'>Safe Link</a></p><div style="display:none" data-parsoid='{"stx":"html"}'><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'>" onmouseover="alert(document.cookie)" onfoo="</a></div>
17503 Media link to nonexistent file (T3702)
17505 [[Media:No such.jpg]]
17506 [[Media:No_such file.jpg]]
17508 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17509 <a href="/index.php?title=Special:Upload&wpDestFile=No_such_file.jpg" class="new" title="No such file.jpg">Media:No_such file.jpg</a>
17512 <p><a rel="mw:MediaLink" href="./Special:FilePath/No_such.jpg" title="No such.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"fileName":"No_such.jpg"},"sa":{"fileName":"No such.jpg"}}'>Media:No such.jpg</a>
17513 <a rel="mw:MediaLink" href="./Special:FilePath/No_such_file.jpg" title="No such file.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"fileName":"No_such_file.jpg"},"sa":{"fileName":"No_such file.jpg"}}'>Media:No_such file.jpg</a></p>
17517 Image link to nonexistent file (T3850 - good)
17519 [[File:No_such.jpg]]
17521 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17524 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:No_such.jpg"><img resource="./File:No_such.jpg" src="./Special:FilePath/No_such.jpg" height="220" width="220"/></a></span></p>
17528 :Image link to nonexistent file (T3850 - bad)
17530 [[:Image:No such.jpg]]
17532 <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>
17535 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17539 Character reference normalization in link text (T3938)
17541 [[Main Page|this&that]]
17543 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17550 Test for unicode normalization
17552 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17556 (T21451) Links should refer to the normalized form.
17564 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17565 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17566 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17567 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17568 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17573 Empty attribute crash test (T4067)
17575 <font color="">foo</font>
17577 <p><font color="">foo</font>
17582 Empty attribute crash test single-quotes (T4067)
17584 <font color=''>foo</font>
17586 <p><font color="">foo</font>
17591 Attribute test: equals, then nothing
17593 parsoid=wt2html,html2html
17595 <font color=>foo</font>
17597 <p><font color="">foo</font>
17600 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17604 Attribute test: unquoted value
17606 parsoid=wt2html,html2html
17608 <font color=x>foo</font>
17610 <p><font color="x">foo</font>
17613 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17617 Attribute test: unquoted but illegal value (hash)
17619 <font color=#x>foo</font>
17621 <p><font color="#x">foo</font>
17625 # Parsoid does not serialize to empty attribute syntax,
17626 # so wt2wt and html2wt cases are skipped
17628 Attribute test: no value (T54330)
17630 parsoid=wt2html,html2html
17632 <font color>foo</font>
17634 <p><font color="">foo</font>
17637 <p><font color="">foo</font></p>
17641 T4095: link with three closing brackets
17645 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17648 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17652 T4095: link with pipe and three closing brackets
17654 [[Main Page|link]]]
17656 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17659 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17663 T4095: link with pipe and three closing brackets, version 2
17665 [[Main Page|[http://example.com/]]]
17667 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17670 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17679 Template:Dangerous attribute
17681 " onmouseover="alert(document.cookie)
17685 Template:Dangerous style attribute
17687 border-size: expression(alert(document.cookie))
17693 <div style="float: right; {{{1}}}">Magic div</div>
17697 T4304: HTML attribute safety (safe template; regression T4309)
17699 <div title="{{test}}"></div>
17701 <div title="This is a test template"></div>
17704 <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>
17707 # Parsoid has enough context to handle this case
17709 T4304: HTML attribute safety (dangerous template; 2309)
17711 <div title="{{dangerous attribute}}"></div>
17713 <div title=""></div>
17716 <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>
17720 T4304: HTML attribute safety (dangerous style template; 2309)
17722 <div style="{{dangerous style attribute}}"></div>
17724 <div style="/* insecure input */"></div>
17727 <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>
17731 T4304: HTML attribute safety (safe parameter; 2309)
17733 {{div style|width: 200px}}
17735 <div style="float: right; width: 200px">Magic div</div>
17738 <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>
17742 T4304: HTML attribute safety (unsafe parameter; 2309)
17744 {{div style|width: expression(alert(document.cookie))}}
17746 <div style="/* insecure input */">Magic div</div>
17749 <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>
17752 ## Parsoid output here differs; needs investigation.
17754 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17756 {{div style|"><script>alert(document.cookie)</script>}}
17758 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17762 ## Parsoid output here differs; needs investigation.
17764 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17766 {{div style|" ><script>alert(document.cookie)</script>}}
17768 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17773 T4304: HTML attribute safety (link)
17775 <div title="[[Main Page]]"></div>
17777 <div title="[[Main Page]]"></div>
17782 T4304: HTML attribute safety (italics)
17784 <div title="''foobar''"></div>
17786 <div title="''foobar''"></div>
17791 T4304: HTML attribute safety (bold)
17793 <div title="'''foobar'''"></div>
17795 <div title="'''foobar'''"></div>
17800 T4304: HTML attribute safety (ISBN)
17802 <div title="ISBN 1234567890"></div>
17804 <div title="ISBN 1234567890"></div>
17809 T4304: HTML attribute safety (RFC)
17811 <div title="RFC 1234"></div>
17813 <div title="RFC 1234"></div>
17818 T4304: HTML attribute safety (PMID)
17820 <div title="PMID 1234567890"></div>
17822 <div title="PMID 1234567890"></div>
17827 T4304: HTML attribute safety (web link)
17829 <div title="http://example.com/"></div>
17831 <div title="http://example.com/"></div>
17836 T4304: HTML attribute safety (named web link)
17838 <div title="[http://example.com/ link]"></div>
17840 <div title="[http://example.com/ link]"></div>
17845 T5244: HTML attribute safety (extension; safe)
17847 <div style="<nowiki>background:blue</nowiki>"></div>
17849 <div style="background:blue"></div>
17852 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17856 T5244: HTML attribute safety (extension; unsafe)
17858 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17860 <div style="/* insecure input */"></div>
17863 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17866 # More MSIE fun discovered by Tom Gilder
17869 MSIE CSS safety test: spurious slash
17871 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17873 <div style="/* insecure input */">evil</div>
17876 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
17880 MSIE CSS safety test: hex code
17882 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
17884 <div style="/* insecure input */">evil</div>
17887 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
17891 MSIE CSS safety test: comment in url
17893 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
17895 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
17898 <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>
17902 MSIE CSS safety test: comment in expression
17904 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
17906 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
17909 <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>
17913 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
17915 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
17917 <p style="/* invalid control char */">A</p>
17920 <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>
17924 MSIE 6 CSS safety test: Fullwidth (T57332)
17926 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
17927 <div style="top:EXPRESSION(alert())">B</div>
17929 <p style="/* insecure input */">A</p>
17930 <div style="/* insecure input */">B</div>
17933 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
17934 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
17938 MSIE 6 CSS safety test: IPA extensions (T57332)
17940 <div style="background-image:uʀʟ(javascript:alert())">A</div>
17941 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
17943 <div style="/* insecure input */">A</div>
17944 <p style="/* insecure input */">B</p>
17947 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
17948 <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>
17952 MSIE 6 CSS safety test: sup/sub script (T57332)
17954 <div style="background-image:url⁽javascript:alert())">A</div>
17955 <div style="background-image:url₍javascript:alert())">B</div>
17956 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
17958 <div style="/* insecure input */">A</div>
17959 <div style="/* insecure input */">B</div>
17960 <p style="/* insecure input */">C</p>
17963 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
17964 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
17965 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
17971 parsoid=wt2html,html2html
17974 title="data:text/html,<img src=1 onerror=alert(1)>"
17975 style="-o-link:attr(title);-o-link-source:current">X</div>
17977 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
17980 <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>
17984 MSIE 6 CSS safety test: Repetition markers (T57332)
17986 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
17987 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
17988 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
17989 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
17990 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
17991 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
17992 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
17994 <p style="/* insecure input */">A</p>
17995 <p style="/* insecure input */">B</p>
17996 <p style="/* insecure input */">C</p>
17997 <p style="/* insecure input */">D</p>
17998 <p style="/* insecure input */">E</p>
17999 <p style="/* insecure input */">F</p>
18000 <p style="/* insecure input */">G</p>
18003 <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>
18004 <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>
18005 <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>
18006 <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>
18007 <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>
18008 <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>
18009 <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>
18013 Table attribute legitimate extension
18016 !+ style="<nowiki>color:blue</nowiki>"| status
18021 <th style="color:blue"> status
18027 Table attribute safety
18030 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
18035 <th style="/* insecure input */"> status
18041 CSS line continuation 1
18043 <div style="background-image: u\ rl(test.jpg);"></div>
18045 <div style="/* insecure input */"></div>
18050 CSS line continuation 2
18052 <div style="background-image: u\ rl(test.jpg); "></div>
18054 <div style="/* invalid control char */"></div>
18065 Expansion of multi-line templates in attribute values (T8255)
18067 <div style="background: {{identity|#00FF00}}">-</div>
18069 <div style="background: #00FF00">-</div>
18074 Expansion of multi-line templates in attribute values (T8255 sanity check)
18076 <div style="background:
18079 <div style="background: #00FF00">-</div>
18082 <div style="background:
18087 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18089 <div style="background: #00FF00">-</div>
18091 <div style="background: #00FF00">-</div>
18096 Tags which are hidden from Tidy cannot pass through the Sanitizer
18098 <mw:toc><script>alert();</script></mw:toc>
18100 <p><mw:toc><script>alert();</script></mw:toc></p>
18104 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18108 Parser hook: empty input
18119 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18122 ## Don't expect parsoid to rt this form.
18124 Parser hook: empty input using terminated empty elements
18126 parsoid=wt2html,html2html
18137 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18141 Parser hook: empty input using terminated empty elements (space before)
18152 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18156 Parser hook: basic input
18167 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18170 ## Don't expect parsoid to rt this form.
18172 Parser hook: case insensitive
18174 parsoid=wt2html,html2html
18185 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18188 ## Don't expect parsoid to rt this form.
18190 Parser hook: case insensitive, redux
18192 parsoid=wt2html,html2html
18203 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18207 Parser hook: nested tags
18209 <tag><tag></tag></tag>
18218 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18222 Parser hook: basic arguments
18224 <tag width="200" height="100" depth="50" square=""></tag>
18237 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18240 ## Don't expect parsoid to rt this form.
18242 Parser hook: basic arguments, variations
18244 parsoid=wt2html,html2html
18246 <tag width=200 height = "100" depth = '50' square></tag>
18259 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18263 Parser hook: argument containing a forward slash (T7344)
18265 <tag filename="/tmp/bla"></tag>
18270 'filename' => '/tmp/bla',
18275 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18278 ## Don't expect parsoid to rt this form.
18280 Parser hook: empty input using terminated empty elements (T4374)
18282 parsoid=wt2html,html2html
18294 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18297 ## </tag> should be output literally since there is no matching tag that begins it
18298 ## Don't expect parsoid to rt this form.
18300 Parser hook: basic arguments using terminated empty elements (T4374)
18304 <tag width=200 height = "100" depth = '50' square/>
18321 <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
18325 ## Don't expect parsoid to rt this form.
18327 Parser hook: Don't allow unclosed extension tags
18333 this is a '''test'''
18335 <p>test <tag>123
18336 </p><p>this is a <b>test</b>
18339 <p>test <tag>123</p>
18341 <p>this is a <b>test</b></p>
18345 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18349 Parser hook: static parser hook not inside a comment
18351 <statictag>hello, world</statictag>
18353 <statictag action="flush" />
18359 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18360 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18364 Parser hook: static parser hook inside a comment
18366 <!-- <statictag>hello, world</statictag> -->
18367 <statictag action="flush" />
18372 <!-- <statictag>hello, world</statictag> -->
18373 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18376 # Nested template calls; this case was broken by Parser.php rev 1.506,
18380 Template:One-parameter
18382 (My parameter is: {{{1}}})
18386 Template:Map-one-parameter
18388 {{{{{1}}}|{{{2}}}}}
18392 Nested template calls
18394 {{Map-one-parameter|One-parameter|param}}
18396 <p>(My parameter is: param)
18405 # HTML+Tidy strips out empty tags completely. Parsoid doesn't.
18406 # FIXME: Wikitext for this first test doesn't match its title.
18408 Sanitizer: Closing of open tags
18410 <s></s><table></table>
18414 <s></s><table></table>
18418 Sanitizer: Closing of open but not closed tags
18427 Sanitizer: Closing of closed but not open tags
18437 Sanitizer: Closing of closed but not open table tags
18441 Table not started</td></tr></table>
18443 <p>Table not started</p>
18445 <p>Table not started</p>
18449 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18451 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18453 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18456 <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>
18459 # In HTML5, the restrictions are that id must contain at least one character,
18460 # and must not contain any space characters.
18462 Sanitizer: Validating the contents of the id attribute (T6515)
18466 <br id="" /><br id="a space" />
18471 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18473 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18477 <br id="foo" /><br id="foo" />
18479 Something need to be done. foo-2 ?
18483 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18486 <meta itemprop="hello" content="world">
18487 <meta http-equiv="refresh" content="5">
18488 <meta itemprop="hello" http-equiv="refresh" content="5">
18489 <link itemprop="hello" href="{{SERVER}}">
18490 <link rel="stylesheet" href="{{SERVER}}">
18491 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18495 <p> <meta itemprop="hello" content="world" />
18496 <meta http-equiv="refresh" content="5">
18497 <meta itemprop="hello" content="5" />
18498 <link itemprop="hello" href="http://example.org" />
18499 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18500 <link itemprop="hello" href="http://example.org" />
18507 Sanitizer: Strip comments from CSS attributes
18509 parsoid=wt2html,wt2wt
18511 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18513 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18516 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18520 Language converter: output gets cut off unexpectedly (T7757)
18524 this bit is safe: }-
18526 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18528 then we get cut off here: }-
18530 all additional text is vanished
18532 <p>this bit is safe: }-
18533 </p><p>but if we add a conversion instance: xxx
18534 </p><p>then we get cut off here: }-
18535 </p><p>all additional text is vanished
18538 <p>this bit is safe: }-</p>
18539 <p>but if we add a conversion instance: <span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"xxx"},{"l":"zh-tw","t":"yyy"}]}'></span></p>
18540 <p>then we get cut off here: }-</p>
18541 <p>all additional text is vanished</p>
18545 Language converter glossary rules inside attributes (T119158)
18547 language=sr variant=sr-el
18549 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18551 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18554 </p><p><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="" onload="alert(1)" data-foo="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
18557 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18559 <p><span class="mw-default-size" typeof="mw:Image"><a href="./Датотека:Foobar.jpg"><img alt="foAjrjvi" resource="./Датотека:Foobar.jpg" 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":"foAjrjvi","resource":"./Датотека:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=-{}-foAjrjvi-{}-","resource":"File:Foobar.jpg"}}'/></a></span></p>
18563 Self closed html pairs (T7487)
18565 <center><font id="bug" />Centered text</center>
18566 <div><font id="bug2" />In div text</div>
18568 <center><font id="bug"></font>Centered text</center>
18569 <div><font id="bug2"></font>In div text</div>
18577 Punctuation: nbsp before exclamation
18581 <p>C'est grave !
18586 Punctuation: CSS !important (T13874)
18588 <div style="width:50% !important">important</div>
18590 <div style="width:50% !important">important</div>
18595 Punctuation: CSS ! important (T13874; with space after)
18597 <div style="width:50% ! important">important</div>
18599 <div style="width:50% ! important">important</div>
18604 HTML bullet list, closed tags (T7497)
18617 <ul data-parsoid='{"stx":"html"}'>
18618 <li data-parsoid='{"stx":"html"}'>One</li>
18619 <li data-parsoid='{"stx":"html"}'>Two</li>
18625 HTML bullet list, unclosed tags (T7497)
18637 <ul data-parsoid='{"stx":"html"}'>
18638 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18639 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18645 HTML ordered list, closed tags (T7497)
18658 <ol data-parsoid='{"stx":"html"}'>
18659 <li data-parsoid='{"stx":"html"}'>One</li>
18660 <li data-parsoid='{"stx":"html"}'>Two</li>
18666 HTML ordered list, unclosed tags (T7497)
18679 <ol data-parsoid='{"stx":"html"}'>
18680 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18681 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18687 HTML nested bullet list, closed tags (T7497)
18710 <ul data-parsoid='{"stx":"html"}'>
18711 <li data-parsoid='{"stx":"html"}'>One</li>
18712 <li data-parsoid='{"stx":"html"}'>Two:
18713 <ul data-parsoid='{"stx":"html"}'>
18714 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18715 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18722 HTML nested bullet list, open tags (T7497)
18759 HTML nested ordered list, closed tags (T7497)
18784 HTML nested ordered list, open tags (T7497)
18821 HTML ordered list item with parameters oddity
18823 <ol><li id="fragment">One</li>
18826 <ol><li id="fragment">One</li>
18831 # parsoid doesn't explicitly mark autonumbered links, see T55505
18833 T7918: autonumbering
18835 [http://first/] [http://second] [ftp://ftp]
18839 [mailto:enclosed@mail.tld With target]
18841 [mailto:enclosed@mail.tld]
18843 mailto:inline@mail.tld
18845 <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>
18846 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
18847 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
18848 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
18849 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
18852 <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>
18853 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
18854 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
18855 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
18856 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
18861 # Security and HTML correctness
18862 # From Nick Jenkins' fuzz testing
18866 Fuzz testing: Parser13
18881 Fuzz testing: Parser14
18886 <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>
18887 http://<div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
18889 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18895 <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>
18897 <div id="toc" class="toc">
18898 <div class="toctitle">
18902 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18909 Fuzz testing: Parser14-table
18911 parsoid=wt2html,html2html
18916 <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>
18917 <table style="__TOC__">
18922 <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>
18923 <table style="__TOC__">
18930 <table style="__TOC__"></table>
18933 # Known to produce bogus xml (extra </td>)
18935 Fuzz testing: Parser16
18962 Fuzz testing: Parser21
18965 ! irc://{{ftp://a" onmouseover="alert('hello world');"
18970 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
18980 Fuzz testing: Parser22
18982 http://===r:::https://b
18986 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
18994 # Known to produce bad XML for now
18996 Fuzz testing: Parser24
19003 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19004 <br style="onmouseover='alert(document.cookie);' " />
19006 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19011 <u class="|">}}}} >
19012 <br style="onmouseover='alert(document.cookie);'" />
19014 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19022 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19023 <u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true}'><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>}}}} >
19024 <br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/></u></p><p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true,"autoInsertedStart":true}'>MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p><table data-parsoid='{"autoInsertedEnd":true}'>
19028 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19031 # Note: the current result listed for this is not what the original one was,
19032 # but the original bug was JavaScript injection, which is fixed in any case.
19033 # It's not clear that the original result listed was any more correct than the
19034 # current one. Original result:
19037 # <li class="||">
19038 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19040 Fuzz testing: Parser25 (T8055)
19046 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19048 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19051 <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"]}'>
19052 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19056 Fuzz testing: URL adjacent extension (with space, clean)
19058 http://example.com <nowiki>junk</nowiki>
19060 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19063 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
19067 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19069 http://example.com<nowiki>junk</nowiki>
19071 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19074 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
19078 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19080 http://example.com<pre>junk</pre>
19082 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19085 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
19090 <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>
19094 Fuzz testing: image with bogus manual thumbnail
19096 [[Image:foobar.jpg|thumbnail= ]]
19098 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19101 <figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' data-mw='{"errors":[{"key":"apierror-invalidtitle","message":"Invalid thumbnail title.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"Image:foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/Foobar.jpg" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
19105 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19107 <pre dir=" "></pre>
19109 <pre dir=" "></pre>
19112 <pre typeof="mw:Extension/pre" about="#mwt2" dir="&#10;" data-mw='{"name":"pre","attrs":{"dir":"&#10;"},"body":{"extsrc":""}}'></pre>
19116 Parsing optional HTML elements (T8171)
19121 <td> Some tabular data</td>
19122 <td> More tabular data ...
19123 <td> And yet som tabular data</td>
19129 <td> Some tabular data</td>
19130 <td> More tabular data ...
19131 </td><td> And yet som tabular data</td>
19138 Correct handling of <td>, <tr> (T8171)
19143 <td> Some tabular data</td>
19144 <td> More tabular data ...</td>
19145 <td> And yet som tabular data</td>
19151 <td> Some tabular data</td>
19152 <td> More tabular data ...</td>
19153 <td> And yet som tabular data</td>
19161 Parsing crashing regression (fr:JavaScript)
19165 <p></body></x>
19170 Inline wiki vs wiki block nesting
19176 <p><b>Bold paragraph</b>
19177 </p><p>New wiki paragraph
19181 # FIXME: The current php output is documented
19182 # and desired output is the parsoid target.
19184 Inline HTML vs wiki block nesting
19190 <p><b>Bold paragraph
19191 </p><p>New wiki paragraph</b>
19194 <p><b>Bold paragraph</b>
19195 </p><p>New wiki paragraph
19199 # Original result was this:
19200 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19202 # While that might be marginally more intuitive, maybe, the six-apostrophe
19203 # construct is clearly pathological and the result stated here (which is what
19204 # the parser actually does) is about as reasonable as anything.
19206 Mixing markup for italics and bold
19209 '''bold''''''bold''bolditalics'''''
19211 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19219 Article for special page transclusion test
19223 Special page transclusion
19226 {{Special:Prefixindex/Xyzzyx}}
19228 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19234 Special page transclusion twice (T7021)
19237 {{Special:Prefixindex/Xyzzyx}}
19238 {{Special:Prefixindex/Xyzzyx}}
19240 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19242 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19248 Transclusion of default MediaWiki message
19250 {{MediaWiki:Mainpage}}
19257 Transclusion of nonexistent MediaWiki message
19259 {{MediaWiki:Mainpagexxx}}
19261 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19266 Transclusion of MediaWiki message with underscore
19268 {{MediaWiki:history_short}}
19275 Transclusion of MediaWiki message with space
19277 {{MediaWiki:history short}}
19284 Invalid header with following text
19294 Section extraction test (section 0)
19314 Section extraction test (section 1)
19336 Section extraction test (section 2)
19357 Section extraction test (section 3)
19377 Section extraction test (section 4)
19401 Section extraction test (section 5)
19421 Section extraction test (section 6)
19442 Section extraction test (section 7)
19462 Section extraction test (section 8)
19482 Section extraction test (section 9)
19503 Section extraction test (section 10)
19523 Section extraction test (nonexistent section 11)
19542 Section extraction test with bogus heading (section 1)
19547 ==bogus== not a legal section
19551 ==bogus== not a legal section
19555 Section extraction test with bogus heading (section 2)
19560 ==bogus== not a legal section
19567 Section extraction test with comment after heading (section 1)
19579 Section extraction test with comment after heading (section 2)
19591 Section extraction test with bogus <nowiki> heading (section 1)
19596 ==bogus== <nowiki>not a legal section</nowiki>
19600 ==bogus== <nowiki>not a legal section</nowiki>
19604 Section extraction test with bogus <nowiki> heading (section 2)
19609 ==bogus== <nowiki>not a legal section</nowiki>
19615 # Formerly testing for T4587, now resolved by the use of unmarked sections
19616 # instead of respecting commented sections
19618 Section extraction prefixed by comment (section 1)
19629 Section extraction prefixed by comment (section 2)
19639 # Formerly testing for T4607, now resolved by the use of unmarked sections
19640 # instead of respecting HTML-style headings
19642 Section extraction, mixed wiki and html (section 1)
19658 Section extraction, mixed wiki and html (section 2)
19674 # Formerly testing for T5342
19676 Section extraction, heading surrounded by <noinclude>
19680 <noinclude>==unmarked==</noinclude>
19686 # Test behavior of T21910
19688 Sectiion with all-equals
19693 The line above must have a trailing space
19696 But just in case it doesn't...
19700 But just in case it doesn't...
19704 Section replacement test (section 0)
19735 Section replacement test (section 1)
19764 Section replacement test (section 2)
19794 Section replacement test (section 3)
19825 Section replacement test (section 4)
19852 Section replacement test (section 5)
19883 Section replacement test (section 6)
19913 Section replacement test (section 7)
19944 Section replacement test (section 8)
19975 Section replacement test (section 9)
20004 Section replacement test (section 10)
20034 Section replacement test with initial whitespace (T15728)
20038 Preformatted initial line
20042 Preformatted initial line
20049 Section extraction, heading followed by pre with 20 spaces (T8398)
20061 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20074 Section extraction, <pre> around bogus header (T12309)
20091 Section replacement, <pre> around bogus header (T12309)
20112 Handling of 
 in URLs
20116 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
20119 <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>
20123 Handling of %0A in URLs
20127 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
20130 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
20133 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20135 5 quotes, code coverage +1 line
20145 # same html as previous, but wikitext adjusted to match parsoid html2wt
20146 # note that wt2html and html2html will put the <i> before the <b>
20148 5 quotes, code coverage +1 line w/ nowiki (1)
20150 parsoid=wt2wt,html2wt
20152 '''''<nowiki/>'''''
20157 <p><b><i></i></b></p>
20160 # same as previous, just swapping the <i> and <b>
20162 5 quotes, code coverage +1 line w/ nowiki (2)
20164 '''''<nowiki/>'''''
20169 <p><i><b></b></i></p>
20173 Special:Search page linking.
20177 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20182 {{!}} is a magic word
20184 {{!}} is a magic word there and {{!}} is still a magic word here
20185 | is not a magic word here but {{!}} is still a magic word here
20187 <p>| is a magic word there and | is still a magic word here
20188 | is not a magic word here but | is still a magic word here
20191 <p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
20192 | is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
20198 title=[[Parser test]]
20203 * {{FULLPAGENAMEE}}
20205 * {{BASEPAGENAMEE}}
20209 * {{ROOTPAGENAMEE}}
20211 * {{TALKPAGENAMEE}}
20212 * {{SUBJECTPAGENAME}}
20213 * {{SUBJECTPAGENAMEE}}
20216 * {{NAMESPACENUMBER}}
20220 * {{SUBJECTSPACEE}}
20221 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20223 <ul><li> Parser test</li>
20224 <li> Parser_test</li>
20225 <li> Parser test</li>
20226 <li> Parser_test</li>
20227 <li> Parser test</li>
20228 <li> Parser_test</li>
20229 <li> Parser test</li>
20230 <li> Parser_test</li>
20231 <li> Parser test</li>
20232 <li> Parser_test</li>
20233 <li> Talk:Parser test</li>
20234 <li> Talk:Parser_test</li>
20235 <li> Parser test</li>
20236 <li> Parser_test</li>
20244 <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>
20247 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20250 Gallery with valid attributes
20252 <gallery type="123" summary="345">
20253 File:File:Foobar.jpg
20256 <ul class="gallery mw-gallery-traditional" type="123">
20257 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20258 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20259 <div class="gallerytext">
20265 <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"}}'>
20266 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Error mw:Image"><a href="./File:File:Foobar.jpg"><img resource="./File:File:Foobar.jpg" src="./Special:FilePath/File:Foobar.jpg" height="120" width="120"/></a></span></div><div class="gallerytext"></div></li>
20270 ## Parsoid thinks the "centre" here is a property, not a caption.
20275 "modes": ["wt2html"],
20276 "nativeGallery": true
20284 image4 |300px| centre
20285 image5.svg| http://///////
20290 <ul class="gallery mw-gallery-traditional">
20291 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20292 <div class="thumb" style="height: 150px;">Image1.png</div>
20293 <div class="gallerytext">
20296 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20297 <div class="thumb" style="height: 150px;">Image2.gif</div>
20298 <div class="gallerytext">
20301 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20302 <div class="thumb" style="height: 150px;">Image3</div>
20303 <div class="gallerytext">
20306 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20307 <div class="thumb" style="height: 150px;">Image4</div>
20308 <div class="gallerytext">
20313 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20314 <div class="thumb" style="height: 150px;">Image5.svg</div>
20315 <div class="gallerytext">
20316 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20320 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20321 <div class="thumb" style="height: 150px;">* image6</div>
20322 <div class="gallerytext">
20328 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20329 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Error mw:Image"><a href="./File:Image1.png"><img resource="./File:Image1.png" src="./Special:FilePath/Image1.png" height="120" width="120"/></a></span></div><div class="gallerytext"></div></li>
20330 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Error mw:Image"><a href="./File:Image2.gif"><img resource="./File:Image2.gif" src="./Special:FilePath/Image2.gif" height="120" width="120"/></a></span></div><div class="gallerytext"></div></li>
20331 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Error mw:Image"><a href="./File:Image3"><img resource="./File:Image3" src="./Special:FilePath/Image3" height="120" width="120"/></a></span></div><div class="gallerytext"></div></li>
20332 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Error mw:Image"><a href="./File:Image4"><img resource="./File:Image4" src="./Special:FilePath/Image4" height="300" width="300"/></a></span></div><div class="gallerytext"></div></li>
20333 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Error mw:Image"><a href="./File:Image5.svg"><img resource="./File:Image5.svg" src="./Special:FilePath/Image5.svg" height="120" width="120"/></a></span></div><div class="gallerytext"> <a rel="mw:ExtLink" href="http://///////">http://///////</a></div></li>
20334 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Error mw:Image"><a href="./File:*_image6"><img resource="./File:*_image6" src="./Special:FilePath/*_image6" height="120" width="120"/></a></span></div><div class="gallerytext"></div></li>
20339 Gallery (with options, html)
20342 "modes": ["wt2html", "html2html"],
20343 "nativeGallery": true
20346 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20347 File:Nonexistent.jpg|caption
20348 File:Nonexistent.jpg
20349 image:foobar.jpg|some '''caption''' [[Main Page]]
20351 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20354 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20355 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20356 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20357 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20358 <div class="gallerytext">
20363 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20364 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20365 <div class="gallerytext">
20368 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20369 <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>
20370 <div class="gallerytext">
20371 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20375 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20376 <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>
20377 <div class="gallerytext">
20380 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20381 <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>
20382 <div class="gallerytext">
20390 <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":{}}'>
20391 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20392 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></span></div><div class="gallerytext">caption</div></li>
20393 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></span></div><div class="gallerytext"></div></li>
20394 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span typeof="mw:Image"><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>
20395 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span typeof="mw:Image"><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>
20396 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span typeof="mw:Image"><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>
20401 Gallery (with options, extsrc)
20404 "nativeGallery": false
20407 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20408 File:Nonexistent.jpg|caption
20409 File:Nonexistent.jpg
20410 image:foobar.jpg|some '''caption''' [[Main Page]]
20412 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20415 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20416 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20417 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20418 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20419 <div class="gallerytext">
20424 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20425 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20426 <div class="gallerytext">
20429 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20430 <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>
20431 <div class="gallerytext">
20432 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20436 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20437 <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>
20438 <div class="gallerytext">
20441 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20442 <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>
20443 <div class="gallerytext">
20451 <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","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"}}'>
20452 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20453 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></span></div><div class="gallerytext">caption</div></li>
20454 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></span></div><div class="gallerytext"></div></li>
20455 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span typeof="mw:Image"><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>
20456 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span typeof="mw:Image"><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>
20457 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><span typeof="mw:Image"><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>
20462 Gallery with link that has fragment
20465 "modes": ["wt2html", "html2html"],
20466 "nativeGallery": true
20470 image:foobar.jpg|link=Main_Page
20471 image:foobar.jpg|link=Main_Page#section
20472 image:foobar.jpg|link=Main Page#section|caption
20475 <ul class="gallery mw-gallery-traditional">
20476 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20477 <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>
20478 <div class="gallerytext">
20481 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20482 <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>
20483 <div class="gallerytext">
20486 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20487 <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>
20488 <div class="gallerytext">
20496 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20497 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Image"><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>
20498 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Image"><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>
20499 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Image"><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>
20503 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20505 Gallery with template inside caption
20508 "nativeGallery": true
20511 <gallery caption="{{echo|hi}}">
20512 File:Foobar.jpg|{{echo|ho}}
20515 <ul class="gallery mw-gallery-traditional">
20516 <li class='gallerycaption'>{{echo|hi}}</li>
20517 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20518 <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>
20519 <div class="gallerytext">
20527 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20528 <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>
20529 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 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"><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>
20534 Gallery with wikitext inside caption
20537 "nativeGallery": true
20541 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20542 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20545 <ul class="gallery mw-gallery-traditional">
20546 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20547 <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>
20548 <div class="gallerytext">
20549 <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>
20553 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20554 <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>
20555 <div class="gallerytext">
20556 <p>This is a test template
20563 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20564 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Image"><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>
20565 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Image"><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>
20570 Gallery (with showfilename option)
20573 "nativeGallery": true
20576 <gallery showfilename="">
20577 File:Nonexistent.jpg|caption
20578 File:Nonexistent.jpg
20579 File:Foobar.jpg|some '''caption''' [[Main Page]]
20583 <ul class="gallery mw-gallery-traditional">
20584 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20585 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20586 <div class="gallerytext">
20587 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20592 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20593 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20594 <div class="gallerytext">
20595 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20599 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20600 <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>
20601 <div class="gallerytext">
20602 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20603 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20607 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20608 <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>
20609 <div class="gallerytext">
20610 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20617 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20618 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></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>
20619 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></span></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a></div></li>
20620 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 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"><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>
20621 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 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"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a></div></li>
20625 ## Should Parsoid be preserving these variations? See T151367
20627 Gallery (with namespace-less filenames)
20630 "modes": ["wt2html", "html2html"],
20631 "nativeGallery": true
20635 File:Nonexistent.jpg
20641 <ul class="gallery mw-gallery-traditional">
20642 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20643 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20644 <div class="gallerytext">
20647 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20648 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20649 <div class="gallerytext">
20652 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20653 <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>
20654 <div class="gallerytext">
20657 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20658 <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>
20659 <div class="gallerytext">
20665 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20666 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></span></div><div class="gallerytext"></div></li>
20667 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></span></div><div class="gallerytext"></div></li>
20668 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 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>
20669 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 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>
20674 Gallery override link with WikiLink (T36852)
20677 "nativeGallery": true
20681 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
20684 <ul class="gallery mw-gallery-traditional">
20685 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20686 <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>
20687 <div class="gallerytext">
20693 <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":{}}'>
20694 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Image"><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>
20699 Gallery override link with absolute external link (T36852)
20702 "nativeGallery": true
20706 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20709 <ul class="gallery mw-gallery-traditional">
20710 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20711 <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>
20712 <div class="gallerytext">
20718 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20719 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Image"><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>
20724 Gallery override link with absolute external link with LanguageConverter
20729 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20732 <ul class="gallery mw-gallery-traditional">
20733 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20734 <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>
20735 <div class="gallerytext">
20745 Gallery override link with malicious javascript (T36852)
20748 "modes": ["wt2html", "html2html"],
20749 "nativeGallery": true
20753 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20756 <ul class="gallery mw-gallery-traditional">
20757 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20758 <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>
20759 <div class="gallerytext">
20765 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20766 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:Image"><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>
20770 # Note that parsoid uses the invalid link as a caption, PHP does not.
20772 Gallery with invalid title as link (T45964)
20775 "modes": ["wt2html", "html2html"],
20776 "nativeGallery": true
20780 File:Foobar.jpg|link=<
20783 <ul class="gallery mw-gallery-traditional">
20784 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20785 <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>
20786 <div class="gallerytext">
20792 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20793 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 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">link=<</div></li>
20798 Serialize gallery without attrs in data-mw
20801 "modes": ["html2wt"],
20802 "nativeGallery": true
20805 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
20806 <li class="gallerycaption">123</li>
20807 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span>File:Test.png</span></div><div class="gallerytext"></div></li>
20810 <gallery caption="123">
20816 Gallery with class and style attributes
20819 "nativeGallery": true
20822 <gallery class="center" style="text-align: center;">
20826 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
20827 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20828 <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>
20829 <div class="gallerytext">
20835 <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":{}}'>
20836 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 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>
20841 Gallery in slideshow mode
20844 "nativeGallery": true
20847 <gallery mode="slideshow" showthumbnails="">
20851 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
20852 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20853 <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>
20854 <div class="gallerytext">
20860 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
20861 <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>
20866 HTML Hex character encoding (spells the word "JavaScript")
20868 parsoid=wt2html,wt2wt,html2html
20870 JavaScript
20872 <p>JavaScript
20877 <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>
20881 HTML Hex character encoding bogus encoding (T28437 regression check)
20885 <p>&#xsee;&#XSEE;
20888 <p>&#xsee;&#XSEE;</p>
20892 HTML Hex character encoding mixed case
20894 parsoid=wt2html,wt2wt,html2html
20903 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
20906 # See: https://www.w3.org/TR/html5/syntax.html#character-references
20907 # Note that U+000C (form feed) is not a valid XML character, so
20908 # it is banned even though allowed in HTML5.
20910 Illegal character references (T106578)
20915 ; Control (low): 
20916 ; Control (high):  Ÿ
20917 ; Surrogate: ��
20918 ; This is an okay astral character: 💩
20927 <dt>Control (low)</dt>
20929 <dt>Control (high)</dt>
20930 <dd>&#x7F; &#x9F;</dd>
20932 <dd>&#xD83D;&#xDCA9;</dd>
20933 <dt>This is an okay astral character</dt>
20939 __FORCETOC__ override
20951 ISBN 978-0-1234-56 789
20953 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
20956 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
20958 <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>
20962 ISBN followed by 5 spaces
20973 ISBN ISBN 1234567890
20975 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20978 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
20981 # Uppercase X and lowercase x as well
20992 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
20993 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
20994 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
20995 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
20996 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
20997 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21000 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21001 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21002 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21003 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21004 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21005 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21009 ISBN with empty prefix (parsoid test)
21013 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21016 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21020 T24905: <abbr> followed by ISBN followed by </a>
21022 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21024 <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>
21027 <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>
21035 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21040 Double RFC with a wiki link
21044 <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>
21053 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21056 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
21060 Centre-aligned image
21062 [[Image:foobar.jpg|centre]]
21064 <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>
21071 [[Image:foobar.jpg|none]]
21073 <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>
21078 Width + Height sized image (using px) (height is ignored)
21080 [[Image:foobar.jpg|640x480px]]
21082 <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>
21087 Width-sized image (using px, no following whitespace)
21089 [[Image:foobar.jpg|640px]]
21091 <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>
21096 Width-sized image (using px, with following whitespace - test regression from r39467)
21098 [[Image:foobar.jpg|640px ]]
21100 <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>
21105 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21107 [[Image:foobar.jpg| 640px]]
21109 <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>
21114 Image with page parameter
21118 [[File:LoremIpsum.djvu|page=2]]
21120 <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>
21123 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"page","ak":"page=2"}]}' data-mw='{"page":"2"}'><a href="./File:LoremIpsum.djvu" data-parsoid='{"a":{"href":"./File:LoremIpsum.djvu"},"sa":{"href":"File:LoremIpsum.djvu"}}'><img resource="./File:LoremIpsum.djvu" src="//example.com/images/5/5f/LoremIpsum.djvu" data-file-width="2480" data-file-height="3508" data-file-type="bitmap" height="3508" width="2480" data-parsoid='{"a":{"resource":"./File:LoremIpsum.djvu","height":"3508","width":"2480"},"sa":{"resource":"File:LoremIpsum.djvu"}}'/></a></span></p>
21127 Another italics / bold test
21135 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21141 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21144 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21148 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21150 Images with the "|" character in the comment
21152 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21154 <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>
21157 <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>
21161 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21163 <html><script>alert(1);</script></html>
21165 <p><html><script>alert(1);</script></html>
21170 HTML with raw HTML ($wgRawHtml==true)
21174 <html><script>alert(1);</script></html>
21176 <p><script>alert(1);</script>
21181 Parents of subpages, one level up
21183 subpage title=[[Subpage test/L1/L2/L3]]
21187 <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>
21193 Parents of subpages, one level up, not named
21195 subpage title=[[Subpage test/L1/L2/L3]]
21199 <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>
21206 Parents of subpages, two levels up
21208 subpage title=[[Subpage test/L1/L2/L3]]
21214 <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
21215 </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>
21220 Parents of subpages, two levels up, without trailing slash or name.
21222 subpage title=[[Subpage test/L1/L2/L3]]
21231 Parents of subpages, two levels up, with lots of extra trailing slashes.
21233 subpage title=[[Subpage test/L1/L2/L3]]
21237 <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>
21242 Subpage test/L1/L2/L3Sibling
21248 Transclusion of a sibling page (one level up)
21250 subpage title=[[Subpage test/L1/L2/L3]]
21259 Transclusion of a child page
21261 subpage title=[[Subpage test/L1/L2]]
21269 # This is wt2html only in Parsoid because we add <nowiki>
21270 # because of {{..}} and we don't expect to fix that to
21271 # eliminate the nowikis selective for {{..}} markup.
21273 Non-transclusion because of too many up levels
21275 subpage title=[[Subpage test/L1/L2/L3]]
21278 {{../../../../More than parent}}
21280 <p>{{../../../../More than parent}}
21283 <p>{{../../../../More than parent}}</p>
21287 Definition list code coverage
21293 <dl><dt> title  </dt>
21295 <dt> title </dt>
21301 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21302 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21303 <dt>title</dt><dd> def</dd></dl>
21307 Don't fall for the self-closing div
21309 <div>hello world</div/>
21311 <div>hello world</div>
21320 <p>[[:Template:Msg]]
21329 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21333 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21335 Always escape literal '>' in output, not just after '<'
21349 <p>This is a test template
21350 This is a test template
21362 Inclusion of !userCanEdit() content
21366 <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>
21372 Out-of-order TOC heading levels
21381 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
21383 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21385 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21386 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21389 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21391 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21392 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21398 <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>
21399 <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>
21400 <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>
21401 <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>
21402 <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>
21403 <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>
21409 ISBN with a dummy number
21419 ISBN with space-delimited number
21423 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21426 <p data-parsoid='{"dsr":[0,18,0,0]}'><a href="./Special:BookSources/9290170328" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink","dsr":[0,18,2,2]}'>ISBN 92 9017 032 8</a></p>
21431 ISBN with multiple spaces, no number
21450 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21451 </p><p>ISBN 12345678901
21454 <p>ISBN 123456789</p>
21456 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21458 <p>ISBN 12345678901</p>
21463 ISBN with trailing year (T9110)
21465 ISBN 1-234-56789-0 - 2006
21467 ISBN 1 234 56789 0 - 2006
21469 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21470 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21473 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21475 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21482 {{anchorencode:foo bar©#%n}}
21484 <p>foo_bar.C2.A9.23.25n
21489 anchorencode trims spaces
21491 {{anchorencode: __pretty__please__}}
21498 anchorencode deals with links
21500 {{anchorencode: [[hello|world]] [[hi]]}}
21507 anchorencode deals with templates
21509 {{anchorencode: {{Foo}} }}
21516 anchorencode encodes like the TOC generator: (T20431)
21518 === _ +:.3A%3A&&]] ===
21519 {{anchorencode: _ +:.3A%3A&&]] }}
21522 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21523 <p>.2B:.3A.253A.26.26.5D.5D
21528 T8200: blockquotes and paragraph formatting
21549 T10293: Use of center tag ruins paragraph formatting
21570 Parsing of overlapping (improperly nested) inline html tags
21572 <span><s>x</span></s>
21574 <p><span><s>x</span></s></span>
21577 <p><span><s>x</s></span>
21582 ### Language variants related tests
21585 # Parsoid does not mark self-links.
21586 # Parsoid does not convert links; PHP will do any necessary redirects.
21589 Self-link in language variants
21591 title=[[Dunav]] language=sr
21593 Both [[Dunav]] and [[Дунав]] are names for this river.
21595 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21598 <p>Both <a rel="mw:WikiLink" href="./Dunav" title="Dunav">Dunav</a> and <a rel="mw:WikiLink" href="./Дунав" title="Дунав">Дунав</a> are names for this river.</p>
21608 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21610 title=[[Duna]] language=sr
21612 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21614 <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.
21617 <p><a rel="mw:WikiLink" href="./Дуна" title="Дуна">Дуна</a> is not a self-link while <a rel="mw:WikiLink" href="./Duna" title="Duna">Duna</a> and <a rel="mw:WikiLink" href="./Dуна" title="Dуна">Dуна</a> are still self-links.</p>
21621 Link to a section of a variant of this title shouldn't be parsed as self-link
21623 title=[[Duna]] language=sr
21625 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21627 <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.
21630 <p><a rel="mw:WikiLink" href="./Dуна" title="Dуна">Dуна</a> is a self-link while <a rel="mw:WikiLink" href="./Dunа#Foo" title="Dunа">Dunа#Foo</a> and <a rel="mw:WikiLink" href="./Dуна#Foo" title="Dуна">Dуна#Foo</a> are not self-links.</p>
21634 Link to pages in language variants
21638 Main Page can be written as [[Маин Паге]]
21640 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21643 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21648 Multiple links to pages in language variants
21652 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21654 <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>.
21657 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a> can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a> same as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a>.</p>
21662 Simple template in language variants
21668 <p>This is a test template
21674 Template with explicit namespace in language variants
21680 <p>This is a test template
21686 Basic test for template parameter in language variants
21690 {{парамтест|param=foo}}
21692 <p>This is a test template with parameter foo
21697 Simple category in language variants
21701 [[Category:МедиаWики Усер'с Гуиде]]
21703 cat=МедиаWики_Усер'с_Гуиде sort=
21705 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21720 ## We used to, but no longer wt2wt this test since the default serializer
21721 ## will normalize all categories to serialize on their own line.
21722 ## This wikitext usage is going to be fairly uncommon in production and
21723 ## selser will take care of preserving formatting in those scenarios.
21725 Don't convert blue categorylinks to another variant (T35210)
21731 [[A]][[Category:分类]]
21735 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
21736 <link rel="mw:PageProp/Category" href="./Category:分类"/>
21740 Stripping -{}- tags (language variants)
21744 Latin proverb: -{Ne nuntium necare}-
21746 <p>Latin proverb: Ne nuntium necare
21749 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21754 Prevent conversion with -{}- tags (language variants)
21756 language=sr variant=sr-ec
21758 Latinski: -{Ne nuntium necare}-
21760 <p>Латински: Ne nuntium necare
21763 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21768 Prevent conversion of text with -{}- tags (language variants)
21770 language=sr variant=sr-ec
21772 Latinski: -{Ne nuntium necare}-
21774 <p>Латински: Ne nuntium necare
21777 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21782 Prevent conversion of links with -{}- tags (language variants)
21784 language=sr variant=sr-ec
21788 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21791 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<a rel=\"mw:WikiLink\" href=\"./Main_Page\" title=\"Main Page\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main Page\"},\"dsr\":[2,15,2,2]}'>Main Page</a>"}}'></span></p>
21796 -{}- tags within headlines (within html for parserConvert())
21798 language=sr variant=sr-ec
21802 Note that even an unprotected headline ID is not affected by language
21807 <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>
21808 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
21811 <h2><span class="mw-headline" id="Latinski">Латински</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Уреди одељак „Латински“">уреди</a><span class="mw-editsection-bracket">]</span></span></h2>
21814 <h2 id="-.7BNaslov.7D-"><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
21816 <p>Note that even an unprotected headline ID is not affected by language
21819 <h2 id="Latinski">Latinski</h2>
21823 Explicit definition of language variant alternatives
21825 language=zh variant=zh-tw
21827 -{zh:China;zh-tw:Taiwan}-, not China
21829 <p>Taiwan, not China
21832 <p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'></span>, not China</p>
21836 Filter syntax for language variants
21838 language=zh variant=zh-tw
21840 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
21842 <p>fooblog, WEBJOURNAL, WEBLOGquux
21845 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
21848 # Note that Parsoid post-processing for language variants needs to
21849 # update the `title` attribute here, based on the mw:ExpandedAttrs property
21851 Conversion around HTML tags
21853 language=sr variant=sr-ec
21855 -{H|span=>sr-ec:script;title=>sr-ec:src}-
21856 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
21859 <span title="ЛаCтин">ски</span>
21862 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[8]}' data-mw-variant='{"add":true,"oneway":[{"f":"span","l":"sr-ec","t":"script"},{"f":"title","l":"sr-ec","t":"src"}]}'/>
21863 <span title="Latin" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"title"},{"html":"La<span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"sr-el\",\"t\":\"L\"},{\"l\":\"sr-ec\",\"t\":\"C\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[6],\"dsr\":[57,76,null,2]}'></span>tin"}]]}'>ski</span></p>
21867 Explicit session-wise two-way language variant mapping (A flag and - flag)
21869 language=zh variant=zh-tw
21871 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
21873 Taiwan is not China.
21875 But -{A|zh:China; zh-tw:Taiwan}- is China,
21877 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
21879 and -{China}- is China.
21881 <p>This is Taiwan, but we'll forget that now.
21882 </p><p>Taiwan is not China.
21883 </p><p>But Taiwan is Taiwan,
21884 </p><p>(This should be stripped!)
21885 </p><p>and China is China.
21888 <p>This is <span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'></span>, but we'll forget that now.</p>
21889 <p>Taiwan is not China.</p>
21890 <p>But <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'></span> is China,</p>
21891 <p>(This<meta typeof="mw:LanguageVariant" data-mw-variant='{"remove":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/> should be stripped!)</p>
21892 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
21896 Explicit session-wise one-way language variant mapping (A flag and - flag)
21898 language=zh variant=zh-tw
21900 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
21902 COUNTRY is China or Taiwan.
21904 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
21906 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
21908 and -{COUNTRY}- is COUNTRY.
21910 <p>This is Taiwan, but we'll forget that now.
21911 </p><p>COUNTRY is China or Taiwan.
21912 </p><p>But Taiwan is Taiwan,
21913 </p><p>(This should be stripped!)
21914 </p><p>and COUNTRY is COUNTRY.
21917 <p>This is <span typeof="mw:LanguageVariant" data-mw-variant='{"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}]}'></span>, but we'll forget that now.</p>
21918 <p>COUNTRY is China or Taiwan.</p>
21919 <p>But <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}]}'></span> is COUNTRY,</p>
21920 <p>(This<meta typeof="mw:LanguageVariant" data-mw-variant='{"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}],"remove":true}'/> should be stripped!)</p>
21921 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
21925 Explicit session-wise two-way language variant mapping (H flag for hide)
21927 language=zh variant=zh-tw
21929 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
21933 <p>(This should be stripped!)
21934 </p><p>Taiwan is Taiwan.
21937 <p>(This<meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/> should be stripped!)</p>
21938 <p>Taiwan is China.</p>
21942 Explicit session-wise one-way language variant mapping (H flag for hide)
21944 language=zh variant=zh-tw
21946 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
21948 COUNTRY is Taiwan or China.
21950 <p>(This should be stripped!)
21951 </p><p>Taiwan is Taiwan or China.
21954 <p>(This<meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[8]}' data-mw-variant='{"add":true,"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}]}'/> should be stripped!)</p>
21955 <p>COUNTRY is Taiwan or China.</p>
21958 ## Note that parsoid test runner does not support 'showtitle' option.
21960 Adding explicit conversion rule for title (T flag)
21962 language=zh variant=zh-tw showtitle
21964 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
21969 <p>Should be stripped!
21970 </p><p>Taiwan is China.
21973 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
21974 <p>Taiwan is China.</p>
21978 Code coverage: T combined with H flag
21980 language=zh variant=zh-tw showtitle
21982 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
21987 <p>Should be stripped!
21988 </p><p>Taiwan is Taiwan.
21991 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
21992 <p>Taiwan is China.</p>
21996 Code coverage: T with no variants
21998 language=zh variant=zh-tw showtitle
22000 -{H|zh:China; zh-tw:Taiwan}-
22001 Taiwan is China.-{T|Taiwan is China}-
22008 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22009 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22013 Code coverage: rules with no variants
22015 language=zh variant=zh-tw
22017 -{H|zh:China; zh-tw:Taiwan}-
22028 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22030 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22031 Taiwan is China.</p>
22036 Code coverage: D flag for conversion rule
22038 language=zh variant=zh-tw
22040 -{D|zh-cn:XA; zh-tw:YA}-
22041 -{A;D|zh-cn:XB; zh-tw:YB}-
22042 -{D;H|zh-cn:XC; zh-tw:YC}-
22044 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22050 XA XB XC YA YB YC FOO BAR BAT 012345
22055 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22059 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22062 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22063 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22064 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22065 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"FOO","l":"zh-tw","t":"BAR"},{"f":"FOO","l":"zh-cn","t":"BAT"}]}'></span></p>
22066 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22067 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22068 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22069 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22073 Code coverage: N flag for conversion rule
22075 language=zh variant=zh-cn
22085 </p><p>српски (ћирилица)
22088 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22089 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22090 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22093 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22095 Code coverage: N flag for conversion rule (wt2html only)
22097 language=zh variant=zh-cn
22098 parsoid=wt2html,html2html
22105 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22109 Testing that changing the language variant here in the tests actually works
22111 language=zh variant=zh showtitle
22113 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22116 <p>Should be stripped!
22119 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22123 Recursive conversion of alt and title attrs shouldn't clear converter state
22125 language=zh variant=zh-cn
22128 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22129 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22133 Should be stripped<span title="Exclamation">!</span>
22136 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22137 Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh-cn","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/><span title="exclamation">!</span></p>
22141 T26072: more test on conversion rule for title
22143 language=zh variant=zh-tw showtitle
22145 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22147 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22150 <p>This should be stripped!
22151 </p><p>This won't take interferes with the title rule.
22154 <p>This should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22155 <p>This won't take interferes with the title rule<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"Beijing"},{"l":"zh-tw","t":"Taipei"}]}'/>.</p>
22159 Partly disable title conversion if variant == main language code
22161 language=zh variant=zh title=[[ZH]] showtitle
22163 -{T|zh-cn:CN;zh-tw:TW}-
22169 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"title":true,"twoway":[{"l":"zh-cn","t":"CN"},{"l":"zh-tw","t":"TW"}]}'/></p>
22173 Partly disable title conversion if variant == main language code, more
22175 language=zh variant=zh title=[[ZH]] showtitle
22183 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22187 Raw output of variant escape tags (R flag)
22189 language=zh variant=zh-tw
22191 Raw: -{R|zh:China;zh-tw:Taiwan}-
22193 <p>Raw: zh:China;zh-tw:Taiwan
22196 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22199 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22201 Raw output of variant escape tags (R flag) (wt2html only)
22203 language=zh variant=zh-tw
22204 parsoid=wt2html,html2html
22206 -{Variant}- -{D|syntax}- -{D;R|options}-
22208 <p>Variant syntax options
22211 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Variant"}}'></span> <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"syntax"}}'></span> <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"options"}}'></span></p>
22215 Nested markup inside raw output of variant escape tags (R flag)
22217 language=zh variant=zh-tw
22219 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22221 <p>Nested raw: nested Taiwan nested
22224 <p>Nested raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"nested <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh\",\"t\":\"China\"},{\"l\":\"zh-tw\",\"t\":\"Taiwan\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[6],\"dsr\":[23,48,null,2]}'></span> nested"}}'></span></p>
22228 Nested markup and spaces inside raw output of variant escape tags (R flag)
22230 language=zh variant=zh-tw
22232 X-{ outer -{ inner }- outer }-X
22234 <p>X outer inner outer X
22237 <p>X<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":" outer <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\" inner \"}}' data-parsoid='{\"fl\":[],\"dsr\":[10,21,null,2]}'></span> outer "}}'></span>X</p>
22241 Templates inside raw output of variant escape tags (R flag)
22243 language=zh variant=zh-tw
22245 Nested raw: -{R|nested {{echo|hi}} templates}-
22247 <p>Nested raw: nested hi templates
22250 <p>Nested raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"nested <span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[23,34,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}'>hi</span> templates"}}'></span></p>
22254 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22256 language=zh variant=zh-cn
22258 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22263 <p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[12]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"0"},{"l":"zh-sg","t":"1"},{"l":"zh-tw","t":"2"},{"l":"zh-hk","t":"3"}]}'></span></p>
22267 Conversion rules from [numeric-only string] to [something else] (T48634)
22269 language=zh variant=zh-cn
22271 -{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
22276 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"B"}]}'/><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"C"},{"f":"0","l":"zh-cn","t":"D"}]}'/><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-hans","t":"A"}]}'/>012345<span typeof="mw:LanguageVariant" data-parsoid='{"fl":["A"],"tSp":[7]}' data-mw-variant='{"add":true,"twoway":[{"l":"zh-tw","t":"0"},{"l":"zh-cn","t":"E"}]}'></span>012345</p>
22280 Two-way converter rule entries with an empty value should be ignored (T53551)
22282 language=zh variant=zh-cn
22284 -{H|zh-cn:foo;zh-tw:;}-foobar
22289 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[7]}' data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"foo"},{"l":"zh-tw","t":""}]}'/>foobar</p>
22293 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22295 language=zh variant=zh-cn
22297 -{H|=>zh-cn:foo;}-foobar
22302 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22306 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22308 language=zh variant=zh-cn
22315 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22319 Nested using of manual convert syntax
22321 language=zh variant=zh-hk
22323 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22325 <p>Nested: Hello Hong Kong!
22328 <p>Nested: <span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[7]}' data-mw-variant='{"twoway":[{"l":"zh-hans","t":"Hi <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh-cn\",\"t\":\"China\"},{\"l\":\"zh-sg\",\"t\":\"Singapore\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[7],\"dsr\":[21,53,null,2]}'></span>"},{"l":"zh-hant","t":"Hello <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh-tw\",\"t\":\"Taiwan\"},{\"l\":\"zh-hk\",\"t\":\"H&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"ong\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[90,97,null,2]}&apos;>&lt;/span> K&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[99,103,null,2]}&apos;>&lt;/span>ong\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[7],\"dsr\":[68,109,null,2]}'></span>"}]}'></span>!</p>
22332 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22334 language=zh variant=zh-cn
22336 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22338 <p><span title="X">A</span>
22341 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"<span title=\"\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"title\":\"\"},\"sa\":{\"title\":\"-{X}-\"},\"dsr\":[21,49,20,7]}' data-mw='{\"attribs\":[[{\"txt\":\"title\"},{\"html\":\"&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[34,39,null,2]}&apos;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
22345 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22347 language=zh variant=zh-cn
22349 -{<span title="-{X}-">A</span>}-
22350 !! html/php+disabled
22351 <p><span title="X">A</span>
22354 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span title=\"\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"title\":\"\"},\"sa\":{\"title\":\"-{X}-\"},\"dsr\":[2,30,20,7]}' data-mw='{\"attribs\":[[{\"txt\":\"title\"},{\"html\":\"&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[15,20,null,2]}&apos;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
22357 # Parsoid and PHP disagree on how to parse this example: Parsoid
22358 # insists that the content of a language converter element be a valid
22359 # DOM fragment or attribute string
22361 Language converter markup with block content
22363 language=zh variant=zh-cn
22365 <span>a-{b<div>c}-d
22367 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22369 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22371 <p><span>ab</span></p>
22372 <div><span>cd <span>ab</span></span>
22373 <div><span>cd <span>ad</span></span></div>
22376 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><div typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[10,16,5,0]}'>c</div>"}}'></div><p>d</p>
22378 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><div typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[50,56,5,0]}'>c</div>"}}'></div><p>d</p>
22380 <p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"x<span data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[82,89,6,0]}'>y</span>"},{"f":"0","l":"zh-tw","t":"b<div data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[100,106,5,0]}'>c</div>"}]}'/>d</span></p>
22384 LanguageConverter selser (1)
22386 language=zh variant=zh-cn
22388 "modes": ["wt2wt", "selser"],
22390 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22400 LanguageConverter selser (2)
22402 language=zh variant=zh-cn
22404 "modes": ["wt2wt", "selser"],
22406 ["span[class='x']", "contents", "text", "-{foo}-"],
22407 ["a", "contents", "text", "-{"],
22408 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22412 <span class="x">TEXT1</span>
22413 [http://example.com TEXT2]
22417 <span class="x"><nowiki>-{foo}-</nowiki></span>
22418 [http://example.com -{]
22419 [[Foo|<nowiki>-{</nowiki>]]
22420 {{1x|<nowiki>-{</nowiki>}}
22423 # Tests LanguageVariantText in ConstrainedText
22425 LanguageConverter selser (3)
22427 language=zh variant=zh-cn
22429 "modes": ["wt2wt", "selser"],
22431 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22432 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22443 |<nowiki/>-{edited}-
22447 # Tests LanguageVariantText._fromSelSer
22449 LanguageConverter selser (4)
22451 language=zh variant=zh-cn
22453 "modes": ["wt2wt", "selser"],
22455 ["td > span.x", "remove"]
22461 |<span class="x">Foo</span>-{Bar}-
22462 ||<span class="x">Foo</span>-{Bar}-
22472 # Since Parsoid is starting to emit canonical wikitext for links,
22473 # [http://example.com http://example.com] will not RT back to that
22475 # Parsoid does not language-convert links (it is done in a
22476 # post-processing step)
22478 Proper conversion of text in external links
22480 language=sr variant=sr-ec
22483 http://www.google.com
22484 gopher://www.google.com
22485 [http://www.google.com http://www.google.com]
22486 [gopher://www.google.com gopher://www.google.com]
22487 [https://www.google.com irc://www.google.com]
22488 [ftp://www.google.com www.google.com/ftp://dir]
22489 [//www.google.com www.google.com]
22491 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22492 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22493 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22494 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22495 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22496 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22497 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22500 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
22501 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
22502 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
22503 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
22504 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
22505 <a rel="mw:ExtLink" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22506 <a rel="mw:ExtLink" href="//www.google.com">www.google.com</a></p>
22510 Do not convert roman numbers to language variants
22512 language=sr variant=sr-ec
22516 <p>Фридрих IV је цар.
22519 <p>Fridrih IV je car.</p>
22523 Unclosed language converter markup "-{"
22534 Don't convert raw rule "-{R|=>}-" to "=>"
22543 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"=<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;gt;\",\"srcContent\":\">\",\"dsr\":[5,9,null,null]}'>></span>"}}'></span></p>
22547 Don't break link parsing if language converter markup is in the caption.
22549 language=sr variant=sr-ec
22551 [[Main Page|-{R|main page}-]]
22553 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22556 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"main page"}}' data-parsoid='{"fl":["R"]}'></span></a></p>
22560 T146304: Don't break template parsing if language converter markup is in the parameter.
22562 language=sr variant=sr-ec
22569 <p><span typeof="mw:Transclusion mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo"}}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Шаблон:Echo"},"params":{"1":{"wt":"-{R|foo}-"}},"i":0}}]}'></span></p>
22573 T146305: Don't break image parsing if language converter markup is in the caption.
22577 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22579 <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>
22582 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"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-variant='{"disabled":{"t":"caption:"}}' data-parsoid='{"fl":["R"]}'></span></figcaption></figure>
22586 T146305: Don't break image parsing if nested language converter markup is in the caption.
22588 language=zh variant=zh-cn
22590 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22592 <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>
22595 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"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-variant='{"twoway":[{"l":"zh-cn","t":"blog (hk: <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"WEBJOURNAL\"}}' data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[43,65,null,2]}'></span>, tw: <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"WEBLOG\"}}' data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[71,89,null,2]}'></span>)"}]}'></span></figcaption></figure>
22598 # XXX html2wt disabled because rich markup in alt is not preserved.
22600 Don't break gallery if language converter markup is inside.
22605 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22606 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22609 <ul class="gallery mw-gallery-traditional">
22610 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22611 <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>
22612 <div class="gallerytext">
22613 <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>
22617 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22618 <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>
22619 <div class="gallerytext">
22620 <p>This is a test template
22627 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-\nFile:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt\n"}}'>
22628 <li class="gallerybox">
22629 <div class="thumb"><span typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="" 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>
22630 <div class="gallerytext"><span typeof="mw:Image" data-mw='{"caption":"<span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\"bar\"}}' data-parsoid='{\"fl\":[\"R\"],\"dsr\":[68,77,null,2]}'></span>"}'><a href="./File:Foobar.jpg"><img alt="" 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>
22632 <li class="gallerybox">
22633 <div class="thumb"><span typeof="mw:Image"><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>
22634 <div class="gallerytext"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Test","href":"./Template:Test"},"params":{"1":{"wt":"unamedParam"},"alt":{"wt":"-{R|param}-"}},"i":0}}]}'>This is a test template</span></div>
22640 T153135: Don't break list handling if language converter markup is in the item.
22642 language=zh variant=zh-cn
22644 ;-{zh-cn:AAA;zh-tw:BBB}-
22648 <dt>foo:bar</dt></dl>
22651 <dl><dt data-parsoid='{"dsr":[0,24,1,0]}'><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"AAA"},{"l":"zh-tw","t":"BBB"}]}'></span></dt>
22652 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22656 // Note that parsoid does not protect colons unless language converter
22657 // markup is properly nested, because it is a backtracking parser.
22659 T153135: Unclosed markup in definition list (code coverage)
22661 language=zh variant=zh-cn
22667 <dt><b>foo:bar</b></dt>
22668 <dt><b>-{zh-cn:AAA</b></dt>
22671 <dl><dt data-parsoid='{"dsr":[0,11,1,0]}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
22672 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22673 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22678 T153135: Nested language converter markup in definition list (code coverage)
22680 language=zh variant=zh-cn
22682 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22684 <dl><dt>AAA foo:bar bat:baz</dt>
22688 <dl><dt data-parsoid='{"dsr":[0,49,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"zh-cn","t":"AAA <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"foo:bar\"}}' data-parsoid='{\"fl\":[\"zh-hans\"],\"dsr\":[14,33,null,2]}'></span> <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"disabled\":{\"t\":\"bat:baz\"}}' data-parsoid='{\"fl\":[\"R\"],\"dsr\":[34,47,null,2]}'></span>"}]}'></span></dt>
22689 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22693 # html2wt mode disabled due to <nowiki> insertion.
22695 T153140: Don't break table handling if language converter markup is in the cell.
22697 language=sr variant=sr-ec
22698 parsoid=wt2html,wt2wt,html2html
22715 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
22722 Language converter tricky html2wt cases (1)
22725 parsoid=html2wt,wt2wt
22727 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
22729 -{<nowiki>}-</nowiki>}-
22736 Language converter tricky html2wt cases (2)
22739 parsoid=html2wt,wt2wt
22743 <nowiki>-{foo}-</nowiki>
22745 <p>-{foo}-
22750 Language converter tricky html2wt cases (3)
22753 parsoid=html2wt,wt2wt
22755 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
22756 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
22757 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
22763 -{<nowiki>-{foo}-</nowiki>}-
22767 </p><p>-{foo}-
22772 Language converter tricky html2wt cases (4)
22775 parsoid=html2wt,wt2wt
22777 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hey\"}},\"i\":0}}]}'>hey</span>"}}'></span></p>
22785 # Note that the <nowiki> escaping added by parsoid for source text,
22786 # destination text, and language names only works on the PHP side
22787 # for *destination text*. (HTML entity escaping wouldn't work
22788 # any better.) This is probably a bug, at least for source texts.
22789 # (For language names PHP uses a precise regexp based on the languages
22790 # it currently knows have variants, which is fragile since this set
22791 # can grow/shrink over time.)
22793 Language converter tricky html2wt cases (5)
22795 language=zh variant=zh-cn
22797 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"a:b=>c","l":"zh-cn","t":"x;foo=>zh-cn:boo"},{"f":"bar","l":"zh-cn","t":"bat;xyz=>zh-cn:abc"}]}'/>foobar</p>
22798 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
22799 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-tw","t":"xyz"},{"l":"zh-cn","t":"0;zh-tw:bar"}]}'></span></p>
22800 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
22803 -{H|<nowiki>a:b=>c</nowiki>=>zh-cn:<nowiki>x;foo=>zh-cn:boo</nowiki>;bar=>zh-cn:<nowiki>bat;xyz=>zh-cn:abc</nowiki>}-foobar
22805 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
22807 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
22809 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
22812 !! html/php+disabled
22813 <p>foobat;xyz=>zh-cn:abc
22817 </p><p>a:b=>c 0;zh-tw:bar
22822 T179579: Nowiki and lc interaction
22829 -{123<nowiki>|</nowiki>456}-
22831 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
22833 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"123<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[23,41,8,9]}'>|</span>456"}}' data-parsoid='{"fl":[],"src":"-{123<nowiki>|</nowiki>456}-"}'></span></p>
22837 T2529: Uncovered bullet
22846 # Plain MediaWiki does not remove empty lists, but tidy actually does.
22847 # Templates in Wikipedia rely on this behavior, as tidy has always been
22848 # enabled there. These tests are normally run *without* tidy, so specify the
22849 # full output here.
22850 # To test realistic parsing behavior, apply a tidy-like transformation to both
22851 # the expected output and your parser's output.
22853 T2529: Uncovered bullet leaving empty list, normally removed by tidy
22855 ******* Foo {{bullet}}
22857 <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>
22863 T2529: Uncovered table already at line-start
22886 T2529: Uncovered bullet in parser function result
22888 * Foo {{lc:{{bullet}} }}
22896 T7678: Double-parsed template argument
22898 {{lc:{{{1}}}|hello}}
22905 T7678: Double-parsed template invocation
22907 {{lc:{{paramtest {{!}} param = hello }} }}
22909 <p>{{paramtest | param = hello }}
22914 Case insensitivity of parser functions for non-ASCII characters (T10143)
22917 title=[[Main Page]]
22919 {{PRVNÍVELKÉ:ěščř}}
22920 {{prvnívelké:ěščř}}
22940 Morwen/13: Unclosed link followed by heading
22947 <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>
22952 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
22959 <h1><span class="mw-headline" id="heading">heading</span></h1>
22964 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
22971 <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>
22986 Paragraphs inside divs (no extra line breaks)
22998 Paragraphs inside divs (extra line break on open)
23013 Paragraphs inside divs (extra line break on close)
23028 Paragraphs inside divs (extra line break on open and close)
23045 Nesting tags, paragraphs on lines which begin with <div>
23047 <div></div><strong>A
23050 <p><strong>A</strong></p>
23051 <p><strong>B</strong></p>
23059 # T8200: <blockquote> should behave like <div> with respect to line breaks
23061 T8200: paragraphs inside blockquotes (no extra line breaks)
23063 <blockquote>Line one
23065 Line two</blockquote>
23067 <blockquote>Line one
23068 Line two</blockquote>
23072 <p>Line one Line two</p>
23077 T8200: paragraphs inside blockquotes (extra line break on open)
23082 Line two</blockquote>
23087 Line two</blockquote>
23092 Line two</blockquote>
23096 T8200: paragraphs inside blockquotes (extra line break on close)
23098 <blockquote>Line one
23103 <blockquote>Line one
23116 T8200: paragraphs inside blockquotes (extra line break on open and close)
23138 Paragraphs inside blockquotes/divs (no extra line breaks)
23140 <blockquote><div>Line one
23142 Line two</div></blockquote>
23144 <blockquote><div>Line one
23145 Line two</div></blockquote>
23150 Paragraphs inside blockquotes/divs (extra line break on open)
23155 Line two</div></blockquote>
23160 Line two</div></blockquote>
23165 Paragraphs inside blockquotes/divs (extra line break on close)
23167 <blockquote><div>Line one
23170 </div></blockquote>
23172 <blockquote><div>Line one
23175 </div></blockquote>
23180 Paragraphs inside blockquotes/divs (extra line break on open and close)
23186 </div></blockquote>
23192 </div></blockquote>
23197 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23199 wgLinkHolderBatchSize=0
23205 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23206 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23207 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23212 Free external link invading image caption
23214 [[Image:Foobar.jpg|thumb|http://x|hello]]
23216 <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>
23221 T17196: localised external link numbers
23225 [http://en.wikipedia.org/]
23227 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23230 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
23234 Multibyte character in padleft
23236 {{padleft:-Hello|7|Æ}}
23243 Multibyte character in padright
23245 {{padright:Hello-|7|Æ}}
23252 formatdate parser function
23254 {{#formatdate:2009-03-24}}
23256 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23261 formatdate parser function, with default format
23263 {{#formatdate:2009-03-24|mdy}}
23265 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23270 Spacing of numbers in formatted dates
23272 {{#formatdate:January 15}}
23274 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23279 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
23281 language=nl title=[[MediaWiki:Common.css]]
23283 {{#formatdate:2009-03-24|dmy}}
23285 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23298 Edit comment with link
23302 I like the [[Main Page]] a lot
23304 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23308 Edit comment with link and link text
23312 I like the [[Main Page|best pages]] a lot
23314 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23318 Edit comment with link and link text with suffix
23322 I like the [[Main Page|best page]]s a lot
23324 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23328 Edit comment with section link (non-local, eg in history list)
23330 comment title=[[Main Page]]
23332 /* External links */ removed bogus entries
23334 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23338 Edit comment with section link and text before it (non-local, eg in history list)
23340 comment title=[[Main Page]]
23342 pre-comment text /* External links */ removed bogus entries
23344 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>
23348 Edit comment with section link (local, eg in diff view)
23350 comment local title=[[Main Page]]
23352 /* External links */ removed bogus entries
23354 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23358 Edit comment with subpage link (T16080)
23362 title=[[Subpage test]]
23364 Poked at a [[/subpage]] here...
23366 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23370 Edit comment with subpage link and link text (T16080)
23374 title=[[Subpage test]]
23376 Poked at a [[/subpage|neat little page]] here...
23378 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23382 Edit comment with bogus subpage link in non-subpage NS (T16080)
23385 title=[[Subpage test]]
23387 Poked at a [[/subpage]] here...
23389 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23393 Edit comment with bare anchor link (local, as on diff)
23397 title=[[Main Page]]
23401 <a href="#section">#section</a>
23405 Edit comment with bare anchor link (non-local, as on history)
23408 title=[[Main Page]]
23412 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23416 Anchor starting with underscore
23422 <p><a href="#_ref">One</a>
23425 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23429 Id starting with underscore
23431 <div id="_ref"></div>
23433 <div id="_ref"></div>
23438 Edit comment with link with more than one pipe (T99346)
23442 [[Main Page|Many|pipes]]
23444 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23448 Complex edit comment with link with more than one pipe (T99346)
23452 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23454 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..."
23458 Space normalisation on autocomment (T24784)
23461 title=[[Main Page]]
23463 /* __hello__world__ */
23465 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23469 percent-encoding and + signs in comments (T28410)
23473 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23475 <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>
23478 # Parsoid doesn't support this yet: see T75581
23479 # but it *should* omit the 'src' attribute if the image is bad.
23480 # PHP side of tests was disabled in
23481 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23482 # because of issues in the PHP parserTests infrastructure
23483 # (but the output below is indeed what the PHP side emits)
23485 Bad images - basic functionality
23488 !! DISABLED/html/php
23490 <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>
23494 Bad images - T18039: text after bad image disappears
23499 !! DISABLED/html/php
23505 <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>
23510 Verify that displaytitle works (T24501) no displaytitle
23514 wgAllowDisplayTitle=true
23515 wgRestrictDisplayTitle=false
23517 this is not the the title
23520 <p>this is not the the title
23525 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23530 wgAllowDisplayTitle=true
23531 wgRestrictDisplayTitle=false
23533 this is not the the title
23534 {{DISPLAYTITLE:whatever}}
23537 <p>this is not the the title
23542 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23547 wgAllowDisplayTitle=true
23548 wgRestrictDisplayTitle=true
23550 this is not the the title
23551 {{DISPLAYTITLE:whatever}}
23554 <p>this is not the the title
23559 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23564 wgAllowDisplayTitle=true
23565 wgRestrictDisplayTitle=true
23567 this is not the the title
23568 {{DISPLAYTITLE:screen}}
23571 <p>this is not the the title
23576 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23581 wgAllowDisplayTitle=false
23583 this is not the the title
23584 {{DISPLAYTITLE:screen}}
23587 <p>this is not the the title
23588 <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>
23593 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23598 wgAllowDisplayTitle=false
23600 this is not the the title
23603 <p>this is not the the title
23608 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23613 wgAllowDisplayTitle=true
23614 wgRestrictDisplayTitle=true
23616 this is not the the title
23617 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23619 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23620 <p>this is not the the title
23625 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23630 wgAllowDisplayTitle=true
23631 wgRestrictDisplayTitle=true
23633 this is not the the title
23634 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23636 <span style="color: red;">s</span>creen
23637 <p>this is not the the title
23642 Page status indicators: Empty name is invalid
23646 <indicator name=" "></indicator>
23647 <indicator></indicator>
23649 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23650 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23655 Page status indicators: Weird syntaxes that are okay
23659 <indicator name="empty" />
23660 <indicator name="name"></indicator>
23669 Page status indicators: Torture test
23673 <indicator name="01">hello world</indicator>
23674 <indicator name="02">[[Main Page]]</indicator>
23675 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23676 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23677 <indicator name="05">* foo
23679 <indicator name="06"><nowiki>foo</nowiki></indicator>
23680 <indicator name="07"> Preformatted</indicator>
23681 <indicator name="08"><div>Broken tag</indicator>
23682 <indicator name="09">{| class=wikitable
23685 <indicator name="10">Two
23687 paragraphs</indicator>
23690 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23691 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" />
23692 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>
23693 05=<ul><li> foo</li>
23697 07=<pre>Preformatted
23699 08=<div>Broken tag</div>
23701 09=<table class="wikitable">
23718 preload: check <noinclude> and <includeonly>
23722 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
23728 preload: check <onlyinclude>
23732 Goodbye <onlyinclude>Hello world</onlyinclude>
23738 preload: can pass tags through if we want to
23742 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
23744 <includeonly>Hello world</includeonly>
23748 preload: check that it doesn't try to do tricks
23752 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23754 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23758 Play a bit with r67090 and T5158
23760 <div style="width:50% !important"> </div>
23761 <div style="width:50% !important"> </div>
23762 <div style="width:50% !important"> </div>
23763 <div style="border : solid;"> </div>
23765 <div style="width:50% !important"> </div>
23766 <div style="width:50% !important"> </div>
23767 <div style="width:50% !important"> </div>
23768 <div style="border : solid;"> </div>
23771 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23772 <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>
23773 <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>
23774 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23779 HTML5 data attributes
23781 <span data-foo="bar">Baz</span>
23782 <p data-abc-def_hij="">Quuz</p>
23784 <p><span data-foo="bar">Baz</span>
23786 <p data-abc-def_hij="">Quuz</p>
23789 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
23790 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
23794 Strip reserved data attributes
23796 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
23798 <div data-ok="fred">d</div>
23801 <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>
23805 percent-encoding and + signs in internal links (T28410)
23807 [[User:+%]] [[Page+title%]]
23808 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
23809 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
23810 [[%33%45]] [[%33%45+]]
23812 <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>
23813 <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>
23814 <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>
23815 <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>
23818 <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>
23819 <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>
23820 <a rel="mw:WikiLink" href="./%25" title="%" data-parsoid='{"stx":"simple","a":{"href":"./%25"},"sa":{"href":"%"}}'>%</a> <a rel="mw:WikiLink" href="./+" title="+" data-parsoid='{"stx":"simple","a":{"href":"./+"},"sa":{"href":"+"}}'>+</a> <span class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"<a rel=\"mw:WikiLink\" href=\"./Bar\" title=\"Bar\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Bar\"},\"sa\":{\"href\":\"bar\"},\"dsr\":[94,101,2,2]}'>bar</a>"}'><a href="./File:%25+abc9" data-parsoid='{"a":{"href":"./File:%25+abc9"},"sa":{}}'><img resource="./File:%25+abc9" src="./Special:FilePath/%25+abc9" height="220" width="220" data-parsoid='{"a":{"resource":"./File:%25+abc9","height":"220","width":"220"},"sa":{"resource":"File:%+abc%39"}}'/></a></span>
23821 <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>
23825 Special characters in embedded file links (T29679)
23827 [[File:Contains & ampersand.jpg]]
23828 [[File:Does not exist.jpg|Title with & ampersand]]
23830 <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>
23831 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
23834 <p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Contains_&_ampersand.jpg"><img resource="./File:Contains_&_ampersand.jpg" src="./Special:FilePath/Contains_&_ampersand.jpg" height="220" width="220"/></a></span>
23835 <span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"Title with &amp; ampersand"}'><a href="./File:Does_not_exist.jpg"><img resource="./File:Does_not_exist.jpg" src="./Special:FilePath/Does_not_exist.jpg" height="220" width="220"/></a></span></p>
23839 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
23841 Text's been normalized?
23843 <p>Text's been normalized?
23848 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
23850 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
23852 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
23857 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
23859 [http://www.example.org/ ideograms]
23861 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
23866 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
23868 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
23870 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
23894 T33098 Template which includes system messages which includes the template
23898 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
23899 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
23904 T33490 Turkish: ucfirst 'blah'
23915 T33490 Turkish: ucfirst 'ix'
23926 T33490 Turkish: lcfirst 'BLAH'
23937 T33490 Turkish: ucfırst (with a dotless i)
23943 <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>
23948 T33490 ucfırst (with a dotless i) with English language
23954 <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>
23958 # Note that Parsoid doesn't emit an explicit TOC.
23959 # Note also that the html2wt direction tends to emit an extra newline
23960 # between the __TOC__ magicword and the first heading unless *both*
23961 # the <meta> and the <h2> have a data-parsoid attribute set (even if
23965 T28375: TOC with italics
23967 title=[[Main Page]]
23970 == ''Lost'' episodes ==
23972 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23974 <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>
23978 <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>
23981 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23982 <h2 data-parsoid='{}'> <i>Lost</i> episodes </h2>
23986 T28375: TOC with bold
23988 title=[[Main Page]]
23991 == '''should be bold''' then normal text ==
23993 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23995 <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>
23999 <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>
24002 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24003 <h2 data-parsoid='{}'> <b>should be bold</b> then normal text </h2>
24007 T35845: Headings become cursive in TOC when they contain an image
24009 title=[[Main Page]]
24012 == Image [[Image:foobar.jpg]] ==
24014 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24016 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24020 <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>
24023 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24024 <h2 data-parsoid='{}'> Image <span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></span> </h2>
24028 T35845 (2): Headings become bold in TOC when they contain a blockquote
24030 title=[[Main Page]]
24033 == <blockquote>Quote</blockquote> ==
24035 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24037 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24041 <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>
24045 <div id="toc" class="toc">
24046 <div class="toctitle">
24050 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24054 <h2><span class="mw-headline" id="Quote"></span></h2>
24056 <p><span class="mw-headline" id="Quote">Quote</span></p>
24058 <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>
24060 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24061 <h2 data-parsoid='{}'> <blockquote>Quote</blockquote> </h2>
24065 Unclosed tags in TOC
24067 title=[[Main Page]]
24071 <small>Hanc marginis exiguitas non caperet.</small>
24074 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24076 <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>
24080 <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>
24081 <p><small>Hanc marginis exiguitas non caperet.</small>
24085 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24086 <h2 data-parsoid='{}'> Proof: 2 < 3 </h2>
24087 <p><small>Hanc marginis exiguitas non caperet.</small>
24092 Multiple tags in TOC
24095 == <i>Foo</i> <b>Bar</b> ==
24097 == <i>Foo</i> <blockquote>Bar</blockquote> ==
24099 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24101 <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>
24102 <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>
24106 <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>
24107 <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>
24111 <div id="toc" class="toc">
24112 <div class="toctitle">
24116 <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>
24117 <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>
24121 <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>
24122 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
24124 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
24126 <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>
24128 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24129 <h2 data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b> </h2>
24130 <h2> <i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote> </h2>
24133 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24134 # html5 tag parsing.
24136 Tags with parameters in TOC
24141 == <sup class="in-h2">Hello</sup> ==
24143 == <sup class="a > b">Evilbye</sup> ==
24145 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24147 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24148 <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>
24152 <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>
24153 <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>
24156 <meta property="mw:PageProp/toc" />
24157 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
24159 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
24163 span tags with directionality in TOC
24166 == <span dir="ltr">C++</span> ==
24168 == <span dir="rtl">זבנג!</span> ==
24170 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
24172 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
24174 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
24176 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24178 <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>
24179 <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>
24180 <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>
24181 <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>
24182 <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>
24186 <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>
24187 <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>
24188 <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>
24189 <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>
24190 <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>
24193 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24194 <h2 data-parsoid='{}'> <span dir="ltr">C++</span> </h2>
24195 <h2> <span dir="rtl">זבנג!</span> </h2>
24196 <h2> <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> </h2>
24197 <h2> <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> </h2>
24198 <h2> <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> </h2>
24202 T74884: bdi element in ToC
24205 == <bdi>test</bdi> ==
24207 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24209 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24213 <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>
24216 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24217 <h2 data-parsoid='{}'> <bdi>test</bdi> </h2>
24221 T35715: s/strike element in ToC
24224 == <s>test</s> test <strike>test</strike> ==
24226 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24228 <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>
24232 <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>
24235 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24236 <h2 data-parsoid='{}'> <s>test</s> test <strike>test</strike> </h2>
24239 # Note that the html output does not have the <p></p>, but the
24240 # html+tidy output *does*. This is because the empty <p></p> is
24241 # removed by the sanitizer, but only when tidy is *not* enabled (!).
24243 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24248 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24250 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24254 <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>
24258 <div id="toc" class="toc">
24259 <div class="toctitle">
24263 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24267 <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>
24269 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24270 <h2 data-parsoid='{}'> x </h2>
24276 == {{int:headline_sample}} ==
24280 T34057: Title needed when expanding <h> nodes.
24282 title=[[Main Page]]
24286 <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>
24291 Strip marker in urlencode
24293 {{urlencode:x<nowiki/>y}}
24294 {{urlencode:x<nowiki/>y|wiki}}
24295 {{urlencode:x<nowiki/>y|path}}
24296 {{urlencode:x<pre id="one">two</pre>y}}
24324 Strip marker in formatNum
24326 {{formatnum:1<nowiki/>2}}
24327 {{formatnum:1<nowiki/>2|R}}
24335 Check noCommafy in formatNum
24339 {{formatnum:123456.78}}
24340 {{formatnum:123456.78|NOSEP}}
24348 Wrong option for formatNum (T58199)
24350 {{formatnum:1,234.56|Random}}
24351 {{formatnum:1,234.56|EVERYTHING}}
24352 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24361 Strip marker in grammar
24365 {{grammar:elative|foo<nowiki/>bar}}
24372 Strip marker in padleft
24374 {{padleft:|2|x<nowiki/>y}}
24381 Strip marker in padright
24383 {{padright:|2|x<nowiki/>y}}
24390 Strip marker in anchorencode
24392 {{anchorencode:x<nowiki/>y}}
24399 nowiki inside link inside heading (T20295)
24401 ==[[foo|x<nowiki>y</nowiki>z]]==
24403 <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>
24408 new support for bdi element (T33817)
24410 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24412 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24417 Ignore pipe between table row attributes
24421 |- id=foo | style='color: red'
24429 <tr id="foo" style="color: red">
24436 Language parser function
24445 Padleft and padright as substr
24447 {{padleft:|3|abcde}}
24448 {{padright:|3|abcde}}
24456 Special parser function
24458 {{#special:RandomPage}}
24459 {{#special:BaDtItLe}}
24460 {{#special:Foobar}}
24469 T36939 - Case insensitive link parsing ([HttP://])
24471 [HttP://MediaWiki.Org/]
24473 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24476 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
24480 T36939 - Case insensitive link parsing ([HttP:// title])
24482 [HttP://MediaWiki.Org/ MediaWiki]
24484 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24489 T36939 - Case insensitive link parsing (HttP://)
24491 HttP://MediaWiki.Org/
24493 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24496 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24514 <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>
24515 <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>
24516 <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>
24517 <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>
24518 <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>
24524 ### Parsoid-specific tests
24525 ### Parsoid-PHP parser incompatibilities
24528 1. SOL-sensitive wikitext tokens as template-args
24530 parsoid=wt2html,wt2wt
24536 <span about="#mwt1" typeof="mw:Transclusion">
24537 </span><ul about="#mwt1"><li>a</li>
24539 <span about="#mwt2" typeof="mw:Transclusion">
24540 </span><ol about="#mwt2"><li>a</li>
24542 <span about="#mwt3" typeof="mw:Transclusion">
24543 </span><dl about="#mwt3"><dd>a</dd>
24547 #### -----------------------------------------------------------------
24548 #### Parsoid-specific functionality tests
24549 #### -----------------------------------------------------------------
24551 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24552 # We know wt2wt will fail, but we expect selser to pass.
24553 # Due to the nature of our testing, wt2wt and selser tests will enter the
24554 # blacklist and we'll catch selser regressions based on changes to the
24555 # blacklist entries for selser tests.
24557 1. Bad treebuilder fixup of formatting elt is cleaned up
24559 parsoid=wt2html,wt2wt
24564 [[Image:Foobar.jpg|right|Test]]
24571 <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>
24578 2. Bad treebuilder fixup of formatting elt is cleaned up
24580 parsoid=wt2html,wt2wt
24582 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24584 <small>[[Image:Foobar.jpg|right|300px]]</small>
24588 <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>
24590 <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>
24594 3. Bad treebuilder fixup of formatting elt is cleaned up
24596 parsoid=wt2html,wt2wt
24598 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24600 <p><small><b>foo</b></small></p>
24601 <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>
24602 <p><small><b>bar</b></small></p>
24606 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24608 parsoid=wt2html,wt2wt
24610 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24612 <b><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></b>
24615 #### ----------------------------------------------------------------
24616 #### Parsoid-only testing of Parsoid's impl of LST
24617 #### Not implemented yet, see
24618 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24619 #### ----------------------------------------------------------------
24621 ## We still need to support serializing the older format while content is stored.
24623 LST Sections: Backwards compatibility
24626 "suppressErrors": true,
24627 "modes": ["html2wt"]
24630 <section begin="2011-05-16" />
24631 <section end="2014-04-10 (MW 1.23wmf22)" />
24633 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24634 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24638 LST Sections: Newfangled approach
24640 <section begin="2011-05-16" />
24641 <section end="2014-04-10 (MW 1.23wmf22)" />
24643 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24645 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24649 #--------- Test stripping of empty nodes in template content ----------
24652 Empty LI and TR nodes should be stripped from template content
24657 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24661 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24674 Empty LI and TR nodes should not be stripped from top-level content
24687 <li class='mw-empty-elt'></li>
24692 <tr class='mw-empty-elt'></tr>
24701 Empty TR nodes should not be stripped if they have any attributes set
24703 {{EmptyTRWithHTMLAttrTest}}
24705 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
24706 <tr align='center'></tr>
24707 <tr><td>foo</td></tr>
24708 <tr align='center'></tr>
24709 <tr><td>bar</td></tr>
24713 #### ----------------------------------------------------------------
24714 #### The following section of tests are primarily to test
24715 #### wikitext escaping capabilities of Parsoid. Given that
24716 #### escaping can be done any number of ways, the wikitext (input)
24717 #### is always adjusted to reflect how Parsoid adds nowiki
24720 #### We are marking several tests as parsoid-only since the
24721 #### HTML in the result section is different from what the
24722 #### PHP parser generates for it.
24723 #### ----------------------------------------------------------------
24726 #### --------------- Headings ---------------
24728 #### 1. Nested inside html <h1>=foo=</h1>
24729 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
24730 #### 3. Nested inside html with wikitext split by html tags
24731 #### 4. No escape needed
24732 #### 5. Empty headings <h1></h1>
24733 #### 6. Heading chars in SOL context
24734 #### ----------------------------------------
24736 Headings: 0. Unnested
24746 <p>=foo<i>a</i>=</p>
24748 <nowiki>=foo=</nowiki>
24750 <nowiki> </nowiki>=foo=
24752 <nowiki>=foo=</nowiki>
24754 =foo''a''<nowiki>=</nowiki>
24757 # New headings and existing headings are handled differently
24759 Headings: 1. Nested inside html
24767 <h1 data-parsoid=''>=foo=</h1>
24768 <h2 data-parsoid=''>=foo=</h2>
24769 <h3 data-parsoid=''>=foo=</h3>
24770 <h4 data-parsoid=''>=foo=</h4>
24771 <h5 data-parsoid=''>=foo=</h5>
24772 <h6 data-parsoid=''>=foo=</h6>
24780 =<nowiki>=foo=</nowiki>=
24781 ==<nowiki>=foo=</nowiki>==
24782 ===<nowiki>=foo=</nowiki>===
24783 ====<nowiki>=foo=</nowiki>====
24784 =====<nowiki>=foo=</nowiki>=====
24785 ======<nowiki>=foo=</nowiki>======
24790 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
24799 <nowiki>*</nowiki>bar
24805 <nowiki>=bar=</nowiki>
24809 Headings: 3. Nested inside html with wikitext split by html tags
24813 <h1>=<b>bold</b>foo=</h1>
24815 = ='''bold'''foo= =
24819 Headings: 4a. No escaping needed (testing just h1 and h2)
24830 <h1><i>=</i>foo=</h1>
24850 Headings: 4b. No escaping needed (inside p-tags)
24865 Headings: 5. Empty headings
24869 <h1 data-parsoid='{}'></h1>
24871 <h2 data-parsoid='{}'></h2>
24873 <h3 data-parsoid='{}'></h3>
24875 <h4 data-parsoid='{}'></h4>
24877 <h5 data-parsoid='{}'></h5>
24879 <h6 data-parsoid='{}'></h6>
24889 =====<nowiki/>=====
24891 ======<nowiki/>======
24895 Headings: 6a. Heading chars in SOL context (with trailing spaces)
24905 <nowiki>=a=</nowiki>
24907 <nowiki>=a=</nowiki>
24909 <nowiki>=a=</nowiki>
24913 Headings: 6b. Heading chars in SOL context (with trailing newlines)
24926 <nowiki>=a=</nowiki>
24929 <nowiki>=a=</nowiki>
24932 <nowiki>=a=</nowiki>
24937 Headings: 6c. Heading chars in SOL context (leading newline break)
24945 <nowiki>=b=</nowiki>
24949 Headings: 6d. Heading chars in SOL context (with interspersed comments)
24953 <!--c0--><p>=a=</p>
24955 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
24957 <!--c0--><nowiki>=a=</nowiki>
24959 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
24963 Headings: 6d. Heading chars in SOL context (No escaping needed)
24973 Headings: 7. Insert a newline between new content and headings
24979 <h2 data-parsoid='{}'>A</h2>
24980 <p data-parsoid='{}'>a</p>
24990 #### --------------- Lists ---------------
24991 #### 0. Outside nests (*foo, etc.)
24992 #### 1. Nested inside html <ul><li>*foo</li></ul>
24993 #### 2. Inside definition lists
24994 #### 3. Only bullets at start should be escaped
24995 #### 4. No escapes needed
24996 #### 5. No unnecessary escapes
24997 #### 6. Escape bullets in SOL position
24998 #### 7. Escape bullets in a multi-line context
24999 #### ----------------------------------------
25002 Lists: 0. Outside nests
25012 <nowiki>*</nowiki>foo
25014 <nowiki>#</nowiki>foo
25016 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25019 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25020 ## to test wikitext escaping, and insignificant whitespace diffs
25021 ## cause PHP parser tests to barf
25023 Lists: 1. Nested inside html (No unnecessary escapes)
25032 <li data-parsoid='{}'>*foo</li>
25033 <li data-parsoid='{}'>#foo</li>
25034 <li data-parsoid='{}'>:foo</li>
25035 <li data-parsoid='{}'>;foo</li>
25043 <li data-parsoid='{}'>*foo</li>
25044 <li data-parsoid='{}'>#foo</li>
25045 <li data-parsoid='{}'>:foo</li>
25046 <li data-parsoid='{}'>;foo</li>
25053 *<nowiki>*foo</nowiki>
25054 *<nowiki>#foo</nowiki>
25055 *<nowiki>:foo</nowiki>
25056 *<nowiki>;foo</nowiki>
25062 #<nowiki>*foo</nowiki>
25063 #<nowiki>#foo</nowiki>
25064 #<nowiki>:foo</nowiki>
25065 #<nowiki>;foo</nowiki>
25069 Lists: 2. Inside definition lists
25073 <dl><dt>;foo</dt></dl>
25074 <dl><dt>:foo</dt></dl>
25077 <dl><dd>:foo</dd></dl>
25081 ; <nowiki>:foo</nowiki>
25083 ; <nowiki>:foo</nowiki>
25090 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25096 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25100 *<nowiki>*foo</nowiki>''it''*bar
25104 Lists: 4. No escapes needed
25117 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25121 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25135 Lists: 5. No unnecessary escapes
25139 <ul><li> bar <span>[[foo]]</span></li></ul>
25140 <ul><li> =bar <span>[[foo]]</span></li></ul>
25141 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25142 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25143 <ul><li> =bar <span>foo]]</span>=</li></ul>
25144 <ul><li> <s></s>: a</li></ul>
25145 <ul><li> <i>* foo</i></li></ul>
25148 * bar <span><nowiki>[[foo]]</nowiki></span>
25150 * =bar <span><nowiki>[[foo]]</nowiki></span>
25152 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25154 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25156 * =bar <span>foo]]</span>=
25164 Lists: 6. Escape bullets in SOL position
25168 <p><!--cmt-->*foo</p>
25170 <!--cmt--><nowiki>*</nowiki>foo
25174 Lists: 7. Escape bullets in a multi-line context
25183 <nowiki>*</nowiki>b
25187 Lists: 8. Escape colons only if not present in tags
25191 <dl><dt>a:b<i>c:d</i></dt></dl>
25193 ; <nowiki>a:b</nowiki>''c:d''
25196 #### --------------- HRs ---------------
25197 #### 1. Single line
25198 #### -----------------------------------
25201 HRs: 1. Single line
25209 ----<nowiki>----</nowiki>
25214 #### --------------- Tables ---------------
25215 #### 1a. Simple example
25216 #### 1b. No escaping needed (!foo)
25217 #### 1c. No escaping needed (|foo)
25218 #### 1d. No escaping needed (|}foo)
25220 #### 2a. Nested in td (<td>foo|bar</td>)
25221 #### 2b. Nested in td (<td>foo||bar</td>)
25222 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25224 #### 3a. Nested in th (<th>foo!bar</th>)
25225 #### 3b. Nested in th (<th>foo!!bar</th>)
25226 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25230 #### 4c. No escaping needed
25231 #### --------------------------------------
25234 Tables: 1a. Simple example
25242 <nowiki>{|</nowiki>
25247 Tables: 1b. No escaping needed
25258 Tables: 1c. No escaping needed
25269 Tables: 1d. No escaping needed
25280 Tables: 2a. Nested in td
25285 <td>foo|bar</td></tr>
25286 <tr><td>x<div>a|b</div></td>
25290 |<nowiki>foo|bar</nowiki>
25292 |x<div><nowiki>a|b</nowiki></div>
25308 Tables: 2b. Nested in td
25314 <td>a<i>b||c</i></td>
25315 <td>a<i><div>b||c</div></i></td>
25316 </tr></tbody></table>
25319 |<nowiki>foo||bar</nowiki>
25320 |a''<nowiki>b||c</nowiki>''
25321 |a''<div><nowiki>b||c</nowiki></div>''
25330 <td>a<i><div>b||c</div></i>
25336 Tables: 2c. Nested in td -- no escaping needed
25352 Tables: 3a. Nested in th
25368 Tables: 3b. Nested in th
25373 <tr><th>foo!!bar</th>
25374 <th><i>foo|bar</i></th>
25375 <th><i>foo!!bar</i></th>
25376 <th><i><span>foo!!bar</span></i></th>
25377 </tr></tbody></table>
25380 !<nowiki>foo!!bar</nowiki>
25381 !''<nowiki>foo|bar</nowiki>''
25382 !''<nowiki>foo!!bar</nowiki>''
25383 !''<span><nowiki>foo!!bar</nowiki></span>''
25392 <th><i>foo!!bar</i>
25394 <th><i><span>foo!!bar</span></i>
25400 Tables: 3c. Nested in th
25405 <tr><th>foo||bar</th>
25406 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25407 </tr></tbody></table>
25410 !<nowiki>foo||bar</nowiki>
25411 !<nowiki>foo||bar</nowiki>
25424 Tables: 4a. Escape -
25440 |<nowiki>-bar</nowiki>
25445 Tables: 4b. Escape +
25461 |<nowiki>+bar</nowiki>
25466 Tables: 4c. No escaping needed
25471 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25472 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25478 <div>a|b</div></td>
25523 Tables: 4d. No escaping needed
25528 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25529 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25530 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25541 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25551 T97430: Don't emit empty nowiki pairs around marker meta tags
25555 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25556 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25558 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25559 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25563 Unclosed xmlish element in table line shouldn't eat end delimiters
25568 <tbody><tr><td> <foo</td>
25569 <td> bar></td></tr>
25586 #### --------------- Links ----------------
25587 #### 1. Quote marks in link text
25588 #### 2. Wikilinks: Escapes needed
25589 #### 3. Wikilinks: No escapes needed
25590 #### 4. Extlinks: Escapes needed
25591 #### 5. Extlinks: No escapes needed
25592 #### --------------------------------------
25594 Links 1. WikiLinks: No escapes needed
25598 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
25599 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
25600 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
25604 [[Foo|x [Foobar] x]]
25606 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
25607 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
25608 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
25613 Links 2. WikiLinks: Escapes needed
25617 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
25618 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
25619 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
25620 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
25621 <a href="Foo" rel="mw:WikiLink">|Bar</a>
25622 <a href="Foo" rel="mw:WikiLink">]]bar</a>
25623 <a href="Foo" rel="mw:WikiLink">[[bar</a>
25624 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
25625 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
25626 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
25628 [[Foo|<nowiki>Foobar]</nowiki>]]
25629 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
25630 [[Foo|<nowiki>[[Bar]]</nowiki>]]
25631 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
25632 [[Foo|<nowiki>|Bar</nowiki>]]
25633 [[Foo|<nowiki>]]bar</nowiki>]]
25634 [[Foo|<nowiki>[[bar</nowiki>]]
25635 [[Foo|<nowiki>x [[ y</nowiki>]]
25636 [[Foo|<nowiki>x ]] y</nowiki>]]
25637 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
25639 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
25640 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
25641 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
25642 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
25643 <a href="/wiki/Foo" title="Foo">|Bar</a>
25644 <a href="/wiki/Foo" title="Foo">]]bar</a>
25645 <a href="/wiki/Foo" title="Foo">[[bar</a>
25646 <a href="/wiki/Foo" title="Foo">x [[ y</a>
25647 <a href="/wiki/Foo" title="Foo">x ]] y</a>
25648 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
25653 Links 3. WikiLinks: No escapes needed
25657 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
25658 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
25663 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
25664 <a href="/wiki/Foo" title="Foo">foo|bar</a>
25669 Links 4. ExtLinks: Escapes needed
25673 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
25674 <a rel="mw:ExtLink" href="http://google.com">google]</a>
25675 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
25676 <p>[http://google.com]</p>
25677 <p>[http://google.com google]</p>
25678 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
25679 <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>
25681 [http://google.com <nowiki>[google]</nowiki>]
25682 [http://google.com <nowiki>google]</nowiki>]
25683 [http://google.com <nowiki>goog] le</nowiki>]
25685 <nowiki>[http://google.com]</nowiki>
25687 <nowiki>[http://google.com google]</nowiki>
25689 [http://google.com<nowiki>]</nowiki>
25691 [{{echo|http://google.com}}<nowiki>]</nowiki>
25693 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
25694 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
25695 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
25696 </p><p>[http://google.com]
25697 </p><p>[http://google.com google]
25698 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25699 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25704 Links 5. ExtLinks: No escapes needed
25708 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
25709 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
25711 [http://google.com [google]
25713 [[http://google.com]]
25715 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
25716 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
25721 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
25725 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
25726 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
25727 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
25728 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
25729 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
25730 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
25731 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25732 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
25733 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25734 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
25735 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
25736 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
25737 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
25740 x<nowiki/>http://example.com<nowiki/>y
25741 http://example.com<nowiki/>?x
25742 http://example.com<nowiki/>&x
25743 http://example.com<nowiki/>'x
25744 http://example.com<nowiki/>,x
25745 http://example.com<nowiki/>.x
25746 http://example.com<nowiki/>;x
25747 http://example.com<nowiki/>:x
25748 http://example.com<nowiki/>;x
25749 http://example.com<nowiki/>!x
25750 http://example.com<nowiki/>=x
25751 http://example.com<nowiki/>(x)
25752 http://example.com(x<nowiki/>)
25756 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25761 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
25763 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
25764 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
25765 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
25766 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
25767 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
25773 "http://example.com"
25774 (http://example.com)
25775 (http://example.com) foo
25776 http://example.com,
25777 http://example.com, foo
25780 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
25782 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
25783 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
25784 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
25785 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
25786 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
25791 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25795 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
25796 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
25798 http://example.com.,;:!?\
25799 -http://example.com:
25801 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
25802 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
25807 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
25811 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
25812 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
25813 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
25817 X<nowiki/>RFC 123<nowiki/>y
25821 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
25825 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
25826 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
25827 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
25834 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
25835 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
25836 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
25841 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
25845 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
25846 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
25847 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
25851 X<nowiki/>PMID 123<nowiki/>y
25855 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
25859 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
25860 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
25861 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
25868 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
25869 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
25870 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
25875 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
25879 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
25880 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
25881 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
25884 ISBN 1234567890<nowiki/>1
25885 ISBN 1234567890<nowiki/>x
25886 a<nowiki/>ISBN 1234567890<nowiki/>b
25890 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
25894 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
25898 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
25903 Links 14. Protect link-like plain text. (Parsoid bug T78425)
25907 <p>this is not a link: http://example.com
25910 this is not a link: <nowiki>http://example.com</nowiki>
25914 Links 15. Link trails can't become link prefixes.
25919 <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>
25921 [[Söfnuður]]-[[00]]
25923 <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>
25927 #### --------------- Quotes ---------------
25928 #### 1. Quotes inside <b> and <i>
25929 #### 2. Link fragments separated by <i> and <b> tags
25930 #### 3. Link fragments inside <i> and <b>
25931 #### 4. No escaping needed
25932 #### --------------------------------------
25934 1a. Quotes inside <b> and <i>
25945 <b>foo'<i>bar'</i>baz</b>
25954 <i>fools'<span> errand</span></i>
25955 <i><span>fool</span>'s errand</i>
25956 '<i>foo</i> bar '<i>baz</i>
25957 a|!*#-:;+-~[]{}b'<i>x</i>
25961 ''<nowiki>''foo''</nowiki>''
25962 ''<nowiki>'''foo'''</nowiki>''
25964 '''<nowiki/>'foo''''
25965 '''<nowiki>''foo''</nowiki>'''
25966 '''<nowiki>'''foo'''</nowiki>'''
25967 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
25968 '''foo'''<nowiki/>'s
25974 '''foo'''<nowiki/>'
25975 ''''foo'''<nowiki/>'
25976 ''fools'<span> errand</span>''
25977 ''<span>fool</span>'s errand''
25978 '<nowiki/>''foo'' bar '''baz''
25979 a|!*#-:;+-~[]{}b'''x''
25983 1b. Quotes inside <b> and <i> with other tags on same line
25987 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
25988 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
25989 <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>
25990 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
25991 '<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>
25992 '<i>foo</i> <div title="name">test</div>
25993 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
25994 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
25995 <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>
25998 '''a'' foo ''[[bar]]''
25999 ''a''' foo ''[[bar]]''
26000 ''a''' foo '''{{echo|[[bar]]}}'''
26001 [[foo]] x'''[[bar]]''
26002 '''foo'' <ref>test</ref>
26003 '''foo'' <div title="name">test</div>
26004 '''foo'' and <br> bar
26009 2. Link fragments separated by <i> and <b> tags
26013 <p>[[<i>foo</i>hello]]</p>
26014 <p>[[<b>foo</b>hello]]</p>
26016 [[''foo''<nowiki>hello]]</nowiki>
26018 [['''foo'''<nowiki>hello]]</nowiki>
26021 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26022 # this is one of the shortcomings of this format
26024 3. Link fragments inside <i> and <b>
26028 <p><i>[[foo</i>]]</p>
26029 <p><b>[[foo</b>]]</p>
26031 ''[[foo''<nowiki>]]</nowiki>
26033 '''[[foo'''<nowiki>]]</nowiki>
26037 4. No escaping needed
26041 <p>'<span><i>bar</i></span>'
26042 '<span><b>bar</b></span>'
26046 '<span>''bar''</span>'
26047 '<span>'''bar'''</span>'
26051 #### ----------- Paragraphs ---------------
26052 #### 1. No unnecessary escapes
26053 #### --------------------------------------
26056 1. No unnecessary escapes
26060 <p>bar <span>[[foo]]</span>
26061 </p><p>=bar <span>[[foo]]</span>
26062 </p><p>[[bar <span>[[foo]]</span>
26063 </p><p>]]bar <span>[[foo]]</span>
26064 </p><p>=bar <span>foo]]</span>=
26067 bar <span><nowiki>[[foo]]</nowiki></span>
26069 =bar <span><nowiki>[[foo]]</nowiki></span>
26071 [[bar <span><nowiki>[[foo]]</nowiki></span>
26073 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26075 =bar <span>foo]]</span><nowiki>=</nowiki>
26078 #### ----------------------- PRE --------------------------
26079 #### 1. Leading whitespace in SOL context should be escaped
26080 #### ------------------------------------------------------
26082 1. Leading whitespace in SOL context should be escaped
26105 <nowiki> </nowiki>a
26107 <nowiki> </nowiki> a
26111 <nowiki> </nowiki> a
26113 <nowiki> </nowiki>a
26116 <nowiki> </nowiki>b
26139 2. Leading whitespace in non-indent-pre contexts should not be escaped
26143 <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>
26144 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26145 <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>
26155 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26174 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26178 <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>
26180 [[File:Foobar.jpg|thumb|caption]]
26184 5. Nowiki escaping should account for indent-pres
26194 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26207 #### --------------- Behavior Switches --------------------
26210 1. Valid behavior switches should be escaped
26217 <nowiki>__TOC__</nowiki>
26218 ''<nowiki>__TOC__</nowiki>''
26222 2. Invalid behavior switches should not be escaped
26233 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26235 Behavior switches should be SOL-transparent
26239 <meta property="mw:PageProp/toc" />
26241 <!-- this one's bogus -->
26244 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26246 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26250 <!-- this one's bogus -->
26259 #### --------------- HTML tags ---------------
26262 #### 3. multi-line html tag
26263 #### 4. extension tags
26264 #### -----------------------------------------
26270 <a href="http://google.com">google</a>
26272 <a href="http://google.com">google</a>
26280 <ul><li> <div>foo</div></li>
26281 <li> <div style="color:red">foo</div></li>
26282 <li> <td></li></ul>
26285 * <nowiki><div>foo</div></nowiki>
26286 * <nowiki><div style="color:red">foo</div></nowiki>
26287 * <nowiki><td></nowiki>
26291 3. multi-line html tag
26310 <p><ref>foo</ref>
26311 </p><p><ref>bar
26312 </p><p>baz</ref>
26315 <nowiki><ref>foo</ref></nowiki>
26317 <nowiki><ref>bar</nowiki>
26319 baz<nowiki></ref></nowiki>
26322 #### --------------- Others ---------------
26328 <p><nowiki>foo</nowiki>
26331 <nowiki>foo</nowiki>
26334 ## The quote-char in the input is necessary for triggering the bug
26336 (T54035) Nowiki-escaping should not get tripped by " :" in text
26345 #----------- End of wikitext escaping tests --------------
26349 Tag-like HTML structures are passed through as text
26371 </p><p>1<d e>f
26376 HTML tag with necessary entities in attributes
26378 <span title="&amp;">foo</span>
26380 <p><span title="&amp;">foo</span>
26385 HTML tag with 'unnecessary' entity encoding in attributes
26387 <span title="&">foo</span>
26389 <p><span title="&">foo</span>
26394 HTML tag with broken attribute value quoting
26396 parsoid=wt2html,html2html
26398 <span title="Hello world>Foo</span>
26400 <p><span title="Hello world">Foo</span>
26403 <p><span title="Hello world">Foo</span></p>
26407 Self-closed tag with broken attribute value quoting
26409 parsoid=wt2html,html2html
26411 <div title="Hello world />Foo
26413 <div title="Hello world"></div>
26416 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26420 Table with broken attribute value quoting
26422 parsoid=wt2html,html2html
26425 | title="Hello world|Foo
26430 <td title="Hello world">Foo
26436 <td title="Hello world">Foo
26442 Table with broken attribute value quoting on consecutive lines
26444 parsoid=wt2html,html2html
26447 | title="Hello world|Foo
26448 | style="color:red|Bar
26453 <td title="Hello world">Foo
26455 <td style="color:red">Bar
26461 <td title="Hello world">Foo
26462 </td><td style="color: red">Bar
26463 </td></tr></tbody></table>
26468 Accept empty td cell attribute
26471 | align="center" | foo || |
26476 <td align="center"> foo </td>
26483 Non-empty attributes in th-cells
26486 ! Foo !! style="color: red" | Bar
26492 <th style="color: red"> Bar
26498 Accept empty attributes in th-cells
26513 Empty table rows go away
26534 ### Parsoid-centric tests for testing RTing of inter-element separators
26535 ### Edge cases not tested by existing parser tests and specific to
26536 ### Parsoid-specific serialization strategies.
26540 RT-ed inter-element separators should be valid separators
26552 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
26556 # Parsoid-only since PHP parser relies on Tidy for correct output
26558 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
26572 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
26573 <p>bar</p></small></td></tr>
26577 <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>
26581 # Note that the "style" attribute is really a template parameter here.
26582 # The = would have to be {{=}} if you wanted the literal.
26584 Empty TD followed by TD with tpl-generated attribute
26589 |{{echo|style='color:red'}}|foo
26603 Indented table with an empty td
26621 ## We have some newline diffs RT-ing this edge case
26622 ## and it is not important enough -- we seem to be emitting
26623 ## at most 2 newlines after a </tr> and this is unrelated to
26624 ## the issue from T85627 that this is testing.
26626 Indented table with blank lines in between (T85627)
26645 Indented block & table
26659 <div data-parsoid='{"stx":"html"}'>foo</div>
26661 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
26666 Indent and comment before table row
26681 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
26682 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
26686 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
26688 Empty TR followed by a template-generated TR
26694 {{echo|<tr><td>foo</td></tr>}}
26699 <tr class='mw-empty-elt'></tr>
26700 <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}}]}'>
26705 ## PHP and parsoid output differ for this, and since this is primarily
26706 ## for testing Parsoid's serializer, marking this Parsoid only
26708 Empty TR followed by mixed-ws-comment line should RT correctly
26721 <tr class='mw-empty-elt'></tr>
26724 <!--c--> </tr><!--d-->
26730 Multi-line image caption generated by templates with/without trailing newlines
26732 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
26733 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
26735 <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>
26736 <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>
26740 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
26744 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
26746 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
26748 <includeonly>foo</includeonly>
26756 ## PHP emits broken html for this, and since this is primarily
26757 ## a Parsoid serializer test, marking this Parsoid only
26759 Improperly nested inline or quotes tags with whitespace in between
26761 <span> <s>x</span> </s>
26764 <p><span> <s>x</s></span><s> </s>
26765 <b> <i>x</i></b><i> </i>
26770 Encapsulate protected attributes from wt
26772 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
26774 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
26778 <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>
26780 <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">
26781 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
26785 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
26786 ## Having nested or stray pre tags results in the attempt to add duplicates,
26787 ## causing an assertion fail. This test tries to prevent that situation.
26789 Ensure ParagraphWrapper can deal with stray closing pre tags
26799 1. Ensure fostered text content is wrapped in element nodes
26803 <table>hi</table><table>ho</table>
26812 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
26814 parsoid=wt2html,wt2wt
26823 <tbody><tr><td> a</td></tr>
26828 Encapsulation properly handles null DSR information from foster box
26830 parsoid=wt2html,wt2wt
26832 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
26834 <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>
26838 1. Encapsulate foster-parented transclusion content
26840 parsoid=wt2wt,wt2html
26842 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
26844 <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>
26854 2. Encapsulate foster-parented transclusion content
26856 parsoid=wt2wt,wt2html
26858 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
26860 <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>
26871 3. Encapsulate foster-parented transclusion content
26873 parsoid=wt2wt,wt2html
26875 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
26877 <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>"]}">
26890 4. Encapsulate foster-parented transclusion content
26892 parsoid=wt2wt,wt2html
26894 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
26896 <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>"]}">
26909 5. Encapsulate foster-parented transclusion content
26911 parsoid=wt2wt,wt2html
26913 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
26915 <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>
26930 6. Encapsulate foster-parented transclusion content
26932 parsoid=wt2wt,wt2html
26934 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
26936 <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>
26952 7. Encapsulate foster-parented transclusion content
26954 parsoid=wt2wt,wt2html
26956 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
26958 <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>
26968 # Note that the wt is broken on purpose: the = should be {{=}} if you
26969 # don't want it to be a template parameter key.
26971 8. Encapsulate foster-parented transclusion content
26973 parsoid=wt2wt,wt2html
26976 }}{|{{echo|style='color:red'}}
26981 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
26983 <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>
26994 9. Encapsulate foster-parented transclusion content
26996 parsoid=wt2wt,wt2html
26998 <table>{{echo|hi</table>hello}}
27000 <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>
27004 Table in fosterable position
27015 <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">
27017 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27023 # Parsoid only for T66747
27025 Properly encapsulate empty-content transclusions in fosterable positions
27033 <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"}]]}'>
27039 Always encapsulate foster box when template range is expanded to table
27052 T115289: Unclosed table
27054 {{echo|<table>}}<!--c-->[[Category:Two]]
27056 <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>
27060 T115289: Don't migrate newlines out of tables with fostered content
27062 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27064 <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>
27068 T73074: More fostering fun
27070 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27072 <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>
27076 Support <object> element with .data attribute
27080 <object data="test.swf"></object>
27082 <object data="test.swf"></object>
27086 Don't block XML namespace declaration
27088 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27090 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27093 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27096 # -----------------------------------------------------------------
27097 # The following section of tests are primarily to spec requirements
27098 # around Parsoid's serialization (old, new, edited content)
27100 # All these tests are marked Parsoid html2wt and html2html only
27101 # ----------------------------------------------------------------
27104 Ignore rel attribute in a-tags during serialization to url-links
27108 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27109 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27110 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27112 http://en.wikipedia.org/wiki/Foobar
27113 http://en.wikipedia.org/wiki/Foobar
27114 http://en.wikipedia.org/wiki/Foobar
27117 # 'mi' is a localinterwiki prefix as well as a language
27119 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27123 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27129 Parsoid should accept interwiki shortcuts
27133 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27134 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27135 <a href='./fr:Foo'>Foo</a></p>
27136 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27137 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27138 <a href='fr%3AFoo'>Foo</a></p>
27139 <p><a href='FR%3AFoo'>Foo</a>
27140 <a href='./FR:Foo'>Foo</a></p>
27155 Parsoid should not accept invalid interwiki shortcuts
27159 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27160 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27161 <a href='news:Foo'>Foo</a></p>
27170 New wikilinks should be serialized properly
27174 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27175 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27176 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27177 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27178 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27182 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27183 http://en.wikipedia.org/wiki/Foo
27184 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27188 New wiki links (href variations)
27192 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27193 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27194 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27195 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27200 [[Toxine bactérienne]]
27204 New wiki links (content string variations)
27208 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27209 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27210 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27214 [[Foo_bar|./Foo_bar]]
27218 New category links (href variations)
27222 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27223 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27224 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27226 [[Category:Toxine bactérienne]]
27227 [[Category:Toxine bactérienne]]
27228 [[Category:Toxine bactérienne]]
27232 New sol transparent links don't need indent-pre nowiki protection
27237 <link rel="mw:PageProp/redirect" href="./Main_Page">
27238 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27239 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27241 #WEITERLEITUNG [[Main Page]]
27242 <!-- this is good --> [[Category:Good]]
27243 <!-- this is great --> [[Kategorie:Great]]
27247 New interlanguage links (href variations)
27251 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27252 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27253 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27255 [[es:Toxine bactérienne]]
27256 [[es:Toxine_bactérienne]]
27257 [[es:Toxine_bactérienne]]
27261 Image: Modifying size of an image (1)
27264 "modes": ["wt2wt"],
27266 ["img[height]", "attr", "height", "22"],
27267 ["img[width]", "attr", "width", "200"]
27271 [[Image:Foobar.jpg|230x230px]]
27273 [[Image:Foobar.jpg|200x200px]]
27277 Image: Modifying size of an image (2)
27280 "modes": ["wt2wt"],
27282 ["img[height]", "attr", "height", "100"],
27283 ["img[width]", "attr", "width", "500"]
27287 [[Image:Foobar.jpg|230x230px]]
27289 [[Image:Foobar.jpg|500x500px]]
27292 # Change in size is ignored so long as class='mw-default-size'
27294 Image: Modifying size of an image (3)
27297 "modes": ["wt2wt"],
27299 ["figure[class]", "removeClass", "mw-default-size"],
27300 ["figure img", "attr", "height", "19"],
27301 ["figure img", "attr", "width", "170"]
27305 [[Image:Foobar.jpg|thumb]]
27307 [[Image:Foobar.jpg|thumb|170x170px]]
27311 Image: Modifying alignment of an image (T50665)
27314 "modes": ["wt2wt"],
27316 ["figure[class]", "removeClass", "mw-halign-right"],
27317 ["figure[class]", "addClass", "mw-halign-left"]
27321 [[Image:Foobar.jpg|thumb|caption|right]]
27323 [[Image:Foobar.jpg|thumb|caption|left]]
27327 Image: Modifying mw-default-size of an frameless image (T64805)
27330 "modes": ["wt2wt"],
27332 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27336 [[Image:Foobar.jpg|frameless|right]]
27338 [[Image:Foobar.jpg|frameless|right|220x220px]]
27342 Image: Modifying valign of an image (T51221)
27345 "modes": ["wt2wt"],
27347 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27348 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27352 [[File:Foobar.jpg|20px|middle]]
27354 [[File:Foobar.jpg|20px|text-top]]
27358 Image: Modifying alt attribute of an image (T58400)
27361 "modes": ["wt2wt"],
27363 ["img[alt]", "attr", "alt", "some alternate edited text"]
27367 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27369 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27373 Image: Modifying caption of an image
27376 "modes": ["wt2wt"],
27378 ["figcaption", "text", "new caption"]
27382 [[Image:Foobar.jpg|thumb|original caption]]
27384 [[Image:Foobar.jpg|thumb|new caption]]
27388 Image: empty alt attribute (T50924)
27392 [[File:Foobar.jpg|thumb|alt=|bar]]
27394 <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>
27398 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27404 <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>
27406 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27410 Image: Block level image should have \n before and after
27413 [[File:Foobar.jpg|right|thumb|150x150px]]
27417 <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>
27422 Image: New block level image should have \n before and after (existing content)
27425 [[File:Foobar.jpg|right|thumb|150x150px]]
27429 <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>
27434 Image: upright option (parsoid)
27436 [[File:Foobar.jpg|thumb|upright|caption]]
27437 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27438 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27440 <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>
27441 <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>
27442 <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>
27446 Image: upright option is ignored on inline and frame images (parsoid)
27448 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27450 <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>
27454 Image: in template parameter with empty parameter
27456 {{echo|[[File:Foobar.jpg|link=]]}}
27458 <p><span class="mw-default-size" typeof="mw:Transclusion mw:Image" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[File:Foobar.jpg|link=]]"}},"i":0}}]}'><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>
27462 Image: from basic HTML (1)
27466 <span typeof="mw:Image">
27467 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27470 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27474 Image: from basic HTML (2)
27478 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27480 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27484 Image: from basic HTML (3)
27488 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27490 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27494 Image: from basic HTML (4)
27498 <img src="./File:Foobar.jpg">
27500 [[File:Foobar.jpg|link=]]
27504 Image: Invalid title as link
27506 [[File:Foobar.jpg|link=<]]
27508 <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>
27511 <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>
27515 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27520 <li><p>foo</p></li>
27527 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27531 <ul> <li>foo</li></ul>
27537 Don't strip leading whitespace when handling indent-pre suppressing tags
27542 <tr><td> indented row</td></tr>
27545 <b>This is very bold of you!</b>
27548 indented cell (no pre-wrapping!)
27558 '''This is very bold of you!'''
27562 indented cell (no pre-wrapping!)
27570 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
27592 <nowiki> </nowiki></span>bar2
27595 <nowiki> </nowiki><span>bar</span>
27598 <nowiki> </nowiki><span>foo</span>
27603 Lists: Dont insert newlines in a serialized list item.
27607 <ul><li>a<br>b</li><li>c</li></ul>
27614 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
27617 "modes": ["html2wt"],
27618 "scrubWikitext": false
27621 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27622 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27624 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27625 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27627 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
27629 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27631 == hello there [[Category:A1]] ==
27633 == [[Category:A2]] hi pal ==
27635 == <!--foo--> [[Category:A3]] how goes it ==
27637 == it goes well [[Category:A4]] <!--bar--> ==
27639 ==howdy [[Category:A5]]==
27645 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
27648 "modes": ["html2wt"],
27649 "scrubWikitext": true
27652 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27653 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27655 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27656 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27658 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27666 <!--foo--> [[Category:A3]]
27671 [[Category:A4]] <!--bar-->
27679 Headings: Don't hoist metas that come from templates
27682 "modes": ["html2wt"],
27683 "scrubWikitext": true
27686 <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>
27688 == {{echo|foo [[Category:Foo]]}} ==
27692 Headings: Category in ref isn't hoisted
27695 "modes": ["html2wt"],
27696 "scrubWikitext": true
27699 <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>
27701 <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>
27704 [[Category:Baz]] </ref> ==
27710 Parsoid: Serialize positional parameters with = in them as named parameter
27714 <p about="#mwt1" typeof="mw:Transclusion"
27715 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
27717 <p about="#mwt1" typeof="mw:Transclusion"
27718 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
27720 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27721 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27722 <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>
27726 {{echo|1=f=oo|2=bar}}
27728 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27729 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27730 {{echo|<nowiki>f=oo</nowiki>|bar}}
27734 Parsoid: Serialize positional parameters with = in extlink as named parameter
27738 <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>
27740 {{echo|1=http://stuff?is=ok}}
27744 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
27748 <div>a<p>b</p></div>
27769 Substrings resembling wikitext in hrefs should not get nowiki escapes
27773 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
27779 Enforce single-line context in the serializer
27786 <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">
27787 </span><span about="#mwt1">you</span> </h2>
27789 <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>
27791 <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
27792 there</span></li></ol>
27804 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
27811 </tbody></table></dd></dl>
27815 == hi {{bogus|there
27826 * foo '''bar''' baz
27838 Serialize new placeholder space without spans
27842 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
27844 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
27846 <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>
27852 <ref>foo : bar</ref>ok
27856 #-----------------------
27857 # Tag minimization tests
27858 #-----------------------
27861 1. I/B quote minimization: wikitext-only tags should be combined
27865 <p><i>A</i><i>B</i></p>
27866 <p><b>A</b><b>B</b></p>
27867 <p><i>A</i><b><i>B</i></b></p>
27868 <p><b>A</b><i><b>B</b></i></p>
27869 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
27870 <p><i><b>A</b></i><i><b>B</b></i></p>
27871 <p><i><b>A</b></i><b><i>B</i></b></p>
27872 <p><b><i>A</i></b><i><b>B</b></i></p>
27892 2. I/B quote minimization: wikitext and html tags should not be combined
27896 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
27897 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
27901 ''A''<nowiki/>'''<i>B</i>'''
27905 3. I/B quote minimization: templated content stops minimization
27909 <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>
27910 <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>
27912 ''A''{{echo|''B''}}
27914 ''A''{{echo|'''''B'''''}}
27918 4. I/B quote minimization: new content should be mimimized with adjacent old content
27922 <p><i>A</i><i>B</i></p>
27923 <p><b>A</b><b>B</b></p>
27924 <p><i>A</i><b><i>B</i></b></p>
27934 5a. Merge adjacent quote nodes if they've been edited
27937 "modes": ["wt2wt", "selser"],
27939 ["p", "contents", "remove", ":contains('b')"]
27949 5b. Merge adjacent quote nodes if they've been edited
27952 "modes": ["wt2wt", "selser"],
27958 ''a''<span id="x">b</span>''c''
27964 1. Merge adjacent link nodes as long as at least one element is new
27967 "modes": ["html2wt"],
27968 "scrubWikitext": true
27971 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
27972 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
27973 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
27977 [[Football|Foot]][[Football|ball]]
27981 2. Merge adjacent link nodes and enable additional normalizations
27984 "modes": ["html2wt"],
27985 "scrubWikitext": true
27988 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
27990 [[Football|''Football'']]
27994 3. Don't merge adjacent link nodes if scrubWikitext is false
27997 "modes": ["html2wt"],
27998 "scrubWikitext": false
28001 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28003 [[Football|Foot]][[Football|ball]]
28006 #------------------------------
28007 # End of tag minimization tests
28008 #------------------------------
28011 T56262: New entities
28015 <span typeof="mw:Entity"> </span>
28020 ## Note that there is no wikitext output for 'unknownproperty' ##
28021 ## Unknown magic words are silently dropped ##
28028 <meta property='mw:PageProp/toc' />
28029 <meta property='mw:PageProp/notoc' />
28030 <meta property='mw:PageProp/forcetoc' />
28031 <meta property='mw:PageProp/index' />
28032 <meta property='mw:PageProp/noindex' />
28033 <meta property='mw:PageProp/nogallery' />
28034 <meta property='mw:PageProp/noeditsection' />
28035 <meta property='mw:PageProp/notitleconvert' />
28036 <meta property='mw:PageProp/nocontentconvert' />
28037 <meta property='mw:PageProp/unknownproperty' />
28047 __NOCONTENTCONVERT__
28051 Consecutive <pre>s should not get merged
28053 parsoid=html2wt,html2html
28055 <pre>a</pre><pre>b</pre>
28083 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28087 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28089 [[Special:BookSources/1234567890|ISBN 1234567895]]
28093 Edited RFC links not serializable as RFC links should serialize as extlinks
28097 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28099 [https://tools.ietf.org/html/rfc123 New RFC]
28103 Edited PMID links not serializable as PMID links should serialize as extlinks
28107 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28109 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28113 WTS of autolinks with trailing/surrounding context
28117 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28118 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28119 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28120 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28121 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28122 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28124 http://cscott.net'''foo'''
28126 http://cscott.net<b>foo</b>
28128 '''http://cscott.net'''
28130 '''http://cscott.net '''
28132 '''http://cscott.net<nowiki/>x'''
28134 http://cscott.net<nowiki/>x
28138 WTS of autolinks with nowikis (round-trip)
28140 x<nowiki/>http://cscott.net<nowiki/>x
28142 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
28145 # this is the "easy" test because it leaves in place all the
28146 # data-parsoid information indicating this is an autolink
28148 WTS of autolinks with escapes (editing)
28151 "modes": ["wt2wt"],
28153 [ "span", "remove" ]
28157 x<nowiki/>http://cscott.net<nowiki/>x
28159 x<nowiki/>http://cscott.net<nowiki/>x
28163 WTS of edited autolink-like text (T103364)
28166 "modes": ["wt2wt"],
28168 [ "span[typeof]", "removeAttr", "typeof" ]
28172 Not a link: <nowiki>http://example.com</nowiki>.
28174 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28178 WTS of newly-authored autolink-like text (T103364)
28182 <p>http://example.com is not a link.</p>
28184 <nowiki>http://example.com</nowiki> is not a link.
28188 WTS of autolink-like text after an autolink (T108563)
28192 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28194 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28198 Magic links inside links (not autolinked)
28200 [[Foo|http://example.com]]
28203 [[Foo|ISBN 123456789x]]
28205 [http://foo.com http://example.com]
28206 [http://foo.com RFC 1234]
28207 [http://foo.com PMID 1234]
28208 [http://foo.com ISBN 123456789x]
28210 <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>
28211 <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>
28213 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28214 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28215 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28216 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28218 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
28219 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
28220 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
28221 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
28225 Magic links inside image captions (autolinked)
28227 [[File:Foobar.jpg|thumb|http://example.com]]
28228 [[File:Foobar.jpg|thumb|RFC 1234]]
28229 [[File:Foobar.jpg|thumb|PMID 1234]]
28230 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28232 <div class="thumb tright">
28233 <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>
28234 <div class="thumbcaption">
28235 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28236 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
28239 <div class="thumb tright">
28240 <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>
28241 <div class="thumbcaption">
28242 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28243 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a></div>
28246 <div class="thumb tright">
28247 <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>
28248 <div class="thumbcaption">
28249 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28250 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
28253 <div class="thumb tright">
28254 <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>
28255 <div class="thumbcaption">
28256 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28257 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
28261 <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>
28262 <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="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink">RFC 1234</a></figcaption></figure>
28263 <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>
28264 <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>
28268 WTS of magic word text (T109371)
28273 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28274 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28276 <nowiki>RFC 1234</nowiki>
28278 [http://foo.com RFC 1234]
28284 Edited Redirect link should emit a non-piped wikitext link
28288 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28294 T75121: Infer extension name from typeOf if data-mw is not present
28296 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28298 <div typeOf="mw:Extension/foo"></div>
28303 # Note that the <p> wrapping isn't present in PHP parser output
28304 # The important thing for this test is that P-wrapping doesn't
28305 # interfere with the <nowiki> protection for leading - in <td>
28306 # (which isn't necessary for <th>).
28308 T88318: p-wrapped dash in table.
28310 parsoid=html2wt,wt2wt
28313 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28314 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28315 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28322 |<nowiki>-</nowiki>
28323 |<nowiki>- </nowiki>
28342 <td><small>-</small></td>
28354 T149209: WTS: Handle newlines in table cells properly
28362 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28364 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28370 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
28372 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
28394 T149209: Selser: Handle newlines in table cells properly
28397 "modes": ["selser"],
28399 [ "#h1", "html", "a\nb\n" ],
28400 [ "#h2", "html", "a\nb\n" ],
28401 [ "#c1", "html", "a\nb\n" ],
28402 [ "#c2", "html", "<p>a</p>" ],
28403 [ "#c3", "html", "<p>a</p>" ],
28404 [ "#c4", "html", "edit-me<p>a</p>" ]
28409 ! id="h1" |edit-me!!1
28411 ! id="h2" |edit-me||2
28413 | id="c1" |edit-me||3
28415 | id="c2" |edit-me||4
28417 | id="c3" |edit-me||p||q||r
28419 | id="c4" |edit-me||p||q||r
28448 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28453 <td id='mwAc'>foo</td>
28454 <td id='serialize-this'>bar</td>
28459 | id="serialize-this" |bar
28464 Parsoid-like element ids should not be serialized to wikitext unless shadowed
28468 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
28470 <div id="hello">ok</div>
28477 "modes": ["wt2wt"],
28479 [ "#xyz", "before", "<b>before</b> stuff " ],
28480 [ "#xyz", "after", " stuff <i>after</i>" ],
28481 [ "#xyz", "html", "x <b>y</b> z" ]
28485 <span id="xyz">hello</span>
28487 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
28491 Never serialize a-tag as html, regardless of what data-parsoid has to say
28493 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28495 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
28500 ## SSS FIXME: This is broken output nevertheless.
28501 ## What might be a reasonable non-broken output for this?
28502 ## This is an edge case unlikely to be seen in production
28503 ## that I am not wasting more time on this right now.
28505 Never serialize a-tag as html, no matter what attributes it has
28507 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28509 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
28511 [http://boo.org http://boohoo.org]
28514 # Misnested is an indication that selser can reuse the source but these have
28515 # shown to sneak through on occasion. See T101768.
28516 # The original wikitext here is: [http://test.com [[one]] two three]
28518 Strip span tags added to mark misnested links
28522 <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>
28524 [http://test.com][[one]] two three
28528 Catch regression when unpacking misnested links
28532 {{echo|hi}}[http://example.com [[ho]]]
28534 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span><a rel="mw:ExtLink" href="http://example.com"></a><a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"misnested":true}'>ho</a></p>
28538 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
28542 <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|}"]}'>
28554 ## This test verifies the presence and computation of this attribute indirectly
28555 ## by making an edit and ensuring that the serialization is correct (which it would be
28556 ## only if firstWikitextNode is properly set).
28558 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
28561 "modes": ["wt2wt"],
28563 [ "div#x", "remove" ],
28564 [ "div", "before", "<div>new</div>" ]
28568 <div id="x">foo</div>
28570 {{echo|<div>boo</div>
28578 {{echo|<div>boo</div>
28584 # --------------------------------------------
28585 # Tests spec'ing wikitext serialization norms |
28586 # --------------------------------------------
28589 Serialize multi-line indent-pre starting with wikitext syntax
28603 1. Categories should always be serialized on their own line
28607 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
28615 2. Categories that are part of templates should not introduce a line break
28617 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
28619 <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>
28622 # Careful while editing these next 2 tests. There are \u200f characters
28623 # before and after the <link> tags in the HTML and following some
28624 # of the categories in wikitext
28625 # Do not remove these characters in edits.
28627 # As part of the serialization, these bidi characters will get stripped.
28629 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
28632 "modes": ["html2wt"],
28633 "scrubWikitext": true
28636 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
28637 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
28640 [[קטגוריה: שיטות משפט]]
28644 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
28647 "modes": ["html2wt"],
28648 "scrubWikitext": true
28651 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
28658 Lists: Add space after bullets
28665 <li><span> baz</span></li>
28670 * <span> baz</span>
28674 1. Headings: Add space before/after == (T53744)
28681 <h2><span> baz</span></h2>
28689 == <span> baz</span> ==
28693 2. Headings: Add space before/after == even after hoisted content
28696 "modes": ["html2wt"],
28697 "scrubWikitext": true
28700 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
28708 1. Headings: suppress newly created empty headings
28711 "modes": ["html2wt"],
28712 "scrubWikitext": true
28720 2. Headings: don't suppress empty headings if scrubWikitext is false
28730 3. Headings: suppress empty headings on edits
28733 "modes": ["selser"],
28734 "scrubWikitext": true,
28740 ==<span id="x">foo</span>==
28745 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
28748 "modes": ["html2wt"],
28749 "scrubWikitext": true
28752 <h2>foo<br/>bar</h2>
28753 <h2>foo <span><br/>bar</span> baz</h2>
28757 == foo <span> bar</span> baz ==
28761 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
28764 "modes": ["html2wt"],
28765 "scrubWikitext": false
28768 <h2>foo<br/>bar</h2>
28774 1. WT Quote Tags: suppress newly created empty style tags
28777 "modes": ["html2wt"],
28778 "scrubWikitext": true
28786 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
28792 ''<nowiki/>'''''<nowiki/>'''
28796 3. WT Quote Tags: suppress empty style tags on edits
28799 "modes": ["selser"],
28800 "scrubWikitext": true,
28806 '''<span id="x">foo</span>'''
28811 1. Anchors: suppress newly created empty anchors
28814 "modes": ["html2wt"],
28815 "scrubWikitext": true
28818 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
28823 2. Anchors: don't suppress empty anchors if scrubWikitext is false
28826 "modes": ["html2wt"],
28827 "scrubWikitext": false
28830 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
28836 3. Anchors: suppress empty anchors on edits
28839 "modes": ["selser"],
28840 "scrubWikitext": true,
28846 [[Test|<span id="x">foo</span>]]
28851 3a. Anchors: do not suppress numbered extlinks
28854 "modes": ["wt2wt"],
28855 "scrubWikitext": true
28860 <a rel="mw:ExtLink" href="http://foo.com"></a>
28864 3b. Anchors: do not suppress numbered extlinks
28867 "modes": ["wt2wt"],
28868 "scrubWikitext": true,
28874 [http://foo.com <span id="x">foo</span>]
28880 Normalizations should be restricted to edited content
28883 "modes": ["selser"],
28884 "scrubWikitext": true,
28886 [ "h1", "before", "<i></i>"]
28900 1. Multiple normalizations (html2wt)
28903 "modes": ["html2wt"],
28904 "scrubWikitext": true
28908 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
28909 </a><b><i></i></b>x</p>
28918 2. Multiple normalizations (selser)
28921 "modes": ["selser"],
28922 "scrubWikitext": true,
28924 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
28928 <span id="x">foo</span>
28930 <span id="x">foo</span>
28936 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
28939 "modes": ["html2wt"],
28940 "scrubWikitext": true
28952 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
28959 <nowiki> </nowiki>hi
28961 <nowiki> </nowiki> hello
28965 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
28968 "modes": ["html2wt"],
28969 "scrubWikitext": true
28978 baz bang</td></tr></table>
28984 bar<span>boo</span></p>
29000 bar<span>boo</span>
29004 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29007 "modes": ["selser"],
29008 "scrubWikitext": true,
29010 [ "p", "html", " a\n b" ]
29021 1. New links that end in spaces
29024 "modes": ["html2wt"],
29025 "scrubWikitext": false
29028 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29029 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29030 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29032 [[Berlin ]]<nowiki/>is the capital of Germany.
29036 [[Boston ]] is a city.
29040 2. New links that end in spaces
29043 "modes": ["html2wt"],
29044 "scrubWikitext": true
29047 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29048 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29049 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29051 [[Berlin]] is the capital of Germany.
29055 [[Boston]] is a city.
29059 1. Table cells with escapable prefixes
29062 "modes": ["html2wt"],
29063 "scrubWikitext": false
29067 <tr><td>a</td></tr>
29068 <tr><td>-</td></tr>
29069 <tr><td>+</td></tr>
29075 |<nowiki>-</nowiki>
29077 |<nowiki>+</nowiki>
29082 2. Table cells with escapable prefixes
29085 "modes": ["html2wt"],
29086 "scrubWikitext": true
29090 <tr><td>a</td></tr>
29091 <tr><td>-</td></tr>
29092 <tr><td>+</td></tr>
29105 3a. Table cells with escapable prefixes after edits
29108 "modes": ["selser"],
29109 "scrubWikitext": true,
29111 [ "table tbody tr:first-child td:first-child", "remove"]
29125 3b. Table cells with escapable prefixes after edits
29128 "modes": ["selser"],
29129 "scrubWikitext": true,
29131 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29138 |<span id="x">foo</span>+
29147 # FIXME: This test will fail because
29148 # normalization doesn't realize that the id attribute
29149 # will eliminate the escapable scenario
29151 4a. Table cells without escapable prefixes after edits
29154 "modes": ["selser"],
29155 "scrubWikitext": true,
29157 [ "#x", "html", "-" ]
29170 ## This tests normalizer's ability to discriminate between
29171 ## cells having identical content.
29173 4b. Table cells without escapable prefixes after edits
29176 "modes": ["selser"],
29177 "scrubWikitext": true,
29179 [ "td", "html", "-" ]
29192 ## This tests normalizer's ability to not be tripped by
29193 ## comments (and whitespace)
29195 4c. Table cells without escapable prefixes after edits
29198 "modes": ["selser"],
29199 "scrubWikitext": true,
29201 [ "table tbody tr td:first-child", "remove" ]
29216 ## This tests normalizer's ability to handle HTML cells
29218 4d. Table cells without escapable prefixes after edits
29221 "modes": ["selser"],
29222 "scrubWikitext": true,
29224 [ "td", "html", "-" ]
29229 <tr><td>a</td></tr>
29233 <tr><td>-</td></tr>
29237 ## T111151 Remove font elements without attributes
29239 5a. font tags without attributes should be dropped in scrubWikitext mode
29242 "modes": ["html2wt"],
29243 "scrubWikitext": true
29247 <font><font>bar</font></font>
29248 <font class="x">boo</font>
29252 <font class="x">boo</font>
29256 5b. font tags should not be dropped without scrubWikitext being enabled
29259 "modes": ["html2wt"],
29260 "scrubWikitext": false
29269 Escape nowiki DOM elements
29273 <nowiki><i>foo</i></nowiki>
29275 <nowiki>''foo''</nowiki>
29278 # This is meant to be an interim fix while we go about figuring out
29279 # how to not introduce these trailing <nowiki/>s in the first place.
29281 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29285 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29287 <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>
29288 <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>
29301 # ---------------------------------------------------
29302 # End of tests spec'ing wikitext serialization norms |
29303 # ---------------------------------------------------
29307 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
29315 <td><b>c</b><p>d</p></td>
29334 Anchor without href scenarios
29336 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29339 <a class="no">dice</a>
29344 <span name="foo"></span>
29348 New transclusion added after a list should be serialized after the list
29352 <ul><li>a</li></ul><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>
29358 # -----------------------------------------------------------------
29359 # End of section for Parsoid-only html2wt tests for serialization
29361 # -----------------------------------------------------------------
29363 # -----------------------------------------------------------------
29364 # The following section of tests are primarily to spec behavior of
29365 # the selective serializer. All these tests have manual selser
29366 # changes. The automated selser changes for all tests handle the
29367 # wide variation of changes, but these tests here capture specs
29368 # deterministically.
29369 # ----------------------------------------------------------------
29373 Selser: New comments should not be lost
29376 "modes": ["selser"],
29378 [ "#a", "after", "<!--c1-->" ],
29379 [ "#b", "before", "<!--c2-->" ]
29383 <span id="a">a</span>
29385 <span id="b">b</span>
29387 <span id="a">a</span><!--c1-->
29389 <!--c2--><span id="b">b</span>
29394 Selser: Check for validity of DSR before using it
29397 "modes": ["selser"],
29399 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
29403 <span id="a">a</span>
29405 {{DISPLAYTITLE:foo}}
29406 <span id="a">a</span>
29410 1. DOMDiff: Changes to <ref> content should be looked up using id
29413 "modes": ["selser"],
29415 ["#X", "after", "bar"],
29416 ["#Y", "after", "baz"]
29420 X <ref><span id="X">foo</span></ref>
29423 <ref name="a"><span id="Y">foo</span></ref>
29426 X <ref><span id="X">foo</span>bar</ref>
29429 <ref name="a"><span id="Y">foo</span>baz</ref>
29434 2. DOMDiff: Changes to <ref> content should be looked up using id
29437 "modes": ["selser"],
29439 ["#Z", "after", "bar"]
29443 A <ref>foo bar for a</ref>
29444 B <ref group="X" name="b" />
29448 <references group="X">
29449 <ref name="b"><span id="Z">foo</span></ref>
29452 A <ref>foo bar for a</ref>
29453 B <ref group="X" name="b" />
29457 <references group="X">
29458 <ref name="b"><span id="Z">foo</span>bar</ref>
29463 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
29466 "modes": ["selser"],
29468 [ "div:first-child", "text", "bar" ]
29472 <div style="{{1x|color:red;}}%">foo</div>
29474 <div style="{{1x|color:red;}}%">bar</div>
29487 <li class="mw-empty-elt"></li>
29488 <li class="mw-empty-elt"></li>
29496 [[File:Thumb.png|thumb]]
29498 <div class="thumb tright">
29499 <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>
29500 <div class="thumbcaption">
29501 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
29508 unclosed internal link XSS (T137264)
29510 [[#%3Cscript%3Ealert(1)%3C/script%3E|
29512 <p>[[#<script>alert(1)</script>|
29515 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
29518 # Use $wgRawHtml to inject a <style> tag, since you normally can't in wikitext
29519 # (Parsoid doesn't support $wgRawHtml==true)
29521 Validating that <style> isn't eaten by tidy (T167349)
29526 <html><style>.foo::before { content: "<foo>"; }</style></html>
29527 <html><style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style></html>
29531 <style>.foo::before { content: "<foo>"; }</style>
29532 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29537 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
29539 == A&B&C&amp;D&amp;amp;E ==
29540 [[#A&B&C&amp;D&amp;amp;E]]
29542 <h2><span class="mw-headline" id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">A&B&C&amp;D&amp;amp;E</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A&B&C&amp;D&amp;amp;E">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29543 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
29548 Decoding of HTML entities in indicator names for IDs (T104196)
29552 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29554 1&2&3&4&amp;5=Indicator
29559 HTML5 ids: fallback to legacy
29561 wgFragmentMode=[ 'html5', 'legacy' ]
29573 == Hey < # " > % : ' ==
29574 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29576 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29578 <!-- These two links should produce identical HTML -->
29579 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29582 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
29584 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29585 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29586 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29587 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29588 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29589 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29593 <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>
29594 <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>
29595 <h2><span id=".D0.A2.D0.B5.D1.81.D1.82"></span><span class="mw-headline" id="Тест">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29596 <h2><span id=".D0.A2.D0.B5.D1.81.D1.82_2"></span><span class="mw-headline" id="Тест_2">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29597 <h2><span id=".D1.82.D0.B5.D1.81.D1.82"></span><span class="mw-headline" id="тест">тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29598 <h2><span id="Hey_.3C_.23_.22_.3E_.25_:_.27"></span><span class="mw-headline" id="Hey_<_#_"_>_%_:_'">Hey < # " > % : '</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Hey < # " > % : '">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29599 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#Тест">#Тест</a> <a href="#тест">#тест</a> <a href="#Hey_<_#_"_>_%_:_'">#Hey < # " > % : '</a>
29600 </p><p>💩 <span id="💩"></span>
29601 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
29606 HTML5 ids: legacy with a fallback to modern
29608 wgFragmentMode=[ 'legacy', 'html5' ]
29620 == Hey < # " > % : ' ==
29621 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29623 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29625 <!-- These two links should produce identical HTML -->
29626 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29629 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
29631 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29632 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29633 <li class="toclevel-1 tocsection-3"><a href="#.D0.A2.D0.B5.D1.81.D1.82"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29634 <li class="toclevel-1 tocsection-4"><a href="#.D0.A2.D0.B5.D1.81.D1.82_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29635 <li class="toclevel-1 tocsection-5"><a href="#.D1.82.D0.B5.D1.81.D1.82"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29636 <li class="toclevel-1 tocsection-6"><a href="#Hey_.3C_.23_.22_.3E_.25_:_.27"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29640 <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>
29641 <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>
29642 <h2><span id="Тест"></span><span class="mw-headline" id=".D0.A2.D0.B5.D1.81.D1.82">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29643 <h2><span id="Тест_2"></span><span class="mw-headline" id=".D0.A2.D0.B5.D1.81.D1.82_2">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29644 <h2><span id="тест"></span><span class="mw-headline" id=".D1.82.D0.B5.D1.81.D1.82">тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29645 <h2><span id="Hey_<_#_"_>_%_:_'"></span><span class="mw-headline" id="Hey_.3C_.23_.22_.3E_.25_:_.27">Hey < # " > % : '</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Hey < # " > % : '">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29646 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#.D0.A2.D0.B5.D1.81.D1.82">#Тест</a> <a href="#.D1.82.D0.B5.D1.81.D1.82">#тест</a> <a href="#Hey_.3C_.23_.22_.3E_.25_:_.27">#Hey < # " > % : '</a>
29647 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
29648 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
29653 HTML5 ids: no legacy
29655 wgFragmentMode=[ 'html5' ]
29667 == Hey < # " > % : ' ==
29668 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29670 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29672 <!-- These two links should produce identical HTML -->
29673 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29676 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
29678 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29679 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29680 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29681 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29682 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29683 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29687 <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>
29688 <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>
29689 <h2><span class="mw-headline" id="Тест">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29690 <h2><span class="mw-headline" id="Тест_2">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29691 <h2><span class="mw-headline" id="тест">тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29692 <h2><span class="mw-headline" id="Hey_<_#_"_>_%_:_'">Hey < # " > % : '</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Hey < # " > % : '">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
29693 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#Тест">#Тест</a> <a href="#тест">#тест</a> <a href="#Hey_<_#_"_>_%_:_'">#Hey < # " > % : '</a>
29694 </p><p>💩 <span id="💩"></span>
29695 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
29700 T90902: Normalize weird characters in section IDs
29702 wgFragmentMode=[ 'html5', 'legacy' ]
29708 <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>
29709 <p><a href="#Foo_bar">#Foo bar</a>
29714 T51672: Test for brackets in attributes of elements in external link texts
29716 [http://example.com/ link <span title="title with [brackets]">span</span>]
29717 [http://example.com/ link <span title="title with [brackets]">span</span>]
29720 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
29721 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
29726 T72875: Test for brackets in attributes of elements in internal link texts
29728 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
29729 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
29732 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
29733 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
29738 T179544: {{anchorencode:}} output should be always usable in links
29740 wgFragmentMode=[ 'html5' ]
29742 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
29744 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
29748 ## ------------------------------
29749 ## Parsoid section-wrapping tests
29750 ## ------------------------------
29752 Section wrapping for well-nested sections (no leading content)
29755 "wrapSections": true
29776 <section data-mw-section-id="1"><h1 id="1"> 1 </h1>
29779 </section><section data-mw-section-id="2"><h1 id="2"> 2 </h1>
29782 <section data-mw-section-id="3"><h2 id="2.1"> 2.1 </h2>
29785 </section><section data-mw-section-id="4"><h2 id="2.2"> 2.2 </h2>
29788 <section data-mw-section-id="5"><h3 id="2.2.1"> 2.2.1 </h3>
29791 </section></section></section><section data-mw-section-id="6"><h1 id="3"> 3 </h1>
29798 Section wrapping for well-nested sections (with leading content)
29801 "wrapSections": true
29806 Para 2 with a <div>nested in it</div>
29819 <section data-mw-section-id="0"><p>Para 1.</p>
29821 <p>Para 2 with a </p><div>nested in it</div>
29825 </section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
29828 </section><section data-mw-section-id="2"><h1 id="2"> 2 </h1>
29831 <section data-mw-section-id="3"><h2 id="2.1"> 2.1 </h2>
29834 </section></section>
29838 Section wrapping with template-generated sections (good nesting 1)
29841 "wrapSections": true
29858 <section data-mw-section-id="1"><h1 id="1"> 1 </h1>
29861 <section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.1" data-parsoid='{"dsr":[9,33,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== 1.1 ==\nb"}},"i":0}}]}'> 1.1 </h2><span about="#mwt1">
29862 </span><p about="#mwt1">b</p>
29863 </section><section data-mw-section-id="3"><h2 id="1.2"> 1.2 </h2>
29866 </section></section><section data-mw-section-id="4"><h1 id="2"> 2 </h1>
29870 # In this example, the template scope is mildly expanded to incorporate the
29871 # trailing newline after the transclusion since that is part of section 1.1.1
29873 Section wrapping with template-generated sections (good nesting 2)
29876 "wrapSections": true,
29877 "modes": ["wt2html", "wt2wt"]
29892 <section data-mw-section-id="1"><h1 id="1"> 1 </h1>
29895 <section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.1" data-parsoid='{"dsr":[9,50,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== 1.1 ==\nb\n=== 1.1.1 ===\nd"}},"i":0}},"\n"]}'> 1.1 </h2><span about="#mwt1">
29896 </span><p about="#mwt1">b</p><span about="#mwt1">
29897 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1"> 1.1.1 </h3><span about="#mwt1">
29898 </span><p about="#mwt1">d</p><span about="#mwt1">
29899 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2"> 2 </h1>
29903 # In this example, the template scope is mildly expanded to incorporate the
29904 # trailing newline after the transclusion since that is part of section 1.2.1
29906 Section wrapping with template-generated sections (good nesting 3)
29909 "wrapSections": true,
29910 "modes": ["wt2html", "wt2wt"]
29928 <section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
29931 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[9,60,0,0],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"x\n== 1.1 ==\nb\n==1.2==\nc\n===1.2.1===\nd"}},"i":0}},"\n"]}'>x</p><span about="#mwt1">
29932 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1"> 1.1 </h2><span about="#mwt1">
29933 </span><p about="#mwt1">b</p><span about="#mwt1">
29934 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
29935 </span><p about="#mwt1">c</p><span about="#mwt1">
29936 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
29937 </span><p about="#mwt1">d</p><span about="#mwt1">
29938 </span></section></section></section><section data-mw-section-id="5"><h1 id="2"> 2 </h1>
29942 # Because of section-wrapping and template-wrapping interactions,
29943 # the scope of the template is expanded so that the template markup
29944 # is valid in the presence of <section> tags.
29946 Section wrapping with template-generated sections (bad nesting 1)
29949 "wrapSections": true
29967 <section data-mw-section-id="1"><h1 id="1"> 1 </h1>
29970 </section><section data-mw-section-id="-1"><h1 about="#mwt1" typeof="mw:Transclusion" id="2" data-parsoid='{"dsr":[9,45,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"= 2 =\nb\n== 2.1 ==\nc"}},"i":0}},"\n\nd\n\n"]}'> 2 </h1><span about="#mwt1">
29971 </span><p about="#mwt1">b</p><span about="#mwt1">
29972 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1"> 2.1 </h2><span about="#mwt1">
29973 </span><p about="#mwt1">c</p><span about="#mwt1">
29975 </span><p about="#mwt1">d</p><span about="#mwt1">
29977 </span></section></section><section data-mw-section-id="4"><h1 id="3"> 3 </h1>
29981 # Because of section-wrapping and template-wrapping interactions,
29982 # additional template wrappers are added to <section> tags
29983 # so that template wrapping semantics are valid whether section
29984 # tags are retained or stripped. But, the template scope can expand
29985 # greatly when accounting for section tags.
29987 Section wrapping with template-generated sections (bad nesting 2)
29990 "wrapSections": true,
29991 "modes": ["wt2html", "wt2wt"]
30009 <section data-mw-section-id="1" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["= 1 =\na\n\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== 1.2 ==\nb\n= 2 =\nc"}},"i":0}},"\n\nd\n\n"]}'><h1 id="1"> 1 </h1>
30012 <section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== 1.2 ==\nb\n= 2 =\nc"}},"i":0}}]}'> 1.2 </h2><span about="#mwt1">
30013 </span><p about="#mwt1">b</p><span about="#mwt1">
30014 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2"> 2 </h1><span about="#mwt1">
30015 </span><p about="#mwt1">c</p>
30018 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3"> 3 </h1>
30023 Section wrapping with uneditable lead section + div wrapping multiple sections
30026 "wrapSections": true
30031 <div style="border:1px solid red;">
30048 <section data-mw-section-id="-1"><p>foo</p>
30050 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30051 <section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30054 <section data-mw-section-id="2"><h2 id="1.1"> 1.1 </h2>
30057 </section></section><section data-mw-section-id="-1"><h1 id="2"> 2 </h1>
30061 </section><section data-mw-section-id="4"><h1 id="3"> 3 </h1>
30064 <section data-mw-section-id="5"><h2 id="3.1"> 3.1 </h2>
30066 </section></section>
30070 Section wrapping with editable lead section + div overlapping multiple sections
30073 "wrapSections": true
30080 <div style="border:1px solid red;">
30097 <section data-mw-section-id="0"><p>foo</p>
30099 </section><section data-mw-section-id="-1"><h1 id="1"> 1 </h1>
30101 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30104 <section data-mw-section-id="2"><h2 id="1.1"> 1.1 </h2>
30107 </section><section data-mw-section-id="-1"><h1 id="2"> 2 </h1>
30112 </section><section data-mw-section-id="4"><h1 id="3"> 3 </h1>
30115 <section data-mw-section-id="5"><h2 id="3.1"> 3.1 </h2>
30117 </section></section>
30121 HTML header tags should not be wrapped in section tags
30124 "wrapSections": true
30137 <section data-mw-section-id="0"><p>foo</p>
30139 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
30141 </section><section data-mw-section-id="1"><h1 id="b"> b </h1>
30143 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
30145 </section><section data-mw-section-id="2"><h1 id="d"> d </h1></section>