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 Block tag on one line (<blockquote>)
1918 a <blockquote>foo</blockquote>
1922 a <blockquote>foo</blockquote>
1934 Block tag on both lines (<div>)
1951 Block tag on both lines (<blockquote>)
1953 a <blockquote>foo</blockquote>
1955 b <blockquote>foo</blockquote>
1957 a <blockquote>foo</blockquote>
1958 b <blockquote>foo</blockquote>
1972 Multiple lines without block tags
1996 # Tidy strips out the empty <div> tags. Parsoid doesn't.
1997 # So, we have a separate section for Parsoid. We don't want
1998 # to mimic this stripping behavior in Parsoid. It affects
1999 # editing experience and also requires us to maintain additional
2002 Empty lines between lines with block tags
2040 <div data-parsoid='{"stx":"html"}'></div>
2043 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2046 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2048 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2051 <div data-parsoid='{"stx":"html"}'>e</div>
2054 ## PHP parser emits output which is broken
2056 Unclosed HTML p-tags should be handled properly
2069 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2074 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2075 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2078 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2082 a [[Category:A1]] [[Category:A2]]
2087 <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"/>
2091 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2097 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2101 ### Preformatted text
2110 And a [[Main Page|link]]
2116 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2121 Tabs don't trigger preformatted text
2125 This is preformatted text.
2131 <pre>This is preformatted text.
2136 preformatted text.</p>
2137 <pre>This is preformatted text.
2142 Space before tab needs nowiki pre protection
2148 <nowiki> </nowiki> a
2152 Ident preformatting with inline content
2163 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2180 Regression with preformatted in <center>
2194 T54763: Preformatted in <blockquote>
2200 indented cell (no pre-wrapping!)
2210 <p> indented cell (no pre-wrapping!)
2218 T53086: Double newlines in blockquotes should be turned into paragraphs
2235 T17491: <ins>/<del> in blockquote
2238 Foo <del>bar</del> <ins>baz</ins> quux
2242 <p>Foo <del>bar</del> <ins>baz</ins> quux
2248 # Note that the p-wrapping is newline sensitive, which could be
2249 # considered a bug: tidy will wrap only the 'Foo' in the example
2250 # below in a <p> tag. (see comment 23-25 of T8200)
2252 T17491: <ins>/<del> in blockquote (2)
2254 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2257 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2263 <del>bar</del> <ins>baz</ins> quux</blockquote>
2267 <pre> with attributes (T5202)
2269 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2271 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2276 <pre> with width attribute (T5202)
2278 <pre width="8">Narrow screen goodies</pre>
2280 <pre width="8">Narrow screen goodies</pre>
2285 <pre> with forbidden attribute (T5202)
2287 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2289 <pre width="8">Narrow screen goodies</pre>
2294 Entities inside <pre>
2303 <pre> with forbidden attribute values (T5202)
2305 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2307 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2312 <nowiki> inside <pre> (T15238)
2320 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2328 <pre><nowiki>Foo</nowiki></pre>
2333 <nowiki> inside of #tag:pre
2335 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2337 <pre>Foo →bar</pre>
2340 <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>
2343 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2344 ## aren't enclosed in nowikis.
2346 <nowiki> and <pre> preference (first one wins)
2377 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2382 <p><span typeof="mw:Nowiki">
2390 </pre> inside nowiki
2392 <nowiki></pre></nowiki>
2398 # Parsoid doesn't strip empty tags, like Tidy does.
2400 Empty pre; pre inside other HTML tags (T56946)
2425 <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
2427 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2431 HTML pre followed by indent-pre
2441 # Note that tidy removes the empty <p> tags from the start and end.
2442 # Parsoid does not, by design.
2446 <p><pre>foo</pre></p>
2452 <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>
2456 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2464 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2474 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2486 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2507 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2511 {{echo| foo}}{{echo| bar}}
2516 {{echo|<!--cmt--> foo}}
2518 <!--cmt-->{{echo| foo}}
2520 {{echo|{{echo| }}bar}}
2538 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2574 ## Hmm, should Parsoid rt this?
2576 Pres with newline attributes
2578 parsoid=wt2html,html2html
2583 <pre class="one two">hi</pre>
2586 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2590 Things that look like <pre> tags aren't treated as such
2592 Barack Obama <President> of the United States
2593 <President></President>
2595 <p>Barack Obama <President> of the United States
2596 <President></President>
2601 Handle broken pre-like tags (T66025)
2605 {{echo|<pre <pre>x</pre>}}
2607 <table><pre </table>
2610 <table><pre </table>
2618 <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>
2627 Parsoid: handle pre with space after attribute
2631 <pre style="width:50%;" >{{echo|foo}}</pre>
2633 <pre style="width:50%;">{{echo|foo}}</pre>
2636 <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>
2639 # TODO / maybe: fix wt2wt for this
2641 Parsoid: Don't paragraph-wrap fosterable content
2667 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2695 #--------------------------------------------------------------------
2696 # Transclusion parameter whitespace stripping tests
2697 # Behavior is different for positional and named parameters
2698 #--------------------------------------------------------------------
2700 Templates: Strip leading and trailing whitespace from named-param values
2704 {{echo|1= {{echo|b}} }}
2717 <ul><li> d</li></ul>
2722 Templates: Don't strip whitespace from positional-param values
2726 {{echo|{{echo|b}} }}
2758 <ul><li> f</li></ul>
2766 Templates: Don't recognize targets split by newlines
2782 Templates: Recognize targets when newlines and comments don't split the target
2787 <!--X--> ech<!--X-->o<!--X-->
2795 <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>
2799 Templates: Handle empty comment-and-ws-only lines correctly
2802 <!--should be ignored-->
2803 <!--should be ignored as well-->
2810 <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>
2814 Templates: Handle comments in the target
2817 <!-- should be ignored -->
2821 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2824 {{echo<!-- should be ignored -->
2827 {{echo<!-- should be ignored -->|foo}}
2829 {{<!-- should be ignored -->echo|foo}}
2838 <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>
2840 <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>
2842 <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>
2844 <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>
2846 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2850 Templates: Handle comments in parameter names (T69657)
2853 <!-- should be ignored -->
2857 <!-- should be ignored -->
2860 {{echo|1<!-- should be ignored -->=foo}}
2862 {{echo|<!-- should be ignored -->1=foo}}
2870 <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>
2872 <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>
2874 <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>
2876 <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>
2880 Templates: Other wikitext in parameter names (T69657)
2887 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2891 Templates: With colons
2895 <p>Template with colon
2898 <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>
2901 #--------------------------------------------------------------------
2902 # Transclusion parameter escaping tests
2903 #--------------------------------------------------------------------
2906 Templates: Parsoid parameter escaping test 1
2908 {{echo|[foo]|{{echo|[bar]}}}}
2912 <p about="#mwt1" typeof="mw:Transclusion"
2913 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2917 Parsoid: Pipes in external links in template parameter
2919 {{echo|[{{echo|http://example.com}} link]}}
2921 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2923 <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>
2927 Parsoid: pipe in transclusion parameter
2929 {{echo|http://foo.com/a|b}}
2931 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2933 <p><a rel="mw:ExtLink" href="http://foo.com/a%7Cb" about="#mwt1"
2934 typeof="mw:Transclusion"
2935 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>
2939 Parsoid: Pipe in external link target and content in template parameter
2941 parsoid=html2wt,wt2wt
2943 {{echo|[http://foo.com/a|b a|b]}}
2945 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2947 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2948 typeof="mw:Transclusion"
2949 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2950 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2954 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2958 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2960 <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>
2964 Templates: Don't escape already nowiki-escaped text in template parameters
2966 parsoid=html2wt,wt2wt
2968 {{echo|foo<nowiki>|</nowiki>bar}}
2969 {{echo|<nowiki><div></nowiki>}}
2970 {{echo|<nowiki></nowiki>}}
2972 <p>foo|bar <div></p>
2974 <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>
2975 <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>
2976 <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>
2982 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
2984 parsoid=html2wt,wt2wt
2986 {{echo|{{echo|1=bar}}}}
2990 <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>
2995 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3001 <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>
3006 Templates: Preserve blank parameter names
3012 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3016 Templates: Preserve blank parameter names in other positions
3018 {{blank_param|bar|=foo}}
3022 <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
3027 ### Parsoid-centric tests for testing RT edge cases for pre
3031 1a. Indent-Pre and Comments
3044 1b. Indent-Pre and Comments
3057 1c. Indent-Pre and Comments
3070 1d. Indent-Pre and Comments
3071 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3084 2a. Indent-Pre and tables
3105 2b. Indent-Pre and tables
3121 2c. Indent-Pre and tables (T44252)
3138 2d. Indent-Pre and tables
3155 <tbody><tr><td> b</td></tr>
3160 2e. Indent-Pre and table-line syntax
3173 2f. Indent-pre started by table-line syntax
3192 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3197 Text that should be rendered preformatted
3205 <pre>Text that should be rendered preformatted
3214 3a. Indent-Pre and block tags (single-line html)
3218 c <blockquote> foo </blockquote>
3223 c <blockquote> foo </blockquote>
3224 <pre><span> foo </span>
3227 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3228 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3229 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3230 <pre><span> foo </span>
3247 3b. Indent-Pre and block tags (multi-line html)
3252 <pre>a <span>foo</span>
3257 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3258 b <div data-parsoid='{"stx":"html"}'> foo </div>
3268 3c. Indent-Pre and block tags (pre-content on separate line)
3332 4. Indent-Pre and extension tags
3343 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3347 5. Indent-Pre and html pre
3349 <pre class="123">hi</pre>
3351 <pre class="123">hi</pre>
3354 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3358 Render paragraphs when indent-pre is suppressed in blocklevels
3375 4. Multiple spaces at start-of-line
3393 ## NOTE: the leading white-space chars on empty line are significant
3395 5a. White-space in indent-pre
3407 ## NOTE: the leading white-space chars on empty line are significant
3409 5b. White-space in indent-pre
3428 5c. White-space in indent-pre
3441 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3464 7a. Indent-pre and category links
3466 parsoid=wt2html,wt2wt
3468 [[Category:foo]] <!-- No pre-wrapping -->
3469 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3472 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3473 <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 -->
3476 ## We used to, but no longer wt2wt this test since the default serializer
3477 ## will normalize all categories to serialize on their own line.
3478 ## This wikitext usage is going to be fairly uncommon in production and
3479 ## selser will take care of preserving formatting in those scenarios.
3481 7b. Indent-pre and category links
3486 [[Category:foo]] {{echo|b}}
3488 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3489 <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>
3493 Indent-Pre: Newlines in comments shouldn't affect sol state
3507 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3511 HTML-pre: 1. embedded newlines
3546 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3548 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3551 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3556 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3564 HTML-pre: big spaces
3600 <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"}}'>
3619 HTML-pre: 2: indented text
3632 HTML-pre: 3: other wikitext
3651 <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
3660 ### Definition lists
3667 <dl><dt> name </dt>
3668 <dd> Definition</dd></dl>
3673 Definition list for indentation only
3677 <dl><dd> Indented text</dd></dl>
3682 Definition list with no space
3687 <dd>Definition</dd></dl>
3692 Definition list with URL link
3694 ; http://example.com/ : definition
3696 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3697 <dd> definition</dd></dl>
3702 Definition list with bracketed URL link
3704 ;[http://www.example.com/ Example]:Something about it
3706 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3707 <dd>Something about it</dd></dl>
3712 Definition list with wikilink containing colon
3714 ; [[Help:FAQ]]: The least-read page on Wikipedia
3716 <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>
3717 <dd> The least-read page on Wikipedia</dd></dl>
3721 # At Brion's and JeLuF's insistence... :)
3723 Definition list with news link containing colon
3725 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3727 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3728 <dd> This isn't even a real newsgroup!</dd></dl>
3731 <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>
3735 Malformed definition list with colon
3737 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3739 <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>
3744 Definition lists: colon in external link text
3746 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3748 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3749 <dd> OK, I made that up</dd></dl>
3754 Definition lists: colon in HTML attribute
3756 ;<b style="display: inline">bold</b>
3758 <dl><dt><b style="display: inline">bold</b></dt></dl>
3763 Definition lists: self-closed tag
3765 ;one<br/>two : two-line fun
3767 <dl><dt>one<br />two </dt>
3768 <dd> two-line fun</dd></dl>
3773 Definition lists: ignore colons inside tags
3775 ;one <b>two : tag <i>fun:</i>:</b>: def
3777 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3783 Definition lists: excess closed tags
3785 ;one</b>two : bad tag fun
3788 <dt>onetwo </dt>
3789 <dd>bad tag fun</dd>
3794 <dd>bad tag fun</dd>
3799 T13748: Literal closing tags
3803 <dd>test test test test test</dd>
3805 <dd>test test test test test</dd>
3810 <dd>test test test test test</dd>
3812 <dd>test test test test test</dd>
3818 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3821 ; term : description
3826 <dl><dt> term </dt>
3827 <dd> description</dd></dl>
3828 <ul><li> unordered</li></ul>
3834 Definition list with empty definition and following paragraph
3846 Nested definition lists using html syntax
3859 Definition Lists: No nesting: Multiple dd's
3872 Definition Lists: Indentation: Regular
3880 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3885 Definition Lists: Indentation: Missing 1st level
3891 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3896 Definition Lists: Indentation: Multi-level indent
3900 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3905 Definition Lists: Hacky use to indent tables
3912 should be left alone
3914 <dl><dd><dl><dd><table>
3919 </td></tr></table></dd></dl></dd></dl>
3921 should be left alone
3926 Definition Lists: Hacky use to indent tables, with comments (T65979)
3934 should be left alone
3937 <dl><dd><dl><dd><table><tr>
3940 </tr></table><!-- bar --></dd></dl></dd></dl>
3942 should be left alone</p>
3946 Definition Lists: Hacky use to indent tables, with comment before table
3952 <dl><dd><dl><dd><!-- foo --><table><tr>
3954 </tr></table></dd></dl></dd></dl>
3957 # The trailing whitespace in this test is to catch a regression in
3958 # Parsoid after T54473.
3960 Definition Lists: Hacky use to indent tables (WS-insensitive)
3969 </td></tr></table></dd></dl>
3973 <tbody><tr><td>a</td></tr>
3974 </tbody></table> </dd></dl>
3977 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
3978 ## as an empty dt item. It also ignores all but the last ";" when followed
3979 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
3980 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
3983 ## Ex: ";;t2 ::d2" is transformed into:
3995 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
3996 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4007 ## All Parsoid only definition list tests have this difference.
4009 ## See also: https://phabricator.wikimedia.org/T8569
4010 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4013 Table / list interaction: indented table with lists in table contents
4028 <ul><li> b</li></ul>
4032 <ul><li> d</li></ul>
4033 </td></tr></table></dd></dl>
4038 Table / list interaction: lists nested in tables nested in indented lists
4061 </td></tr></table></dd></dl>
4068 Definition Lists: Nesting: Multi-level (Parsoid only)
4098 Definition Lists: Nesting: Test 2 (Parsoid only)
4125 Definition Lists: Nesting: Test 3 (Parsoid only)
4168 Definition Lists: Nesting: Test 4
4173 <dl><dd><dl><dd><dl><dt>t3</dt>
4174 <dd>d3</dd></dl></dd></dl></dd></dl>
4179 ## The Parsoid team believes the following three test exposes a
4180 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4181 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4182 ## It also exposes a "misfeature" in tidy, which doesn't like
4183 ## <dl> tags with a single <dt> child; it converts the <dt> into
4184 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4186 Definition Lists: Mixed Lists: Test 1
4192 <dl><dd><dl><dt><ul><li> foo</li>
4193 <li> bar</li></ul></dt></dl>
4194 <dl><dt> baz</dt></dl></dd></dl>
4229 Definition Lists: Mixed Lists: Test 2
4234 <ul><li><dl><dd> d1</dd>
4235 <dd> d2</dd></dl></li></ul>
4241 Definition Lists: Mixed Lists: Test 3
4246 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4247 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4253 Definition Lists: Mixed Lists: Test 4
4258 <ul><li><dl><dt>d1 </dt>
4261 <dd>d4</dd></dl></li></ul>
4267 Definition Lists: Mixed Lists: Test 5
4273 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4279 Definition Lists: Mixed Lists: Test 6
4284 <ol><li><ul><li><dl><dd>d1
4285 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4291 Definition Lists: Mixed Lists: Test 7
4296 <dl><dd><ul><li> d1</li>
4297 <li> d2</li></ul></dd></dl>
4303 Definition Lists: Mixed Lists: Test 8
4308 <dl><dd><ul><li> d1</li></ul>
4309 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4315 Definition Lists: Mixed Lists: Test 9
4319 <ul><li><dl><dt>foo </dt>
4320 <dd>bar</dd></dl></li></ul>
4326 Definition Lists: Mixed Lists: Test 10
4330 <ul><li><ol><li><dl><dt>foo </dt>
4331 <dd>bar</dd></dl></li></ol></li></ul>
4335 # This is a regression test for T175099
4336 # html/php+tidy is insufficient since Tidy covers up the bug.
4337 # But once Tidy is replaced with RemexHTML, html/php+tidy is good enough
4339 Definition Lists: Mixed Lists: Test 11
4346 <ul><li> b</li></ul></dd></dl>
4350 # The Parsoid team disagrees with the PHP parser's seemingly-random
4351 # rules regarding dd/dt on the next two tests. Parsoid is more
4352 # consistent, and recognizes the shared nesting and keeps the
4353 # still-open tags around until the nesting is complete.
4354 # (And tidy again converts <dt> to <dd> before 'bar'.)
4357 Definition Lists: Mixed Lists: Test 12
4362 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4363 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4364 <dl><dt>boo </dt>
4365 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4420 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4421 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4425 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4426 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4435 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4437 # * The test is wrong, there are two colons where there should be :;
4438 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4440 Definition Lists: Weird Ones: Test 1
4442 *#;*::;; foo : bar (who uses this?)
4444 <ul><li><ol><li><dl><dt> foo </dt>
4445 <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>
4464 <dt>bar (who uses this?)</dt>
4496 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4497 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4509 Definition Lists: colons occurring in tags
4527 <dt><span>a:b</span></dt>
4554 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4556 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4557 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4558 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4559 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4561 <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>
4562 <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>
4563 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4567 Definition Lists: colons and tables 1
4579 </td></tr></table></dd></dl>
4583 </td></tr></table></dd></dl>
4587 # Parsoid's output (as documented below) differs from php's in this case.
4588 # This is probably a bug. If we fixup parsoid to match php's output, the
4589 # above test should pass and the below test case can be removed. It is
4590 # unclear which output is more desirable.
4593 Definition Lists: colons and tables 2
4605 </td></tr></table></dd>
4609 </td></tr></table></dd></dl>
4613 Definition Lists: template interaction
4615 ::{{definition_list}}
4618 ::{{definition_list}}
4623 <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">
4624 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4626 <dl><dd data-parsoid='{}'>one
4627 <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">
4628 </span><dd about="#mwt2">two
4630 <dd>three</dd></dl></dd>
4631 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4639 External links: non-bracketed
4641 Non-bracketed: http://example.com
4643 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4647 # parsoid doesn't explicitly mark autonumbered links, see T55505
4649 External links: numbered
4651 Numbered: [http://example.com]
4652 Numbered: [http://example.net]
4653 Numbered: [http://example.com]
4655 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4656 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4657 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4660 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4661 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4662 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4666 External links: specified text
4668 Specified text: [http://example.com link]
4670 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4675 External links: trail
4677 Linktrails should not work for external links: [http://example.com link]s
4679 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4684 External links: dollar sign in URL
4686 http://example.com/1$2345
4688 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4692 # parsoid doesn't explicitly mark autonumbered links, see T55505
4694 External links: dollar sign in URL (autonumber)
4696 [http://example.com/1$2345]
4698 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4701 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4705 External links: open square bracket forbidden in URL (T6377)
4707 parsoid=wt2html,wt2wt,html2html
4709 http://example.com/1[2345
4711 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4714 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4718 External links: open square bracket forbidden in URL (named) (T6377)
4720 parsoid=wt2html,html2html
4722 [http://example.com/1[2345]
4724 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4727 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4730 # parsoid adds a space before the link name
4732 External links: open square bracket forbidden in URL (named) (T6377)
4735 [http://example.com/1 [2345]
4737 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4742 External links: nowiki in URL link text (T8230)
4744 [http://example.com/ <nowiki>''example site''</nowiki>]
4746 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4751 External links: newline forbidden in text (T8230 regression check)
4753 [http://example.com/ first
4756 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4762 External links: Pipe char between url and text
4764 [http://example.com | link]
4766 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4771 External links: protocol-relative URL in brackets
4773 [//example.com/ Test]
4775 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4779 # parsoid doesn't explicitly mark autonumbered links, see T55505
4781 External links: protocol-relative URL in brackets without text
4785 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4788 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4792 External links: protocol-relative URL in free text is left alone
4796 <p>//example.com/Foo
4801 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4803 foo//example.com/Foo
4805 <p>foo//example.com/Foo
4810 External links: with no contents
4812 [http://en.wikipedia.org/wiki/Foo]
4814 [[wikipedia:Foo|Bar]]
4816 [[wikipedia:Foo|<span>Bar</span>]]
4818 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4819 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4820 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4823 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4824 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4825 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4829 External links: Free with trailing punctuation
4839 http://example.com/url_with_(brackets)
4840 (http://example.com/url_without_brackets)
4841 http://example.com/url_with_entity&
4842 http://example.com/url_with_entity&
4843 http://example.com/url_with_entity&
4844 http://example.com/url_with_entity
4845 http://example.com/url_with_entity 
4846 http://example.com/url_with_entity 
4847 http://example.com/url_with_entity<
4848 http://example.com/url_with_entity<
4849 http://example.com/url_with_entity<
4851 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4852 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4853 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4854 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4855 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4856 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4857 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4858 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4859 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4860 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4861 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4862 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4863 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4864 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4865 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4866 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4867 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4868 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4869 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4872 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4873 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4874 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4875 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4876 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4877 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4878 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4879 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4880 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4881 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4882 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4883 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4884 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4885 <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>
4886 <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>
4887 <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>
4888 <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>
4889 <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>
4890 <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>
4894 External links: tricky Parsoid html2html case
4896 parsoid=wt2html,wt2wt,html2html
4898 http://example.com/url_with_entity&amp;
4900 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4903 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4907 External links: Free with trailing quotes (T113666)
4909 '''News:''' Stuff here
4913 <p><b>News:</b> Stuff here
4914 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4917 <p><b>News:</b> Stuff here</p>
4918 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4922 External links: with entity
4924 [http:// www.librarieswithoutborders.org Libraries without borders]
4926 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4929 <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>
4933 External links: Lone protocols are never linked (T105697)
4952 External links: No preceding word characters allowed (T67278)
4954 NOPEhttp://example.com
4955 N0http://example.com
4956 ok:http://example.com
4957 ok-http://example.com
4959 <p>NOPEhttp://example.com
4960 N0http://example.com
4961 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4962 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4967 External links: nofollow domain exception
4969 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4971 <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>.
4978 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4980 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4985 External image from https
4987 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4989 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4994 External image (when not allowed)
4996 wgAllowExternalImages=0
4998 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5000 <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>
5005 Link to non-http image, no img tag
5007 Link to non-http image, no img tag: ftp://example.com/test.jpg
5009 <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>
5014 External links: terminating separator
5016 Terminating separator: http://example.com/thing,
5018 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5023 External links: intervening separator
5025 Intervening separator: http://example.com/1,2,3
5027 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5032 External links: old bug with URL in query
5034 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5036 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5041 External links: old URL-in-URL bug, mixed protocols
5043 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5045 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5049 # Since Parsoid is starting to emit canonical wikitext for links,
5050 # [http://example.com http://example.com] will not RT back to that
5053 External links: URL in text
5057 URL in text: [http://example.com http://example.com]
5059 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5062 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5066 External links: Clickable images
5068 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5070 <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>
5073 <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>
5077 External links: raw ampersand
5079 Old & use: http://x&y
5081 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5086 External links: encoded ampersand
5088 Old & use: http://x&y
5090 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5093 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
5097 External links: encoded equals (T8102)
5099 http://example.com/?foo=bar
5101 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5104 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5108 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5109 ## does it number them. As discussed in T55505, we can identify
5110 ## autonumbered links via CSS.
5114 External links: [raw ampersand]
5116 Old & use: [http://x&y]
5118 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5121 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5124 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5125 # mode will return the [raw ampersand] wikitext
5127 External links: [encoded ampersand]
5129 parsoid=wt2html,wt2wt,html2html
5131 Old & use: [http://x&y]
5133 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5136 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5140 External links: [raw equals]
5142 [http://example.com/?foo=bar]
5144 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5147 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5150 # note that parsoid html is identical to [raw equals] case; so html2wt
5151 # mode will return the [raw equals] wikitext
5153 External links: [encoded equals] (T8102)
5155 parsoid=wt2html,wt2wt,html2html
5157 [http://example.com/?foo=bar]
5159 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5162 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5165 # xxx parsoid strips the IDN character, so the round-trip tests will
5166 # obviously fail and are disabled. --cscott
5168 External links: [IDN ignored character reference in hostname; strip it right off]
5170 parsoid=wt2html,wt2wt,html2html
5172 [http://e‌xample.com/]
5174 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5177 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5180 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5181 # Where an external link could easily circumvent the sanitization of the text of
5182 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5183 # test demands a higher standard. That's a bit strange.
5187 # http://example.com -> [http://example.com|http://example.com]
5188 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5190 # The first example is sanitized, but the second is not. Any security benefits
5191 # from this production are trivial to circumvent. Either remove this test and
5192 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5193 # the test accordingly.
5197 # xxx parsoid strips the IDN character, so the round-trip tests will
5198 # obviously fail and are disabled. --cscott
5200 External links: IDN ignored character reference in hostname; strip it right off
5202 parsoid=wt2html,html2html
5204 http://e‌xample.com/
5206 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5209 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5213 External links: www.jpeg.org (T2554)
5217 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5221 # parsoid doesn't explicitly mark autonumbered links, see T55505
5223 External links: URL within URL (T2002)
5225 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5227 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5230 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5234 T2361: URL inside bracketed URL
5236 [http://www.example.com/foo http://www.example.com/bar]
5238 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5243 T2361: URL within URL, not bracketed
5245 http://www.example.com/foo?=http://www.example.com/bar
5247 <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>
5252 T2289: ">"-token in URL-tail
5254 http://www.example.com/<hello>
5256 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5261 T2289: literal ">"-token in URL-tail
5263 http://www.example.com/<b>html</b>
5265 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5268 <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>
5272 T2289: ">"-token in bracketed URL
5274 [http://www.example.com/<hello> stuff]
5276 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5281 T2289: literal ">"-token in bracketed URL
5283 [http://www.example.com/<b>html</b> stuff]
5285 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5290 T2289: literal double quote at end of URL
5292 http://www.example.com/"hello"
5294 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5299 T2289: literal double quote in bracketed URL
5301 [http://www.example.com/"hello" stuff]
5303 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5308 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5310 [http://www.example.com test]
5312 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5317 External links: link text with spaces
5319 [http://www.example.com a b c]
5320 [http://www.example.com ''a'' ''b'']
5322 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5323 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5328 External links: wiki links within external link (T5695)
5330 parsoid=wt2html,html2html
5332 [http://example.com [[wikilink]] embedded in ext link]
5334 <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>
5337 <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>
5341 T2787: Links with one slash after the url protocol are invalid
5345 [http:/example.com title]
5347 <p>http:/example.com
5348 </p><p>[http:/example.com title]
5353 Bracketed external links with template-generated invalid target
5355 [{{echo|http:/example.com}} title]
5357 <p>[http:/example.com title]
5361 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5363 Broken wikilinks (but not external links) prevent templates from closing
5367 [http://example.com x
5369 {{echo|[http://example.com x}}
5375 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5376 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5378 </p><p>{{echo|[[Foo}}
5381 <p>[<a rel="mw:ExtLink" href="http://example.com">http://example.com</a> x</p>
5382 <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>
5384 <p>{{echo|[[Foo}}</p>
5388 Wikilinks with embedded newlines are not broken
5399 <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>
5411 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5415 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5416 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5420 T4702: Mismatched <i>, <b> and <a> tags are invalid
5422 ''[http://example.com text'']
5423 [http://example.com '''text]'''
5424 ''Something [http://example.com in italic'']
5425 ''Something [http://example.com mixed''''', even bold]'''
5426 '''''Now [http://example.com both''''']
5428 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5429 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5430 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5431 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5432 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5440 http://www.example.com/?title=AT%26T
5442 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5445 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5448 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5449 # % is actually legal in HTML5. Any change in output would need testing though.
5451 T6781, T7267: %25 in URL
5453 http://www.example.com/?title=100%25_Bran
5455 <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>
5458 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5462 T6781, T7267: %28, %29 in URL
5464 http://www.example.com/?title=Ben-Hur_%281959_film%29
5466 <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>
5469 <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>
5474 T6781: %26 in autonumber URL
5476 [http://www.example.com/?title=AT%26T]
5478 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5481 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5485 T6781, T7267: %26 in autonumber URL
5487 [http://www.example.com/?title=100%25_Bran]
5489 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5492 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5496 T6781, T7267: %28, %29 in autonumber URL
5498 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5500 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5503 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5508 T6781: %26 in bracketed URL
5510 [http://www.example.com/?title=AT%26T link]
5512 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5515 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5519 T6781, T7267: %25 in bracketed URL
5521 [http://www.example.com/?title=100%25_Bran link]
5523 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5528 T6781, T7267: %28, %29 in bracketed URL
5530 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5532 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5535 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5539 External link containing a period in the anchor. (T65947)
5541 [//foo.org/bar#baz. bang]
5543 [//foo.org/bar. bang]
5545 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5546 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5549 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5550 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5554 External link containing a single quote. (T65947)
5558 [//foo.org/bar'baz bang]
5560 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5561 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5564 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5565 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5569 External link containing double-single-quotes in text '' (T6598 sanity check)
5571 Some [http://example.com/ pretty ''italics'' and stuff]!
5573 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5578 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5580 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5582 <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>
5587 External link containing double-single-quotes with no space separating the url from text in italics
5589 [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]].]
5591 <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>
5594 <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>
5596 <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>
5600 External link with comments in link text
5602 [http://www.google.com Google <!-- comment -->]
5604 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5607 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5611 External link to bare IPv4 address
5613 [http://192.168.0.1 Link]
5615 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5618 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5622 URL-encoding in URL functions (single parameter)
5624 {{localurl:Some page|amp=&}}
5626 <p>/index.php?title=Some_page&amp=&
5631 URL-encoding in URL functions (multiple parameters)
5633 {{localurl:Some page|q=?&=&}}
5635 <p>/index.php?title=Some_page&q=?&amp=&
5642 http://example.com/index.php?foozoid%5B%5D=bar
5644 http://example.com/index.php?foozoid[]=bar
5646 <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>
5647 </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>
5650 <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>
5652 <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>
5656 IPv6 urls, autolink format (T23261)
5658 http://[2404:130:0:1000::187:2]/index.php
5660 Examples from RFC 2373, section 2.2:
5661 * http://[1080::8:800:200C:417A]/unicast
5662 * http://[FF01::101]/multicast
5663 * http://[::1]/loopback
5664 * http://[::]/unspecified
5665 * http://[::13.1.68.3]/ipv4compat
5666 * http://[::FFFF:129.144.52.38]/ipv4compat
5668 Examples from RFC 2732, section 2:
5669 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5670 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5671 * http://[3ffe:2a00:100:7031::1]
5672 * http://[1080::8:800:200C:417A]/foo
5673 * http://[::192.9.5.5]/ipng
5674 * http://[::FFFF:129.144.52.38]:80/index.html
5675 * http://[2010:836B:4179::836B:4179]
5678 <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>
5679 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5681 <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>
5682 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5683 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5684 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5685 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5686 <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>
5687 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5689 <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>
5690 <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>
5691 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5692 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5693 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5694 <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>
5695 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5698 <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>
5700 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5701 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5702 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5703 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5704 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5705 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5706 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5708 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5709 <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>
5710 <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>
5711 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5712 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5713 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5714 <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>
5715 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5719 IPv6 urls, bracketed format (T23261)
5721 [http://[2404:130:0:1000::187:2]/index.php test]
5723 Examples from RFC 2373, section 2.2:
5724 * [http://[1080::8:800:200C:417A] unicast]
5725 * [http://[FF01::101] multicast]
5726 * [http://[::1]/ loopback]
5727 * [http://[::] unspecified]
5728 * [http://[::13.1.68.3] ipv4compat]
5729 * [http://[::FFFF:129.144.52.38] ipv4compat]
5731 Examples from RFC 2732, section 2:
5732 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5733 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5734 * [http://[3ffe:2a00:100:7031::1] 3]
5735 * [http://[1080::8:800:200C:417A]/foo 4]
5736 * [http://[::192.9.5.5]/ipng 5]
5737 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5738 * [http://[2010:836B:4179::836B:4179] 7]
5741 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5742 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5744 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5745 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5746 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5747 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5748 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5749 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5750 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5752 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5753 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5754 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5755 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5756 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5757 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5758 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5761 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5763 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5764 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5765 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5766 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5767 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5768 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5769 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5771 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5772 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5773 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5774 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5775 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5776 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5777 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5778 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5782 Non-extlinks in brackets
5791 [{{echo|foo}} ''bar'']
5792 [{{echo|foo}}l's] errand
5793 [{{echo|foo}}l's errand]
5795 [url=http://example.com]
5796 [http:// bare protocols don't count]
5809 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5810 [http:// bare protocols don't count]
5818 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5819 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5820 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5821 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5822 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5823 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5824 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5825 [http:// bare protocols don't count]</p>
5829 Percent encoding in external links
5831 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5833 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5836 <p><a rel="mw:ExtLink"
5837 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5841 Use url link syntax for links where the content is equal the link target
5845 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5848 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5852 Parenthesis in external links, especially URL links
5856 http://example.com/test)
5858 http://example.com/(test)
5860 http://example.com/((test)
5862 (http://example.com/(test))
5864 (http://example.com/(test)))))
5866 http://example.com/a)b
5868 [http://example.com) foo]
5870 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5871 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5872 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5873 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5874 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5875 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5876 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5877 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5880 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5881 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5882 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5883 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5884 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5885 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5886 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5887 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5891 Parenthesis in external links, w/ transclusion or comment
5893 (http://example.com/{{echo|hi}})
5895 (http://example.com<!-- hi -->)
5897 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5898 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5901 <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>
5903 <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>
5907 Serialize <a> tags with invalid link targets as plain text
5909 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5911 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5912 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5913 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5914 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5917 <nowiki>*</nowiki>text
5918 <nowiki>[[foo]]</nowiki>
5919 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5923 mw:ExtLink -vs- mw:WikiLink (T94723)
5927 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5928 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5929 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5930 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5932 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5933 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5938 [[wikipedia:Foo|Bar]]
5939 [[wikipedia:Foo|Bar]]
5941 [[wikipedia:European_Robin|European Robin]]
5942 [[wikipedia:European_Robin|European Robin]]
5946 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5950 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5952 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5963 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5965 Normal text. '''''Bold italic text.''''' Normal text.
5967 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5968 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5973 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5974 # parser strips. The wikitext contains just the first half of the bold
5977 Unclosed and unmatched quotes
5979 '''''Bold italic text '''with bold deactivated''' in between.'''''
5981 '''''Bold italic text ''with italic deactivated'' in between.'''''
5985 ..spanning two paragraphs (should not work).'''
5987 '''Bold tag left open
5989 ''Italic tag left open
5993 <!-- Unmatching number of opening, closing tags: -->
5994 '''This year''''s election ''should'' beat '''last year''''s.
5996 ''Tom'''s car is bigger than ''Susan'''s.
5998 Plain ''italic'''s plain
6000 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6001 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6002 </p><p><b>Bold text..</b>
6003 </p><p>..spanning two paragraphs (should not work).
6004 </p><p><b>Bold tag left open</b>
6005 </p><p><i>Italic tag left open</i>
6007 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6008 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6009 </p><p>Plain <i>italic'</i>s plain
6012 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6013 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6014 </p><p><b>Bold text..</b>
6015 </p><p>..spanning two paragraphs (should not work).<b></b>
6016 </p><p><b>Bold tag left open</b>
6017 </p><p><i>Italic tag left open</i>
6020 <!-- Unmatching number of opening, closing tags: -->
6021 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6022 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6023 </p><p>Plain <i>italic'</i>s plain
6030 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6033 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6034 # is the bare minimum required by the spec, see:
6035 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6036 # Parsoid team replies: empty table tags are legal in HTML5
6038 A table with no data.
6051 A table with stray table end tags on start tag line (wt2html)
6055 {|style="color: red;"|}
6057 {|style="color: red;" |}
6061 {|style="color: red;"|} id="foo"
6065 {|style="color: red;" |} id="foo"
6069 <table style="color: red;"></table>
6071 <table style="color: red;">
6077 <table style="color: red;" id="foo">
6083 <table style="color: red;" id="foo">
6092 A table with no data (take 2)
6100 # A table with nothing but a caption is invalid XHTML, we might want to render
6101 # this as <p>caption</p>
6102 # Parsoid team replies: table with only a caption is legal in HTML5
6104 A table with nothing but a caption
6112 </caption><tr><td></td></tr></table>
6115 <table><caption> caption</caption></table>
6119 A table with caption with default-spaced attributes and a table row
6122 |+ style="color: red;" | caption1
6128 <caption style="color: red;"> caption1
6137 A table with captions with non-default spaced attributes and a table row
6140 |+style="color: red;"|caption2
6141 |+ style="color: red;"| caption3
6147 <caption style="color: red;">caption2
6149 <caption style="color: red;"> caption3
6158 Table td-cell syntax variations
6162 | foo bar foo || baz
6163 | style='color:red;' | baz
6164 | style='color:red;' || baz
6171 <td> foo bar foo </td>
6174 <td style="color:red;"> baz
6176 <td> style='color:red;' </td>
6204 Simple table but with multiple dashes for row wikitext
6223 Multiplication table
6225 {| border="1" cellpadding="2"
6226 |+Multiplication table
6228 ! × !! 1 !! 2 !! 3
6246 <table border="1" cellpadding="2">
6247 <caption>Multiplication table
6294 Accept "||" in table headings
6309 Accept "!!" in table data
6323 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'></td></tr>
6328 Accept "||" in indented table headings
6338 </th></tr></table></dd></dl>
6343 Accept "!!" in templates
6357 <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>
6361 Accept "!!" in table headings after newline
6378 <p>b!!c</p></th></tr>
6383 Accept "!!" in table data of mixed wikitext / html syntax
6387 <tr><td>b!!c</td></tr>
6400 <tbody><tr><th>a</th></tr>
6401 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6406 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6423 Accept "| !" at start of line in tables (ignore !-attribute)
6427 | !style="color:red" | bar
6439 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 +/-
6443 |style='color:red;'|+1
6444 |style='color:blue;'|-1
6456 <td style="color:red;">+1
6458 <td style="color:blue;">-1
6482 |rowspan=2| Cell 2, row 1 (and 2)
6493 <td rowspan="2"> Cell 2, row 1 (and 2)
6511 {| bgcolor=#ABCDEF border=2
6516 |the original table again
6524 <table bgcolor="#ABCDEF" border="2">
6532 <td>the original table again
6538 Invalid attributes in table cell (T3830)
6552 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6556 | title="foo<nowiki>|</nowiki>" |bar
6557 | title="foo<nowiki>|</nowiki>" bar
6564 <td title="foo|">bar
6566 <td> title="foo|" bar
6571 <tbody><tr><td title="foo">bar</td>
6572 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6573 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6577 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6578 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6579 # *2wt modes will fail.
6581 Table security: embedded pipes
6583 parsoid=wt2html,html2html
6586 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6590 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6591 <td>]" onmouseover="alert(document.cookie)">test
6599 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6603 Element attributes with double ! should not be broken up by <th>
6606 ! hi <div class="!!">ha</div> ho
6611 <th> hi <div class="!!">ha</div> ho
6616 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6621 ! and || in element attributes should not be parsed as <th>/<td>
6624 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6629 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6634 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6638 # FIXME: The output seems broken. Filed as T110268.
6640 ! and || in td attributes should not be parsed as <th>/<td>
6645 | style="color: red !important;" data-contrived="put this here ||" | foo
6650 <td> style="color: red !important;" data-contrived="put this here </td>
6656 <tbody><tr><td> style="color: red !important;" data-contrived="put this here </td><td data-parsoid='{"stx_v":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'> foo</td></tr>
6661 Break on | in element attribute in template
6663 parsoid=wt2html,html2html
6665 {{echo|1=<div class="hi|ho">ha</div>}}
6667 <p>ho">ha</div>
6670 <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>
6674 Break on | in element attribute name in template
6676 {{echo|<div cla|ss="hiho">ha</div>}}
6678 <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>
6682 Don't break on | in extension attribute in template
6684 {{echo|<ref name="hi|ho">ha</ref>}}
6688 <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>
6690 <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>
6693 ## We don't support roundtripping of these attributes in Parsoid.
6694 ## Selective serialization takes care of preventing dirty diffs.
6695 ## But, on edits, we dirty-diff the invalid attribute text.
6697 Invalid text in table attributes should be discarded
6701 {| <span>boo</span> style='border:1px solid black'
6702 | <span>boo</span> style='color:blue' | 1
6703 |<span>boo</span> style='color:blue'| 2
6706 <table style="border:1px solid black">
6708 <td style="color:blue"> 1
6710 <td style="color:blue"> 2
6714 <table style="border:1px solid black">
6716 <td style="color:blue"> 1</td>
6717 <td style="color:blue"> 2</td>
6723 Invalid text in table attributes should be preserved by selective serializer
6726 "modes": ["selser"],
6728 ["td:first-child", "text", "abc"],
6729 ["td + td", "text", "xyz"]
6733 {| <span>boo</span> style='border:1px solid black'
6734 | <span>boo</span> style='color:blue' | 1
6735 |<span>boo</span> style='color:blue'| 2
6738 {| <span>boo</span> style='border:1px solid black'
6739 | <span>boo</span> style='color:blue' |abc
6740 |<span>boo</span> style='color:blue'|xyz
6745 1. Template-generated table cell attributes and cell content
6750 || {{table_attribs_5}}
6751 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6752 |align=center {{table_attribs}}
6753 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6758 <td style="color:red;">Foo
6760 <td style="color:red;">Foo
6762 <td> style="color:red;"</td>
6765 <td style="color:red;">Foo
6767 <td align="center" style="color:red;">Foo
6769 <td align="center" style="color:red;">Foo
6775 2. Template-generated table cell attributes and cell content
6778 |{{table_attribs_2}}
6783 <td style="color:red;">Foo
6791 <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>
6792 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6797 3. Template-generated table cell attributes and cell content
6800 !align=center {{table_header_cells}}
6802 |align=center {{table_cells}}
6807 <th align="center" style="color:red;">Foo</th>
6808 <th style="color:red;"><i>Bar</i></th>
6809 <th style="color:brown;"><i>Foo</i> and Baz
6812 <td align="center" style="color:red;">Foo</td>
6813 <td style="color:red;"><i>Bar</i></td>
6814 <td style="color:brown;"><i>Foo</i> and Baz
6819 <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>
6820 <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>
6825 4. Template-generated table cell attributes and cell content inside a templated table
6828 !align=center {{table_header_cells}}
6830 |align=center {{table_cells}}
6835 <th align="center" style="color:red;">Foo</th>
6836 <th style="color:red;"><i>Bar</i></th>
6837 <th style="color:brown;"><i>Foo</i> and Baz
6840 <td align="center" style="color:red;">Foo</td>
6841 <td style="color:red;"><i>Bar</i></td>
6842 <td style="color:brown;"><i>Foo</i> and Baz
6846 <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}}]}'>
6847 <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>
6849 <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>
6853 ## Edge case fix to prevent future regressions
6855 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6858 |{{table_attribs_7}}
6863 <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>
6865 <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>
6869 Table with row followed by newlines and table heading
6871 parsoid=wt2html,html2html
6889 Table with empty line following the start tag
6891 parsoid=wt2html,html2html
6909 Table attributes with empty value
6911 parsoid=wt2html,html2html
6924 <tbody><tr><td style=""> hello</td></tr>
6929 Wikitext table with a lot of comments
6952 Wikitext table comments represented in parsoid dom
6954 {|<!--c1--><!--c2-->
6965 <table><!--c1--><!--c2-->
6966 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6967 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6972 Wikitext table with double-line table cell
6989 Table cell with a single comment
7006 Table-cell after a comment-only-empty-line
7023 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7025 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
7031 Build table with {{!}}
7033 {{{!}} class="wikitable"
7036 {{!}}- style="color:red;"
7037 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
7040 <table class="wikitable">
7046 <tr style="color:red;">
7048 <td style="color:red;"> second data
7054 Build table with pipe as data
7056 {| class="wikitable"
7059 |- style="color:red;"
7060 | data || style="color:red;" | second data
7062 | style="color:red;" | data with | || style="color:red;" | second data with |
7064 || data with | ||| second data with |
7067 <table class="wikitable">
7073 <tr style="color:red;">
7075 <td style="color:red;"> second data
7078 <td style="color:red;"> data with | </td>
7079 <td style="color:red;"> second data with |
7082 <td> data with | </td>
7083 <td> second data with |
7089 Build table with wikilink
7091 {| class="wikitable"
7092 ! header || second header
7093 |- style="color:red;"
7094 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
7096 | data || second data [[Main Page|link|text with pipe]]
7099 <table class="wikitable">
7104 <tr style="color:red;">
7105 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
7106 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7110 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7115 # The expected HTML structure in this test is debatable. The PHP parser does
7116 # not parse this kind of table at all. The main focus for Parsoid is on
7117 # round-tripping, so this output is ok for now. TODO: revisit!
7119 Wikitext table with html-syntax row
7129 <td>foo</td></tr></tbody></table>
7133 Implicit <td> after a |-
7135 parsoid=wt2html,html2html
7150 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7151 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7153 </tr></tbody></table>
7157 Lists should be recognized in an implicit <td> context
7159 parsoid=wt2html,html2html
7176 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7177 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7179 </tr></tbody></table>
7183 Table cells not properly parsed in an implicit-td context
7187 {{table_attribs_4}} || a || b
7192 <td style="background-color:#DC241f;" width="10px"></td>
7199 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7200 <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>
7204 Parsoid: Round-trip tables directly followed by content (T53219)
7206 parsoid=wt2html,wt2wt
7231 Parsoid: Default to a newline after tables in new content (T53219)
7236 <tr><td>foo</td></tr></tbody></table> bar
7238 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7243 <nowiki> </nowiki>bar
7251 Parsoid: newline inducing block nodes don't suppress <nowiki>
7263 Parsoid: Row-syntax table headings followed by comment & table cells
7265 parsoid=wt2html,wt2wt
7269 <!-- foo --> || baz || quux
7283 <tbody><tr><th> foo </th><th> bar
7284 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7289 Parsoid: Recover better from broken table attributes
7309 <p>foo</p></td></tr>
7314 Tables: Digest broken attributes on table and tr tag
7325 <tr class='mw-empty-elt'></tr>
7326 <tr class='mw-empty-elt'></tr>
7330 # T137406: Whitespace in the HTML
7332 1. Generate correct wikitext for tables with thead/tbody/tfoot
7337 <caption>Test</caption>
7378 <caption>Test</caption>
7398 # T137406: No whitespace in the HTML
7400 2. Generate correct wikitext for tables with thead/tbody/tfoot
7404 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7414 Testing serialization after deletion in references
7423 hi <ref><div id="x">ho</div></ref>
7433 Testing serialization after deletion of table cells
7436 "modes": ["wt2wt", "selser"],
7444 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7454 Testing selser after addition of new row before first row (T125419)
7457 "modes": ["wt2wt", "selser"],
7459 [ "tr", "before", "<tr><td>X</td></tr>" ]
7475 Serialize new table rows in a HTML table using HTML tags
7478 "modes": ["wt2wt", "selser"],
7480 [ "tr", "before", "<tr><td>X</td></tr>" ]
7484 <table><tr><td>a</td></tr></table>
7486 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7490 Serialize new table cells in a HTML row using HTML tags
7493 "modes": ["wt2wt", "selser"],
7495 [ "td", "before", "<td>X</td>" ]
7499 <table><tr><td>a</td></tr></table>
7501 <table><tr><td>X</td><td>a</td></tr></table>
7505 Wikitext tables can be nested inside HTML tables
7509 <table data-parsoid='{"stx":"html"}'>
7512 <tr><td>foo</td></tr>
7527 Serialize wikitext list items as HTML list items when embedded in a HTML list
7531 <ul data-parsoid='{"stx": "html"}'>
7532 <li data-parsoid='{}'>a</li>
7542 # SSS FIXME: Is this actually a good thing given the
7543 # odd nested list output that is generated by MW?
7544 # <ul><li>foo<ul>..</ul></li></ul> instead of
7545 # <ul><li>foo</li><ul>..</ul></ul>
7547 Wikitext lists can be nested inside HTML lists
7551 <ul data-parsoid='{"stx": "html"}'>
7552 <li data-parsoid='{"stx": "html"}'>a
7557 <ul data-parsoid='{"stx": "html"}'>
7580 Plain link, capitalized
7584 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7589 Plain link, uncapitalized
7593 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7600 [[Main Page|The Main Page]]
7602 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7607 Piped link with comment in link text
7609 [[Main Page|The Main<!--front--> Page]]
7611 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7616 Piped link with multiple pipe characters in link text
7618 [[Main Page||The|Main|Page|]]
7620 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7623 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7627 Piped link with no link text
7629 [[Thomas Bek (bishop of St David's)|]]
7631 <p>[[Thomas Bek (bishop of St David's)|]]
7634 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7638 Piped link with empty link text
7640 [[Main Page|<nowiki/>]] - empty nowiki
7641 [[Main Page| ]] - empty space
7642 [[Main Page| ]] - empty non breaking space
7644 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7645 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7646 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7649 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7650 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7651 <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>
7659 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7664 Broken link with fragment
7666 [[Zigzagzogzagzig#zug]]
7668 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7673 Special page link with fragment
7675 [[Special:Version#anchor]]
7677 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7682 Nonexistent special page link with fragment
7684 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7686 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7693 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7695 <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>
7702 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7704 <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>!!!
7715 T45661: Piped links with identical prefixes
7717 [[prefixed article|prefixed articles with spaces]]
7719 [[prefixed article|prefixed articlesaoeu]]
7721 [[Main Page|Main Page test]]
7723 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7724 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7725 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7731 Link with HTML entity in suffix / tail
7733 [[Main Page]]", [[Main Page]]a
7735 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7738 <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>
7742 Link with 3 brackets
7753 Link with 4 brackets
7757 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7762 Piped link with 3 brackets
7764 [[[main page|the main page]]]
7766 <p>[[[main page|the main page]]]
7771 Piped link with extlink-like text
7774 [[Main Page|This is a [bar]]]
7777 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7778 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7779 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7782 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7783 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7784 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7788 Link with multiple pipes
7790 [[Main Page|The|Main|Page]]
7792 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7797 Anchor containing a #. (T65430)
7799 [[Main Page#And#Link]]
7801 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7804 <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>
7810 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7812 <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>
7817 Link with space in namespace
7819 [[User talk:Foo bar]]
7821 <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>
7826 MemoryAlpha:AlphaTest
7828 This is an article in the MemoryAlpha namespace
7829 (which shadows the memoryalpha interwiki link).
7833 Namespace takes precedence over interwiki link (T53680)
7835 [[MemoryAlpha:AlphaTest]]
7837 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7841 # The previous test doesn't work correctly in html2*, due to not recognizing the
7842 # link as an internal one. This one checks for the correct behavior.
7844 Link to namespace preferred over interwiki with correct rel attribute
7846 parsoid=html2wt,html2html
7848 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7850 [[MemoryAlpha:AlphaTest]]
7854 Piped link to namespace
7856 [[Meta:Disclaimers|The disclaimers]]
7858 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7865 [[Usually caused by a typo (oops}]]
7867 <p>[[Usually caused by a typo (oops}]]
7874 Just a test of an article title containing a percent.
7878 Link containing % (not as a hex sequence)
7881 [[7% Solution|7%25 Solution]]
7883 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7884 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7887 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7888 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7891 # note that the parsoid HTML is identical to the previous test output,
7892 # so the previous test ensures that the html2wt mode will generate the
7893 # "not as a hex sequence" wikitext.
7895 Link containing % as a single hex sequence interpreted to char
7897 parsoid=wt2wt,wt2html,html2html
7900 [[7%25 Solution|7%25 Solution]]
7902 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7903 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7906 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7907 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7911 Link containing % as a double hex sequence interpreted to hex sequence
7915 <p>[[7%2525 Solution]]
7919 ## Example for such a section: == < ==
7921 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7923 [[%23%3c]][[%23%3e]]
7925 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7928 <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>
7932 Link containing "<#" and ">#" as a hex sequences
7934 [[%3c%23]][[%3e%23]]
7936 <p>[[%3c%23]][[%3e%23]]
7941 Link containing an equals sign
7943 [[Special:BookSources/isbn=4-00-026157-6]]
7945 <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>
7948 <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>
7954 Just a test of an article title containing a tilde.
7957 # note that links containing signatures, like [[Foo~~~~]], are
7958 # massaged by the pre-save transform (PST) and so the tildes are never
7959 # seen by the parser.
7961 Link containing a tilde
7965 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7968 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7972 Link containing double-single-quotes '' (T6598)
7974 [[Lista d''e paise d''o munno]]
7976 <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>
7979 <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>
7983 Link containing double quotes and spaces
7987 <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>
7990 <p><a rel="mw:WikiLink" href="./Cool_%22Gator%22" title='Cool "Gator"'>Cool "Gator"</a></p>
7994 File containing double quotes and spaces
7996 [[File:Cool "Gator".png]]
7998 <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>
8002 Redirect containing double quotes and spaces
8004 #REDIRECT [[Cool "Gator"]]
8006 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8010 Link containing double-single-quotes '' in text (T6598 sanity check)
8012 Some [[Link|pretty ''italics'' and stuff]]!
8014 <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>!
8017 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8021 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8023 ''Some [[Link|pretty ''italics'' and stuff]]!''
8025 <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>
8030 Link with double quotes in title part (literal) and alternate part (interpreted)
8032 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8036 [[''Pentecoste''|Pentecoste]]
8038 [[''Pentecoste''|''Pentecoste'']]
8040 <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>
8041 </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>
8042 </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>
8043 </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>
8046 <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>
8047 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8048 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8049 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8053 Broken image links with HTML captions (T41700)
8055 [[File:Nonexistent|<script></script>]]
8056 [[File:Nonexistent|100x100px|<script></script>]]
8057 [[File:Nonexistent|<]]
8058 [[File:Nonexistent|a<i>b</i>c]]
8060 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8061 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8062 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8063 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8066 <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>
8067 <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>
8068 <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>
8069 <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>
8075 [[http://www.example.com]]
8077 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8080 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
8084 Plain link to URL with link text
8086 [[http://www.example.com Link text]]
8088 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8093 Plain link to protocol-relative URL
8095 [[//www.example.com]]
8097 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8100 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
8104 Plain link to protocol-relative URL with link text
8106 [[//www.example.com Link text]]
8108 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8113 Plain link to page with question mark in title
8119 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8120 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8124 # I'm fairly sure the expected result here is wrong.
8125 # We want these to be URL links, not pseudo-pages with URLs for titles....
8126 # However the current output is also pretty screwy.
8129 # I'm changing it to match the current output--it arguably makes more
8130 # sense in the light of the test above. Old expected result was:
8131 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8133 # But I think this test is bordering on "garbage in, garbage out" anyway.
8138 Piped link to URL: [[http://www.example.com|an example URL]]
8140 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8143 <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>
8147 Plain link in template argument
8151 {{echo|[http://www.example.com |123]}}
8153 {{echo|[[http://www.example.com |123]]}}
8155 {{echo|[[http://www.example.com |123]}}
8157 {{echo|[http://www.example.com |123]]}}
8159 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8160 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8161 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8162 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8165 <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>
8167 <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>
8169 <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>
8171 <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>
8175 T2002: [[page|http://url/]] should link to page, not http://url/
8177 [[Main Page|http://url/]]
8179 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8182 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8185 # Parsoid does not mark self-links, by design.
8187 T2337: Escaped self-links should be bold
8191 [[Bug462]] [[Bug462]]
8193 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8196 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a></p>
8198 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8202 Self-link to section should not be bold
8206 [[Main Page#section]]
8208 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8219 Self-link to numeric title
8225 <p><a class="mw-selflink selflink">0</a>
8230 Link to numeric-equivalent title
8236 <p><a href="/wiki/00" title="00">00</a>
8241 <nowiki> inside a link
8243 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8245 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8250 Non-breaking spaces in title
8252 [[ Main Page ]]
8254 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8258 # Add new article for the test below so that it doesn't red-link
8266 Multiple spaces in titles should normalize to a single underscore
8268 parsoid=wt2html,wt2wt
8274 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8275 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8276 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8279 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8280 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8281 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8286 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8292 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8297 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8303 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8308 Internal link with en linktrail: no apostrophes (T29473)
8314 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8319 Internal link with ca linktrail with apostrophes (T29473)
8325 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8330 Internal link with kaa linktrail with apostrophes (T29473)
8336 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8341 Link with multiple ":" in a subpage-supporting namespace (T65636)
8343 [[User:Foo/Test/63636:Bar|Test]]
8345 <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>
8348 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8351 ## Mainly a sanity check for Parsoid
8353 Handle title parsing for subpages
8373 Link to a subpage from a namespace other than main
8380 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8383 <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>
8387 Ensure that transclusion titles are not url-decoded
8389 subpage title=[[Test]]
8392 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8394 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8397 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8401 Purely hash wikilink
8403 title=[[User:Test/123]]
8408 <p><a href="#a">b</a>
8411 <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>
8415 Serialization of purely hash wikilink
8417 title=[[User:Test/123]]
8421 <p><a href="#a">[[</a></p>
8423 [[#a|<nowiki>[[</nowiki>]]
8425 <p><a href="#a">[[</a>
8430 1. Interaction of linktrail and template encapsulation
8434 <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>
8438 2. Interaction of linktrail and template encapsulation
8442 {{echo|Some [[Fool]]}}s
8444 <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>
8448 3. Interaction of linktrail and template encapsulation
8452 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8454 <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>
8464 Internal link with is link prefix
8468 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8470 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8481 Internal link with is link trail and link prefix
8485 [[mótmælendatrú|xxx]]ar
8487 mótmælenda[[söfnuður]]
8488 mótmælenda[[söfnuður|söfnuðir]]
8489 mótmælenda[[söfnuður|söfnuðir]]xxx
8491 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8492 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8493 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8494 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8495 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8500 Parsoid link trail escaping
8502 parsoid=html2wt,html2html
8504 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8510 Parsoid link prefix escaping
8513 parsoid=html2wt,html2html
8515 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8517 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8521 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8529 [http://wp.org ''foo'']
8531 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8532 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8533 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8534 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8539 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8541 [[Foo|{{echo|a}} b {{echo|c}}]]
8543 <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>
8547 Link with angle bracket after anchor
8551 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8554 <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>
8558 ### Interwiki links (see maintenance/interwiki.sql)
8562 Inline interwiki link
8564 parsoid=wt2html,wt2wt,html2html
8566 [[MeatBall:SoftSecurity]]
8568 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8571 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8575 Inline interwiki link with empty title (T4372)
8577 parsoid=wt2html,wt2wt,html2html
8581 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8584 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8588 Interwiki link encoding conversion (T3636)
8590 *[[Wikipedia:ro:Olteniţa]]
8591 *[[Wikipedia:ro:Olteniţa]]
8593 <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>
8594 <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>
8598 <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>
8599 <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>
8604 Interwiki link with fragment (T4130)
8606 [[MeatBall:SoftSecurity#foo]]
8608 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8613 Link scenarios with escaped fragments
8616 [[Foo#Is this great?]]
8617 [[meatball:Foo#Is this great?]]
8619 <p><a href="#Is_this_great.3F">#Is this great?</a>
8620 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8621 <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>
8624 <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>
8625 <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>
8626 <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>
8629 # Ideally the wikipedia: prefix here should be proto-relative too
8630 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8631 # define the 'en' prefix, and originally the test used 'wikipedia',
8632 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8635 Different interwiki prefixes mapping to the same URL
8643 [[:wikipedia:Foo|Foo]]
8645 [[wikipedia:en:Foo]]
8647 [[:wikipedia:en:Foo]]
8651 <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>
8653 <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>
8655 <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>
8657 <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>
8659 <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>
8661 <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>
8663 <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>
8667 Interwiki links that cannot be represented in wiki syntax
8670 [[meatball:ok#foo|ok with fragment]]
8671 [[meatball:ok_as_well?|ok ending with ? mark]]
8672 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8673 [http://de.wikipedia.org/wiki/#foo is just fragment]
8676 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8677 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8678 <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>
8679 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8680 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8683 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8684 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8685 <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>
8686 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8687 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8691 Interwiki links: trail
8693 [[wikipedia:Foo|Ba]]r
8695 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8698 <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>
8702 Local interwiki link
8704 parsoid=wt2html,wt2wt,html2html
8706 [[local:Template:Foo]]
8708 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8711 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8714 # Parsoid does not mark self-links, by design.
8716 Local interwiki link: self-link to current page
8719 parsoid=wt2html,wt2wt,html2html
8723 <p><a class="mw-selflink selflink">local:Main Page</a>
8726 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8730 Local interwiki link: prefix only (T66167)
8732 parsoid=wt2html,wt2wt,html2html
8736 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8739 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8743 Local interwiki link: with additional interwiki prefix (T63357)
8745 parsoid=wt2html,wt2wt,html2html
8747 [[local:meatball:Hello]]
8749 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8752 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8756 Multiple local interwiki link prefixes
8758 [[local:local:local:local:mi:local:Foo]]
8760 parsoid=wt2html,wt2wt,html2html
8762 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8765 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8769 ### Interlanguage links
8770 ### Language links (so that searching for '### language' matches..)
8782 <p>Blah blah blah</p>
8783 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8786 ## parsoid html2wt will lose the space variations
8788 Interlanguage link with spacing
8790 parsoid=wt2html,wt2wt,html2html
8798 <p>Blah blah blah</p>
8799 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8803 Double interlanguage link
8812 <p>Blah blah blah</p>
8813 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8814 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8817 ## parsoid html2wt will lose the space variations
8819 Interlanguage link variations
8821 parsoid=wt2html,wt2wt,html2html
8831 <p>Blah blah blah</p>
8832 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8833 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8834 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8838 Escaping of interlanguage links (T129218, T156308)
8842 [[ : zh : Chinese ]]
8845 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8846 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8850 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8851 <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8855 Multiple colons escaping interlanguage links
8863 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8868 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8870 [[:::es:Spanish]]</p>
8873 ## parsoid html2wt will normalize the space to _
8875 Space and question mark encoding in interlanguage links (T95473)
8877 parsoid=wt2html,wt2wt,html2html
8885 <p>Blah blah blah</p>
8886 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8890 Interlanguage link, with prefix links
8900 <p>Blah blah blah</p>
8901 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8905 Double interlanguage link, with prefix links (T10897)
8916 <p>Blah blah blah</p>
8917 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8918 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8922 "Extra" interlanguage links (T34189 / gerrit 111390)
8930 <p>Blah blah blah</p>
8931 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8934 ## PHP parser tests script needs an update
8935 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8937 Language links render as inline links if $wgInterwikiMagic=false
8939 wgInterwikiMagic=false
8940 parsoid=wt2html,wt2wt,html2html
8945 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8948 ## PHP parser tests script needs an update
8949 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8951 Language links render as inline links in the Talk namespace
8954 parsoid=wt2html,wt2wt,html2html
8959 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8963 Parsoid-specific test: Wikilinks with should RT properly
8969 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8974 Parsoid T55221: Wikilinks should be properly entity-escaped
8976 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8978 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8979 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8981 He&nbsp;llo [[Foo|He&nbsp;llo]]
8983 He&nbsp;llo He&nbsp;llo
8985 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8986 </p><p>He&nbsp;llo He&nbsp;llo
8990 # html2wt will fail because of title normalization without data-parsoid
8992 Parsoid: handle constructor well
8994 parsoid=wt2html,wt2wt
9000 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9001 </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>
9004 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9006 <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>
9015 # Note that `ko` isn't a known interlanguage prefix
9017 Parsoid: recognize interlanguage links without a target page
9027 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9029 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9032 # Note that `ko` isn't a known interwiki prefix
9034 Parsoid: recognize interwiki links without a target page
9036 parsoid=wt2html,wt2wt,html2html
9042 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9043 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9046 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9047 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9051 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9055 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9058 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9062 Interlanguage link with preceding local interwiki link (T70085)
9064 parsoid=wt2html,wt2wt,html2html
9067 [[local:es:Spanish]]
9070 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9074 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9078 Looks like an interlanguage link, but is actually a local interwiki
9080 parsoid=wt2html,wt2wt,html2html
9086 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9090 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9094 ### Redirects, Parsoid-only
9098 1. Simple redirect to page
9100 #REDIRECT [[Main Page]]
9102 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9106 2. Other redirect variants
9108 #REDIRECT [[Main_Page]]
9110 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9113 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9114 # This tests the Parsoid bail-out code.
9116 3. Other redirect variants
9118 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9120 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
9124 4. Redirect to a templated destination
9126 #REDIRECT [[{{echo|Foo}}bar]]
9128 <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"}]]}'/>
9134 parsoid=wt2html,wt2wt
9139 <li>REDIRECT [[]]</li></ol>
9143 Optional colon in #REDIRECT
9145 # the colon is archaic syntax. we support it for wt2html, but we
9146 # don't care that it roundtrips back to the modern syntax.
9147 parsoid=wt2html,html2html
9149 #REDIRECT:[[Main Page]]
9151 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9155 Whitespace in #REDIRECT with optional colon
9157 # the colon and gratuitous whitespace is archaic syntax. we support
9158 # it for wt2html, but we don't care that it roundtrips back to the
9159 # modern syntax (without extra whitespace)
9160 parsoid=wt2html,html2html
9167 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9171 Piped link in #REDIRECT
9173 # content after piped link is ignored. we support this syntax,
9174 # but don't care that the piped link is lost when we roundtrip this.
9177 #REDIRECT [[Main Page|bar]]
9179 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9183 Redirect to category (T104502)
9185 parsoid=wt2html,wt2wt
9187 #REDIRECT [[Category:Foo]]
9189 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9193 Redirect to category with URL encoding (T104502)
9197 #REDIRECT [[Category%3AFoo]]
9199 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9203 Redirect to category page
9205 #REDIRECT [[:Category:Foo]]
9207 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9211 Redirect to image page (1)
9213 #REDIRECT [[File:Wiki.png]]
9215 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9219 Redirect to image page (2)
9221 #REDIRECT [[Image:Wiki.png]]
9223 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9226 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9227 # Next test confirms this.
9229 Redirect to language (1) (T104918)
9231 parsoid=wt2html,wt2wt,html2html
9233 #REDIRECT [[en:File:Wiki.png]]
9235 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9239 Redirect to language (2) (T104918)
9241 #REDIRECT [[:en:File:Wiki.png]]
9243 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9247 Redirect to interwiki (T104918)
9249 #REDIRECT [[meatball:File:Wiki.png]]
9251 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9255 Non-English #REDIRECT
9259 #TILVÍSUN [[Main Page]]
9261 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9265 Redirect syntax under text isn't considered a redirect
9268 #redirect [[Main Page]]
9271 <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>
9279 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9286 Redirect followed by block on the same line
9290 #REDIRECT [[Main Page]]<!-- haha -->== hi ==
9292 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi"> hi </h2>
9296 Redirect followed by a newline
9298 #REDIRECT [[Main Page]]
9301 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9306 Redirect followed by multiple newlines
9308 #REDIRECT [[Main Page]]
9313 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9320 Drop duplicate redirects
9324 <link rel="mw:PageProp/redirect" href="./Foo"/>
9325 <link rel="mw:PageProp/redirect" href="./Bar"/>
9326 <link rel="mw:PageProp/redirect" href="./Baz"/>
9345 Broken br tag sanitization
9353 # TODO: Fix html2html mode (T53055)!
9355 Parsoid: Broken br tag recognition
9368 Incorrecly removing closing slashes from correctly formed XHTML
9370 <br style="clear:both;" />
9372 <p><br style="clear:both;" />
9377 Failing to transform badly formed HTML into correct XHTML
9379 <br style="clear: left;">
9380 <br style="clear: right;">
9381 <br style="clear: both;">
9383 <p><br style="clear: left;" />
9384 <br style="clear: right;" />
9385 <br style="clear: both;" />
9389 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9390 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9392 Handling html with a div self-closing tag
9401 <p><div title />
9405 <p><div title=bar />
9406 <div title=bar/>
9408 <div title="bar/"></div>
9412 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9413 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9414 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9415 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9416 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9417 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9421 Handling html with a br self-closing tag
9448 Horizontal ruler (should it add that extra space?)
9463 Horizontal ruler -- 4+ dashes render hr
9472 Horizontal ruler -- eats additional dashes on the same line
9481 Horizontal ruler -- does not collapse dashes on consecutive lines
9492 Horizontal ruler -- <4 dashes render as plain text
9501 Horizontal ruler -- Supports content following dashes on same line
9513 ### Block-level elements
9522 <ul><li>Common list</li>
9524 <li>item 3</li></ul>
9535 <ol><li>Numbered list</li>
9537 <li> item 3</li></ol>
9551 ***#Number on level 4
9553 **#Number on level 3
9554 **#Number on level 3
9558 #** Level 3, but ordered
9561 <ol><li> with numbers</li></ol>
9562 <ul><li> and bullets</li></ul>
9563 <ol><li> and numbers</li></ol></li>
9565 <ul><li>bullet level 2
9566 <ul><li>bullet level 3
9567 <ol><li>Number on level 4</li></ol></li></ul></li>
9569 <ol><li>Number on level 3</li>
9570 <li>Number on level 3</li></ol></li></ul>
9571 <ol><li>number level 2</li></ol></li>
9573 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9574 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9579 1. Nested mixed wikitext and html list
9582 * <ul><li>ho</li></ul>
9587 <li> <ul><li>ho</li></ul></li>
9589 <ul><li> ho</li></ul></li></ul>
9593 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9595 <ul><li> ho</li></ul></li></ul>
9599 2. Nested mixed wikitext and html list (incompatible)
9602 : {{echo|<li>ho</li>}}
9605 <dd> <li>ho</li></dd></dl>
9609 <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>
9619 <ul><li>bar</li></ul></li></ul>
9629 <ul><li><ul><li>foo</li></ul></li>
9635 Nested lists 3 (first element empty)
9641 <ul><li>bar</li></ul></li></ul>
9646 Nested lists 4 (first element empty)
9651 <ul><li><ul><li></li></ul></li>
9657 Nested lists 5 (both elements empty)
9662 <ul><li><ul><li></li></ul></li>
9668 Nested lists 6 (both elements empty)
9674 <ul><li></li></ul></li></ul>
9679 Nested lists 7 (skip initial nesting levels)
9683 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9688 Nested lists 8 (multiple nesting transitions)
9696 <ul><li><ul><li> bar</li></ul></li>
9697 <li> baz</li></ul></li>
9703 Nested lists 9 (extension interaction)
9709 <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>
9713 1. Lists with start-of-line-transparent tokens before bullets: Comments
9726 2. Lists with start-of-line-transparent tokens before bullets: Template close
9731 <ul><li>foo bar</li>
9737 List items are not parsed correctly following a <pre> block (T2785)
9743 <ul><li> <pre>foo</pre></li>
9744 <li> <pre>bar</pre></li>
9748 <ul><li> <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9749 <li> <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9754 List items from template
9765 * notSOL{{inner list}}
9768 <ul><li> item 1</li>
9769 <li> item 2</li></ul>
9770 <ul><li> item 0</li>
9772 <li> item 2</li></ul>
9773 <ul><li> item 0</li>
9776 <li> item 2</li></ul>
9781 List interrupted by empty line or heading
9789 <ul><li> foo</li></ul>
9790 <ul><li><ul><li> bar</li></ul></li></ul>
9791 <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>
9792 <ul><li> Another list item</li></ul>
9797 Multiple list tags generated by templates
9818 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9821 <!--This line will NOT split the list-->
9823 <!--This line will NOT split the list either-->
9825 <!--foo--> <!----> <!--This line NOT split the list either-->
9836 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9839 <!--This line will NOT split the list-->
9841 <!--This line will NOT split the list either-->
9843 <!--foo--> <!----> <!--This line NOT split the list
9856 (The PHP parser relies on Tidy for the hack)
9858 parsoid=wt2html,wt2wt
9862 * {{echo|<li>templated li-hack}}
9863 * <!--foo--> <li> unsupported li-hack with preceding comments
9866 <li><li>not a li-hack
9873 <li>templated li-hack</li>
9874 <li>unsupported li-hack with preceding comments</li>
9877 <li>not a li-hack</li>
9881 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"* "}'>li-hack</li>
9882 <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>
9883 <li data-parsoid='{"autoInsertedEnd":true}'> <!--foo--> </li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'> unsupported li-hack with preceding comments</li></ul>
9885 <ul data-parsoid='{"stx":"html"}'>
9886 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
9893 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9920 Parsoid: Test of whitespace serialization with Templated bullets
9927 <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>
9931 # ------------------------------------------------------------------------
9932 # The next set of tests are about Parsoid's ability to handle badly nested
9933 # tags (parse, minimize scope of fixup, and roundtrip back)
9934 # ------------------------------------------------------------------------
9937 Unbalanced closing block tags break a list
9938 (php parser relies on Tidy to fix up)
9956 # Parsoid fails this test, but it might be tricky to support properly.
9959 Unbalanced closing non-block tags don't break a list
9960 (php parser relies on Tidy to fix up)
9967 <li><span>a</span></li>
9968 <li><span>b</span></li>
9982 Unclosed formatting tags that straddle lists are closed and reopened
9983 (php parser relies on Tidy to fix up)
9985 parsoid=wt2html,wt2wt,html2html
9995 <ol><li> <s> a</s></li>
9996 <li><s> b </s></li></ol>
10001 1. List embedded in a formatting tag
10008 <li><small>foo</small></li>
10018 ## Ugly Parsoid output here
10019 ## Not sure what the right output is.
10021 2. List embedded in a formatting tag
10028 <li><small>a</small></li>
10029 <li><small>b</small></li>
10036 <li><small>b</small></li>
10040 # Ugly Parsoid and PHP parser output here
10041 # Not sure if we want to make this a test!
10044 ## 3. Unclosed formatting tags in list elements
10048 ## !! html/php+tidy
10050 ## <li><small>a</small></li>
10051 ## <li><small><small>b</small></small></li>
10055 ## <li><small>a</small></li>
10057 ## <li><small>b</small></li>
10061 # This is a bug in the PHP parser + tidy combination.
10062 # (The </tr> tag gets parsed as text and html-escaped by PHP,
10063 # and then fostered out of the table by tidy.)
10064 # We believe the Parsoid output to be correct.
10066 Table with missing opening <tr> tag
10068 parsoid=wt2html,wt2wt
10086 # Note that the current date is hard-coded as
10087 # 1970-01-01T00:02:03Z (a Thursday)
10088 # when running parser tests. The timezone is also fixed to GMT, so
10089 # local date will be identical to current date.
10092 Magic Word: {{CURRENTDAY}}
10101 Magic Word: {{CURRENTDAY2}}
10110 Magic Word: {{CURRENTDAYNAME}}
10119 Magic Word: {{CURRENTDOW}}
10128 Magic Word: {{CURRENTMONTH}}
10137 Magic Word: {{CURRENTMONTH1}}
10146 Magic Word: {{CURRENTMONTHABBREV}}
10148 {{CURRENTMONTHABBREV}}
10155 Magic Word: {{CURRENTMONTHNAME}}
10157 {{CURRENTMONTHNAME}}
10164 Magic Word: {{CURRENTMONTHNAMEGEN}}
10166 {{CURRENTMONTHNAMEGEN}}
10173 Magic Word: {{CURRENTTIME}}
10182 Magic Word: {{CURRENTHOUR}}
10191 Magic Word: {{CURRENTWEEK}} (T6594)
10200 Magic Word: {{CURRENTYEAR}}
10209 Magic Word: {{CURRENTTIMESTAMP}}
10211 {{CURRENTTIMESTAMP}}
10218 Magic Words LOCAL (UTC)
10222 * {{LOCALMONTHNAME}}
10223 * {{LOCALMONTHNAMEGEN}}
10224 * {{LOCALMONTHABBREV}}
10233 * {{LOCALTIMESTAMP}}
10248 <li> 19700101000203</li></ul>
10253 Magic Word: {{FULLPAGENAME}}
10255 title=[[User:Ævar Arnfjörð Bjarmason]]
10256 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10260 <p>User:Ævar Arnfjörð Bjarmason
10265 Magic Word: {{FULLPAGENAMEE}}
10267 title=[[User:Ævar Arnfjörð Bjarmason]]
10268 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10272 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10277 Magic Word: {{TALKSPACE}}
10279 title=[[User:Ævar Arnfjörð Bjarmason]]
10280 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10289 Magic Word: {{TALKSPACE}}, same namespace
10291 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10292 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10301 Magic Word: {{TALKSPACE}}, main namespace
10303 title=[[Parser Test]]
10304 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10313 Magic Word: {{TALKSPACEE}}
10315 title=[[User:Ævar Arnfjörð Bjarmason]]
10316 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10325 Magic Word: {{SUBJECTSPACE}}
10327 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10328 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10337 Magic Word: {{SUBJECTSPACE}}, same namespace
10339 title=[[User:Ævar Arnfjörð Bjarmason]]
10340 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10349 Magic Word: {{SUBJECTSPACE}}, main namespace
10351 title=[[Parser Test]]
10352 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10360 Magic Word: {{SUBJECTSPACEE}}
10362 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10363 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10372 Magic Word: {{NAMESPACE}}
10374 title=[[User:Ævar Arnfjörð Bjarmason]]
10375 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10384 Magic Word: {{NAMESPACEE}}
10386 title=[[User:Ævar Arnfjörð Bjarmason]]
10387 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10396 Magic Word: {{NAMESPACENUMBER}}
10398 title=[[User:Ævar Arnfjörð Bjarmason]]
10399 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10401 {{NAMESPACENUMBER}}
10408 Magic Word: {{SUBPAGENAME}}
10410 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10411 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10420 Magic Word: {{SUBPAGENAMEE}}
10422 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10423 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10432 Magic Word: {{ROOTPAGENAME}}
10434 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10435 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10439 <p>Ævar Arnfjörð Bjarmason
10444 Magic Word: {{ROOTPAGENAMEE}}
10446 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10447 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10451 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10456 Magic Word: {{BASEPAGENAME}}
10458 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10459 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10463 <p>Ævar Arnfjörð Bjarmason
10468 Magic Word: {{BASEPAGENAMEE}}
10470 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10471 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10475 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10480 Magic Word: {{TALKPAGENAME}}
10482 title=[[User:Ævar Arnfjörð Bjarmason]]
10483 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10487 <p>User talk:Ævar Arnfjörð Bjarmason
10492 Magic Word: {{TALKPAGENAMEE}}
10494 title=[[User:Ævar Arnfjörð Bjarmason]]
10495 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10499 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10504 Magic Word: {{SUBJECTPAGENAME}}
10506 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10507 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10509 {{SUBJECTPAGENAME}}
10511 <p>User:Ævar Arnfjörð Bjarmason
10516 Magic Word: {{SUBJECTPAGENAMEE}}
10518 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10519 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10521 {{SUBJECTPAGENAMEE}}
10523 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10528 Magic Word: {{NUMBEROFFILES}}
10530 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10539 Magic Word: {{PAGENAME}}
10541 title=[[User:Ævar Arnfjörð Bjarmason]]
10542 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10546 <p>Ævar Arnfjörð Bjarmason
10551 Magic Word: {{PAGENAME}} with metacharacters
10553 title=[['foo & bar = baz']]
10554 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10558 <p><i>'foo & bar = baz'</i>
10561 <p><i>'foo & bar = baz'</i></p>
10565 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10567 title=[[*RFC 1234 http://example.com/]]
10568 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10572 <p>*RFC 1234 http://example.com/
10575 <p>*RFC 1234 http://example.com/</p>
10579 Magic Word: {{PAGENAMEE}}
10581 title=[[User:Ævar Arnfjörð Bjarmason]]
10582 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10586 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10591 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10593 title=[[*RFC 1234 http://example.com/]]
10594 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10598 <p>*RFC_1234_http://example.com/
10601 <p>*RFC_1234_http://example.com/</p>
10605 Magic Word: {{REVISIONID}}
10607 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10614 flags=vary-revision-id
10618 Magic Word: {{SCRIPTPATH}}
10620 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10628 Magic Word: {{STYLEPATH}}
10630 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10639 Magic Word: {{SERVER}}
10641 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10645 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10650 Magic Word: {{SERVERNAME}}
10652 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10661 Magic Word: {{SITENAME}}
10663 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10672 Magic Word: {{PAGELANGUAGE}}
10675 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10684 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10686 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10695 Case-sensitive magic words, when cased differently, should just be template transclusions
10702 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10703 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10704 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10705 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10710 Case-insensitive magic words should still work with weird casing.
10720 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10724 # From plwiki:PLOS_ONE
10726 Parsoid: Page property magic word with magic word contents
10728 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10730 <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>"}]]}'/>
10733 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10734 # But, this is a limitation of our representation and is documented in
10735 # TemplateHandler.js in processSpecialMagicWord
10737 Parsoid: Template-generated DISPLAYTITLE
10739 {{{{echo|DISPLAYTITLE}}:Foo}}
10743 wgAllowDisplayTitle=true
10744 wgRestrictDisplayTitle=false
10749 <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"}]]}'/>
10753 Namespace 1 {{ns:1}}
10762 Namespace 1 {{ns:01}}
10771 Namespace 0 {{ns:0}} (T6783)
10779 Namespace 0 {{ns:00}} (T6783)
10787 Namespace -1 {{ns:-1}}
10796 Namespace User {{ns:User}}
10805 Namespace User talk {{ns:User_talk}}
10814 Namespace User talk {{ns:uSeR tAlK}}
10823 Namespace File {{ns:File}}
10832 Namespace File {{ns:Image}}
10841 Namespace (lang=de) Benutzer {{ns:User}}
10852 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10858 <p>Benutzer Diskussion
10865 {{urlencode:hi world?!}}
10866 {{urlencode:hi world?!|WIKI}}
10867 {{urlencode:hi world?!|PATH}}
10868 {{urlencode:hi world?!|QUERY}}
10878 Magic Word: prioritize type info over data-parsoid
10882 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10888 Magic Word: serialize on separate line (parsoid)
10890 parsoid=wt2wt,html2wt
10896 foo<meta property="mw:PageProp/notoc"/>bar
10900 Magic Word: rt non-english wikis
10907 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10911 __proto__ is treated as normal wikitext (T105997)
10923 Magic links: internal link to RFC (T2479)
10927 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10930 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10934 Magic links: RFC (T2479)
10938 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10941 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10945 Magic links: RFC (T67278)
10947 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10949 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
10952 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10956 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10958 RFC      822
10962 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10967 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 822</a>
10973 Magic links: ISBN (T3937)
10977 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10980 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10984 Magic links: ISBN (T67278)
10986 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10988 <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.
10991 <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>
10995 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
10997 ISBN      978 0 316 09811 3
11003 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11010 <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>
11018 Magic links: PMID incorrectly converts space to underscore
11022 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11025 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
11029 Magic links: PMID (T67278)
11031 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11033 <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.
11036 <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>
11040 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11042 PMID      1234
11046 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11051 <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>
11056 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11057 # since these are ExtLinkText, not MagicLinkText
11059 Magic links: use appropriate serialization for "almost" magic links.
11061 X[[Special:BookSources/0978739256|foo]]
11063 X[//tools.ietf.org/html/rfc1234 foo]
11065 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11066 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
11069 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11070 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
11074 Magic links: All disabled (T47942)
11076 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11082 <p>ISBN 0-306-40615-2
11093 Nonexistent template
11095 {{thistemplatedoesnotexist}}
11097 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11102 Template with invalid target containing tags
11104 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11106 <p>{{a<b>b</b>|foo|a=b|a = b}}
11111 Template with invalid target containing unclosed tag
11113 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11115 <p>{{a<b>|foo|a=b|a = b}}</b>
11120 Template with invalid target containing wikilink
11124 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11127 <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>
11131 Template with just whitespace in it, T70421
11135 <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>
11141 This is a test template
11149 <p>This is a test template
11154 Template with explicit namespace
11158 <p>This is a test template
11166 This is a test template with parameter {{{param}}}
11172 {{paramtest|param=foo}}
11174 <p>This is a test template with parameter foo
11179 Template:paramtestnum
11181 [[{{{1}}}|{{{2}}}]]
11185 Template unnamed parameter
11187 {{paramtestnum|Main Page|the main page}}
11189 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11194 Template:templatesimple
11200 Template:templateredirect
11202 #redirect [[Template:templatesimple]]
11206 Template:templateasargtestnum
11212 Template:templateasargtest
11214 {{template{{{templ}}}}}
11218 Template:templateasargtest2
11224 Template with template name as unnamed argument
11226 {{templateasargtestnum|templatesimple}}
11233 Template with template name as argument
11235 {{templateasargtest|templ=simple}}
11242 Template with template name as argument (2)
11244 {{templateasargtest2|templ=templatesimple}}
11251 Template:templateasargtestdefault
11253 {{{{{templ|templatesimple}}}}}
11263 Template with default value
11265 {{templateasargtestdefault}}
11272 Template with default value (value set)
11274 {{templateasargtestdefault|templ=templa}}
11283 {{templateredirect}}
11288 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11292 Template with argument in separate line
11294 {{ templateasargtest |
11302 Template with complex template as argument
11305 param ={{ templateasargtest |
11306 templ = simple }}}}
11308 <p>This is a test template with parameter (test)
11313 Templates with templated name
11315 {{{{echo|echo}}|foo}}
11316 {{{{echo|inner list}} }}
11320 <ul><li> item 1</li></ul>
11323 <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>
11324 <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>
11327 # Parsoid markup is deliberate "broken". This is an edge case.
11328 # See long comment in TemplateHandler.js:convertAttribsToString.
11330 Templates with invalid templated targets
11341 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11346 Template with thumb image (with link in description)
11348 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11350 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>
11353 <p>This is a test template with parameter</p>
11354 <div class="thumb tright">
11355 <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>
11356 <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>
11360 <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>
11364 Template:complextemplate
11366 {{{1}}} {{paramtest|
11367 param ={{{param}}}}}
11371 Template with complex arguments
11374 param ={{ templateasargtest |
11375 templ = simple }}|[[Template:complextemplate|link]]}}
11377 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11382 T2553: link with two variables in a piped link
11385 |[[{{{1}}}|{{{2}}}]]
11390 <td>[[{{{1}}}|{{{2}}}]]
11395 <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>
11401 Abort table cell attribute parsing on wikilink
11404 | testing [[one|two]] | three || four
11405 | testing one two | three || four
11406 | testing="[[one|two]]" | three || four
11411 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11417 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11423 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> | three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td>
11424 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'> three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td>
11425 <td> testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" | three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td></tr>
11430 Don't abort table cell attribute parsing if wikilink is found in template arg
11433 | Test {{#tag:ref|One two "[[three]]" four}}
11437 <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>
11442 Magic variable as template parameter
11444 {{paramtest|param={{SITENAME}}}}
11446 <p>This is a test template with parameter MediaWiki
11453 [[{{{param}}}|link]]
11457 Template parameter as link source
11459 {{linktest|param=Main Page}}
11461 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11466 Template:paramtest2
11468 including another template, {{paramtest|param={{{arg}}}}}
11472 Template passing argument to another template
11474 {{paramtest2|arg='hmm'}}
11476 <p>including another template, This is a test template with parameter 'hmm'
11487 Template as link source
11491 [[{{linktest2}}|Main Page]]
11493 [[{{linktest2}}]]Page
11495 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11496 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11497 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11515 Template infinite loop
11519 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11524 Template from main namespace
11543 T2529: Template with table, not included at beginning of line
11562 T2523: Template shouldn't eat newline (or add an extra one before table)
11582 T2041: Template parameters shown as broken links
11591 Template with targets containing wikilinks
11597 {{[[{{echo|foo}}]]}}
11599 {{{{echo|[[foo}}]]}}
11601 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11602 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11606 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11607 <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>
11608 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11618 Templates: Double quotes as template target
11625 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11629 ## This test is about making sure Parsoid's data-mw is well formed in the
11630 ## face of multiple templates with intersecting and overlapping ranges. The
11631 ## wikitext itself is wretched.
11633 Templates with intersecting and overlapping ranges
11658 <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":""}]]}'>
11660 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11662 <tbody><tr><td>hi</td></tr>
11667 Template:MSGNW test
11669 ''None'' of '''this''' should be
11671 but rather passed unmodified
11679 # hmm, fix this or just deprecate msgnw and document its behavior?
11683 {{msgnw:MSGNW test}}
11685 <p>''None'' of '''this''' should be
11687  but rather passed unmodified
11688 {{test}}
11692 <!-- comment -->
11699 {{int:youhavenewmessages|lots of money|not!}}
11701 <p>You have lots of money (not!).
11706 int keyword - non-existing message
11717 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11721 <includeonly> and <noinclude> being included
11732 <onlyinclude>Foo</onlyinclude>bar
11736 <onlyinclude> being included
11748 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11752 <onlyinclude> and <includeonly> being included
11761 <includeonly> and <noinclude> on a page
11763 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11770 Un-closed <noinclude>
11777 <onlyinclude> on a page
11779 <onlyinclude>Foo</onlyinclude>bar
11786 Un-closed <onlyinclude>
11793 Self-closed noinclude, includeonly, onlyinclude tags
11804 Unbalanced includeonly and noinclude tags
11808 |b</noinclude></noinclude>
11809 |c</noinclude></includeonly>
11810 |d</includeonly></includeonly>
11819 <td>c</includeonly>
11821 <td>d</includeonly></includeonly>
11827 Template:Includeonly section
11830 ==Includeonly section==
11836 T8563: Edit link generation for section shown by <includeonly>
11838 {{includeonly section}}
11840 <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>
11841 <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>
11845 # Uses same input as the contents of [[Template:Includeonly section]]
11847 T8563: Section extraction for section shown by <includeonly>
11852 ==Includeonly section==
11860 T8563: Edit link generation for section suppressed by <includeonly>
11863 ==Includeonly section==
11867 <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>
11872 T8563: Section extraction for section suppressed by <includeonly>
11877 ==Includeonly section==
11885 Un-closed <includeonly>
11890 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11893 ## We used to, but no longer wt2wt this test since the default serializer
11894 ## will normalize the include directives to serialize on their own line.
11895 ## Selser will take care of preserving formatting in scenarios where they
11896 ## intermingled with other wikitext.
11898 Includes and comments at SOL
11900 parsoid=wt2html,html2html
11902 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11906 </noinclude>* stuff
11909 <includeonly>can have stuff</includeonly>=== here ===
11912 <h2><span class="mw-headline" id="hu">hu</span></h2>
11915 <ul><li> stuff</li>
11916 <li> here</li></ul>
11917 <h3><span class="mw-headline" id="here">here</span></h3>
11920 <!-- 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>
11922 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11924 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11925 <li> here</li></ul>
11927 <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>
11931 # TODO: test with DOM fragment reuse!
11933 Parsoid: DOM fragment reuse
11935 parsoid=wt2wt,wt2html
11937 a{{echo|b<table></table>c}}d
11949 <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>
11951 <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">
11952 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11953 </span><p about="#mwt2">cd</p>
11955 <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">
11957 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11959 </span><p about="#mwt3">b</p>
11963 Parsoid: Merge double tds (T52603)
11968 |{{echo|{{!}} foo}}
11972 <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>
11977 Parsoid: Merge double tds in nested transclusion content (T52603)
11983 |{{echo|{{!}} foo}}
11987 <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}}]}'>
11989 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11995 ### <includeonly> and <noinclude> in attributes
11998 0. includeonly around the entire attribute
12000 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12002 <p><span id="v2">bar</span>
12007 1. includeonly in html attr key
12009 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12011 <p><span id="foo">bar</span>
12016 2. includeonly in html attr value
12018 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12019 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12021 <p><span id="v1">bar</span>
12022 <span id="v1">bar</span>
12027 3. includeonly in part of an attr value
12029 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12031 <p><span style="color:red;">bar</span>
12036 4. includeonly in table attributes
12060 ### Preprocessor precedence tests
12061 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12063 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12065 Preprocessor precedence 1: link is rightmost opening
12071 But close-brace is not a valid character in a link title:
12074 However, we can still tell this was handled as a link in the preprocessor:
12075 {{echo|[[Foo}}|bar]]|bat}}
12077 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12078 </p><p>But close-brace is not a valid character in a link title:
12080 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12084 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12085 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12086 <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>
12090 Preprocessor precedence 2: template is rightmost opening
12099 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12103 Preprocessor precedence 3: language converter is rightmost opening
12119 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12120 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12121 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12125 Preprocessor precedence 4: left-most angle bracket
12136 Template:Precedence5
12142 Preprocessor precedence 5: tplarg takes precedence over template
12144 {{Precedence5|Bullet}}
12146 <ul><li> Bar</li></ul>
12149 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li> Bar</li></ul>
12153 Preprocessor precedence 6: broken link is rightmost opening
12159 {{echo|[[Foo|bar|bat=baz}}
12162 </p><p>{{echo|[[Foo|bar|bat=baz}}
12165 <p>{{echo|[[Foo}}</p>
12166 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12169 # This next test exposes a difference between PHP and Parsoid:
12170 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12171 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12172 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12173 # outer `[[Foo` extends until the `y]]`
12174 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12175 # intermediate result (after template expansion), and link processing
12176 # happens on this intermediate result, which moves the wikilink
12177 # boundary leftward to `[[Foo|Bar]]`
12178 # 2b) Parsoid works in a single step, so it's going to keep the
12179 # wikilink as extending to the `y]]`
12180 # 3a) Then PHP does linktrail processing which slurps up the trailing
12181 # `xy` inside the link.
12182 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12183 # `z` inside the link.
12184 # This is "correct" behavior. Parsoid's basic worldview is that the
12185 # `]]` inside the template shouldn't be allowed to leak out to affect
12186 # the surrounding wikilink. PHP may match Parsoid (in the future)
12187 # if you use {{#balance}} (T114445).
12190 Preprocessor precedence 7: broken template is rightmost opening
12196 [[Foo|{{echo|Bar]]-x}}-y]]-z
12198 Careful: linktrails can move the end of the wikilink:
12199 [[Foo|{{echo|y']]a}}l]]l
12201 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12202 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12203 </p><p>Careful: linktrails can move the end of the wikilink:
12204 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12207 <p>[[Foo|{{echo|Bar]]</p>
12208 <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>
12209 <p>Careful: linktrails can move the end of the wikilink:
12210 <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>
12214 Preprocessor precedence 8: broken language converter is rightmost opening
12225 Template:Preprocessor_precedence_9
12230 ;7: {{{{{{{4}}}}}}}
12234 Preprocessor precedence 9: groups of braces
12236 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12242 <ul><li> Bar</li></ul>
12246 <dd> {Bullet}</dd></dl>
12249 <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}}]}'>
12254 </dl><ul about="#mwt1">
12256 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12265 Template:Preprocessor_precedence_10
12272 ;6: -{{{{{{4}}}}}}-
12273 ;7: -{{{{{{{5}}}}}}}-
12277 Preprocessor precedence 10: groups of braces with leading dash
12281 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12287 <ul><li> Bar-</li></ul>
12294 <ul><li> Bar-</li></ul>
12298 <dd> raw2</dd></dl>
12301 <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}}]}'>
12303 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12306 </dl><ul about="#mwt1">
12308 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12312 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12315 </dl><ul about="#mwt1">
12317 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12321 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12326 Preprocessor precedence 11: found during visual diff testing
12328 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12330 {{echo|-{{echo|-{{echo|x}}}}}}
12332 {{echo|-{{echo|x}}}}
12334 <p><span>-<span>-x</span></span>
12339 <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>
12341 <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>
12343 <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>
12347 Preprocessor precedence 12: broken language converter closed by brace.
12351 This form breaks the template, which is unfortunate:
12352 * {{echo|foo-{bar}bat}}
12354 But if the broken language converter markup is inside an extension
12355 tag, nothing bad happens:
12356 * <nowiki>foo-{bar}bat</nowiki>
12357 * {{echo|<nowiki>foo-{bar}bat</nowiki>}}
12358 * <pre>foo-{bar}bat</pre>
12359 * {{echo|<pre>foo-{bar}bat</pre>}}
12361 <tag>foo-{bar}bat</tag>
12362 {{echo|<tag>foo-{bar}bat</tag>}}
12365 <p>This form breaks the template, which is unfortunate:</p>
12367 <li>{{echo|foo-{bar}bat}}</li>
12369 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12371 <li>foo-{bar}bat</li>
12372 <li>foo-{bar}bat</li>
12393 <p>This form breaks the template, which is unfortunate:</p>
12395 <li>{{echo|foo-{bar}bat}}</li>
12397 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12399 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12400 <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>
12401 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12402 <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>
12404 <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>
12408 Preprocessor precedence 13: broken language converter in external link
12412 * [http://example.com/-{foo Example in URL]
12413 * [http://example.com Example in -{link} description]
12414 * {{echo|[http://example.com/-{foo Breaks template, however]}}
12417 <li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12418 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12419 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12423 <li><a rel="mw:ExtLink" href="http://example.com/-{foo">Example in URL</a></li>
12424 <li><a rel="mw:ExtLink" href="http://example.com">Example in -{link} description</a></li>
12425 <li>{{echo|<a rel="mw:ExtLink" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12430 Preprocessor precedence 14: broken language converter in comment
12432 * <!--{{foo}}--> ...should be ok
12433 * <!---{{foo}}--> ...extra dashes
12434 * {{echo|foo<!-- -{bar} -->bat}} ...should be ok
12437 <li>...should be ok</li>
12438 <li>...extra dashes</li>
12439 <li>foobat ...should be ok</li>
12443 <li><!--{{foo}}--> ...should be ok</li>
12444 <li><!---{{foo}}--> ...extra dashes</li>
12445 <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>
12450 Preprocessor precedence 15: broken brace markup in headings
12454 __NOTOC__ __NOEDITSECTION__
12463 ===5 foo{{{bar 5===
12468 <h3><span class="mw-headline" id="1_foo.5Bbar_1">1 foo[bar 1</span></h3>
12470 <h3><span class="mw-headline" id="2_foo.5B.5Bbar_2">2 foo[[bar 2</span></h3>
12472 <h3><span class="mw-headline" id="3_foo.7Bbar_3">3 foo{bar 3</span></h3>
12474 <h3><span class="mw-headline" id="4_foo.7B.7Bbar_4">4 foo{{bar 4</span></h3>
12476 <h3><span class="mw-headline" id="5_foo.7B.7B.7Bbar_5">5 foo{{{bar 5</span></h3>
12478 <h3><span class="mw-headline" id="6_foo-.7Bbar_6">6 foo-{bar 6</span></h3>
12481 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/
12483 <h3>1 foo[bar 1</h3>
12485 <h3>2 foo[[bar 2</h3>
12487 <h3>3 foo{bar 3</h3>
12489 <h3>4 foo{{bar 4</h3>
12491 <h3>5 foo{{{bar 5</h3>
12493 <h3>6 foo-{bar 6</h3>
12498 Preprocessor precedence 16: matching closing braces to opening braces
12503 -{{{echo|foo}}bar}-
12508 <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>
12512 ### Token Stream Patcher tests
12514 ### These tests won't always pass wt2wt and other modes because
12515 ### on serialization, the table will be output on a new line.
12516 ### For now, we are blacklisting them, and using this to test selser.
12520 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12522 parsoid=wt2html,wt2wt
12524 {{echo|}}{| width = '100%'
12528 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12529 <tbody><tr><td>foo</td></tr>
12533 ## We used to, but no longer wt2wt this test since the default serializer
12534 ## will normalize the include directives to serialize on their own line.
12535 ## Selser will take care of preserving formatting in scenarios where they
12536 ## intermingled with other wikitext.
12538 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12542 <includeonly>a</includeonly>{| {{{b}}}
12546 <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":""}]]}'>
12547 <tbody><tr><td>c</td></tr>
12552 Table wikitext syntax outside wiki-tables
12556 ! not a table heading
12559 | class="foo bar" | baz
12567 ! not a table heading
12570 | class="foo bar" | baz
12579 ### Testing parsing of templates where a template arg
12580 ### has the same name as the template itself.
12586 {{{quote|{{{1}}}}}}
12590 Templates: Template Name/Arg clash: 1. Use of positional param
12599 Templates: Template Name/Arg clash: 2. Use of named param
12601 {{quote|quote=foo}}
12608 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12617 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12621 Templates: 1. Simple use
12630 Templates: 2. Inside a block tag
12632 <div>{{echo|Foo}}</div>
12633 <blockquote>{{echo|Foo}}</blockquote>
12636 <blockquote>Foo</blockquote>
12646 Templates: P-wrapping: 1a. Templates on consecutive lines
12657 Templates: P-wrapping: 1b. Templates on consecutive lines
12671 Templates: P-wrapping: 1c. Templates on consecutive lines
12674 {{echo|bar}} <div>baz</div>
12687 Templates: P-wrapping: 1d. Template preceded by comment-only line
12696 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12700 Templates: Inline Text: 1. Multiple template uses
12702 {{echo|Foo}}bar{{echo|baz}}
12709 Templates: Inline Text: 2. Back-to-back template uses
12711 {{echo|Foo}}{{echo|bar}}
12718 Templates: Block Tags: 1. Multiple template uses
12720 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12722 <div>Foo</div><div>bar</div><div>baz</div>
12727 Templates: Block Tags: 2. Back-to-back template uses
12729 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12731 <div>Foo</div><div>bar</div>
12735 # This is an edge case relating to paragraph wrapping.
12737 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12742 <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
12747 Templates: Links: 1. Simple example
12749 {{echo|[[Foo|bar]]}}
12751 <p><a href="/wiki/Foo" title="Foo">bar</a>
12756 Templates: Links: 2. Generation of link href
12758 [[{{echo|Foo}}|bar]]
12760 <p><a href="/wiki/Foo" title="Foo">bar</a>
12765 Templates: Links: 3. Generation of part of a link href
12767 [[Fo{{echo|o}}|bar]]
12769 [[Foo{{echo|bar}}]]
12771 [[Foo{{echo|bar}}baz]]
12773 [[Foo{{echo|bar}}|bar]]
12775 [[:Foo{{echo|bar}}]]
12777 [[:Foo{{echo|bar}}|bar]]
12779 <p><a href="/wiki/Foo" title="Foo">bar</a>
12780 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12781 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12782 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12783 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12784 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12789 Templates: Links: 4. Multiple templates generating link href
12791 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12793 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12798 Templates: Links: 5. Generation of link text
12800 [[Foo|{{echo|bar}}]]
12802 <p><a href="/wiki/Foo" title="Foo">bar</a>
12807 Templates: Links: 5. Nested templates (only outermost template should be marked)
12809 {{echo|[[{{echo|Foo}}|bar]]}}
12811 <p><a href="/wiki/Foo" title="Foo">bar</a>
12816 Templates: HTML Tag: 1. Generation of HTML attr. key
12818 <div {{echo|style}}="color:red;">foo</div>
12820 <div style="color:red;">foo</div>
12825 Templates: HTML Tag: 2. Generation of HTML attr. value
12827 <div style={{echo|'color:red;'}}>foo</div>
12829 <div style="color:red;">foo</div>
12834 Templates: HTML Tag: 3. Generation of HTML attr key and value
12836 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12838 <div style="color:red;">foo</div>
12843 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12845 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12847 <div title="This is a long title with just one piece templated">foo</div>
12852 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12854 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12856 <div title="This is a long title with just one piece templated">foo</div>
12861 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12863 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12865 <div title="This is a long title with just one piece templated">foo</div>
12869 # SSS FIXME: While it is great we added support for all this,
12870 # do we want to make this part of the spec? Maybe we want to
12871 # deprecate this kind of usage in the future?
12873 Templates: HTML Tag: 7. Generation of partial attribute key string
12875 <div st{{echo|yle}}="color:red;">foo</div>
12877 <div style="color:red;">foo</div>
12882 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12884 <div {{echo|1=id="v1"}}>bar</div>
12886 <div id="v1">bar</div>
12891 Templates: HTML Tag: 9. Multiple template-generated attributes
12893 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12895 <div id="v1" title="foo">bar</div>
12900 Templates: Support for templates generating attributes and content
12902 {| {{mixed_attr_content_template}}
12907 <table style="color:red;" title="T48811">
12917 <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|}"]}'>
12926 1. Entities and nowikis inside templated attributes should be handled correctly
12928 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12930 <div style="background:#f9f9f9;">foo</div>
12933 <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>
12937 2. Entities and nowikis inside templated attributes should be handled correctly
12940 |{{table_attribs_3}}
12945 <td style="background:#f9f9f9;">Foo
12950 <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>
12955 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12958 |{{table_attribs_3}}
12963 <td style="background:#f9f9f9;">Foo
12967 <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}}]}'>
12968 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12974 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12977 | {{table_attribs_6}} hi
12982 <td style="background: red;"> hi
12987 <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>
12992 Templates: HTML Tables: 1. Generating start of a HTML table
12994 {{echo|<table><tr><td>foo</td>}}</tr></table>
12996 <table><tr><td>foo</td></tr></table>
13001 Templates: HTML Tables: 2a. Generating middle of a HTML table
13003 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13005 <table><tr><td>foo</td></tr></table>
13010 Templates: HTML Tables: 2b. Generating middle of a HTML table
13012 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13014 <table><tr><td>foo</td></tr></table>
13019 Templates: HTML Tables: 3. Generating end of a HTML table
13021 <table><tr>{{echo|<td>foo</td></tr></table>}}
13023 <table><tr><td>foo</td></tr></table>
13028 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13030 {{echo|<table>}}<tr><td>foo</td></tr></table>
13032 <table><tr><td>foo</td></tr></table>
13037 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13039 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13041 <table><tr><td>foo</td></tr></table>
13046 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13048 <table><tr>{{echo|<td>}}foo</td></tr></table>
13050 <table><tr><td>foo</td></tr></table>
13055 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13057 <table><tr><td>foo{{echo|</td>}}</tr></table>
13059 <table><tr><td>foo</td></tr></table>
13064 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13066 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13068 <table><tr><td>foo</td></tr></table>
13073 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13075 <table><tr><td>foo</td></tr>{{echo|</table>}}
13077 <table><tr><td>foo</td></tr></table>
13082 Templates: HTML Tables: 5. Proper fostering of categories from inside
13084 parsoid=wt2html,wt2wt
13086 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13087 <!--Two categories (T52330)-->
13088 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13090 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13091 <!--Two categories (T52330)-->
13092 <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>
13096 Templates: Wiki Tables: 1a. Fostering of entire template content
13104 <tr><td></td></tr></table>
13116 Templates: Wiki Tables: 1b. Fostering of entire template content
13129 <tr><td></td></tr></table>
13143 Templates: Wiki Tables: 2. Fostering of partial template content
13153 <tr><td></td></tr></table>
13166 Templates: Wiki Tables: 3. td-content via multiple templates
13169 {{echo|{{pipe}}a}}{{echo|b}}
13180 Templates: Wiki Tables: 4. Templated tags, no content
13186 <tr><td></td></tr></table>
13191 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13205 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13218 ## This test case is very specific to Parsoid's internals
13219 ## and is hence only tested for Parsoid's code. Parsoid uses
13220 ## a <meta> marker tag for <ref> tags and they are expanded
13221 ## much later. We are verifying that this <meta> tag usage
13222 ## doesn't prevent foster parenting.
13224 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13226 {{PartialTable}}<ref>foo</ref>
13231 <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">
13235 <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>
13239 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13249 <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{{!}}}"]}'>
13250 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13254 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13259 Templates: Lists: Multi-line list-items via templates
13261 *{{echo|a {{nonexistent|
13263 *{{echo|b {{nonexistent|
13266 <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>
13267 <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>
13272 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13274 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13276 <p><i>ab</i>c<i>d</i>e
13281 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13282 (PHP parser generates misnested html)
13284 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13286 <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>
13290 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13291 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13293 parsoid=wt2html,wt2wt
13295 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13297 <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>
13298 <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>
13299 <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>
13303 Templates: Ugly nesting: 4. Divs opened/closed across templates
13305 a<div>b{{echo|c</div>d}}e
13316 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
13322 |{{echo|foo</table>}}
13326 <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|}"]}'>
13330 <td>foo</td></tr></tbody></table><span about="#mwt1">
13331 </span><span about="#mwt1">|bar</span><span about="#mwt1">
13336 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
13346 <td>1. {{echo|foo </table>}}</td>
13348 <td>2. {{echo|baz </table>}}</td>
13361 <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>"]}'>
13366 <td>1. foo </td></tr></tbody></table></td>
13368 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
13369 </span><span about="#mwt2">
13370 </span><span about="#mwt2">
13371 </span><span about="#mwt2">abc</span><span about="#mwt2">
13372 </span><span about="#mwt2">
13373 </span><span about="#mwt2">
13374 </span><span about="#mwt2">
13375 </span><span about="#mwt2">
13376 </span><span about="#mwt2">
13377 </span><span about="#mwt2">xyz</span><span about="#mwt2">
13378 </span><span about="#mwt2">
13383 Templates: Ugly templates: 3. newline-only template parameter
13392 # This looks like a bug: a single newline triggers p/br for some reason.
13394 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13403 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13404 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13406 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13412 <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
13413 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13417 # T66017 -- ugly wikitext with fostered content generates two template ranges
13418 # that are "identical" and generate nesting cycles in the algorithm
13420 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13422 {{echo|<table><tr><td><table>}}
13426 <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"}'>
13427 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13428 </table></td></tr></tbody></table>
13432 Templates: Parameters substituted at the top-level
13434 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13438 <p><i>who</i> me? <b>never!</b>
13442 <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>
13444 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13448 Templates: Param with empty arg in the final position
13452 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13456 Parser Functions: 1. Simple example
13465 Parser Functions: 2. Nested use (only outermost should be marked up)
13474 ### Pre-save transform tests
13477 pre-save transform: subst:
13483 This is a test template
13487 pre-save transform: normal template
13497 pre-save transform: nonexistent template
13501 {{thistemplatedoesnotexist}}
13503 {{thistemplatedoesnotexist}}
13507 pre-save transform: subst magic variables
13516 # This is T2089, which I fixed. -- wtm
13518 pre-save transform: subst: templates with parameters
13522 {{subst:paramtest|param="something else"}}
13524 This is a test template with parameter "something else"
13528 Template:nowikitest
13530 <nowiki>'''not wiki'''</nowiki>
13534 pre-save transform: nowiki in subst (T3188)
13538 {{subst:nowikitest}}
13540 <nowiki>'''not wiki'''</nowiki>
13544 Template:commenttest
13546 This template has <!-- a comment --> in it.
13550 pre-save transform: comment in subst (T3936)
13554 {{subst:commenttest}}
13556 This template has <!-- a comment --> in it.
13560 pre-save transform: unclosed tag
13564 <nowiki>'''not wiki'''
13566 <nowiki>'''not wiki'''
13570 pre-save transform: mixed tag case
13574 <NOwiki>'''not wiki'''</noWIKI>
13576 <NOwiki>'''not wiki'''</noWIKI>
13580 pre-save transform: unclosed comment in <nowiki>
13584 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13586 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13589 # Leading @ in this template definition works around a limitation
13590 # in parsoid's parserTests which otherwise strips the <span> from the
13591 # result (confusing it for a template wrapper)
13595 @<span onmouseover="alert('crap')">Oh no</span>
13599 (confirming safety of fix for subst T3936)
13601 {{Template:dangerous}}
13603 <p>@<span>Oh no</span>
13608 pre-save transform: comment containing gallery (T7024)
13612 <!-- <gallery>data</gallery> -->
13614 <!-- <gallery>data</gallery> -->
13618 pre-save transform: comment containing extension
13622 <!-- <tag>data</tag> -->
13624 <!-- <tag>data</tag> -->
13628 pre-save transform: comment containing nowiki
13632 <!-- <nowiki>data</nowiki> -->
13634 <!-- <nowiki>data</nowiki> -->
13638 pre-save transform: <noinclude> in subst (T5298)
13648 pre-save transform: <onlyinclude> in subst (T5298)
13652 {{subst:Includes2}}
13660 {{<includeonly>subst:</includeonly>Includes}}
13664 Template:SafeSubstTest
13666 {{<includeonly>safesubst:</includeonly>Includes}}
13670 T24297: safesubst: works during PST
13674 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13680 T24297: safesubst: works during normal parse
13689 subst: does not work during normal parse
13693 <p>{{subst:Includes}}
13698 pre-save transform: context links ("pipe trick")
13702 [[Article (context)|]]
13705 [[Bar:Article (context)|]]
13706 [[:Bar:Article (context)|]]
13708 [[|Article (context)]]
13712 [[Article (context)|Article]]
13713 [[Bar:Article|Article]]
13714 [[:Bar:Article|Article]]
13715 [[Bar:Article (context)|Article]]
13716 [[:Bar:Article (context)|Article]]
13718 [[Article (context)]]
13719 [[Bar:X (Y) Z|X (Y) Z]]
13720 [[:Bar:X (Y) Z|X (Y) Z]]
13724 pre-save transform: context links ("pipe trick") with interwiki prefix
13728 [[interwiki:Article|]]
13729 [[:interwiki:Article|]]
13730 [[interwiki:Bar:Article|]]
13731 [[:interwiki:Bar:Article|]]
13733 [[interwiki:Article|Article]]
13734 [[:interwiki:Article|Article]]
13735 [[interwiki:Bar:Article|Bar:Article]]
13736 [[:interwiki:Bar:Article|Bar:Article]]
13740 pre-save transform: context links ("pipe trick") with parens in title
13742 pst title=[[Somearticle (context)]]
13746 [[Article (context)|Article]]
13750 pre-save transform: context links ("pipe trick") with comma in title
13752 pst title=[[Someplace, Somewhere]]
13755 [[Otherplace, Elsewhere|]]
13756 [[Otherplace, Elsewhere, Anywhere|]]
13758 [[Otherplace, Somewhere|Otherplace]]
13759 [[Otherplace, Elsewhere|Otherplace]]
13760 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13764 pre-save transform: context links ("pipe trick") with parens and comma
13766 pst title=[[Someplace (IGNORED), Somewhere]]
13769 [[Otherplace (place), Elsewhere|]]
13771 [[Otherplace, Somewhere|Otherplace]]
13772 [[Otherplace (place), Elsewhere|Otherplace]]
13776 pre-save transform: context links ("pipe trick") with comma and parens
13778 pst title=[[Who, me? (context)]]
13781 [[Me, Myself, and I (1937 song)|]]
13783 [[Yes, you. (context)|Yes, you.]]
13784 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13788 pre-save transform: context links ("pipe trick") with namespace
13790 pst title=[[Ns:Somearticle]]
13794 [[Ns:Article|Article]]
13798 pre-save transform: context links ("pipe trick") with namespace and parens
13800 pst title=[[Ns:Somearticle (context)]]
13804 [[Ns:Article (context)|Article]]
13808 pre-save transform: context links ("pipe trick") with namespace and comma
13810 pst title=[[Ns:Somearticle, Context, Whatever]]
13814 [[Ns:Article, Context, Whatever|Article]]
13818 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13820 pst title=[[Ns:Somearticle, Context (context)]]
13824 [[Ns:Article (context)|Article]]
13828 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13830 pst title=[[Ns:Somearticle (IGNORED), Context]]
13834 [[Ns:Article, Context|Article]]
13838 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13842 [[Article(context)|]]
13843 [[Bar:Article(context)|]]
13844 [[:Bar:Article(context)|]]
13845 [[|Article(context)]]
13849 [[Article(context)|Article]]
13850 [[Bar:Article(context)|Article]]
13851 [[:Bar:Article(context)|Article]]
13852 [[Article(context)]]
13853 [[Bar:X(Y)Z|X(Y)Z]]
13854 [[:Bar:X(Y)Z|X(Y)Z]]
13858 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13862 [[Article (context)|]]
13863 [[Bar:Article (context)|]]
13864 [[:Bar:Article (context)|]]
13865 [[|Article (context)]]
13869 [[Article (context)|Article]]
13870 [[Bar:Article (context)|Article]]
13871 [[:Bar:Article (context)|Article]]
13872 [[Article (context)]]
13873 [[Bar:X (Y) Z|X (Y) Z]]
13874 [[:Bar:X (Y) Z|X (Y) Z]]
13878 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13882 [[Article(context)|]]
13883 [[Bar:Article(context)|]]
13884 [[:Bar:Article(context)|]]
13885 [[|Article(context)]]
13889 [[Article(context)|Article]]
13890 [[Bar:Article(context)|Article]]
13891 [[:Bar:Article(context)|Article]]
13892 [[Article(context)]]
13893 [[Bar:X(Y)Z|X(Y)Z]]
13894 [[:Bar:X(Y)Z|X(Y)Z]]
13898 pre-save transform: context links ("pipe trick") with commas (T23660)
13902 [[Article (context), context|]]
13903 [[Article (context),context|]]
13904 [[Bar:Article (context), context|]]
13905 [[Bar:Article (context),context|]]
13906 [[:Bar:Article (context), context|]]
13907 [[:Bar:Article (context),context|]]
13909 [[Article (context), context|Article]]
13910 [[Article (context),context|Article]]
13911 [[Bar:Article (context), context|Article]]
13912 [[Bar:Article (context),context|Article]]
13913 [[:Bar:Article (context), context|Article]]
13914 [[:Bar:Article (context),context|Article]]
13918 Parsoid: backwards pipe trick
13925 <p>[[|<b>bar</b>]]</p>
13929 pre-save transform: trim trailing empty lines
13933 Empty lines are trimmed
13939 Empty lines are trimmed
13943 pre-save transform: Signature expansion
13950 * <noinclude>~~~</noinclude>
13951 * <includeonly>~~~</includeonly>
13952 * <onlyinclude>~~~</onlyinclude>
13954 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13955 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13956 * 00:02, 1 January 1970 (UTC)
13957 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13958 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13959 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13964 ParserOutput flags from signature expansion (T84843)
13971 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13972 flags=user-signature
13977 pre-save transform: Signature expansion in nowiki tags (T2093)
13983 <nowiki>~~~~</nowiki>
13985 <includeonly><nowiki>~~~~</nowiki></includeonly>
13987 <noinclude><nowiki>~~~~</nowiki></noinclude>
13989 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13991 {{subst:Foo}} shall be converted to FOO
13993 As well as inside noinclude/onlyinclude
13994 <noinclude>{{subst:Foo}}</noinclude>
13995 <onlyinclude>{{subst:Foo}}</onlyinclude>
13997 But not inside includeonly
13998 <includeonly>{{subst:Foo}}</includeonly>
14002 <nowiki>~~~~</nowiki>
14004 <includeonly><nowiki>~~~~</nowiki></includeonly>
14006 <noinclude><nowiki>~~~~</nowiki></noinclude>
14008 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14010 FOO shall be converted to FOO
14012 As well as inside noinclude/onlyinclude
14013 <noinclude>FOO</noinclude>
14014 <onlyinclude>FOO</onlyinclude>
14016 But not inside includeonly
14017 <includeonly>{{subst:Foo}}</includeonly>
14021 Parsoid: Recognize nowiki with trailing space in tags
14025 <nowiki ><div>[[foo]]</nowiki >
14033 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14040 Parsoid: Recognize nowiki with odd capitalization
14044 <noWikI ><div>[[foo]]</Nowiki >
14046 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14051 Parsoid: Escape nowiki with trailing space in tags
14055 <p><nowiki > foo </nowiki ></p>
14056 <p>a<nowiki />b</p>
14057 <p>c<nowiki/ >d</p>
14059 <nowiki > foo </nowiki >
14067 Parsoid: Escape weird noWikI capitalizations
14071 <p><noWikI > foo </NoWikI ></p>
14073 <noWikI > foo </NoWikI >
14077 ### Message transform tests
14080 message transform: magic variables
14090 message transform: should not transform wiki markup
14100 message transform: <noinclude> in transcluded template (T6926)
14110 message transform: <onlyinclude> in transcluded template (T6926)
14120 {{#special:}} page name, known
14124 {{#special:Recentchanges}}
14126 Special:RecentChanges
14130 {{#special:}} page name with subpage, known
14134 {{#special:Recentchanges/param}}
14136 Special:RecentChanges/param
14140 {{#special:}} page name, unknown
14144 {{#special:foobar nonexistent}}
14146 Special:Foobar nonexistent
14150 {{#speciale:}} page name, known
14154 {{#speciale:Recentchanges}}
14156 Special:RecentChanges
14160 {{#speciale:}} page name with subpage, known
14164 {{#speciale:Recentchanges/param}}
14166 Special:RecentChanges/param
14170 {{#speciale:}} page name, unknown
14174 {{#speciale:foobar nonexistent}}
14176 Special:Foobar_nonexistent
14182 ### For Parsoid-specific tests, see
14183 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14188 parsoid=wt2html,wt2wt,html2html
14190 [[Image:foobar.jpg]]
14192 <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>
14195 <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>
14199 Serialize simple image with figure-inline wrapper
14203 <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>
14205 [[File:Foobar.jpg]]
14209 Simple image (using File: namespace, now canonical)
14211 [[File:Foobar.jpg]]
14213 <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>
14216 <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>
14220 Right-aligned image
14222 [[File:Foobar.jpg|right]]
14224 <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>
14227 <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>
14233 [[File:Foobar.jpg|right|Caption text]]
14235 <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>
14238 <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>
14242 Image with caption, T55312 #1
14244 [[File:Foobar.jpg|right|Caption page stuff]]
14246 <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>
14249 <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>
14253 Image with caption, T55312 #2
14255 [[File:Foobar.jpg|right|Caption page=]]
14257 <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>
14260 <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>
14264 Image with caption, T55312 #3
14266 [[File:Foobar.jpg|right|Caption page=stuff]]
14268 <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>
14271 <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>
14275 Image caption with pipe entity
14277 [[File:Foobar.jpg|thumb|one | two]]
14278 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14280 <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>
14281 <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>
14284 <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>
14285 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <i>two</i> <span typeof="mw:Entity">|</span> three</figcaption></figure>
14289 Allow empty links in image captions (T62753)
14293 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14298 <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>
14301 <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>
14303 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14304 </figcaption></figure>
14308 Titles in unlinked images (T23454)
14310 [[File:Foobar.jpg|link=|stuff]]
14312 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14317 Link with empty target
14326 Image with link trail
14328 Linktrails should not work for images: [[File:Foobar.jpg]]s
14330 <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
14333 <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>
14337 Image with empty attribute
14339 parsoid=wt2html,wt2wt,html2html
14341 [[File:Foobar.jpg|right||Caption text]]
14343 <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>
14346 <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>
14350 1. Block image with individual attributes from templates
14352 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14354 <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>
14357 <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>
14361 2. Block Image with individual attributes from templates
14363 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14365 <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>
14368 <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>
14372 3. Inline image with individual attributes from templates
14374 [[File:Foobar.jpg|{{echo|50px}}]]
14376 <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>
14379 <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>
14382 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14383 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14385 Image with multiple attributes from the same template
14387 [[File:Foobar.jpg|{{image_attribs}}]]
14389 <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>
14392 <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>
14396 Image with link tails
14400 123[[File:Foobar.jpg]]456
14401 123[[File:Foobar.jpg|right]]456
14402 123[[File:Foobar.jpg|thumb]]456
14404 <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
14406 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
14407 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
14410 <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>
14412 <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>
14414 <div class="thumb tright">
14415 <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>
14416 <div class="thumbcaption">
14417 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
14423 <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>
14424 <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>
14425 <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>
14429 Image with multiple captions -- only last one is accepted
14431 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14433 <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>
14436 <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>
14440 Image with multiple widths -- use last
14442 [[File:Foobar.jpg|200px|300px|caption]]
14444 <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>
14447 <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>
14451 Image with multiple alignments -- use first (T50664)
14455 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14457 [[File:Foobar.jpg|middle|text-top|caption]]
14459 <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>
14460 <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>
14463 <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>
14464 <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>
14468 Image with width attribute at different positions
14470 [[File:Foobar.jpg|200px|right|Caption]]
14471 [[File:Foobar.jpg|right|200px|Caption]]
14472 [[File:Foobar.jpg|right|Caption|200px]]
14474 <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>
14475 <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>
14476 <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>
14479 <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>
14480 <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>
14481 <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>
14484 # a sad bit of backward-compatibility
14486 Image with size specified with pxpx (T15500, T53628)
14488 parsoid=wt2html,wt2wt,html2html
14490 [[File:Foobar.jpg|20pxpx]]
14491 [[File:Foobar.jpg|200x20pxpx]]
14493 <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>
14494 <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>
14497 <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>
14501 Image with link parameter, wiki target
14503 [[File:Foobar.jpg|link=Main Page]]
14505 <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>
14508 <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>
14511 # parsoid T51293 (part 1)
14513 Image with link parameter, URL target
14515 [[File:Foobar.jpg|link=http://example.com/]]
14517 <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>
14520 <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>
14523 # parsoid T51293 (part 2)
14525 Image with link parameter, protocol-less URL target
14527 [[File:Foobar.jpg|link=//example.com/]]
14529 <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>
14532 <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>
14536 Escaping non-block captions (T107435)
14539 "modes": ["wt2wt"],
14541 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14545 [[Image:Foobar.jpg|caption]]
14547 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14550 # wgExternalLinkTarget not supported by Parsoid
14552 Image with link parameter, wgExternalLinkTarget
14554 [[Image:foobar.jpg|link=http://example.com/]]
14556 wgExternalLinkTarget='foobar'
14558 <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>
14563 Image with link parameter, wgNoFollowLinks set to false
14565 [[Image:foobar.jpg|link=http://example.com/]]
14567 wgNoFollowLinks=false
14569 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14574 Image with link parameter, wgNoFollowDomainExceptions
14576 [[Image:foobar.jpg|link=http://example.com/]]
14578 wgNoFollowDomainExceptions='example.com'
14580 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14584 # wgExternalLinkTarget not supported by Parsoid
14586 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14588 [[Image:foobar.jpg|link=http://example.com/|Title]]
14590 wgExternalLinkTarget='foobar'
14592 <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>
14597 Image with empty link parameter
14599 [[File:Foobar.jpg|link=]]
14601 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14604 <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>
14608 Image with link parameter (wiki target) and unnamed parameter
14610 [[File:Foobar.jpg|link=Main_Page|Title]]
14612 <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>
14615 <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>
14619 Image with link parameter (URL target) and unnamed parameter
14621 [[File:Foobar.jpg|link=http://example.com/|Title]]
14623 <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>
14626 <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>
14630 Thumbnail image with link parameter
14633 parsoid=wt2html,wt2wt,html2html
14635 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14637 <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>
14640 <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>
14644 Manually-specified thumbnail image
14648 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14650 <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>
14653 <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>
14657 Manually-specified thumbnail image with explicit link to wiki page
14660 parsoid=wt2html,wt2wt,html2html
14662 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14664 <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>
14667 <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>
14671 Manually-specified thumbnail image with explicit link to url
14674 parsoid=wt2html,wt2wt,html2html
14676 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14678 <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>
14681 <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>
14685 Manually-specified thumbnail image with explicit no link
14688 parsoid=wt2html,wt2wt,html2html
14690 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14692 <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>
14695 <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>
14699 Manually-specified thumbnail image with explicit link and alt text
14702 parsoid=wt2html,wt2wt,html2html
14704 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14706 <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>
14709 <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>
14713 Image with frame and link
14715 parsoid=wt2html,wt2wt,html2html
14717 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14719 <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>
14722 <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>
14726 Image with frame and link and explicit alt
14728 parsoid=wt2html,wt2wt,html2html
14730 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14732 <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>
14735 <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>
14739 Image with wiki markup in implicit alt
14741 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14743 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14745 <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>
14746 </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>
14749 <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>
14751 <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>
14755 Alt image option should handle most kinds of wikitext without barfing
14757 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14759 <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>
14762 <figure class="mw-default-size" typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"This is the image caption"},{"ck":"alt","ak":"alt=This is a [[link]] and a {{echo|''bold template''}}."}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["alt",{"html":"alt=This is a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[65,73,2,2]}'>link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[80,106,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&#39;&#39;bold template&#39;&#39;\"}},\"i\":0}}]}'>bold template</i>."}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="This is a link and a bold template." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"alt":"This is a link and a bold template.","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=This is a [[link]] and a {{echo|''bold template''}}.","resource":"Image:Foobar.jpg"}}'/></a><figcaption>This is the image caption</figcaption></figure>
14765 ###################
14766 # Conflicting image format options.
14767 # First option specified should 'win'.
14768 # All three cases in each test should be identical.
14771 Image with 'frameless' first.
14773 parsoid=wt2html,wt2wt,html2html
14775 [[File:Foobar.jpg|frameless|caption]]
14777 [[File:Foobar.jpg|frameless|frame|caption]]
14779 [[File:Foobar.jpg|frameless|thumb|caption]]
14781 <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>
14782 </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>
14783 </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>
14786 <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>
14787 <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>
14788 <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>
14792 Image with 'frame' first.
14794 parsoid=wt2html,wt2wt,html2html
14796 [[File:Foobar.jpg|frame|caption]]
14797 [[File:Foobar.jpg|frame|frameless|caption]]
14798 [[File:Foobar.jpg|frame|thumb|caption]]
14800 <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>
14801 <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>
14802 <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>
14805 <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>
14806 <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>
14807 <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>
14811 Image with 'thumb' first.
14813 parsoid=wt2html,wt2wt,html2html
14815 [[File:Foobar.jpg|thumb|caption]]
14816 [[File:Foobar.jpg|thumb|frameless|caption]]
14817 [[File:Foobar.jpg|thumb|frame|caption]]
14819 <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>
14820 <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>
14821 <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>
14824 <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>
14825 <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>
14826 <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>
14829 ###################
14831 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14832 # and https://phabricator.wikimedia.org/T64258
14833 # Foobar has actual size of 1941x220
14834 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14835 # a scalable format.
14836 # 2. Framed images always ignore size options; always render at default size.
14837 # 3. "Unspecified format" and border are the only types which can be
14841 Image: unspecified format and border enlarge
14843 parsoid=wt2html,wt2wt,html2html
14845 [[File:Foobar.jpg|2000px]]
14847 [[File:Foobar.jpg|border|2000px]]
14849 <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>
14850 </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>
14853 <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>
14854 <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>
14858 Image: "unspecified format" and border reduce
14860 parsoid=wt2html,wt2wt,html2html
14862 [[File:Foobar.jpg|1000px]]
14864 [[File:Foobar.jpg|border|1000px]]
14866 <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>
14867 </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>
14870 <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>
14871 <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>
14875 Image: thumbs reduce
14877 parsoid=wt2html,wt2wt,html2html
14879 [[File:Foobar.jpg|thumb|50px]]
14881 <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>
14884 <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>
14888 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14890 parsoid=wt2html,wt2wt,html2html
14892 [[File:Foobar.jpg|thumb|2000px]]
14894 [[File:Foobar.svg|thumb|2000px]]
14896 <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>
14897 <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>
14900 <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>
14901 <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>
14905 Image: frameless can reduce in size
14907 parsoid=wt2html,wt2wt,html2html
14909 [[File:Foobar.jpg|frameless|50px]]
14911 <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>
14914 <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>
14918 Image: bitmap frameless can't be enlarged past original size, but vector can
14920 parsoid=wt2html,wt2wt,html2html
14922 [[File:Foobar.jpg|frameless|2000px]]
14924 [[File:Foobar.svg|frameless|2000px]]
14926 <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>
14927 </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>
14930 <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>
14931 <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>
14935 Image: framed images are always unscaled.
14937 parsoid=wt2html,wt2wt,html2html
14939 [[File:Foobar.jpg|frame]]
14941 [[File:Foobar.jpg|frame|50px]]
14943 [[File:Foobar.jpg|frame|50x50px]]
14945 [[File:Foobar.jpg|frame|2000px]]
14947 <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>
14948 <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>
14949 <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>
14950 <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>
14953 <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>
14954 <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>
14955 <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>
14956 <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>
14959 ###################
14962 Link to image page- image page normally doesn't exists, hence edit link
14963 Add test with existing image page
14964 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14968 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14973 T20784 Link to non-existent image page with caption should use caption as link text
14975 [[:Image:test|caption]]
14977 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14982 Frameless image caption with a free URL
14984 [[File:Foobar.jpg|http://example.com]]
14986 <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>
14989 <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>
14993 Thumbnail image caption with a free URL
14997 [[File:Foobar.jpg|thumb|http://example.com]]
14999 <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>
15002 <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>
15006 Thumbnail image caption with a free URL and explicit alt
15009 parsoid=wt2html,wt2wt,html2html
15011 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15013 <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>
15016 <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>
15020 SVG thumbnails with no language set
15023 [[File:Foobar.svg|thumb|caption]]
15025 <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>
15028 <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>
15032 SVG thumbnails with language de
15034 parsoid=wt2html,wt2wt,html2html
15036 [[File:Foobar.svg|thumb|caption|lang=de]]
15038 <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>
15041 <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>
15045 SVG thumbnails with invalid language code
15047 parsoid=wt2html,wt2wt,html2html
15049 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
15051 <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>
15054 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>lang=invalid.language.code</figcaption></figure>
15058 T3887: A ISBN with a thumbnail
15060 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15062 <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>
15065 <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>
15069 T3887: A RFC with a thumbnail
15071 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15073 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
15076 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is <a href="//tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
15080 T3887: A mailto link with a thumbnail
15082 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15084 <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>
15087 <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>
15090 # Pending resolution to T2368
15092 T2648: Frameless image caption with a link
15094 [[File:Foobar.jpg|text with a [[link]] in it]]
15096 <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>
15099 <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>
15103 T2648: Frameless image caption with a link (suffix)
15105 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15107 <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>
15110 <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>
15114 T2648: Frameless image caption with an interwiki link
15116 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15118 <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>
15121 <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>
15125 T2648: Frameless image caption with a piped interwiki link
15127 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15129 <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>
15132 <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>
15136 T107474: Frameless image caption with <nowiki>
15138 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15140 <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>
15144 Escape HTML special chars in image alt text
15146 [[File:Foobar.jpg|& < > "]]
15148 <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>
15151 <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>
15155 Escape HTML special chars in image alt text with LanguageConverter
15159 [[File:Foobar.jpg|& < > "]]
15161 <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>
15164 <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>
15168 Entities in file name and attributes
15170 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15172 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15175 <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>
15179 T2499: Alt text should have Ӓ, not &1234;
15181 [[File:Foobar.jpg|♀]]
15183 <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>
15186 <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>
15190 Broken image caption with link
15192 parsoid=wt2html,wt2wt,html2html
15194 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15196 <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.
15199 <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>
15203 Image caption containing another image
15205 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15207 <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>
15210 <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>
15214 Image: caption containing a newline
15216 [[File:Foobar.jpg|This
15219 <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>
15222 <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>
15226 Image: caption containing leading space
15227 (The leading space should not trigger nowiki escaping in wt2wt mode)
15229 [[File:Foobar.jpg|thumb| bar]]
15231 <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>
15234 <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>
15238 Image: caption containing a table
15240 parsoid=wt2html,wt2wt,html2html
15242 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15248 and some more text.]]
15250 <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>
15253 <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
15256 <tr><th>Foo </th><th>Bar</th></tr>
15259 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15263 T5090: External links other than http: in image captions
15265 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15267 <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>
15270 <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>
15276 parsoid=wt2html,wt2wt,html2html
15278 [[Image:foobar.jpg|a|class=b]]
15280 <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>
15283 <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>
15287 Localized image handling (1).
15289 parsoid=wt2html,wt2wt,html2html
15292 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15294 <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>
15297 <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>
15301 Localized image handling (2).
15304 parsoid=wt2html,wt2wt,html2html
15307 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15309 <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>
15312 <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>
15316 Localized image handling (3).
15321 <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>
15323 [[File:Foobar.jpg|بندانگشتی]]
15327 "border", "frameless" and "class" attributes on an image.
15330 parsoid=wt2html,wt2wt,html2html
15332 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15334 <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>
15337 <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>
15340 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15342 Invalid image attributes (T64500)
15345 parsoid=wt2html,wt2wt,html2html
15347 [[File:Foobar.jpg|thumb|float|left|caption]]
15349 [[File:Foobar.jpg|thumb|righ|caption]]
15351 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15353 <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>
15354 <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>
15355 <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>
15358 <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>
15359 <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>
15360 <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>
15366 #REDIRECT [[File:Barfoo.jpg]]
15369 # FIXME: Parsoid should run this test -- but we'd need to teach the
15370 # mockAPI about the redirected Barfoo.jpg image.
15374 [[Image:Barfoo.jpg]]
15376 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15381 Missing image with uploads disabled
15385 [[File:Foobaz.jpg]]
15387 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15390 <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>
15393 # Parsoid-specific testing for images
15394 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15395 # Currently imperfect due to a flaw in the Parsoid testrunner
15397 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15401 Parsoid-specific image handling - simple image with size and middle alignment
15403 [[File:Foobar.jpg|middle|50px]]
15405 <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>
15409 Parsoid-specific image handling - simple image with size, middle alignment,
15410 non-standard namespace alias
15412 parsoid=wt2wt,wt2html,html2html
15414 [[Image:Foobar.jpg|middle|50px]]
15416 <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>
15420 Parsoid-specific image handling - simple image with size and middle alignment
15423 [[File:Foobar.jpg|50px|middle]]
15425 <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>
15429 Parsoid-specific image handling - simple image with size and middle alignment
15430 and non-standard namespace name
15432 parsoid=wt2html,wt2wt,html2html
15434 [[Image:Foobar.jpg|50px|middle]]
15436 <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>
15440 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15442 [[File:Foobar.jpg|500x10px|baseline|caption]]
15444 <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>
15448 Parsoid-specific image handling - simple image with border and size spec
15450 [[File:Foobar.jpg|50px|border|caption]]
15452 <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>
15456 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15458 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15460 <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>
15464 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15467 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15469 <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>
15473 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15475 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15477 <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>
15481 Parsoid-specific image handling - thumbnail with specific size, halign,
15482 valign, and caption (existing content)
15484 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15486 <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>
15490 Parsoid-specific image handling - framed image with specific size and caption
15493 parsoid=wt2html,wt2wt,html2html
15495 [[File:Foobar.jpg|frame|500x50px|caption]]
15497 <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>
15501 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15504 parsoid=wt2html,wt2wt,html2html
15506 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15508 <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>
15512 Parsoid-specific image handling - frameless image with specific size, border, and caption
15514 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15516 <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>
15520 Parsoid-specific image handling - simple image with a formatted caption
15522 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15524 <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>
15528 Parsoid-specific image handling - caption with a template in it
15530 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15532 <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>
15536 Parsoid-specific image handling - caption with unbalanced tags in it
15538 parsoid=wt2html,wt2wt,html2html
15541 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15545 <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>
15550 Parsoid-specific image handling - empty caption (1)
15552 parsoid=wt2html,wt2wt
15554 [[File:Foobar.jpg|thumb|]]
15556 <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>
15559 # empty captions don't get serialized unless we're in the "round trip" case
15561 Parsoid-specific image handling - empty caption (2)
15565 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15566 <a href="./File:Foobar.jpg">
15567 <img resource="./File:Foobar.jpg"
15568 src="//example.com/images/3/3a/Foobar.jpg"
15569 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15570 height="25" width="220"/>
15572 <figcaption></figcaption>
15575 [[File:Foobar.jpg|thumb]]
15579 Parsoid-specific image handling - whitespace caption
15581 [[File:Foobar.jpg|thumb| ]]
15583 <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>
15587 Parsoid-specific image handling - lang option
15590 [[File:Foobar.svg|lang=de|caption]]
15594 <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>
15598 ## Edge case bugs in Parsoid from T93580
15600 T93580: 1. Templated <ref> inside block images
15602 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15606 <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>
15608 <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>
15612 T93580: 2. <ref> inside inline images
15614 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15618 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,78,5,6]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
15620 <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" data-parsoid="{}">foo</span></li></ol>
15624 T93580: 3. Templated <ref> inside inline images
15626 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15630 <p><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span><meta typeof=\"mw:Transclusion mw:Extension/ref/Marker\" about=\"#mwt2\" data-parsoid='{\"group\":\"\",\"name\":\"\",\"content\":\"foo\",\"hasRefInRef\":false,\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'/>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></span></p>
15632 <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>
15639 Subpage test/subpage
15647 subpage title=[[Subpage test]]
15651 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15656 Subpage noslash link
15658 subpage title=[[Subpage test]]
15662 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15667 Subpage test/1/2/subpage
15673 Relative subpage noslash link
15675 parsoid=wt2wt,wt2html,html2html
15676 subpage title=[[Subpage test/1/2/3/4]]
15682 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15683 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15686 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15687 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15691 Parsoid: dot-slash prefixed wikilinks
15701 </p><p>[[././baz/]]
15706 </p><p>[[././baz/]]
15711 Render invalid page names as plain text (T53090)
15723 [[foo[http://example.com]xyz]]
15725 [[{{echo|./../foo}}|bar]]
15726 [[{{echo|foo/.}}|bar]]
15727 [[{{echo|foo/..}}|bar]]
15728 [[{{echo|foo~~~~bar}}]]
15729 [[{{echo|foo>bar}}]]
15730 [[{{echo|foo././bar}}]]
15731 [[{{echo|foo{bar}}]]
15732 [[{{echo|foo}bar}}]]
15733 [[{{echo|foo[bar}}]]
15734 [[{{echo|foo]bar}}]]
15735 [[{{echo|foo<bar}}]]
15737 <p>[[./../foo|bar]]
15747 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15748 </p><p>[[./../foo|bar]]
15761 <p>[[./../foo|bar]]
15771 [[foo<a rel="mw:ExtLink" href="http://example.com"></a>xyz]]</p>
15773 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15774 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15775 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15776 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15777 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15778 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15779 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15780 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15781 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15782 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15783 [[<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>
15791 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15796 T2561: {{/Subpage}}
15798 subpage title=[[Page]]
15802 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15810 Category:MediaWiki User's Guide
15818 [[:Category:MediaWiki User's Guide]]
15820 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15829 [[Category:MediaWiki User's Guide]]
15831 cat=MediaWiki_User's_Guide sort=
15833 <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"}}'/>
15837 PAGESINCATEGORY invalid title fatal (r33546 fix)
15839 {{PAGESINCATEGORY:<bogus>}}
15846 Category with different sort key
15850 [[Category:MediaWiki User's Guide|Foo]]
15852 cat=MediaWiki_User's_Guide sort=Foo
15854 <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"}}'/>
15858 Category with identical sort key
15862 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15864 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15866 <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"}}'/>
15870 Category with empty sort key
15875 [[Category:MediaWiki User's Guide|]]
15877 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15881 Category with empty sort key and parentheses
15886 [[Category:Foo (bar)|]]
15888 [[Category:Foo (bar)|Foo]]
15892 Category with link tail
15897 123[[Category:Foo]]456
15899 123[[Category:Foo]]456
15903 Category with template
15908 [[Category:{{echo|Foo}}]]
15910 [[Category:{{echo|Foo}}]]
15914 Category with template in sort key
15919 [[Category:Foo|{{echo|Bar}}]]
15921 [[Category:Foo|{{echo|Bar}}]]
15925 Category with template in sort key and title
15930 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15932 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15935 ## We used to, but no longer wt2wt this test since the default serializer
15936 ## will normalize all categories to serialize on their own line.
15937 ## This wikitext usage is going to be fairly uncommon in production and
15938 ## selser will take care of preserving formatting in those scenarios.
15940 Category / paragraph interactions
15944 Foo [[Category:Baz]] Bar
15946 Foo [[Category:Baz]]
15954 [[Category:Baz]] Bar
15967 {{echo|[[Category:Baz]]}}
15980 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15981 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15982 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15983 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15984 <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>
15985 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15988 ## We used to, but no longer wt2wt this test since the default serializer
15989 ## will normalize all categories to serialize on their own line.
15990 ## This wikitext usage is going to be fairly uncommon in production and
15991 ## selser will take care of preserving formatting in those scenarios.
15993 ## The whitespace on the empty line is part of the test. Please do not delete
15995 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16001 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16003 {{echo|[[Category:Foo]] and so should this!}}
16005 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16010 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16012 <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>
16015 ## Parsoid will not try to wt2wt this while preserving newlines because
16016 ## it suppresses excess newlines within list items -- and we don't want to
16017 ## introduce a special case just for categories, which is, in reality somewhat
16018 ## odd behavior -- categories are unlikely to be used in list items like this
16019 ## in top-level pages and are only likely to show up in template-generated
16020 ## list items where this RT-ing is a non-issue.
16022 ## The whitespace on the empty line is part of the test. Please do not delete
16024 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16030 [[Category:Foo]] and this should be part of the same list item
16033 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16035 <ul><li>This and this should be part of the same list item</li>
16036 <li>So should this and this should be part of the same list item</li></ul>
16039 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16040 <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>
16044 ## Newlines and categories that follow the last item of a list
16045 ## are treated differently because this (list followed by categories)
16046 ## is an extremely common pattern on wikis.
16048 3. Categories and newlines: newline suppression for last list item should RT properly
16061 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16063 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16064 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16068 4. Categories and newlines: newline suppression for last list item should RT properly
16076 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
16078 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16081 ## only wt2html for this to make sure the algo only applies to the rightmost path
16083 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16096 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16098 <ul><li> d</li></ul></li></ul>
16099 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16102 ## We used to, but no longer wt2wt this test since the default serializer
16103 ## will normalize all categories to serialize on their own line.
16104 ## This wikitext usage is going to be fairly uncommon in production and
16105 ## selser will take care of preserving formatting in those scenarios.
16107 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16111 * a [[Category:Foo]]
16113 <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>
16116 # This test also demonstrates because of newline+category tunneling
16117 # through the list hander, template wrapping doesn't expand to the
16118 # containing list when the list item swallows the category.
16120 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16125 <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
16126 </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>
16130 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16134 {{echo|[[Category:Foo]]
16138 <ul><li> a</li></ul>
16140 <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">
16141 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16142 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16146 Category links with multiple namespaces
16148 [[Category:Project:Foo]]
16150 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16154 Parsoid: Serialize link to category page with colon escape
16160 [[:Category:Foo|Bar]]
16163 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16164 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16168 # We used to, but no longer wt2wt this test since the default serializer
16169 # will normalize all categories to serialize on their own line.
16170 # This wikitext usage is going to be fairly uncommon in production and
16171 # selser will take care of preventing whitespace insertion if this
16172 # occurs in an article.
16174 # html2html disabled for the same reason (whitespace insertion between
16177 # html2wt disabled because it localizes the "Category" namespace.
16179 Link prefix/suffixes aren't applied to category links
16189 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16193 Parsoid: Serialize link to file page with colon escape
16199 [[:File:Foo.png|Bar]]
16202 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16203 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16208 Parsoid: Serialize a genuine category link without colon escape
16213 [[Category:Foo|Bar]]
16215 <link rel="mw:PageProp/Category" href="./Category:Foo">
16216 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16220 Normalize hrefs properly before testing for invalid link targets (T72894)
16224 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16226 [[Category:Toxine bactérienne]]
16230 Parsoid: Defaultsort
16232 {{DEFAULTSORT:Foo}}
16234 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16237 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16238 # But, this is a limitation of our representation and is documented in
16239 # TemplateHandler.js in processSpecialMagicWord
16241 Parsoid: Defaultsort (template-generated)
16243 {{{{echo|DEFAULTSORT}}:Foo}}
16245 <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"}]]}'/>
16249 ### Inter-language links
16252 Interlanguage links
16260 es:Alimento fr:Nourriture zh:食品
16262 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16263 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16264 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16268 Duplicate interlanguage links (T26502)
16279 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16280 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16281 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16282 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16289 Basic section headings
16296 ===Smaller headline===
16299 <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>
16302 <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>
16305 <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>
16311 Section headings with TOC
16314 === Subheadline 1 ===
16315 ===== Skipping a level =====
16316 ====== Skipping a level ======
16320 ===Another headline===
16322 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16324 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16326 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16328 <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>
16330 <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>
16337 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16339 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16345 <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>
16346 <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>
16347 <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>
16348 <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>
16349 <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>
16352 <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>
16357 TOC anchors don't collide
16365 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16367 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16368 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16369 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16370 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16374 <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>
16375 <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>
16376 <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>
16377 <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>
16381 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16383 Handling of sections up to level 6 and beyond
16386 == Level 2 Heading==
16387 === Level 3 Heading===
16388 ==== Level 4 Heading====
16389 ===== Level 5 Heading=====
16390 ====== Level 6 Heading======
16391 ======= Level 7 Heading=======
16392 ======== Level 8 Heading========
16393 ========= Level 9 Heading=========
16394 ========== Level 10 Heading==========
16396 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16398 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16400 <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>
16402 <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>
16404 <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>
16406 <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>
16408 <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>
16409 <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>
16410 <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>
16411 <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>
16412 <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>
16426 <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>
16427 <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>
16428 <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>
16429 <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>
16430 <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>
16431 <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>
16432 <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>
16433 <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>
16434 <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>
16435 <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>
16440 TOC regression (T11764)
16444 ==== title 1.1.1 ====
16449 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16451 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16453 <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>
16455 <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>
16458 <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>
16461 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16463 <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>
16469 <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>
16470 <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>
16471 <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>
16472 <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>
16473 <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>
16474 <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>
16479 TOC for heading containing <span id="..."></span> (T96153)
16482 ==<span id="old-anchor"></span>New title==
16484 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16486 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16490 <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>
16495 TOC with wgMaxTocLevel=3 (T8204)
16501 ==== title 1.1.1 ====
16506 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16508 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16510 <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>
16511 <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>
16514 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16516 <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>
16522 <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>
16523 <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>
16524 <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>
16525 <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>
16526 <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>
16527 <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>
16532 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16538 ====Section 1.1.1====
16539 ====Section 1.1.1.1====
16542 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16544 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16546 <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>
16549 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16553 <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>
16554 <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>
16555 <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>
16556 <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>
16557 <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>
16563 Resolving duplicate section names
16568 <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>
16569 <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>
16574 Resolving duplicate section names with differing case (T12721)
16579 <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>
16580 <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>
16592 Template with sections, __NOTOC__
16599 <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>
16600 <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>
16601 <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>
16602 <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>
16607 __NOEDITSECTION__ keyword
16613 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16614 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16619 Link inside a section heading
16621 ==Section with a [[Main Page|link]] in it==
16623 <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>
16628 TOC regression (T14077)
16635 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16637 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16639 <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>
16642 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16646 <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>
16647 <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>
16648 <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>
16653 T3219 URL next to image (good)
16655 http://example.com [[File:Foobar.jpg]]
16657 <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>
16660 <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>
16664 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16667 The line above must have a trailing space!
16670 But just in case it doesn't...
16672 <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>
16673 <p>The line above must have a trailing space!
16675 <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>
16676 <p>But just in case it doesn't...
16681 Header with special characters (T27462)
16683 The tooltips shall not show entities to the user (ie. be double escaped)
16700 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16702 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16704 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16705 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16706 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16707 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16708 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16712 <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>
16715 <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>
16718 <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>
16721 <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>
16724 <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>
16730 Header with space, plus and underscore as entity
16732 Id should not contain + for spaces
16734 == Space between Text ==
16737 == Space-Entity between Text ==
16740 == Plus+between+Text ==
16743 == Plus-Entity+between+Text ==
16746 == Underscore_between_Text ==
16749 == Underscore-Entity_between_Text ==
16752 [[#Space between Text]]
16753 [[#Space-Entity between Text]]
16754 [[#Plus+between+Text]]
16755 [[#Plus-Entity+between+Text]]
16756 [[#Underscore_between_Text]]
16757 [[#Underscore-Entity_between_Text]]
16759 <p>Id should not contain + for spaces
16761 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16763 <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>
16764 <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>
16765 <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>
16766 <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>
16767 <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>
16768 <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>
16772 <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>
16775 <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>
16778 <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>
16781 <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>
16784 <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>
16787 <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>
16789 </p><p><a href="#Space_between_Text">#Space between Text</a>
16790 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
16791 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
16792 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
16793 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
16794 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
16799 Headers with excess '=' characters
16800 (Are similar tests necessary beyond the 1st level?)
16804 =''italic'' heading==
16805 ==''italic'' heading=
16807 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16809 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
16810 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
16811 <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>
16812 <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>
16816 <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>
16817 <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>
16818 <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>
16819 <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>
16824 HTML headers vs TOC (T25393)
16825 (__NOEDITSECTION__ for clearer output, doesn't matter here)
16837 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16839 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
16841 <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>
16842 <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>
16845 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
16847 <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>
16848 <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>
16854 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
16855 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
16856 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
16857 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
16858 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
16859 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
16864 Single-line or multiline-comments can follow headings
16866 parsoid=wt2html,wt2wt
16874 <h2><span class="mw-headline" id="foo">foo</span></h2>
16875 <h2><span class="mw-headline" id="bar">bar</span></h2>
16876 <h2><span class="mw-headline" id="baz">baz</span></h2>
16881 T3219 URL next to image (broken)
16883 http://example.com[[File:Foobar.jpg]]
16885 <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>
16888 <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>
16892 T3186 news: in the middle of text
16894 http://en.wikinews.org/wiki/Wikinews:Workplace
16896 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
16902 Namespaced link must have a title
16911 Namespaced link must have a title (bad fragment version)
16913 [[Project:#fragment]]
16915 <p>[[Project:#fragment]]
16921 ### HTML tags and HTML attributes
16925 div with no attributes
16927 <div>HTML rocks</div>
16929 <div>HTML rocks</div>
16934 div with double-quoted attribute
16936 <div id="rock">HTML rocks</div>
16938 <div id="rock">HTML rocks</div>
16943 div with single-quoted attribute
16945 <div id='rock'>HTML rocks</div>
16947 <div id="rock">HTML rocks</div>
16952 div with unquoted attribute
16954 <div id=rock>HTML rocks</div>
16956 <div id="rock">HTML rocks</div>
16961 div with illegal double attributes
16963 <div id="a" id="b">HTML rocks</div>
16965 <div id="b">HTML rocks</div>
16970 div with empty attribute value, space before equals
16972 parsoid=wt2html,html2html
16974 <div class =>HTML rocks</div>
16976 <div class="">HTML rocks</div>
16979 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16983 div with multiple empty attribute values
16985 parsoid=wt2html,html2html
16987 <div id= title=>HTML rocks</div>
16989 <div id="title.3D">HTML rocks</div>
16992 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
16996 table with multiple empty attribute values
16998 parsoid=wt2html,html2html
17004 <table title="id=">
17010 <table title="id=">
17011 <tbody><tr><td> hi</td></tr>
17016 div with braces in attribute value
17018 <div title="{}">Foo</div>
17020 <div title="{}">Foo</div>
17023 <div title="{}">Foo</div>
17027 div with empty attribute value, no space before equals
17029 parsoid=wt2html,html2html
17031 <div class=>HTML rocks</div>
17033 <div class="">HTML rocks</div>
17036 <div class="">HTML rocks</div>
17040 HTML multiple attributes correction
17042 <p class="error" class="awesome">Awesome!</p>
17044 <p class="awesome">Awesome!</p>
17049 Table multiple attributes correction
17052 !+ class="error" class="awesome"| status
17057 <th class="awesome"> status
17065 <DIV ID="x">HTML ROCKS</DIV>
17067 <div id="x">HTML ROCKS</div>
17072 Non-ASCII pseudo-tags are rendered as text
17081 Pseudo-tag with URL 'name' renders as url link
17083 <http://example.com/>
17085 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17090 text with amp in the middle of nowhere
17094 <p>Remember AT&T?
17099 text with character entity: eacute
17101 I always thought é was a cute letter.
17103 <p>I always thought é was a cute letter.
17106 <p>I always thought é was a cute letter.</p>
17110 text with entity-escaped character entity-like string: eacute
17112 I always thought &eacute; was a cute letter.
17114 <p>I always thought &eacute; was a cute letter.
17119 text with undefined character entity: xacute
17121 I always thought &xacute; was a cute letter.
17123 <p>I always thought &xacute; was a cute letter.
17130 <data value="5">five</data>
17131 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17132 <mark>This highlighted text</mark>
17134 <p><data value="5">five</data>
17135 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17136 <mark>This highlighted text</mark>
17141 HTML tag with leading space is parsed as text
17145 <p>< div>foo< /div>
17149 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17150 ## the HTML5 parsing spec.
17152 Element with broken attribute syntax
17156 <div style=" style="123">hi</div>
17159 <div style="123">hi</div>
17163 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17164 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17168 ### Nesting tests (see T43545, T52604, T53081)
17171 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17172 # Note that html2wt is considerably more difficult if we use <b> in
17173 # the test case, instead of <small>
17175 Ensure that HTML adoption agency algorithm is properly implemented.
17177 <small>X<small>Y</small>Z</small>
17179 <p><small>X<small>Y</small>Z</small>
17183 # This was T43545 in the PHP parser.
17184 # Note that tidy doesn't handle this correctly.
17188 <kbd>X<kbd>Y</kbd>Z</kbd>
17190 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17194 # The following cases were T53081 in the PHP parser.
17195 # Note that there are some other nestable tags (b, i, etc) which are
17196 # not covered; see T53081 for discussion.
17198 # Note that tidy doesn't handle this correctly.
17202 <em>X<em>Y</em>Z</em>
17204 <p><em>X<em>Y</em>Z</em>
17208 # Note that tidy doesn't handle this correctly.
17210 Nesting of <strong>
17212 <strong>X<strong>Y</strong>Z</strong>
17214 <p><strong>X<strong>Y</strong>Z</strong>
17223 <p><q>X<q>Y</q>Z</q></p>
17226 # Note that tidy doesn't handle this correctly.
17230 <ruby>X<ruby>Y</ruby>Z</ruby>
17232 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17236 # Note that tidy doesn't handle this correctly.
17240 <bdo>X<bdo>Y</bdo>Z</bdo>
17242 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17254 [[Media:Foobar.jpg]]
17255 [[Media:Video.ogv]]
17256 [[:Media:Video.ogv]]
17258 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17259 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17260 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17263 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17264 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17265 <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>
17269 Media link with text
17271 [[Media:Foobar.jpg|A neat file to look at]]
17273 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17276 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17279 # FIXME: this is still bad HTML tag nesting
17280 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17282 Media link with nasty text
17284 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17286 <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>
17289 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
17290 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
17292 <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>
17297 Media link to nonexistent file (T3702)
17299 [[Media:No such.jpg]]
17300 [[Media:No_such file.jpg]]
17302 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17303 <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>
17306 <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>
17307 <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>
17311 Image link to nonexistent file (T3850 - good)
17313 [[File:No_such.jpg]]
17315 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17318 <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>
17322 :Image link to nonexistent file (T3850 - bad)
17324 [[:Image:No such.jpg]]
17326 <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>
17329 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17333 Character reference normalization in link text (T3938)
17335 [[Main Page|this&that]]
17337 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17344 Test for unicode normalization
17346 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17350 (T21451) Links should refer to the normalized form.
17358 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17359 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17360 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17361 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17362 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17367 Empty attribute crash test (T4067)
17369 <font color="">foo</font>
17371 <p><font color="">foo</font>
17376 Empty attribute crash test single-quotes (T4067)
17378 <font color=''>foo</font>
17380 <p><font color="">foo</font>
17385 Attribute test: equals, then nothing
17387 parsoid=wt2html,html2html
17389 <font color=>foo</font>
17391 <p><font color="">foo</font>
17394 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17398 Attribute test: unquoted value
17400 parsoid=wt2html,html2html
17402 <font color=x>foo</font>
17404 <p><font color="x">foo</font>
17407 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17411 Attribute test: unquoted but illegal value (hash)
17413 <font color=#x>foo</font>
17415 <p><font color="#x">foo</font>
17419 # Parsoid does not serialize to empty attribute syntax,
17420 # so wt2wt and html2wt cases are skipped
17422 Attribute test: no value (T54330)
17424 parsoid=wt2html,html2html
17426 <font color>foo</font>
17428 <p><font color="">foo</font>
17431 <p><font color="">foo</font></p>
17435 T4095: link with three closing brackets
17439 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17442 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17446 T4095: link with pipe and three closing brackets
17448 [[Main Page|link]]]
17450 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17453 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17457 T4095: link with pipe and three closing brackets, version 2
17459 [[Main Page|[http://example.com/]]]
17461 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17464 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17473 Template:Dangerous attribute
17475 " onmouseover="alert(document.cookie)
17479 Template:Dangerous style attribute
17481 border-size: expression(alert(document.cookie))
17487 <div style="float: right; {{{1}}}">Magic div</div>
17491 T4304: HTML attribute safety (safe template; regression T4309)
17493 <div title="{{test}}"></div>
17495 <div title="This is a test template"></div>
17498 <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>
17501 # Parsoid has enough context to handle this case
17503 T4304: HTML attribute safety (dangerous template; 2309)
17505 <div title="{{dangerous attribute}}"></div>
17507 <div title=""></div>
17510 <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>
17514 T4304: HTML attribute safety (dangerous style template; 2309)
17516 <div style="{{dangerous style attribute}}"></div>
17518 <div style="/* insecure input */"></div>
17521 <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>
17525 T4304: HTML attribute safety (safe parameter; 2309)
17527 {{div style|width: 200px}}
17529 <div style="float: right; width: 200px">Magic div</div>
17532 <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>
17536 T4304: HTML attribute safety (unsafe parameter; 2309)
17538 {{div style|width: expression(alert(document.cookie))}}
17540 <div style="/* insecure input */">Magic div</div>
17543 <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>
17546 ## Parsoid output here differs; needs investigation.
17548 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17550 {{div style|"><script>alert(document.cookie)</script>}}
17552 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17556 ## Parsoid output here differs; needs investigation.
17558 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17560 {{div style|" ><script>alert(document.cookie)</script>}}
17562 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17567 T4304: HTML attribute safety (link)
17569 <div title="[[Main Page]]"></div>
17571 <div title="[[Main Page]]"></div>
17576 T4304: HTML attribute safety (italics)
17578 <div title="''foobar''"></div>
17580 <div title="''foobar''"></div>
17585 T4304: HTML attribute safety (bold)
17587 <div title="'''foobar'''"></div>
17589 <div title="'''foobar'''"></div>
17594 T4304: HTML attribute safety (ISBN)
17596 <div title="ISBN 1234567890"></div>
17598 <div title="ISBN 1234567890"></div>
17603 T4304: HTML attribute safety (RFC)
17605 <div title="RFC 1234"></div>
17607 <div title="RFC 1234"></div>
17612 T4304: HTML attribute safety (PMID)
17614 <div title="PMID 1234567890"></div>
17616 <div title="PMID 1234567890"></div>
17621 T4304: HTML attribute safety (web link)
17623 <div title="http://example.com/"></div>
17625 <div title="http://example.com/"></div>
17630 T4304: HTML attribute safety (named web link)
17632 <div title="[http://example.com/ link]"></div>
17634 <div title="[http://example.com/ link]"></div>
17639 T5244: HTML attribute safety (extension; safe)
17641 <div style="<nowiki>background:blue</nowiki>"></div>
17643 <div style="background:blue"></div>
17646 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17650 T5244: HTML attribute safety (extension; unsafe)
17652 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17654 <div style="/* insecure input */"></div>
17657 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17660 # More MSIE fun discovered by Tom Gilder
17663 MSIE CSS safety test: spurious slash
17665 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17667 <div style="/* insecure input */">evil</div>
17670 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
17674 MSIE CSS safety test: hex code
17676 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
17678 <div style="/* insecure input */">evil</div>
17681 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
17685 MSIE CSS safety test: comment in url
17687 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
17689 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
17692 <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>
17696 MSIE CSS safety test: comment in expression
17698 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
17700 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
17703 <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>
17707 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
17709 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
17711 <p style="/* invalid control char */">A</p>
17714 <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>
17718 MSIE 6 CSS safety test: Fullwidth (T57332)
17720 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
17721 <div style="top:EXPRESSION(alert())">B</div>
17723 <p style="/* insecure input */">A</p>
17724 <div style="/* insecure input */">B</div>
17727 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
17728 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
17732 MSIE 6 CSS safety test: IPA extensions (T57332)
17734 <div style="background-image:uʀʟ(javascript:alert())">A</div>
17735 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
17737 <div style="/* insecure input */">A</div>
17738 <p style="/* insecure input */">B</p>
17741 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
17742 <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>
17746 MSIE 6 CSS safety test: sup/sub script (T57332)
17748 <div style="background-image:url⁽javascript:alert())">A</div>
17749 <div style="background-image:url₍javascript:alert())">B</div>
17750 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
17752 <div style="/* insecure input */">A</div>
17753 <div style="/* insecure input */">B</div>
17754 <p style="/* insecure input */">C</p>
17757 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
17758 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
17759 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
17765 parsoid=wt2html,html2html
17768 title="data:text/html,<img src=1 onerror=alert(1)>"
17769 style="-o-link:attr(title);-o-link-source:current">X</div>
17771 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
17774 <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>
17778 MSIE 6 CSS safety test: Repetition markers (T57332)
17780 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
17781 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
17782 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
17783 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
17784 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
17785 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
17786 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
17788 <p style="/* insecure input */">A</p>
17789 <p style="/* insecure input */">B</p>
17790 <p style="/* insecure input */">C</p>
17791 <p style="/* insecure input */">D</p>
17792 <p style="/* insecure input */">E</p>
17793 <p style="/* insecure input */">F</p>
17794 <p style="/* insecure input */">G</p>
17797 <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>
17798 <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>
17799 <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>
17800 <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>
17801 <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>
17802 <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>
17803 <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>
17807 Table attribute legitimate extension
17810 !+ style="<nowiki>color:blue</nowiki>"| status
17815 <th style="color:blue"> status
17821 Table attribute safety
17824 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
17829 <th style="/* insecure input */"> status
17835 CSS line continuation 1
17837 <div style="background-image: u\ rl(test.jpg);"></div>
17839 <div style="/* insecure input */"></div>
17844 CSS line continuation 2
17846 <div style="background-image: u\ rl(test.jpg); "></div>
17848 <div style="/* invalid control char */"></div>
17859 Expansion of multi-line templates in attribute values (T8255)
17861 <div style="background: {{identity|#00FF00}}">-</div>
17863 <div style="background: #00FF00">-</div>
17868 Expansion of multi-line templates in attribute values (T8255 sanity check)
17870 <div style="background:
17873 <div style="background: #00FF00">-</div>
17876 <div style="background:
17881 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
17883 <div style="background: #00FF00">-</div>
17885 <div style="background: #00FF00">-</div>
17890 Tags which are hidden from Tidy cannot pass through the Sanitizer
17892 <mw:toc><script>alert();</script></mw:toc>
17894 <p><mw:toc><script>alert();</script></mw:toc></p>
17898 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
17902 Parser hook: empty input
17913 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17916 ## Don't expect parsoid to rt this form.
17918 Parser hook: empty input using terminated empty elements
17920 parsoid=wt2html,html2html
17931 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17935 Parser hook: empty input using terminated empty elements (space before)
17946 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17950 Parser hook: basic input
17961 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17964 ## Don't expect parsoid to rt this form.
17966 Parser hook: case insensitive
17968 parsoid=wt2html,html2html
17979 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
17982 ## Don't expect parsoid to rt this form.
17984 Parser hook: case insensitive, redux
17986 parsoid=wt2html,html2html
17997 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18001 Parser hook: nested tags
18003 <tag><tag></tag></tag>
18012 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18016 Parser hook: basic arguments
18018 <tag width="200" height="100" depth="50" square=""></tag>
18031 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18034 ## Don't expect parsoid to rt this form.
18036 Parser hook: basic arguments, variations
18038 parsoid=wt2html,html2html
18040 <tag width=200 height = "100" depth = '50' square></tag>
18053 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18057 Parser hook: argument containing a forward slash (T7344)
18059 <tag filename="/tmp/bla"></tag>
18064 'filename' => '/tmp/bla',
18069 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18072 ## Don't expect parsoid to rt this form.
18074 Parser hook: empty input using terminated empty elements (T4374)
18076 parsoid=wt2html,html2html
18088 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18091 ## </tag> should be output literally since there is no matching tag that begins it
18092 ## Don't expect parsoid to rt this form.
18094 Parser hook: basic arguments using terminated empty elements (T4374)
18098 <tag width=200 height = "100" depth = '50' square/>
18115 <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
18119 ## Don't expect parsoid to rt this form.
18121 Parser hook: Don't allow unclosed extension tags
18127 this is a '''test'''
18129 <p>test <tag>123
18130 </p><p>this is a <b>test</b>
18133 <p>test <tag>123</p>
18135 <p>this is a <b>test</b></p>
18139 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18143 Parser hook: static parser hook not inside a comment
18145 <statictag>hello, world</statictag>
18147 <statictag action="flush" />
18153 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18154 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18158 Parser hook: static parser hook inside a comment
18160 <!-- <statictag>hello, world</statictag> -->
18161 <statictag action="flush" />
18166 <!-- <statictag>hello, world</statictag> -->
18167 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18170 # Nested template calls; this case was broken by Parser.php rev 1.506,
18174 Template:One-parameter
18176 (My parameter is: {{{1}}})
18180 Template:Map-one-parameter
18182 {{{{{1}}}|{{{2}}}}}
18186 Nested template calls
18188 {{Map-one-parameter|One-parameter|param}}
18190 <p>(My parameter is: param)
18199 # HTML+Tidy effectively strips out the empty tags completely
18200 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
18201 # which Tidy would have done for the PHP parser had there been content inside it.
18203 Sanitizer: Closing of open tags
18205 <s></s><table></table>
18207 <s></s><table></table>
18210 <p><s></s></p><table></table>
18214 Sanitizer: Closing of open but not closed tags
18223 Sanitizer: Closing of closed but not open tags
18233 Sanitizer: Closing of closed but not open table tags
18237 Table not started</td></tr></table>
18239 <p>Table not started</p>
18241 <p>Table not started</p>
18245 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18247 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18249 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18252 <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>
18255 # In HTML5, the restrictions are that id must contain at least one character,
18256 # and must not contain any space characters.
18258 Sanitizer: Validating the contents of the id attribute (T6515)
18262 <br id="" /><br id="a space" />
18267 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18269 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18273 <br id="foo" /><br id="foo" />
18275 Something need to be done. foo-2 ?
18279 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18282 <meta itemprop="hello" content="world">
18283 <meta http-equiv="refresh" content="5">
18284 <meta itemprop="hello" http-equiv="refresh" content="5">
18285 <link itemprop="hello" href="{{SERVER}}">
18286 <link rel="stylesheet" href="{{SERVER}}">
18287 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18291 <p> <meta itemprop="hello" content="world" />
18292 <meta http-equiv="refresh" content="5">
18293 <meta itemprop="hello" content="5" />
18294 <link itemprop="hello" href="http://example.org" />
18295 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18296 <link itemprop="hello" href="http://example.org" />
18303 Sanitizer: Strip comments from CSS attributes
18305 parsoid=wt2html,wt2wt
18307 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18309 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18312 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18316 Language converter: output gets cut off unexpectedly (T7757)
18320 this bit is safe: }-
18322 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18324 then we get cut off here: }-
18326 all additional text is vanished
18328 <p>this bit is safe: }-
18329 </p><p>but if we add a conversion instance: xxx
18330 </p><p>then we get cut off here: }-
18331 </p><p>all additional text is vanished
18334 <p>this bit is safe: }-</p>
18335 <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>
18336 <p>then we get cut off here: }-</p>
18337 <p>all additional text is vanished</p>
18341 Self closed html pairs (T7487)
18343 <center><font id="bug" />Centered text</center>
18344 <div><font id="bug2" />In div text</div>
18346 <center><font id="bug"></font>Centered text</center>
18347 <div><font id="bug2"></font>In div text</div>
18355 Punctuation: nbsp before exclamation
18359 <p>C'est grave !
18364 Punctuation: CSS !important (T13874)
18366 <div style="width:50% !important">important</div>
18368 <div style="width:50% !important">important</div>
18373 Punctuation: CSS ! important (T13874; with space after)
18375 <div style="width:50% ! important">important</div>
18377 <div style="width:50% ! important">important</div>
18382 HTML bullet list, closed tags (T7497)
18395 <ul data-parsoid='{"stx":"html"}'>
18396 <li data-parsoid='{"stx":"html"}'>One</li>
18397 <li data-parsoid='{"stx":"html"}'>Two</li>
18403 HTML bullet list, unclosed tags (T7497)
18415 <ul data-parsoid='{"stx":"html"}'>
18416 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18417 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18423 HTML ordered list, closed tags (T7497)
18436 <ol data-parsoid='{"stx":"html"}'>
18437 <li data-parsoid='{"stx":"html"}'>One</li>
18438 <li data-parsoid='{"stx":"html"}'>Two</li>
18444 HTML ordered list, unclosed tags (T7497)
18457 <ol data-parsoid='{"stx":"html"}'>
18458 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18459 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18465 HTML nested bullet list, closed tags (T7497)
18488 <ul data-parsoid='{"stx":"html"}'>
18489 <li data-parsoid='{"stx":"html"}'>One</li>
18490 <li data-parsoid='{"stx":"html"}'>Two:
18491 <ul data-parsoid='{"stx":"html"}'>
18492 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18493 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18500 HTML nested bullet list, open tags (T7497)
18537 HTML nested ordered list, closed tags (T7497)
18562 HTML nested ordered list, open tags (T7497)
18599 HTML ordered list item with parameters oddity
18601 <ol><li id="fragment">One</li>
18604 <ol><li id="fragment">One</li>
18609 # parsoid doesn't explicitly mark autonumbered links, see T55505
18611 T7918: autonumbering
18613 [http://first/] [http://second] [ftp://ftp]
18617 [mailto:enclosed@mail.tld With target]
18619 [mailto:enclosed@mail.tld]
18621 mailto:inline@mail.tld
18623 <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>
18624 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
18625 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
18626 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
18627 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
18630 <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>
18631 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
18632 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
18633 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
18634 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
18639 # Security and HTML correctness
18640 # From Nick Jenkins' fuzz testing
18644 Fuzz testing: Parser13
18659 Fuzz testing: Parser14
18664 <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>
18665 http://<div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
18667 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18673 <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>
18675 <div id="toc" class="toc">
18676 <div class="toctitle">
18680 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18687 Fuzz testing: Parser14-table
18689 parsoid=wt2html,html2html
18694 <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>
18695 <table style="__TOC__">
18700 <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>
18701 <table style="__TOC__">
18708 <table style="__TOC__"></table>
18711 # Known to produce bogus xml (extra </td>)
18713 Fuzz testing: Parser16
18740 Fuzz testing: Parser21
18743 ! irc://{{ftp://a" onmouseover="alert('hello world');"
18748 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
18758 Fuzz testing: Parser22
18760 http://===r:::https://b
18764 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
18772 # Known to produce bad XML for now
18774 Fuzz testing: Parser24
18781 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
18782 <br style="onmouseover='alert(document.cookie);' " />
18784 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18789 <u class="|">}}}} >
18790 <br style="onmouseover='alert(document.cookie);'" />
18792 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18800 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
18801 <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>"}'/>}}}} >
18802 <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}'>
18806 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
18809 # Note: the current result listed for this is not what the original one was,
18810 # but the original bug was JavaScript injection, which is fixed in any case.
18811 # It's not clear that the original result listed was any more correct than the
18812 # current one. Original result:
18815 # <li class="||">
18816 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18818 Fuzz testing: Parser25 (T8055)
18824 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
18826 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18829 <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"]}'>
18830 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
18834 Fuzz testing: URL adjacent extension (with space, clean)
18836 http://example.com <nowiki>junk</nowiki>
18838 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
18841 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
18845 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
18847 http://example.com<nowiki>junk</nowiki>
18849 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
18852 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
18856 Fuzz testing: URL adjacent extension (no space, dirty; pre)
18858 http://example.com<pre>junk</pre>
18860 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
18863 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
18868 <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>
18872 Fuzz testing: image with bogus manual thumbnail
18874 [[Image:foobar.jpg|thumbnail= ]]
18876 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
18879 <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>
18883 Fuzz testing: encoded newline in generated HTML replacements (T8577)
18885 <pre dir=" "></pre>
18887 <pre dir=" "></pre>
18890 <pre typeof="mw:Extension/pre" about="#mwt2" dir="&#10;" data-mw='{"name":"pre","attrs":{"dir":"&#10;"},"body":{"extsrc":""}}'></pre>
18894 Parsing optional HTML elements (T8171)
18899 <td> Some tabular data</td>
18900 <td> More tabular data ...
18901 <td> And yet som tabular data</td>
18907 <td> Some tabular data</td>
18908 <td> More tabular data ...
18909 </td><td> And yet som tabular data</td>
18916 Correct handling of <td>, <tr> (T8171)
18921 <td> Some tabular data</td>
18922 <td> More tabular data ...</td>
18923 <td> And yet som tabular data</td>
18929 <td> Some tabular data</td>
18930 <td> More tabular data ...</td>
18931 <td> And yet som tabular data</td>
18939 Parsing crashing regression (fr:JavaScript)
18943 <p></body></x>
18948 Inline wiki vs wiki block nesting
18954 <p><b>Bold paragraph</b>
18955 </p><p>New wiki paragraph
18959 # FIXME: The current php output is documented
18960 # and desired output is the parsoid target.
18962 Inline HTML vs wiki block nesting
18968 <p><b>Bold paragraph
18969 </p><p>New wiki paragraph</b>
18972 <p><b>Bold paragraph</b>
18973 </p><p>New wiki paragraph
18977 # Original result was this:
18978 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
18980 # While that might be marginally more intuitive, maybe, the six-apostrophe
18981 # construct is clearly pathological and the result stated here (which is what
18982 # the parser actually does) is about as reasonable as anything.
18984 Mixing markup for italics and bold
18987 '''bold''''''bold''bolditalics'''''
18989 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
18997 Article for special page transclusion test
19001 Special page transclusion
19004 {{Special:Prefixindex/Xyzzyx}}
19006 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19012 Special page transclusion twice (T7021)
19015 {{Special:Prefixindex/Xyzzyx}}
19016 {{Special:Prefixindex/Xyzzyx}}
19018 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19020 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19026 Transclusion of default MediaWiki message
19028 {{MediaWiki:Mainpage}}
19035 Transclusion of nonexistent MediaWiki message
19037 {{MediaWiki:Mainpagexxx}}
19039 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19044 Transclusion of MediaWiki message with underscore
19046 {{MediaWiki:history_short}}
19053 Transclusion of MediaWiki message with space
19055 {{MediaWiki:history short}}
19062 Invalid header with following text
19072 Section extraction test (section 0)
19092 Section extraction test (section 1)
19114 Section extraction test (section 2)
19135 Section extraction test (section 3)
19155 Section extraction test (section 4)
19179 Section extraction test (section 5)
19199 Section extraction test (section 6)
19220 Section extraction test (section 7)
19240 Section extraction test (section 8)
19260 Section extraction test (section 9)
19281 Section extraction test (section 10)
19301 Section extraction test (nonexistent section 11)
19320 Section extraction test with bogus heading (section 1)
19325 ==bogus== not a legal section
19329 ==bogus== not a legal section
19333 Section extraction test with bogus heading (section 2)
19338 ==bogus== not a legal section
19345 Section extraction test with comment after heading (section 1)
19357 Section extraction test with comment after heading (section 2)
19369 Section extraction test with bogus <nowiki> heading (section 1)
19374 ==bogus== <nowiki>not a legal section</nowiki>
19378 ==bogus== <nowiki>not a legal section</nowiki>
19382 Section extraction test with bogus <nowiki> heading (section 2)
19387 ==bogus== <nowiki>not a legal section</nowiki>
19393 # Formerly testing for T4587, now resolved by the use of unmarked sections
19394 # instead of respecting commented sections
19396 Section extraction prefixed by comment (section 1)
19407 Section extraction prefixed by comment (section 2)
19417 # Formerly testing for T4607, now resolved by the use of unmarked sections
19418 # instead of respecting HTML-style headings
19420 Section extraction, mixed wiki and html (section 1)
19436 Section extraction, mixed wiki and html (section 2)
19452 # Formerly testing for T5342
19454 Section extraction, heading surrounded by <noinclude>
19458 <noinclude>==unmarked==</noinclude>
19464 # Test behavior of T21910
19466 Sectiion with all-equals
19471 The line above must have a trailing space
19474 But just in case it doesn't...
19478 But just in case it doesn't...
19482 Section replacement test (section 0)
19513 Section replacement test (section 1)
19542 Section replacement test (section 2)
19572 Section replacement test (section 3)
19603 Section replacement test (section 4)
19630 Section replacement test (section 5)
19661 Section replacement test (section 6)
19691 Section replacement test (section 7)
19722 Section replacement test (section 8)
19753 Section replacement test (section 9)
19782 Section replacement test (section 10)
19812 Section replacement test with initial whitespace (T15728)
19816 Preformatted initial line
19820 Preformatted initial line
19827 Section extraction, heading followed by pre with 20 spaces (T8398)
19839 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
19852 Section extraction, <pre> around bogus header (T12309)
19869 Section replacement, <pre> around bogus header (T12309)
19890 Handling of 
 in URLs
19894 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19897 <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>
19901 Handling of %0A in URLs
19905 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19908 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19911 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
19913 5 quotes, code coverage +1 line
19920 <p><b><i></i></b></p>
19923 # same html as previous, but wikitext adjusted to match parsoid html2wt
19924 # note that wt2html and html2html will put the <i> before the <b>
19926 5 quotes, code coverage +1 line w/ nowiki (1)
19928 parsoid=wt2wt,html2wt
19930 '''''<nowiki/>'''''
19935 <p><b><i></i></b></p>
19938 # same as previous, just swapping the <i> and <b>
19940 5 quotes, code coverage +1 line w/ nowiki (2)
19942 '''''<nowiki/>'''''
19947 <p><i><b></b></i></p>
19951 Special:Search page linking.
19955 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
19960 {{!}} is a magic word
19962 {{!}} is a magic word there and {{!}} is still a magic word here
19963 | is not a magic word here but {{!}} is still a magic word here
19965 <p>| is a magic word there and | is still a magic word here
19966 | is not a magic word here but | is still a magic word here
19969 <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
19970 | 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>
19976 title=[[Parser test]]
19981 * {{FULLPAGENAMEE}}
19983 * {{BASEPAGENAMEE}}
19987 * {{ROOTPAGENAMEE}}
19989 * {{TALKPAGENAMEE}}
19990 * {{SUBJECTPAGENAME}}
19991 * {{SUBJECTPAGENAMEE}}
19994 * {{NAMESPACENUMBER}}
19998 * {{SUBJECTSPACEE}}
19999 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20001 <ul><li> Parser test</li>
20002 <li> Parser_test</li>
20003 <li> Parser test</li>
20004 <li> Parser_test</li>
20005 <li> Parser test</li>
20006 <li> Parser_test</li>
20007 <li> Parser test</li>
20008 <li> Parser_test</li>
20009 <li> Parser test</li>
20010 <li> Parser_test</li>
20011 <li> Talk:Parser test</li>
20012 <li> Talk:Parser_test</li>
20013 <li> Parser test</li>
20014 <li> Parser_test</li>
20022 <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>
20025 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20028 Gallery with valid attributes
20030 <gallery type="123" summary="345">
20031 File:File:Foobar.jpg
20034 <ul class="gallery mw-gallery-traditional" type="123">
20035 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20036 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20037 <div class="gallerytext">
20043 <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"}}'>
20044 <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>
20048 ## Parsoid thinks the "centre" here is a property, not a caption.
20053 "modes": ["wt2html"],
20054 "nativeGallery": true
20062 image4 |300px| centre
20063 image5.svg| http://///////
20068 <ul class="gallery mw-gallery-traditional">
20069 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20070 <div class="thumb" style="height: 150px;">Image1.png</div>
20071 <div class="gallerytext">
20074 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20075 <div class="thumb" style="height: 150px;">Image2.gif</div>
20076 <div class="gallerytext">
20079 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20080 <div class="thumb" style="height: 150px;">Image3</div>
20081 <div class="gallerytext">
20084 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20085 <div class="thumb" style="height: 150px;">Image4</div>
20086 <div class="gallerytext">
20091 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20092 <div class="thumb" style="height: 150px;">Image5.svg</div>
20093 <div class="gallerytext">
20094 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20098 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20099 <div class="thumb" style="height: 150px;">* image6</div>
20100 <div class="gallerytext">
20106 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20107 <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>
20108 <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>
20109 <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>
20110 <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>
20111 <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>
20112 <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>
20117 Gallery (with options, html)
20120 "modes": ["wt2html", "html2html"],
20121 "nativeGallery": true
20124 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20125 File:Nonexistent.jpg|caption
20126 File:Nonexistent.jpg
20127 image:foobar.jpg|some '''caption''' [[Main Page]]
20129 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20132 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20133 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20134 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20135 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20136 <div class="gallerytext">
20141 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20142 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20143 <div class="gallerytext">
20146 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20147 <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>
20148 <div class="gallerytext">
20149 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20153 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20154 <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>
20155 <div class="gallerytext">
20158 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20159 <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>
20160 <div class="gallerytext">
20168 <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":{}}'>
20169 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20170 <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>
20171 <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>
20172 <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>
20173 <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>
20174 <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>
20179 Gallery (with options, extsrc)
20182 "nativeGallery": false
20185 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20186 File:Nonexistent.jpg|caption
20187 File:Nonexistent.jpg
20188 image:foobar.jpg|some '''caption''' [[Main Page]]
20190 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20193 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20194 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20195 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20196 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20197 <div class="gallerytext">
20202 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20203 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20204 <div class="gallerytext">
20207 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20208 <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>
20209 <div class="gallerytext">
20210 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20214 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20215 <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>
20216 <div class="gallerytext">
20219 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20220 <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>
20221 <div class="gallerytext">
20229 <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"}}'>
20230 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20231 <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>
20232 <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>
20233 <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>
20234 <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>
20235 <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>
20240 Gallery with link that has fragment
20243 "modes": ["wt2html", "html2html"],
20244 "nativeGallery": true
20248 image:foobar.jpg|link=Main_Page
20249 image:foobar.jpg|link=Main_Page#section
20250 image:foobar.jpg|link=Main Page#section|caption
20253 <ul class="gallery mw-gallery-traditional">
20254 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20255 <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>
20256 <div class="gallerytext">
20259 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20260 <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>
20261 <div class="gallerytext">
20264 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20265 <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>
20266 <div class="gallerytext">
20274 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20275 <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>
20276 <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>
20277 <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>
20281 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20283 Gallery with template inside caption
20286 "nativeGallery": true
20289 <gallery caption="{{echo|hi}}">
20290 File:Foobar.jpg|{{echo|ho}}
20293 <ul class="gallery mw-gallery-traditional">
20294 <li class='gallerycaption'>{{echo|hi}}</li>
20295 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20296 <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>
20297 <div class="gallerytext">
20305 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20306 <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>
20307 <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>
20312 Gallery with wikitext inside caption
20315 "nativeGallery": true
20319 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20320 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20323 <ul class="gallery mw-gallery-traditional">
20324 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20325 <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>
20326 <div class="gallerytext">
20327 <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>
20331 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20332 <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>
20333 <div class="gallerytext">
20334 <p>This is a test template
20341 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20342 <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>
20343 <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>
20348 Gallery (with showfilename option)
20351 "nativeGallery": true
20354 <gallery showfilename="">
20355 File:Nonexistent.jpg|caption
20356 File:Nonexistent.jpg
20357 File:Foobar.jpg|some '''caption''' [[Main Page]]
20361 <ul class="gallery mw-gallery-traditional">
20362 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20363 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20364 <div class="gallerytext">
20365 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20370 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20371 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20372 <div class="gallerytext">
20373 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20377 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20378 <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>
20379 <div class="gallerytext">
20380 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20381 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20385 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20386 <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>
20387 <div class="gallerytext">
20388 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20395 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20396 <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>
20397 <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>
20398 <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>
20399 <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>
20403 ## Should Parsoid be preserving these variations? See T151367
20405 Gallery (with namespace-less filenames)
20408 "modes": ["wt2html", "html2html"],
20409 "nativeGallery": true
20413 File:Nonexistent.jpg
20419 <ul class="gallery mw-gallery-traditional">
20420 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20421 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20422 <div class="gallerytext">
20425 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20426 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20427 <div class="gallerytext">
20430 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20431 <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>
20432 <div class="gallerytext">
20435 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20436 <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>
20437 <div class="gallerytext">
20443 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20444 <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>
20445 <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>
20446 <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>
20447 <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>
20452 Gallery override link with WikiLink (T36852)
20455 "nativeGallery": true
20459 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
20462 <ul class="gallery mw-gallery-traditional">
20463 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20464 <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>
20465 <div class="gallerytext">
20471 <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":{}}'>
20472 <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>
20477 Gallery override link with absolute external link (T36852)
20480 "nativeGallery": true
20484 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20487 <ul class="gallery mw-gallery-traditional">
20488 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20489 <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>
20490 <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="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>
20502 Gallery override link with absolute external link with LanguageConverter
20507 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20510 <ul class="gallery mw-gallery-traditional">
20511 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20512 <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>
20513 <div class="gallerytext">
20523 Gallery override link with malicious javascript (T36852)
20526 "modes": ["wt2html", "html2html"],
20527 "nativeGallery": true
20531 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20534 <ul class="gallery mw-gallery-traditional">
20535 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20536 <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>
20537 <div class="gallerytext">
20543 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20544 <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>
20548 # Note that parsoid uses the invalid link as a caption, PHP does not.
20550 Gallery with invalid title as link (T45964)
20553 "modes": ["wt2html", "html2html"],
20554 "nativeGallery": true
20558 File:Foobar.jpg|link=<
20561 <ul class="gallery mw-gallery-traditional">
20562 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20563 <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>
20564 <div class="gallerytext">
20570 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20571 <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>
20576 Serialize gallery without attrs in data-mw
20579 "modes": ["html2wt"],
20580 "nativeGallery": true
20583 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
20584 <li class="gallerycaption">123</li>
20585 <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>
20588 <gallery caption="123">
20594 Gallery with class and style attributes
20597 "nativeGallery": true
20600 <gallery class="center" style="text-align: center;">
20604 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
20605 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20606 <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>
20607 <div class="gallerytext">
20613 <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":{}}'>
20614 <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>
20619 Gallery in slideshow mode
20622 "nativeGallery": true
20625 <gallery mode="slideshow" showthumbnails="">
20629 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
20630 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20631 <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>
20632 <div class="gallerytext">
20638 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
20639 <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>
20644 HTML Hex character encoding (spells the word "JavaScript")
20646 parsoid=wt2html,wt2wt,html2html
20648 JavaScript
20650 <p>JavaScript
20655 <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>
20659 HTML Hex character encoding bogus encoding (T28437 regression check)
20663 <p>&#xsee;&#XSEE;
20666 <p>&#xsee;&#XSEE;</p>
20670 HTML Hex character encoding mixed case
20672 parsoid=wt2html,wt2wt,html2html
20681 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
20684 # See: https://www.w3.org/TR/html5/syntax.html#character-references
20685 # Note that U+000C (form feed) is not a valid XML character, so
20686 # it is banned even though allowed in HTML5.
20688 Illegal character references (T106578)
20693 ; Control (low): 
20694 ; Control (high):  Ÿ
20695 ; Surrogate: ��
20696 ; This is an okay astral character: 💩
20705 <dt>Control (low)</dt>
20707 <dt>Control (high)</dt>
20708 <dd>&#x7F; &#x9F;</dd>
20710 <dd>&#xD83D;&#xDCA9;</dd>
20711 <dt>This is an okay astral character</dt>
20717 __FORCETOC__ override
20729 ISBN 978-0-1234-56 789
20731 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
20734 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
20736 <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>
20740 ISBN followed by 5 spaces
20751 ISBN ISBN 1234567890
20753 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20756 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
20759 # Uppercase X and lowercase x as well
20770 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
20771 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
20772 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
20773 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
20774 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
20775 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
20778 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
20779 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
20780 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
20781 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
20782 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
20783 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
20787 ISBN with empty prefix (parsoid test)
20791 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20794 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
20798 T24905: <abbr> followed by ISBN followed by </a>
20800 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
20802 <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>
20805 <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>
20813 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
20818 Double RFC with a wiki link
20822 <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>
20831 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
20834 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
20838 Centre-aligned image
20840 [[Image:foobar.jpg|centre]]
20842 <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>
20849 [[Image:foobar.jpg|none]]
20851 <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>
20856 Width + Height sized image (using px) (height is ignored)
20858 [[Image:foobar.jpg|640x480px]]
20860 <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>
20865 Width-sized image (using px, no following whitespace)
20867 [[Image:foobar.jpg|640px]]
20869 <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>
20874 Width-sized image (using px, with following whitespace - test regression from r39467)
20876 [[Image:foobar.jpg|640px ]]
20878 <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>
20883 Width-sized image (using px, with preceding whitespace - test regression from r39467)
20885 [[Image:foobar.jpg| 640px]]
20887 <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>
20892 Image with page parameter
20896 [[File:LoremIpsum.djvu|page=2]]
20898 <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>
20901 <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>
20905 Another italics / bold test
20913 # FIXME: The php output seems broken. It's interleaving some open/close tags.
20919 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
20922 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
20926 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
20928 Images with the "|" character in the comment
20930 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
20932 <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>
20935 <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>
20939 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
20941 <html><script>alert(1);</script></html>
20943 <p><html><script>alert(1);</script></html>
20948 HTML with raw HTML ($wgRawHtml==true)
20952 <html><script>alert(1);</script></html>
20954 <p><script>alert(1);</script>
20959 Parents of subpages, one level up
20961 subpage title=[[Subpage test/L1/L2/L3]]
20965 <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>
20971 Parents of subpages, one level up, not named
20973 subpage title=[[Subpage test/L1/L2/L3]]
20977 <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>
20984 Parents of subpages, two levels up
20986 subpage title=[[Subpage test/L1/L2/L3]]
20992 <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
20993 </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>
20998 Parents of subpages, two levels up, without trailing slash or name.
21000 subpage title=[[Subpage test/L1/L2/L3]]
21009 Parents of subpages, two levels up, with lots of extra trailing slashes.
21011 subpage title=[[Subpage test/L1/L2/L3]]
21015 <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>
21020 Subpage test/L1/L2/L3Sibling
21026 Transclusion of a sibling page (one level up)
21028 subpage title=[[Subpage test/L1/L2/L3]]
21037 Transclusion of a child page
21039 subpage title=[[Subpage test/L1/L2]]
21047 # This is wt2html only in Parsoid because we add <nowiki>
21048 # because of {{..}} and we don't expect to fix that to
21049 # eliminate the nowikis selective for {{..}} markup.
21051 Non-transclusion because of too many up levels
21053 subpage title=[[Subpage test/L1/L2/L3]]
21056 {{../../../../More than parent}}
21058 <p>{{../../../../More than parent}}
21061 <p>{{../../../../More than parent}}</p>
21065 Definition list code coverage
21071 <dl><dt> title  </dt>
21073 <dt> title </dt>
21079 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21080 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21081 <dt>title</dt><dd> def</dd></dl>
21085 Don't fall for the self-closing div
21087 <div>hello world</div/>
21089 <div>hello world</div>
21098 <p>[[:Template:Msg]]
21107 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21111 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21113 Always escape literal '>' in output, not just after '<'
21127 <p>This is a test template
21128 This is a test template
21140 Inclusion of !userCanEdit() content
21144 <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>
21150 Out-of-order TOC heading levels
21159 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
21161 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21163 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21164 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21167 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21169 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21170 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21176 <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>
21177 <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>
21178 <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>
21179 <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>
21180 <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>
21181 <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>
21187 ISBN with a dummy number
21197 ISBN with space-delimited number
21201 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21204 <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>
21209 ISBN with multiple spaces, no number
21228 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21229 </p><p>ISBN 12345678901
21232 <p>ISBN 123456789</p>
21234 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21236 <p>ISBN 12345678901</p>
21241 ISBN with trailing year (T9110)
21243 ISBN 1-234-56789-0 - 2006
21245 ISBN 1 234 56789 0 - 2006
21247 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21248 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21251 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21253 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21260 {{anchorencode:foo bar©#%n}}
21262 <p>foo_bar.C2.A9.23.25n
21267 anchorencode trims spaces
21269 {{anchorencode: __pretty__please__}}
21276 anchorencode deals with links
21278 {{anchorencode: [[hello|world]] [[hi]]}}
21285 anchorencode deals with templates
21287 {{anchorencode: {{Foo}} }}
21294 anchorencode encodes like the TOC generator: (T20431)
21296 === _ +:.3A%3A&&]] ===
21297 {{anchorencode: _ +:.3A%3A&&]] }}
21300 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21301 <p>.2B:.3A.253A.26.26.5D.5D
21306 T8200: blockquotes and paragraph formatting
21327 T10293: Use of center tag ruins paragraph formatting
21348 Parsing of overlapping (improperly nested) inline html tags
21350 <span><s>x</span></s>
21352 <p><span><s>x</span></s></span>
21355 <p><span><s>x</s></span>
21360 ### Language variants related tests
21363 # Parsoid does not mark self-links.
21364 # Parsoid does not convert links; PHP will do any necessary redirects.
21367 Self-link in language variants
21369 title=[[Dunav]] language=sr
21371 Both [[Dunav]] and [[Дунав]] are names for this river.
21373 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21376 <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>
21386 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21388 title=[[Duna]] language=sr
21390 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21392 <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.
21395 <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>
21399 Link to a section of a variant of this title shouldn't be parsed as self-link
21401 title=[[Duna]] language=sr
21403 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21405 <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.
21408 <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>
21412 Link to pages in language variants
21416 Main Page can be written as [[Маин Паге]]
21418 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21421 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21426 Multiple links to pages in language variants
21430 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21432 <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>.
21435 <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>
21440 Simple template in language variants
21446 <p>This is a test template
21452 Template with explicit namespace in language variants
21458 <p>This is a test template
21464 Basic test for template parameter in language variants
21468 {{парамтест|param=foo}}
21470 <p>This is a test template with parameter foo
21475 Simple category in language variants
21479 [[Category:МедиаWики Усер'с Гуиде]]
21481 cat=МедиаWики_Усер'с_Гуиде sort=
21483 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21498 ## We used to, but no longer wt2wt this test since the default serializer
21499 ## will normalize all categories to serialize on their own line.
21500 ## This wikitext usage is going to be fairly uncommon in production and
21501 ## selser will take care of preserving formatting in those scenarios.
21503 Don't convert blue categorylinks to another variant (T35210)
21509 [[A]][[Category:分类]]
21513 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
21514 <link rel="mw:PageProp/Category" href="./Category:分类"/>
21518 Stripping -{}- tags (language variants)
21522 Latin proverb: -{Ne nuntium necare}-
21524 <p>Latin proverb: Ne nuntium necare
21527 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21532 Prevent conversion with -{}- tags (language variants)
21534 language=sr variant=sr-ec
21536 Latinski: -{Ne nuntium necare}-
21538 <p>Латински: Ne nuntium necare
21541 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21546 Prevent conversion of text with -{}- tags (language variants)
21548 language=sr variant=sr-ec
21550 Latinski: -{Ne nuntium necare}-
21552 <p>Латински: Ne nuntium necare
21555 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21560 Prevent conversion of links with -{}- tags (language variants)
21562 language=sr variant=sr-ec
21566 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21569 <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>
21574 -{}- tags within headlines (within html for parserConvert())
21576 language=sr variant=sr-ec
21580 Note that even an unprotected headline ID is not affected by language
21585 <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>
21586 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
21589 <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>
21592 <h2 id="-.7BNaslov.7D-"><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
21594 <p>Note that even an unprotected headline ID is not affected by language
21597 <h2 id="Latinski">Latinski</h2>
21601 Explicit definition of language variant alternatives
21603 language=zh variant=zh-tw
21605 -{zh:China;zh-tw:Taiwan}-, not China
21607 <p>Taiwan, not China
21610 <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>
21614 Filter syntax for language variants
21616 language=zh variant=zh-tw
21618 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
21620 <p>fooblog, WEBJOURNAL, WEBLOGquux
21623 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
21626 # Note that Parsoid post-processing for language variants needs to
21627 # update the `title` attribute here, based on the mw:ExpandedAttrs property
21629 Conversion around HTML tags
21631 language=sr variant=sr-ec
21633 -{H|span=>sr-ec:script;title=>sr-ec:src}-
21634 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
21637 <span title="ЛаCтин">ски</span>
21640 <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"}]}'/>
21641 <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>
21645 Explicit session-wise two-way language variant mapping (A flag and - flag)
21647 language=zh variant=zh-tw
21649 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
21651 Taiwan is not China.
21653 But -{A|zh:China; zh-tw:Taiwan}- is China,
21655 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
21657 and -{China}- is China.
21659 <p>This is Taiwan, but we'll forget that now.
21660 </p><p>Taiwan is not China.
21661 </p><p>But Taiwan is Taiwan,
21662 </p><p>(This should be stripped!)
21663 </p><p>and China is China.
21666 <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>
21667 <p>Taiwan is not China.</p>
21668 <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>
21669 <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>
21670 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
21674 Explicit session-wise one-way language variant mapping (A flag and - flag)
21676 language=zh variant=zh-tw
21678 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
21680 COUNTRY is China or Taiwan.
21682 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
21684 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
21686 and -{COUNTRY}- is COUNTRY.
21688 <p>This is Taiwan, but we'll forget that now.
21689 </p><p>COUNTRY is China or Taiwan.
21690 </p><p>But Taiwan is Taiwan,
21691 </p><p>(This should be stripped!)
21692 </p><p>and COUNTRY is COUNTRY.
21695 <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>
21696 <p>COUNTRY is China or Taiwan.</p>
21697 <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>
21698 <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>
21699 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
21703 Explicit session-wise two-way language variant mapping (H flag for hide)
21705 language=zh variant=zh-tw
21707 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
21711 <p>(This should be stripped!)
21712 </p><p>Taiwan is Taiwan.
21715 <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>
21716 <p>Taiwan is China.</p>
21720 Explicit session-wise one-way language variant mapping (H flag for hide)
21722 language=zh variant=zh-tw
21724 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
21726 COUNTRY is Taiwan or China.
21728 <p>(This should be stripped!)
21729 </p><p>Taiwan is Taiwan or China.
21732 <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>
21733 <p>COUNTRY is Taiwan or China.</p>
21736 ## Note that parsoid test runner does not support 'showtitle' option.
21738 Adding explicit conversion rule for title (T flag)
21740 language=zh variant=zh-tw showtitle
21742 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
21747 <p>Should be stripped!
21748 </p><p>Taiwan is China.
21751 <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>
21752 <p>Taiwan is China.</p>
21756 Code coverage: T combined with H flag
21758 language=zh variant=zh-tw showtitle
21760 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
21765 <p>Should be stripped!
21766 </p><p>Taiwan is Taiwan.
21769 <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>
21770 <p>Taiwan is China.</p>
21774 Code coverage: T with no variants
21776 language=zh variant=zh-tw showtitle
21778 -{H|zh:China; zh-tw:Taiwan}-
21779 Taiwan is China.-{T|Taiwan is China}-
21786 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
21787 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
21791 Code coverage: rules with no variants
21793 language=zh variant=zh-tw
21795 -{H|zh:China; zh-tw:Taiwan}-
21806 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
21808 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
21809 Taiwan is China.</p>
21814 Code coverage: D flag for conversion rule
21816 language=zh variant=zh-tw
21818 -{D|zh-cn:XA; zh-tw:YA}-
21819 -{A;D|zh-cn:XB; zh-tw:YB}-
21820 -{D;H|zh-cn:XC; zh-tw:YC}-
21822 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
21828 XA XB XC YA YB YC FOO BAR BAT 012345
21833 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
21837 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
21840 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
21841 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
21842 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
21843 <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>
21844 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
21845 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
21846 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
21847 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
21851 Code coverage: N flag for conversion rule
21853 language=zh variant=zh-cn
21863 </p><p>српски (ћирилица)
21866 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
21867 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
21868 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
21871 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
21873 Code coverage: N flag for conversion rule (wt2html only)
21875 language=zh variant=zh-cn
21876 parsoid=wt2html,html2html
21883 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
21887 Testing that changing the language variant here in the tests actually works
21889 language=zh variant=zh showtitle
21891 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
21894 <p>Should be stripped!
21897 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
21901 Recursive conversion of alt and title attrs shouldn't clear converter state
21903 language=zh variant=zh-cn
21906 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
21907 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
21911 Should be stripped<span title="Exclamation">!</span>
21914 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
21915 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>
21919 T26072: more test on conversion rule for title
21921 language=zh variant=zh-tw showtitle
21923 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
21925 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
21928 <p>This should be stripped!
21929 </p><p>This won't take interferes with the title rule.
21932 <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>
21933 <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>
21937 Partly disable title conversion if variant == main language code
21939 language=zh variant=zh title=[[ZH]] showtitle
21941 -{T|zh-cn:CN;zh-tw:TW}-
21947 <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>
21951 Partly disable title conversion if variant == main language code, more
21953 language=zh variant=zh title=[[ZH]] showtitle
21961 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
21965 Raw output of variant escape tags (R flag)
21967 language=zh variant=zh-tw
21969 Raw: -{R|zh:China;zh-tw:Taiwan}-
21971 <p>Raw: zh:China;zh-tw:Taiwan
21974 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
21977 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
21979 Raw output of variant escape tags (R flag) (wt2html only)
21981 language=zh variant=zh-tw
21982 parsoid=wt2html,html2html
21984 -{Variant}- -{D|syntax}- -{D;R|options}-
21986 <p>Variant syntax options
21989 <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>
21993 Nested markup inside raw output of variant escape tags (R flag)
21995 language=zh variant=zh-tw
21997 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
21999 <p>Nested raw: nested Taiwan nested
22002 <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>
22006 Nested markup and spaces inside raw output of variant escape tags (R flag)
22008 language=zh variant=zh-tw
22010 X-{ outer -{ inner }- outer }-X
22012 <p>X outer inner outer X
22015 <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>
22019 Templates inside raw output of variant escape tags (R flag)
22021 language=zh variant=zh-tw
22023 Nested raw: -{R|nested {{echo|hi}} templates}-
22025 <p>Nested raw: nested hi templates
22028 <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>
22032 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22034 language=zh variant=zh-cn
22036 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22041 <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>
22045 Conversion rules from [numeric-only string] to [something else] (T48634)
22047 language=zh variant=zh-cn
22049 -{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
22054 <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>
22058 Two-way converter rule entries with an empty value should be ignored (T53551)
22060 language=zh variant=zh-cn
22062 -{H|zh-cn:foo;zh-tw:;}-foobar
22067 <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>
22071 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22073 language=zh variant=zh-cn
22075 -{H|=>zh-cn:foo;}-foobar
22080 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22084 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22086 language=zh variant=zh-cn
22093 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22097 Nested using of manual convert syntax
22099 language=zh variant=zh-hk
22101 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22103 <p>Nested: Hello Hong Kong!
22106 <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=&#39;{\\\"disabled\\\":{\\\"t\\\":\\\"ong\\\"}}&#39; data-parsoid=&#39;{\\\"fl\\\":[],\\\"dsr\\\":[90,97,null,2]}&#39;>&lt;/span> K&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&#39;{\\\"disabled\\\":{\\\"t\\\":\\\"\\\"}}&#39; data-parsoid=&#39;{\\\"fl\\\":[],\\\"dsr\\\":[99,103,null,2]}&#39;>&lt;/span>ong\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[7],\"dsr\":[68,109,null,2]}'></span>"}]}'></span>!</p>
22110 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22112 language=zh variant=zh-cn
22114 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22116 <p><span title="X">A</span>
22119 <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=&#39;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&#39; data-parsoid=&#39;{\\\"fl\\\":[],\\\"dsr\\\":[34,39,null,2]}&#39;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
22123 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22125 language=zh variant=zh-cn
22127 -{<span title="-{X}-">A</span>}-
22128 !! html/php+disabled
22129 <p><span title="X">A</span>
22132 <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=&#39;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&#39; data-parsoid=&#39;{\\\"fl\\\":[],\\\"dsr\\\":[15,20,null,2]}&#39;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
22135 # Parsoid and PHP disagree on how to parse this example: Parsoid
22136 # insists that the content of a language converter element be a valid
22137 # DOM fragment or attribute string
22139 Language converter markup with block content
22141 language=zh variant=zh-cn
22143 <span>a-{b<div>c}-d
22145 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22147 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22149 <p><span>ab</span></p>
22150 <div><span>cd <span>ab</span></span>
22151 <div><span>cd <span>ad</span></span></div>
22154 <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>
22156 <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>
22158 <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>
22162 LanguageConverter selser (1)
22164 language=zh variant=zh-cn
22166 "modes": ["wt2wt", "selser"],
22168 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22178 LanguageConverter selser (2)
22180 language=zh variant=zh-cn
22182 "modes": ["wt2wt", "selser"],
22184 ["span[class='x']", "contents", "text", "-{foo}-"],
22185 ["a", "contents", "text", "-{"],
22186 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22190 <span class="x">TEXT1</span>
22191 [http://example.com TEXT2]
22195 <span class="x"><nowiki>-{foo}-</nowiki></span>
22196 [http://example.com -{]
22197 [[Foo|<nowiki>-{</nowiki>]]
22198 {{1x|<nowiki>-{</nowiki>}}
22201 # Tests LanguageVariantText in ConstrainedText
22203 LanguageConverter selser (3)
22205 language=zh variant=zh-cn
22207 "modes": ["wt2wt", "selser"],
22209 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22210 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22221 |<nowiki/>-{edited}-
22225 # Tests LanguageVariantText._fromSelser
22227 LanguageConverter selser (4)
22229 language=zh variant=zh-cn
22231 "modes": ["wt2wt", "selser"],
22233 ["td > span.x", "remove"]
22239 |<span class="x">Foo</span>-{Bar}-
22240 ||<span class="x">Foo</span>-{Bar}-
22250 # Since Parsoid is starting to emit canonical wikitext for links,
22251 # [http://example.com http://example.com] will not RT back to that
22253 # Parsoid does not language-convert links (it is done in a
22254 # post-processing step)
22256 Proper conversion of text in external links
22258 language=sr variant=sr-ec
22261 http://www.google.com
22262 gopher://www.google.com
22263 [http://www.google.com http://www.google.com]
22264 [gopher://www.google.com gopher://www.google.com]
22265 [https://www.google.com irc://www.google.com]
22266 [ftp://www.google.com www.google.com/ftp://dir]
22267 [//www.google.com www.google.com]
22269 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22270 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22271 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22272 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22273 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22274 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22275 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22278 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
22279 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
22280 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
22281 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
22282 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
22283 <a rel="mw:ExtLink" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22284 <a rel="mw:ExtLink" href="//www.google.com">www.google.com</a></p>
22288 Do not convert roman numbers to language variants
22290 language=sr variant=sr-ec
22294 <p>Фридрих IV је цар.
22297 <p>Fridrih IV je car.</p>
22301 Unclosed language converter markup "-{"
22312 Don't convert raw rule "-{R|=>}-" to "=>"
22321 <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>
22325 Don't break link parsing if language converter markup is in the caption.
22327 language=sr variant=sr-ec
22329 [[Main Page|-{R|main page}-]]
22331 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22334 <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>
22338 T146304: Don't break template parsing if language converter markup is in the parameter.
22340 language=sr variant=sr-ec
22347 <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>
22351 T146305: Don't break image parsing if language converter markup is in the caption.
22355 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22357 <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>
22360 <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>
22364 T146305: Don't break image parsing if nested language converter markup is in the caption.
22366 language=zh variant=zh-cn
22368 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22370 <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>
22373 <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>
22376 # XXX html2wt disabled because rich markup in alt is not preserved.
22378 Don't break gallery if language converter markup is inside.
22383 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22384 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22387 <ul class="gallery mw-gallery-traditional">
22388 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22389 <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>
22390 <div class="gallerytext">
22391 <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>
22395 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22396 <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>
22397 <div class="gallerytext">
22398 <p>This is a test template
22405 <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"}}'>
22406 <li class="gallerybox">
22407 <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>
22408 <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>
22410 <li class="gallerybox">
22411 <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>
22412 <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>
22418 T153135: Don't break list handling if language converter markup is in the item.
22420 language=zh variant=zh-cn
22422 ;-{zh-cn:AAA;zh-tw:BBB}-
22426 <dt>foo:bar</dt></dl>
22429 <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>
22430 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22434 // Note that parsoid does not protect colons unless language converter
22435 // markup is properly nested, because it is a backtracking parser.
22437 T153135: Unclosed markup in definition list (code coverage)
22439 language=zh variant=zh-cn
22445 <dt><b>foo:bar</b></dt>
22446 <dt><b>-{zh-cn:AAA</b></dt>
22449 <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}'>
22450 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22451 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22456 T153135: Nested language converter markup in definition list (code coverage)
22458 language=zh variant=zh-cn
22460 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22462 <dl><dt>AAA foo:bar bat:baz</dt>
22466 <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>
22467 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22471 # html2wt mode disabled due to <nowiki> insertion.
22473 T153140: Don't break table handling if language converter markup is in the cell.
22475 language=sr variant=sr-ec
22476 parsoid=wt2html,wt2wt,html2html
22493 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
22500 Language converter tricky html2wt cases (1)
22503 parsoid=html2wt,wt2wt
22505 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
22507 -{<nowiki>}-</nowiki>}-
22514 Language converter tricky html2wt cases (2)
22517 parsoid=html2wt,wt2wt
22521 <nowiki>-{foo}-</nowiki>
22523 <p>-{foo}-
22528 Language converter tricky html2wt cases (3)
22531 parsoid=html2wt,wt2wt
22533 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
22534 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
22535 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
22541 -{<nowiki>-{foo}-</nowiki>}-
22545 </p><p>-{foo}-
22550 Language converter tricky html2wt cases (4)
22553 parsoid=html2wt,wt2wt
22555 <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>
22563 # Note that the <nowiki> escaping added by parsoid for source text,
22564 # destination text, and language names only works on the PHP side
22565 # for *destination text*. (HTML entity escaping wouldn't work
22566 # any better.) This is probably a bug, at least for source texts.
22567 # (For language names PHP uses a precise regexp based on the languages
22568 # it currently knows have variants, which is fragile since this set
22569 # can grow/shrink over time.)
22571 Language converter tricky html2wt cases (5)
22573 language=zh variant=zh-cn
22575 <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>
22576 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
22577 <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>
22578 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
22581 -{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
22583 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
22585 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
22587 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
22590 !! html/php+disabled
22591 <p>foobat;xyz=>zh-cn:abc
22595 </p><p>a:b=>c 0;zh-tw:bar
22600 T2529: Uncovered bullet
22609 # Plain MediaWiki does not remove empty lists, but tidy actually does.
22610 # Templates in Wikipedia rely on this behavior, as tidy has always been
22611 # enabled there. These tests are normally run *without* tidy, so specify the
22612 # full output here.
22613 # To test realistic parsing behavior, apply a tidy-like transformation to both
22614 # the expected output and your parser's output.
22616 T2529: Uncovered bullet leaving empty list, normally removed by tidy
22618 ******* Foo {{bullet}}
22620 <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>
22626 T2529: Uncovered table already at line-start
22649 T2529: Uncovered bullet in parser function result
22651 * Foo {{lc:{{bullet}} }}
22659 T7678: Double-parsed template argument
22661 {{lc:{{{1}}}|hello}}
22668 T7678: Double-parsed template invocation
22670 {{lc:{{paramtest {{!}} param = hello }} }}
22672 <p>{{paramtest | param = hello }}
22677 Case insensitivity of parser functions for non-ASCII characters (T10143)
22680 title=[[Main Page]]
22682 {{PRVNÍVELKÉ:ěščř}}
22683 {{prvnívelké:ěščř}}
22703 Morwen/13: Unclosed link followed by heading
22710 <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>
22715 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
22722 <h1><span class="mw-headline" id="heading">heading</span></h1>
22727 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
22734 <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>
22749 Paragraphs inside divs (no extra line breaks)
22761 Paragraphs inside divs (extra line break on open)
22776 Paragraphs inside divs (extra line break on close)
22791 Paragraphs inside divs (extra line break on open and close)
22808 Nesting tags, paragraphs on lines which begin with <div>
22810 <div></div><strong>A
22813 <p><strong>A</strong></p>
22814 <p><strong>B</strong></p>
22822 # T8200: <blockquote> should behave like <div> with respect to line breaks
22824 T8200: paragraphs inside blockquotes (no extra line breaks)
22826 <blockquote>Line one
22828 Line two</blockquote>
22830 <blockquote>Line one
22831 Line two</blockquote>
22835 <p>Line one Line two</p>
22840 T8200: paragraphs inside blockquotes (extra line break on open)
22845 Line two</blockquote>
22850 Line two</blockquote>
22855 Line two</blockquote>
22859 T8200: paragraphs inside blockquotes (extra line break on close)
22861 <blockquote>Line one
22866 <blockquote>Line one
22879 T8200: paragraphs inside blockquotes (extra line break on open and close)
22901 Paragraphs inside blockquotes/divs (no extra line breaks)
22903 <blockquote><div>Line one
22905 Line two</div></blockquote>
22907 <blockquote><div>Line one
22908 Line two</div></blockquote>
22913 Paragraphs inside blockquotes/divs (extra line break on open)
22918 Line two</div></blockquote>
22923 Line two</div></blockquote>
22928 Paragraphs inside blockquotes/divs (extra line break on close)
22930 <blockquote><div>Line one
22933 </div></blockquote>
22935 <blockquote><div>Line one
22938 </div></blockquote>
22943 Paragraphs inside blockquotes/divs (extra line break on open and close)
22949 </div></blockquote>
22955 </div></blockquote>
22960 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
22962 wgLinkHolderBatchSize=0
22968 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
22969 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
22970 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
22975 Free external link invading image caption
22977 [[Image:Foobar.jpg|thumb|http://x|hello]]
22979 <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>
22984 T17196: localised external link numbers
22988 [http://en.wikipedia.org/]
22990 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
22993 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
22997 Multibyte character in padleft
22999 {{padleft:-Hello|7|Æ}}
23006 Multibyte character in padright
23008 {{padright:Hello-|7|Æ}}
23015 formatdate parser function
23017 {{#formatdate:2009-03-24}}
23019 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23024 formatdate parser function, with default format
23026 {{#formatdate:2009-03-24|mdy}}
23028 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23033 Spacing of numbers in formatted dates
23035 {{#formatdate:January 15}}
23037 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23042 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
23044 language=nl title=[[MediaWiki:Common.css]]
23046 {{#formatdate:2009-03-24|dmy}}
23048 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23061 Edit comment with link
23065 I like the [[Main Page]] a lot
23067 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23071 Edit comment with link and link text
23075 I like the [[Main Page|best pages]] a lot
23077 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23081 Edit comment with link and link text with suffix
23085 I like the [[Main Page|best page]]s a lot
23087 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23091 Edit comment with section link (non-local, eg in history list)
23093 comment title=[[Main Page]]
23095 /* External links */ removed bogus entries
23097 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23101 Edit comment with section link and text before it (non-local, eg in history list)
23103 comment title=[[Main Page]]
23105 pre-comment text /* External links */ removed bogus entries
23107 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>
23111 Edit comment with section link (local, eg in diff view)
23113 comment local title=[[Main Page]]
23115 /* External links */ removed bogus entries
23117 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23121 Edit comment with subpage link (T16080)
23125 title=[[Subpage test]]
23127 Poked at a [[/subpage]] here...
23129 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23133 Edit comment with subpage link and link text (T16080)
23137 title=[[Subpage test]]
23139 Poked at a [[/subpage|neat little page]] here...
23141 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23145 Edit comment with bogus subpage link in non-subpage NS (T16080)
23148 title=[[Subpage test]]
23150 Poked at a [[/subpage]] here...
23152 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23156 Edit comment with bare anchor link (local, as on diff)
23160 title=[[Main Page]]
23164 <a href="#section">#section</a>
23168 Edit comment with bare anchor link (non-local, as on history)
23171 title=[[Main Page]]
23175 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23179 Anchor starting with underscore
23185 <p><a href="#_ref">One</a>
23188 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23192 Id starting with underscore
23194 <div id="_ref"></div>
23196 <div id="_ref"></div>
23201 Edit comment with link with more than one pipe (T99346)
23205 [[Main Page|Many|pipes]]
23207 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23211 Complex edit comment with link with more than one pipe (T99346)
23215 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23217 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..."
23221 Space normalisation on autocomment (T24784)
23224 title=[[Main Page]]
23226 /* __hello__world__ */
23228 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23232 percent-encoding and + signs in comments (T28410)
23236 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23238 <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>
23241 # Parsoid doesn't support this yet: see T75581
23242 # but it *should* omit the 'src' attribute if the image is bad.
23243 # PHP side of tests was disabled in
23244 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23245 # because of issues in the PHP parserTests infrastructure
23246 # (but the output below is indeed what the PHP side emits)
23248 Bad images - basic functionality
23251 !! DISABLED/html/php
23253 <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>
23257 Bad images - T18039: text after bad image disappears
23262 !! DISABLED/html/php
23268 <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>
23273 Verify that displaytitle works (T24501) no displaytitle
23277 wgAllowDisplayTitle=true
23278 wgRestrictDisplayTitle=false
23280 this is not the the title
23283 <p>this is not the the title
23288 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23293 wgAllowDisplayTitle=true
23294 wgRestrictDisplayTitle=false
23296 this is not the the title
23297 {{DISPLAYTITLE:whatever}}
23300 <p>this is not the the title
23305 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23310 wgAllowDisplayTitle=true
23311 wgRestrictDisplayTitle=true
23313 this is not the the title
23314 {{DISPLAYTITLE:whatever}}
23317 <p>this is not the the title
23322 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23327 wgAllowDisplayTitle=true
23328 wgRestrictDisplayTitle=true
23330 this is not the the title
23331 {{DISPLAYTITLE:screen}}
23334 <p>this is not the the title
23339 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23344 wgAllowDisplayTitle=false
23346 this is not the the title
23347 {{DISPLAYTITLE:screen}}
23350 <p>this is not the the title
23351 <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>
23356 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23361 wgAllowDisplayTitle=false
23363 this is not the the title
23366 <p>this is not the the title
23371 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23376 wgAllowDisplayTitle=true
23377 wgRestrictDisplayTitle=true
23379 this is not the the title
23380 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23382 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23383 <p>this is not the the title
23388 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23393 wgAllowDisplayTitle=true
23394 wgRestrictDisplayTitle=true
23396 this is not the the title
23397 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23399 <span style="color: red;">s</span>creen
23400 <p>this is not the the title
23405 Page status indicators: Empty name is invalid
23409 <indicator name=" "></indicator>
23410 <indicator></indicator>
23412 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23413 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23418 Page status indicators: Weird syntaxes that are okay
23422 <indicator name="empty" />
23423 <indicator name="name"></indicator>
23432 Page status indicators: Torture test
23436 <indicator name="01">hello world</indicator>
23437 <indicator name="02">[[Main Page]]</indicator>
23438 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23439 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23440 <indicator name="05">* foo
23442 <indicator name="06"><nowiki>foo</nowiki></indicator>
23443 <indicator name="07"> Preformatted</indicator>
23444 <indicator name="08"><div>Broken tag</indicator>
23445 <indicator name="09">{| class=wikitable
23448 <indicator name="10">Two
23450 paragraphs</indicator>
23453 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23454 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" />
23455 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>
23456 05=<ul><li> foo</li>
23460 07=<pre>Preformatted
23462 08=<div>Broken tag</div>
23464 09=<table class="wikitable">
23481 preload: check <noinclude> and <includeonly>
23485 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
23491 preload: check <onlyinclude>
23495 Goodbye <onlyinclude>Hello world</onlyinclude>
23501 preload: can pass tags through if we want to
23505 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
23507 <includeonly>Hello world</includeonly>
23511 preload: check that it doesn't try to do tricks
23515 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23517 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23521 Play a bit with r67090 and T5158
23523 <div style="width:50% !important"> </div>
23524 <div style="width:50% !important"> </div>
23525 <div style="width:50% !important"> </div>
23526 <div style="border : solid;"> </div>
23528 <div style="width:50% !important"> </div>
23529 <div style="width:50% !important"> </div>
23530 <div style="width:50% !important"> </div>
23531 <div style="border : solid;"> </div>
23534 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23535 <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>
23536 <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>
23537 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23542 HTML5 data attributes
23544 <span data-foo="bar">Baz</span>
23545 <p data-abc-def_hij="">Quuz</p>
23547 <p><span data-foo="bar">Baz</span>
23549 <p data-abc-def_hij="">Quuz</p>
23552 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
23553 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
23557 Strip reserved data attributes
23559 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
23561 <div data-ok="fred">d</div>
23564 <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>
23568 percent-encoding and + signs in internal links (T28410)
23570 [[User:+%]] [[Page+title%]]
23571 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
23572 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
23573 [[%33%45]] [[%33%45+]]
23575 <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>
23576 <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>
23577 <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>
23578 <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>
23581 <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>
23582 <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>
23583 <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>
23584 <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>
23588 Special characters in embedded file links (T29679)
23590 [[File:Contains & ampersand.jpg]]
23591 [[File:Does not exist.jpg|Title with & ampersand]]
23593 <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>
23594 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
23597 <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>
23598 <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>
23602 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
23604 Text's been normalized?
23606 <p>Text's been normalized?
23611 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
23613 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
23615 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
23620 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
23622 [http://www.example.org/ ideograms]
23624 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
23629 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
23631 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
23633 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
23657 T33098 Template which includes system messages which includes the template
23661 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
23662 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
23667 T33490 Turkish: ucfirst 'blah'
23678 T33490 Turkish: ucfirst 'ix'
23689 T33490 Turkish: lcfirst 'BLAH'
23700 T33490 Turkish: ucfırst (with a dotless i)
23706 <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>
23711 T33490 ucfırst (with a dotless i) with English language
23717 <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>
23721 # Note that Parsoid doesn't emit an explicit TOC.
23722 # Note also that the html2wt direction tends to emit an extra newline
23723 # between the __TOC__ magicword and the first heading unless *both*
23724 # the <meta> and the <h2> have a data-parsoid attribute set (even if
23728 T28375: TOC with italics
23730 title=[[Main Page]]
23733 == ''Lost'' episodes ==
23735 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23737 <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>
23741 <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>
23744 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23745 <h2 data-parsoid='{}'> <i>Lost</i> episodes </h2>
23749 T28375: TOC with bold
23751 title=[[Main Page]]
23754 == '''should be bold''' then normal text ==
23756 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23758 <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>
23762 <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>
23765 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23766 <h2 data-parsoid='{}'> <b>should be bold</b> then normal text </h2>
23770 T35845: Headings become cursive in TOC when they contain an image
23772 title=[[Main Page]]
23775 == Image [[Image:foobar.jpg]] ==
23777 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23779 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
23783 <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>
23786 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23787 <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>
23791 T35845 (2): Headings become bold in TOC when they contain a blockquote
23793 title=[[Main Page]]
23796 == <blockquote>Quote</blockquote> ==
23798 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23800 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
23804 <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>
23808 <div id="toc" class="toc">
23809 <div class="toctitle">
23813 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
23817 <h2><span class="mw-headline" id="Quote"></span></h2>
23819 <p><span class="mw-headline" id="Quote">Quote</span></p>
23821 <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>
23823 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23824 <h2 data-parsoid='{}'> <blockquote>Quote</blockquote> </h2>
23828 Unclosed tags in TOC
23830 title=[[Main Page]]
23834 <small>Hanc marginis exiguitas non caperet.</small>
23837 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23839 <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>
23843 <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>
23844 <p><small>Hanc marginis exiguitas non caperet.</small>
23848 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23849 <h2 data-parsoid='{}'> Proof: 2 < 3 </h2>
23850 <p><small>Hanc marginis exiguitas non caperet.</small>
23855 Multiple tags in TOC
23858 == <i>Foo</i> <b>Bar</b> ==
23860 == <i>Foo</i> <blockquote>Bar</blockquote> ==
23862 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23864 <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>
23865 <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>
23869 <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>
23870 <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>
23874 <div id="toc" class="toc">
23875 <div class="toctitle">
23879 <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>
23880 <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>
23884 <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>
23885 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
23887 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
23889 <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>
23891 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23892 <h2 data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b> </h2>
23893 <h2> <i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote> </h2>
23896 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
23897 # html5 tag parsing.
23899 Tags with parameters in TOC
23904 == <sup class="in-h2">Hello</sup> ==
23906 == <sup class="a > b">Evilbye</sup> ==
23908 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23910 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
23911 <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>
23915 <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>
23916 <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>
23919 <meta property="mw:PageProp/toc" />
23920 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
23922 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
23926 span tags with directionality in TOC
23929 == <span dir="ltr">C++</span> ==
23931 == <span dir="rtl">זבנג!</span> ==
23933 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
23935 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
23937 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
23939 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23941 <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>
23942 <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>
23943 <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>
23944 <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>
23945 <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>
23949 <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>
23950 <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>
23951 <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>
23952 <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>
23953 <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>
23956 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23957 <h2 data-parsoid='{}'> <span dir="ltr">C++</span> </h2>
23958 <h2> <span dir="rtl">זבנג!</span> </h2>
23959 <h2> <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> </h2>
23960 <h2> <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> </h2>
23961 <h2> <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> </h2>
23965 T74884: bdi element in ToC
23968 == <bdi>test</bdi> ==
23970 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23972 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
23976 <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>
23979 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23980 <h2 data-parsoid='{}'> <bdi>test</bdi> </h2>
23984 T35715: s/strike element in ToC
23987 == <s>test</s> test <strike>test</strike> ==
23989 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23991 <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>
23995 <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>
23998 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23999 <h2 data-parsoid='{}'> <s>test</s> test <strike>test</strike> </h2>
24002 # Note that the html output does not have the <p></p>, but the
24003 # html+tidy output *does*. This is because the empty <p></p> is
24004 # removed by the sanitizer, but only when tidy is *not* enabled (!).
24006 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24011 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24013 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24017 <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>
24021 <div id="toc" class="toc">
24022 <div class="toctitle">
24026 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24030 <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>
24032 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24033 <h2 data-parsoid='{}'> x </h2>
24039 == {{int:headline_sample}} ==
24043 T34057: Title needed when expanding <h> nodes.
24045 title=[[Main Page]]
24049 <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>
24054 Strip marker in urlencode
24056 {{urlencode:x<nowiki/>y}}
24057 {{urlencode:x<nowiki/>y|wiki}}
24058 {{urlencode:x<nowiki/>y|path}}
24059 {{urlencode:x<pre id="one">two</pre>y}}
24087 Strip marker in formatNum
24089 {{formatnum:1<nowiki/>2}}
24090 {{formatnum:1<nowiki/>2|R}}
24098 Check noCommafy in formatNum
24102 {{formatnum:123456.78}}
24103 {{formatnum:123456.78|NOSEP}}
24111 Wrong option for formatNum (T58199)
24113 {{formatnum:1,234.56|Random}}
24114 {{formatnum:1,234.56|EVERYTHING}}
24115 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24124 Strip marker in grammar
24128 {{grammar:elative|foo<nowiki/>bar}}
24135 Strip marker in padleft
24137 {{padleft:|2|x<nowiki/>y}}
24144 Strip marker in padright
24146 {{padright:|2|x<nowiki/>y}}
24153 Strip marker in anchorencode
24155 {{anchorencode:x<nowiki/>y}}
24162 nowiki inside link inside heading (T20295)
24164 ==[[foo|x<nowiki>y</nowiki>z]]==
24166 <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>
24171 new support for bdi element (T33817)
24173 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24175 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24180 Ignore pipe between table row attributes
24184 |- id=foo | style='color: red'
24192 <tr id="foo" style="color: red">
24199 Language parser function
24208 Padleft and padright as substr
24210 {{padleft:|3|abcde}}
24211 {{padright:|3|abcde}}
24219 Special parser function
24221 {{#special:RandomPage}}
24222 {{#special:BaDtItLe}}
24223 {{#special:Foobar}}
24232 T36939 - Case insensitive link parsing ([HttP://])
24234 [HttP://MediaWiki.Org/]
24236 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24239 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
24243 T36939 - Case insensitive link parsing ([HttP:// title])
24245 [HttP://MediaWiki.Org/ MediaWiki]
24247 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24252 T36939 - Case insensitive link parsing (HttP://)
24254 HttP://MediaWiki.Org/
24256 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24259 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24277 <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>
24278 <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>
24279 <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>
24280 <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>
24281 <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>
24287 ### Parsoid-specific tests
24288 ### Parsoid-PHP parser incompatibilities
24291 1. SOL-sensitive wikitext tokens as template-args
24293 parsoid=wt2html,wt2wt
24299 <span about="#mwt1" typeof="mw:Transclusion">
24300 </span><ul about="#mwt1"><li>a</li>
24302 <span about="#mwt2" typeof="mw:Transclusion">
24303 </span><ol about="#mwt2"><li>a</li>
24305 <span about="#mwt3" typeof="mw:Transclusion">
24306 </span><dl about="#mwt3"><dd>a</dd>
24310 #### -----------------------------------------------------------------
24311 #### Parsoid-specific functionality tests
24312 #### -----------------------------------------------------------------
24314 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24315 # We know wt2wt will fail, but we expect selser to pass.
24316 # Due to the nature of our testing, wt2wt and selser tests will enter the
24317 # blacklist and we'll catch selser regressions based on changes to the
24318 # blacklist entries for selser tests.
24320 1. Bad treebuilder fixup of formatting elt is cleaned up
24322 parsoid=wt2html,wt2wt
24327 [[Image:Foobar.jpg|right|Test]]
24334 <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>
24341 2. Bad treebuilder fixup of formatting elt is cleaned up
24343 parsoid=wt2html,wt2wt
24345 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24347 <small>[[Image:Foobar.jpg|right|300px]]</small>
24351 <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>
24353 <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>
24357 3. Bad treebuilder fixup of formatting elt is cleaned up
24359 parsoid=wt2html,wt2wt
24361 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24363 <p><small><b>foo</b></small></p>
24364 <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>
24365 <p><small><b>bar</b></small></p>
24369 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24371 parsoid=wt2html,wt2wt
24373 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24375 <p><b><small></small></b></p>
24376 <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>
24380 #### ----------------------------------------------------------------
24381 #### Parsoid-only testing of Parsoid's impl of LST
24382 #### Not implemented yet, see
24383 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24384 #### ----------------------------------------------------------------
24386 ## We still need to support serializing the older format while content is stored.
24388 LST Sections: Backwards compatibility
24391 "suppressErrors": true,
24392 "modes": ["html2wt"]
24395 <section begin="2011-05-16" />
24396 <section end="2014-04-10 (MW 1.23wmf22)" />
24398 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24399 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24403 LST Sections: Newfangled approach
24405 <section begin="2011-05-16" />
24406 <section end="2014-04-10 (MW 1.23wmf22)" />
24408 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24410 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24414 #--------- Test stripping of empty nodes in template content ----------
24417 Empty LI and TR nodes should be stripped from template content
24422 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24426 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24439 Empty LI and TR nodes should not be stripped from top-level content
24452 <li class='mw-empty-elt'></li>
24457 <tr class='mw-empty-elt'></tr>
24466 Empty TR nodes should not be stripped if they have any attributes set
24468 {{EmptyTRWithHTMLAttrTest}}
24470 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
24471 <tr align='center'></tr>
24472 <tr><td>foo</td></tr>
24473 <tr align='center'></tr>
24474 <tr><td>bar</td></tr>
24478 #### ----------------------------------------------------------------
24479 #### The following section of tests are primarily to test
24480 #### wikitext escaping capabilities of Parsoid. Given that
24481 #### escaping can be done any number of ways, the wikitext (input)
24482 #### is always adjusted to reflect how Parsoid adds nowiki
24485 #### We are marking several tests as parsoid-only since the
24486 #### HTML in the result section is different from what the
24487 #### PHP parser generates for it.
24488 #### ----------------------------------------------------------------
24491 #### --------------- Headings ---------------
24493 #### 1. Nested inside html <h1>=foo=</h1>
24494 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
24495 #### 3. Nested inside html with wikitext split by html tags
24496 #### 4. No escape needed
24497 #### 5. Empty headings <h1></h1>
24498 #### 6. Heading chars in SOL context
24499 #### ----------------------------------------
24501 Headings: 0. Unnested
24511 <p>=foo<i>a</i>=</p>
24513 <nowiki>=foo=</nowiki>
24515 <nowiki> </nowiki>=foo=
24517 <nowiki>=foo=</nowiki>
24519 =foo''a''<nowiki>=</nowiki>
24522 # New headings and existing headings are handled differently
24524 Headings: 1. Nested inside html
24532 <h1 data-parsoid=''>=foo=</h1>
24533 <h2 data-parsoid=''>=foo=</h2>
24534 <h3 data-parsoid=''>=foo=</h3>
24535 <h4 data-parsoid=''>=foo=</h4>
24536 <h5 data-parsoid=''>=foo=</h5>
24537 <h6 data-parsoid=''>=foo=</h6>
24545 =<nowiki>=foo=</nowiki>=
24546 ==<nowiki>=foo=</nowiki>==
24547 ===<nowiki>=foo=</nowiki>===
24548 ====<nowiki>=foo=</nowiki>====
24549 =====<nowiki>=foo=</nowiki>=====
24550 ======<nowiki>=foo=</nowiki>======
24555 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
24564 <nowiki>*</nowiki>bar
24570 <nowiki>=bar=</nowiki>
24574 Headings: 3. Nested inside html with wikitext split by html tags
24578 <h1>=<b>bold</b>foo=</h1>
24580 = ='''bold'''foo= =
24584 Headings: 4a. No escaping needed (testing just h1 and h2)
24595 <h1><i>=</i>foo=</h1>
24615 Headings: 4b. No escaping needed (inside p-tags)
24630 Headings: 5. Empty headings
24634 <h1 data-parsoid='{}'></h1>
24636 <h2 data-parsoid='{}'></h2>
24638 <h3 data-parsoid='{}'></h3>
24640 <h4 data-parsoid='{}'></h4>
24642 <h5 data-parsoid='{}'></h5>
24644 <h6 data-parsoid='{}'></h6>
24654 =====<nowiki/>=====
24656 ======<nowiki/>======
24660 Headings: 6a. Heading chars in SOL context (with trailing spaces)
24670 <nowiki>=a=</nowiki>
24672 <nowiki>=a=</nowiki>
24674 <nowiki>=a=</nowiki>
24678 Headings: 6b. Heading chars in SOL context (with trailing newlines)
24691 <nowiki>=a=</nowiki>
24694 <nowiki>=a=</nowiki>
24697 <nowiki>=a=</nowiki>
24702 Headings: 6c. Heading chars in SOL context (leading newline break)
24710 <nowiki>=b=</nowiki>
24714 Headings: 6d. Heading chars in SOL context (with interspersed comments)
24718 <!--c0--><p>=a=</p>
24720 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
24722 <!--c0--><nowiki>=a=</nowiki>
24724 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
24728 Headings: 6d. Heading chars in SOL context (No escaping needed)
24738 Headings: 7. Insert a newline between new content and headings
24744 <h2 data-parsoid='{}'>A</h2>
24745 <p data-parsoid='{}'>a</p>
24755 #### --------------- Lists ---------------
24756 #### 0. Outside nests (*foo, etc.)
24757 #### 1. Nested inside html <ul><li>*foo</li></ul>
24758 #### 2. Inside definition lists
24759 #### 3. Only bullets at start should be escaped
24760 #### 4. No escapes needed
24761 #### 5. No unnecessary escapes
24762 #### 6. Escape bullets in SOL position
24763 #### 7. Escape bullets in a multi-line context
24764 #### ----------------------------------------
24767 Lists: 0. Outside nests
24777 <nowiki>*</nowiki>foo
24779 <nowiki>#</nowiki>foo
24781 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
24784 ## Making these next 3 tests Parsoid-only since they are html2wt tests
24785 ## to test wikitext escaping, and insignificant whitespace diffs
24786 ## cause PHP parser tests to barf
24788 Lists: 1. Nested inside html (No unnecessary escapes)
24797 <li data-parsoid='{}'>*foo</li>
24798 <li data-parsoid='{}'>#foo</li>
24799 <li data-parsoid='{}'>:foo</li>
24800 <li data-parsoid='{}'>;foo</li>
24808 <li data-parsoid='{}'>*foo</li>
24809 <li data-parsoid='{}'>#foo</li>
24810 <li data-parsoid='{}'>:foo</li>
24811 <li data-parsoid='{}'>;foo</li>
24818 *<nowiki>*foo</nowiki>
24819 *<nowiki>#foo</nowiki>
24820 *<nowiki>:foo</nowiki>
24821 *<nowiki>;foo</nowiki>
24827 #<nowiki>*foo</nowiki>
24828 #<nowiki>#foo</nowiki>
24829 #<nowiki>:foo</nowiki>
24830 #<nowiki>;foo</nowiki>
24834 Lists: 2. Inside definition lists
24838 <dl><dt>;foo</dt></dl>
24839 <dl><dt>:foo</dt></dl>
24842 <dl><dd>:foo</dd></dl>
24846 ; <nowiki>:foo</nowiki>
24848 ; <nowiki>:foo</nowiki>
24855 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
24861 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
24865 *<nowiki>*foo</nowiki>''it''*bar
24869 Lists: 4. No escapes needed
24882 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
24886 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
24900 Lists: 5. No unnecessary escapes
24904 <ul><li> bar <span>[[foo]]</span></li></ul>
24905 <ul><li> =bar <span>[[foo]]</span></li></ul>
24906 <ul><li> [[bar <span>[[foo]]</span></li></ul>
24907 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
24908 <ul><li> =bar <span>foo]]</span>=</li></ul>
24909 <ul><li> <s></s>: a</li></ul>
24910 <ul><li> <i>* foo</i></li></ul>
24913 * bar <span><nowiki>[[foo]]</nowiki></span>
24915 * =bar <span><nowiki>[[foo]]</nowiki></span>
24917 * [[bar <span><nowiki>[[foo]]</nowiki></span>
24919 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
24921 * =bar <span>foo]]</span>=
24929 Lists: 6. Escape bullets in SOL position
24933 <p><!--cmt-->*foo</p>
24935 <!--cmt--><nowiki>*</nowiki>foo
24939 Lists: 7. Escape bullets in a multi-line context
24948 <nowiki>*</nowiki>b
24952 Lists: 8. Escape colons only if not present in tags
24956 <dl><dt>a:b<i>c:d</i></dt></dl>
24958 ; <nowiki>a:b</nowiki>''c:d''
24961 #### --------------- HRs ---------------
24962 #### 1. Single line
24963 #### -----------------------------------
24966 HRs: 1. Single line
24974 ----<nowiki>----</nowiki>
24979 #### --------------- Tables ---------------
24980 #### 1a. Simple example
24981 #### 1b. No escaping needed (!foo)
24982 #### 1c. No escaping needed (|foo)
24983 #### 1d. No escaping needed (|}foo)
24985 #### 2a. Nested in td (<td>foo|bar</td>)
24986 #### 2b. Nested in td (<td>foo||bar</td>)
24987 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
24989 #### 3a. Nested in th (<th>foo!bar</th>)
24990 #### 3b. Nested in th (<th>foo!!bar</th>)
24991 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
24995 #### 4c. No escaping needed
24996 #### --------------------------------------
24999 Tables: 1a. Simple example
25007 <nowiki>{|</nowiki>
25012 Tables: 1b. No escaping needed
25023 Tables: 1c. No escaping needed
25034 Tables: 1d. No escaping needed
25045 Tables: 2a. Nested in td
25050 <td>foo|bar</td></tr>
25051 <tr><td>x<div>a|b</div></td>
25055 |<nowiki>foo|bar</nowiki>
25057 |x<div><nowiki>a|b</nowiki></div>
25073 Tables: 2b. Nested in td
25079 <td>a<i>b||c</i></td>
25080 <td>a<i><div>b||c</div></i></td>
25081 </tr></tbody></table>
25084 |<nowiki>foo||bar</nowiki>
25085 |a''<nowiki>b||c</nowiki>''
25086 |a''<div><nowiki>b||c</nowiki></div>''
25095 <td>a<i><div>b||c</div></i>
25101 Tables: 2c. Nested in td -- no escaping needed
25117 Tables: 3a. Nested in th
25133 Tables: 3b. Nested in th
25138 <tr><th>foo!!bar</th>
25139 <th><i>foo|bar</i></th>
25140 <th><i>foo!!bar</i></th>
25141 <th><i><span>foo!!bar</span></i></th>
25142 </tr></tbody></table>
25145 !<nowiki>foo!!bar</nowiki>
25146 !''<nowiki>foo|bar</nowiki>''
25147 !''<nowiki>foo!!bar</nowiki>''
25148 !''<span><nowiki>foo!!bar</nowiki></span>''
25157 <th><i>foo!!bar</i>
25159 <th><i><span>foo!!bar</span></i>
25165 Tables: 3c. Nested in th
25170 <tr><th>foo||bar</th>
25171 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25172 </tr></tbody></table>
25175 !<nowiki>foo||bar</nowiki>
25176 !<nowiki>foo||bar</nowiki>
25189 Tables: 4a. Escape -
25205 |<nowiki>-bar</nowiki>
25210 Tables: 4b. Escape +
25226 |<nowiki>+bar</nowiki>
25231 Tables: 4c. No escaping needed
25236 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25237 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25243 <div>a|b</div></td>
25288 Tables: 4d. No escaping needed
25293 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25294 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25295 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25306 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25316 T97430: Don't emit empty nowiki pairs around marker meta tags
25320 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25321 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25323 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25324 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25328 Unclosed xmlish element in table line shouldn't eat end delimiters
25333 <tbody><tr><td> <foo</td>
25334 <td> bar></td></tr>
25351 #### --------------- Links ----------------
25352 #### 1. Quote marks in link text
25353 #### 2. Wikilinks: Escapes needed
25354 #### 3. Wikilinks: No escapes needed
25355 #### 4. Extlinks: Escapes needed
25356 #### 5. Extlinks: No escapes needed
25357 #### --------------------------------------
25359 Links 1. WikiLinks: No escapes needed
25363 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
25364 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
25365 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
25369 [[Foo|x [Foobar] x]]
25371 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
25372 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
25373 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
25378 Links 2. WikiLinks: Escapes needed
25382 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
25383 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
25384 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
25385 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
25386 <a href="Foo" rel="mw:WikiLink">|Bar</a>
25387 <a href="Foo" rel="mw:WikiLink">]]bar</a>
25388 <a href="Foo" rel="mw:WikiLink">[[bar</a>
25389 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
25390 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
25391 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
25393 [[Foo|<nowiki>Foobar]</nowiki>]]
25394 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
25395 [[Foo|<nowiki>[[Bar]]</nowiki>]]
25396 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
25397 [[Foo|<nowiki>|Bar</nowiki>]]
25398 [[Foo|<nowiki>]]bar</nowiki>]]
25399 [[Foo|<nowiki>[[bar</nowiki>]]
25400 [[Foo|<nowiki>x [[ y</nowiki>]]
25401 [[Foo|<nowiki>x ]] y</nowiki>]]
25402 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
25404 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
25405 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
25406 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
25407 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
25408 <a href="/wiki/Foo" title="Foo">|Bar</a>
25409 <a href="/wiki/Foo" title="Foo">]]bar</a>
25410 <a href="/wiki/Foo" title="Foo">[[bar</a>
25411 <a href="/wiki/Foo" title="Foo">x [[ y</a>
25412 <a href="/wiki/Foo" title="Foo">x ]] y</a>
25413 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
25418 Links 3. WikiLinks: No escapes needed
25422 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
25423 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
25428 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
25429 <a href="/wiki/Foo" title="Foo">foo|bar</a>
25434 Links 4. ExtLinks: Escapes needed
25438 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
25439 <a rel="mw:ExtLink" href="http://google.com">google]</a>
25440 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
25441 <p>[http://google.com]</p>
25442 <p>[http://google.com google]</p>
25443 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
25444 <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>
25446 [http://google.com <nowiki>[google]</nowiki>]
25447 [http://google.com <nowiki>google]</nowiki>]
25448 [http://google.com <nowiki>goog] le</nowiki>]
25450 <nowiki>[http://google.com]</nowiki>
25452 <nowiki>[http://google.com google]</nowiki>
25454 [http://google.com<nowiki>]</nowiki>
25456 [{{echo|http://google.com}}<nowiki>]</nowiki>
25458 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
25459 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
25460 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
25461 </p><p>[http://google.com]
25462 </p><p>[http://google.com google]
25463 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25464 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25469 Links 5. ExtLinks: No escapes needed
25473 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
25474 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
25476 [http://google.com [google]
25478 [[http://google.com]]
25480 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
25481 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
25486 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
25490 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
25491 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
25492 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
25493 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
25494 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
25495 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
25496 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25497 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
25498 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25499 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
25500 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
25501 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
25502 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
25505 x<nowiki/>http://example.com<nowiki/>y
25506 http://example.com<nowiki/>?x
25507 http://example.com<nowiki/>&x
25508 http://example.com<nowiki/>'x
25509 http://example.com<nowiki/>,x
25510 http://example.com<nowiki/>.x
25511 http://example.com<nowiki/>;x
25512 http://example.com<nowiki/>:x
25513 http://example.com<nowiki/>;x
25514 http://example.com<nowiki/>!x
25515 http://example.com<nowiki/>=x
25516 http://example.com<nowiki/>(x)
25517 http://example.com(x<nowiki/>)
25521 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25526 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
25528 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
25529 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
25530 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
25531 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
25532 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
25538 "http://example.com"
25539 (http://example.com)
25540 (http://example.com) foo
25541 http://example.com,
25542 http://example.com, foo
25545 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
25547 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
25548 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
25549 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
25550 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
25551 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
25556 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25560 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
25561 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
25563 http://example.com.,;:!?\
25564 -http://example.com:
25566 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
25567 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
25572 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
25576 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
25577 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
25578 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
25582 X<nowiki/>RFC 123<nowiki/>y
25586 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
25590 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
25591 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
25592 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
25599 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
25600 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
25601 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
25606 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
25610 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
25611 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
25612 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
25616 X<nowiki/>PMID 123<nowiki/>y
25620 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
25624 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
25625 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
25626 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
25633 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
25634 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
25635 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
25640 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
25644 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
25645 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
25646 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
25649 ISBN 1234567890<nowiki/>1
25650 ISBN 1234567890<nowiki/>x
25651 a<nowiki/>ISBN 1234567890<nowiki/>b
25655 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
25659 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
25663 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
25668 Links 14. Protect link-like plain text. (Parsoid bug T78425)
25672 <p>this is not a link: http://example.com
25675 this is not a link: <nowiki>http://example.com</nowiki>
25679 Links 15. Link trails can't become link prefixes.
25684 <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>
25686 [[Söfnuður]]-[[00]]
25688 <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>
25692 #### --------------- Quotes ---------------
25693 #### 1. Quotes inside <b> and <i>
25694 #### 2. Link fragments separated by <i> and <b> tags
25695 #### 3. Link fragments inside <i> and <b>
25696 #### 4. No escaping needed
25697 #### --------------------------------------
25699 1a. Quotes inside <b> and <i>
25710 <b>foo'<i>bar'</i>baz</b>
25719 <i>fools'<span> errand</span></i>
25720 <i><span>fool</span>'s errand</i>
25721 '<i>foo</i> bar '<i>baz</i>
25722 a|!*#-:;+-~[]{}b'<i>x</i>
25726 ''<nowiki>''foo''</nowiki>''
25727 ''<nowiki>'''foo'''</nowiki>''
25729 '''<nowiki/>'foo''''
25730 '''<nowiki>''foo''</nowiki>'''
25731 '''<nowiki>'''foo'''</nowiki>'''
25732 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
25733 '''foo'''<nowiki/>'s
25739 '''foo'''<nowiki/>'
25740 ''''foo'''<nowiki/>'
25741 ''fools'<span> errand</span>''
25742 ''<span>fool</span>'s errand''
25743 '<nowiki/>''foo'' bar '''baz''
25744 a|!*#-:;+-~[]{}b'''x''
25748 1b. Quotes inside <b> and <i> with other tags on same line
25752 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
25753 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
25754 <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>
25755 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
25756 '<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>
25757 '<i>foo</i> <div title="name">test</div>
25758 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
25759 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
25760 <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>
25763 '''a'' foo ''[[bar]]''
25764 ''a''' foo ''[[bar]]''
25765 ''a''' foo '''{{echo|[[bar]]}}'''
25766 [[foo]] x'''[[bar]]''
25767 '''foo'' <ref>test</ref>
25768 '''foo'' <div title="name">test</div>
25769 '''foo'' and <br> bar
25774 2. Link fragments separated by <i> and <b> tags
25778 <p>[[<i>foo</i>hello]]</p>
25779 <p>[[<b>foo</b>hello]]</p>
25781 [[''foo''<nowiki>hello]]</nowiki>
25783 [['''foo'''<nowiki>hello]]</nowiki>
25786 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
25787 # this is one of the shortcomings of this format
25789 3. Link fragments inside <i> and <b>
25793 <p><i>[[foo</i>]]</p>
25794 <p><b>[[foo</b>]]</p>
25796 ''[[foo''<nowiki>]]</nowiki>
25798 '''[[foo'''<nowiki>]]</nowiki>
25802 4. No escaping needed
25806 <p>'<span><i>bar</i></span>'
25807 '<span><b>bar</b></span>'
25811 '<span>''bar''</span>'
25812 '<span>'''bar'''</span>'
25816 #### ----------- Paragraphs ---------------
25817 #### 1. No unnecessary escapes
25818 #### --------------------------------------
25821 1. No unnecessary escapes
25825 <p>bar <span>[[foo]]</span>
25826 </p><p>=bar <span>[[foo]]</span>
25827 </p><p>[[bar <span>[[foo]]</span>
25828 </p><p>]]bar <span>[[foo]]</span>
25829 </p><p>=bar <span>foo]]</span>=
25832 bar <span><nowiki>[[foo]]</nowiki></span>
25834 =bar <span><nowiki>[[foo]]</nowiki></span>
25836 [[bar <span><nowiki>[[foo]]</nowiki></span>
25838 ]]bar <span><nowiki>[[foo]]</nowiki></span>
25840 =bar <span>foo]]</span><nowiki>=</nowiki>
25843 #### ----------------------- PRE --------------------------
25844 #### 1. Leading whitespace in SOL context should be escaped
25845 #### ------------------------------------------------------
25847 1. Leading whitespace in SOL context should be escaped
25870 <nowiki> </nowiki>a
25872 <nowiki> </nowiki> a
25876 <nowiki> </nowiki> a
25878 <nowiki> </nowiki>a
25881 <nowiki> </nowiki>b
25904 2. Leading whitespace in non-indent-pre contexts should not be escaped
25908 <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>
25909 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
25910 <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>
25920 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
25939 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
25943 <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>
25945 [[File:Foobar.jpg|thumb|caption]]
25949 5. Nowiki escaping should account for indent-pres
25959 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
25972 #### --------------- Behavior Switches --------------------
25975 1. Valid behavior switches should be escaped
25982 <nowiki>__TOC__</nowiki>
25983 ''<nowiki>__TOC__</nowiki>''
25987 2. Invalid behavior switches should not be escaped
25998 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26000 Behavior switches should be SOL-transparent
26004 <meta property="mw:PageProp/toc" />
26006 <!-- this one's bogus -->
26009 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26011 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26015 <!-- this one's bogus -->
26024 #### --------------- HTML tags ---------------
26027 #### 3. multi-line html tag
26028 #### 4. extension tags
26029 #### -----------------------------------------
26035 <a href="http://google.com">google</a>
26037 <a href="http://google.com">google</a>
26045 <ul><li> <div>foo</div></li>
26046 <li> <div style="color:red">foo</div></li>
26047 <li> <td></li></ul>
26050 * <nowiki><div>foo</div></nowiki>
26051 * <nowiki><div style="color:red">foo</div></nowiki>
26052 * <nowiki><td></nowiki>
26056 3. multi-line html tag
26075 <p><ref>foo</ref>
26076 </p><p><ref>bar
26077 </p><p>baz</ref>
26080 <nowiki><ref>foo</ref></nowiki>
26082 <nowiki><ref>bar</nowiki>
26084 baz<nowiki></ref></nowiki>
26087 #### --------------- Others ---------------
26093 <p><nowiki>foo</nowiki>
26096 <nowiki>foo</nowiki>
26099 ## The quote-char in the input is necessary for triggering the bug
26101 (T54035) Nowiki-escaping should not get tripped by " :" in text
26110 #----------- End of wikitext escaping tests --------------
26114 Tag-like HTML structures are passed through as text
26136 </p><p>1<d e>f
26141 HTML tag with necessary entities in attributes
26143 <span title="&amp;">foo</span>
26145 <p><span title="&amp;">foo</span>
26150 HTML tag with 'unnecessary' entity encoding in attributes
26152 <span title="&">foo</span>
26154 <p><span title="&">foo</span>
26159 HTML tag with broken attribute value quoting
26161 parsoid=wt2html,html2html
26163 <span title="Hello world>Foo</span>
26165 <p><span title="Hello world">Foo</span>
26168 <p><span title="Hello world">Foo</span></p>
26172 Self-closed tag with broken attribute value quoting
26174 parsoid=wt2html,html2html
26176 <div title="Hello world />Foo
26178 <div title="Hello world"></div>
26181 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26185 Table with broken attribute value quoting
26187 parsoid=wt2html,html2html
26190 | title="Hello world|Foo
26195 <td title="Hello world">Foo
26201 <td title="Hello world">Foo
26207 Table with broken attribute value quoting on consecutive lines
26209 parsoid=wt2html,html2html
26212 | title="Hello world|Foo
26213 | style="color:red|Bar
26218 <td title="Hello world">Foo
26220 <td style="color:red">Bar
26226 <td title="Hello world">Foo
26227 </td><td style="color: red">Bar
26228 </td></tr></tbody></table>
26233 Accept empty td cell attribute
26236 | align="center" | foo || |
26241 <td align="center"> foo </td>
26248 Non-empty attributes in th-cells
26251 ! Foo !! style="color: red" | Bar
26257 <th style="color: red"> Bar
26263 Accept empty attributes in th-cells
26278 Empty table rows go away
26299 ### Parsoid-centric tests for testing RTing of inter-element separators
26300 ### Edge cases not tested by existing parser tests and specific to
26301 ### Parsoid-specific serialization strategies.
26305 RT-ed inter-element separators should be valid separators
26317 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
26321 # Parsoid-only since PHP parser relies on Tidy for correct output
26323 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
26337 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
26338 <p>bar</p></small></td></tr>
26342 <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>
26346 # Note that the "style" attribute is really a template parameter here.
26347 # The = would have to be {{=}} if you wanted the literal.
26349 Empty TD followed by TD with tpl-generated attribute
26354 |{{echo|style='color:red'}}|foo
26368 Indented table with an empty td
26386 ## We have some newline diffs RT-ing this edge case
26387 ## and it is not important enough -- we seem to be emitting
26388 ## at most 2 newlines after a </tr> and this is unrelated to
26389 ## the issue from T85627 that this is testing.
26391 Indented table with blank lines in between (T85627)
26410 Indented block & table
26424 <div data-parsoid='{"stx":"html"}'>foo</div>
26426 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
26431 Indent and comment before table row
26446 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
26447 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
26451 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
26453 Empty TR followed by a template-generated TR
26459 {{echo|<tr><td>foo</td></tr>}}
26464 <tr class='mw-empty-elt'></tr>
26465 <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}}]}'>
26470 ## PHP and parsoid output differ for this, and since this is primarily
26471 ## for testing Parsoid's serializer, marking this Parsoid only
26473 Empty TR followed by mixed-ws-comment line should RT correctly
26486 <tr class='mw-empty-elt'></tr>
26489 <!--c--> </tr><!--d-->
26495 Multi-line image caption generated by templates with/without trailing newlines
26497 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
26498 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
26500 <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>
26501 <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>
26505 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
26509 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
26511 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
26513 <includeonly>foo</includeonly>
26521 ## PHP emits broken html for this, and since this is primarily
26522 ## a Parsoid serializer test, marking this Parsoid only
26524 Improperly nested inline or quotes tags with whitespace in between
26526 <span> <s>x</span> </s>
26529 <p><span> <s>x</s></span><s> </s>
26530 <b> <i>x</i></b><i> </i>
26535 Encapsulate protected attributes from wt
26537 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
26539 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
26543 <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>
26545 <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">
26546 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
26550 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
26551 ## Having nested or stray pre tags results in the attempt to add duplicates,
26552 ## causing an assertion fail. This test tries to prevent that situation.
26554 Ensure ParagraphWrapper can deal with stray closing pre tags
26564 1. Ensure fostered text content is wrapped in element nodes
26568 <table>hi</table><table>ho</table>
26577 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
26579 parsoid=wt2html,wt2wt
26588 <tbody><tr><td> a</td></tr>
26593 Encapsulation properly handles null DSR information from foster box
26595 parsoid=wt2html,wt2wt
26597 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
26599 <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>
26603 1. Encapsulate foster-parented transclusion content
26605 parsoid=wt2wt,wt2html
26607 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
26609 <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>
26619 2. Encapsulate foster-parented transclusion content
26621 parsoid=wt2wt,wt2html
26623 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
26625 <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>
26636 3. Encapsulate foster-parented transclusion content
26638 parsoid=wt2wt,wt2html
26640 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
26642 <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>"]}">
26655 4. Encapsulate foster-parented transclusion content
26657 parsoid=wt2wt,wt2html
26659 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
26661 <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>"]}">
26674 5. Encapsulate foster-parented transclusion content
26676 parsoid=wt2wt,wt2html
26678 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
26680 <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>
26695 6. Encapsulate foster-parented transclusion content
26697 parsoid=wt2wt,wt2html
26699 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
26701 <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>
26717 7. Encapsulate foster-parented transclusion content
26719 parsoid=wt2wt,wt2html
26721 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
26723 <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>
26733 # Note that the wt is broken on purpose: the = should be {{=}} if you
26734 # don't want it to be a template parameter key.
26736 8. Encapsulate foster-parented transclusion content
26738 parsoid=wt2wt,wt2html
26741 }}{|{{echo|style='color:red'}}
26746 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
26748 <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>
26759 9. Encapsulate foster-parented transclusion content
26761 parsoid=wt2wt,wt2html
26763 <table>{{echo|hi</table>hello}}
26765 <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>
26769 Table in fosterable position
26780 <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">
26782 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
26788 # Parsoid only for T66747
26790 Properly encapsulate empty-content transclusions in fosterable positions
26798 <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"}]]}'>
26804 Always encapsulate foster box when template range is expanded to table
26817 T115289: Unclosed table
26819 {{echo|<table>}}<!--c-->[[Category:Two]]
26821 <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>
26825 T115289: Don't migrate newlines out of tables with fostered content
26827 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
26829 <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>
26833 T73074: More fostering fun
26835 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
26837 <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>
26841 Support <object> element with .data attribute
26845 <object data="test.swf"></object>
26847 <object data="test.swf"></object>
26851 Don't block XML namespace declaration
26853 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
26855 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
26858 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
26861 # -----------------------------------------------------------------
26862 # The following section of tests are primarily to spec requirements
26863 # around Parsoid's serialization (old, new, edited content)
26865 # All these tests are marked Parsoid html2wt and html2html only
26866 # ----------------------------------------------------------------
26869 Ignore rel attribute in a-tags during serialization to url-links
26873 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
26874 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
26875 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
26877 http://en.wikipedia.org/wiki/Foobar
26878 http://en.wikipedia.org/wiki/Foobar
26879 http://en.wikipedia.org/wiki/Foobar
26882 # 'mi' is a localinterwiki prefix as well as a language
26884 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
26888 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
26894 Parsoid should accept interwiki shortcuts
26898 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
26899 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
26900 <a href='./fr:Foo'>Foo</a></p>
26901 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
26902 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
26903 <a href='fr%3AFoo'>Foo</a></p>
26904 <p><a href='FR%3AFoo'>Foo</a>
26905 <a href='./FR:Foo'>Foo</a></p>
26920 Parsoid should not accept invalid interwiki shortcuts
26924 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
26925 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
26926 <a href='news:Foo'>Foo</a></p>
26935 New wikilinks should be serialized properly
26939 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
26940 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
26941 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
26942 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
26943 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
26947 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
26948 http://en.wikipedia.org/wiki/Foo
26949 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
26953 New wiki links (href variations)
26957 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
26958 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
26959 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
26960 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
26965 [[Toxine bactérienne]]
26969 New wiki links (content string variations)
26973 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
26974 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
26975 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
26979 [[Foo_bar|./Foo_bar]]
26983 New category links (href variations)
26987 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
26988 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
26989 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
26991 [[Category:Toxine bactérienne]]
26992 [[Category:Toxine bactérienne]]
26993 [[Category:Toxine bactérienne]]
26997 New sol transparent links don't need indent-pre nowiki protection
27002 <link rel="mw:PageProp/redirect" href="./Main_Page">
27003 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27004 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27006 #WEITERLEITUNG [[Main Page]]
27007 <!-- this is good --> [[Category:Good]]
27008 <!-- this is great --> [[Kategorie:Great]]
27012 New interlanguage links (href variations)
27016 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27017 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27018 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27020 [[es:Toxine bactérienne]]
27021 [[es:Toxine_bactérienne]]
27022 [[es:Toxine_bactérienne]]
27026 Image: Modifying size of an image (1)
27029 "modes": ["wt2wt"],
27031 ["img[height]", "attr", "height", "22"],
27032 ["img[width]", "attr", "width", "200"]
27036 [[Image:Foobar.jpg|230x230px]]
27038 [[Image:Foobar.jpg|200x200px]]
27042 Image: Modifying size of an image (2)
27045 "modes": ["wt2wt"],
27047 ["img[height]", "attr", "height", "100"],
27048 ["img[width]", "attr", "width", "500"]
27052 [[Image:Foobar.jpg|230x230px]]
27054 [[Image:Foobar.jpg|500x500px]]
27057 # Change in size is ignored so long as class='mw-default-size'
27059 Image: Modifying size of an image (3)
27062 "modes": ["wt2wt"],
27064 ["figure[class]", "removeClass", "mw-default-size"],
27065 ["figure img", "attr", "height", "19"],
27066 ["figure img", "attr", "width", "170"]
27070 [[Image:Foobar.jpg|thumb]]
27072 [[Image:Foobar.jpg|thumb|170x170px]]
27076 Image: Modifying alignment of an image (T50665)
27079 "modes": ["wt2wt"],
27081 ["figure[class]", "removeClass", "mw-halign-right"],
27082 ["figure[class]", "addClass", "mw-halign-left"]
27086 [[Image:Foobar.jpg|thumb|caption|right]]
27088 [[Image:Foobar.jpg|thumb|caption|left]]
27092 Image: Modifying mw-default-size of an frameless image (T64805)
27095 "modes": ["wt2wt"],
27097 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27101 [[Image:Foobar.jpg|frameless|right]]
27103 [[Image:Foobar.jpg|frameless|right|220x220px]]
27107 Image: Modifying valign of an image (T51221)
27110 "modes": ["wt2wt"],
27112 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27113 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27117 [[File:Foobar.jpg|20px|middle]]
27119 [[File:Foobar.jpg|20px|text-top]]
27123 Image: Modifying alt attribute of an image (T58400)
27126 "modes": ["wt2wt"],
27128 ["img[alt]", "attr", "alt", "some alternate edited text"]
27132 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27134 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27138 Image: Modifying caption of an image
27141 "modes": ["wt2wt"],
27143 ["figcaption", "text", "new caption"]
27147 [[Image:Foobar.jpg|thumb|original caption]]
27149 [[Image:Foobar.jpg|thumb|new caption]]
27153 Image: empty alt attribute (T50924)
27157 [[File:Foobar.jpg|thumb|alt=|bar]]
27159 <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>
27163 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27169 <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>
27171 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27175 Image: Block level image should have \n before and after
27178 [[File:Foobar.jpg|right|thumb|150x150px]]
27182 <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>
27187 Image: New block level image should have \n before and after (existing content)
27190 [[File:Foobar.jpg|right|thumb|150x150px]]
27194 <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>
27199 Image: upright option (parsoid)
27201 [[File:Foobar.jpg|thumb|upright|caption]]
27202 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27203 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27205 <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>
27206 <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>
27207 <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>
27211 Image: upright option is ignored on inline and frame images (parsoid)
27213 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27215 <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>
27219 Image: in template parameter with empty parameter
27221 {{echo|[[File:Foobar.jpg|link=]]}}
27223 <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>
27227 Image: from basic HTML (1)
27231 <span typeof="mw:Image">
27232 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27235 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27239 Image: from basic HTML (2)
27243 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27245 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27249 Image: from basic HTML (3)
27253 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27255 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27259 Image: from basic HTML (4)
27263 <img src="./File:Foobar.jpg">
27265 [[File:Foobar.jpg|link=]]
27269 Image: Invalid title as link
27271 [[File:Foobar.jpg|link=<]]
27273 <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>
27276 <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>
27280 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27285 <li><p>foo</p></li>
27292 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27296 <ul> <li>foo</li></ul>
27302 Don't strip leading whitespace when handling indent-pre suppressing tags
27307 <tr><td> indented row</td></tr>
27310 <b>This is very bold of you!</b>
27313 indented cell (no pre-wrapping!)
27323 '''This is very bold of you!'''
27327 indented cell (no pre-wrapping!)
27335 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
27357 <nowiki> </nowiki></span>bar2
27360 <nowiki> </nowiki><span>bar</span>
27363 <nowiki> </nowiki><span>foo</span>
27368 Lists: Dont insert newlines in a serialized list item.
27372 <ul><li>a<br>b</li><li>c</li></ul>
27379 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
27382 "modes": ["html2wt"],
27383 "scrubWikitext": false
27386 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27387 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27389 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27390 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27392 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
27394 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27396 == hello there [[Category:A1]] ==
27398 == [[Category:A2]] hi pal ==
27400 == <!--foo--> [[Category:A3]] how goes it ==
27402 == it goes well [[Category:A4]] <!--bar--> ==
27404 ==howdy [[Category:A5]]==
27410 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
27413 "modes": ["html2wt"],
27414 "scrubWikitext": true
27417 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27418 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27420 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27421 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27423 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27431 <!--foo--> [[Category:A3]]
27436 [[Category:A4]] <!--bar-->
27444 Headings: Don't hoist metas that come from templates
27447 "modes": ["html2wt"],
27448 "scrubWikitext": true
27451 <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>
27453 == {{echo|foo [[Category:Foo]]}} ==
27457 Headings: Category in ref isn't hoisted
27460 "modes": ["html2wt"],
27461 "scrubWikitext": true
27464 <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>
27466 <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>
27469 [[Category:Baz]] </ref> ==
27475 Parsoid: Serialize positional parameters with = in them as named parameter
27479 <p about="#mwt1" typeof="mw:Transclusion"
27480 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
27482 <p about="#mwt1" typeof="mw:Transclusion"
27483 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
27485 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27486 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27487 <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>
27491 {{echo|1=f=oo|2=bar}}
27493 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27494 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27495 {{echo|<nowiki>f=oo</nowiki>|bar}}
27499 Parsoid: Serialize positional parameters with = in extlink as named parameter
27503 <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>
27505 {{echo|1=http://stuff?is=ok}}
27509 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
27513 <div>a<p>b</p></div>
27534 Substrings resembling wikitext in hrefs should not get nowiki escapes
27538 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
27544 Enforce single-line context in the serializer
27551 <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">
27552 </span><span about="#mwt1">you</span> </h2>
27554 <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>
27556 <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
27557 there</span></li></ol>
27569 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
27576 </tbody></table></dd></dl>
27580 == hi {{bogus|there
27591 * foo '''bar''' baz
27603 Serialize new placeholder space without spans
27607 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
27609 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
27611 <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>
27617 <ref>foo : bar</ref>ok
27621 #-----------------------
27622 # Tag minimization tests
27623 #-----------------------
27626 1. I/B quote minimization: wikitext-only tags should be combined
27630 <p><i>A</i><i>B</i></p>
27631 <p><b>A</b><b>B</b></p>
27632 <p><i>A</i><b><i>B</i></b></p>
27633 <p><b>A</b><i><b>B</b></i></p>
27634 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
27635 <p><i><b>A</b></i><i><b>B</b></i></p>
27636 <p><i><b>A</b></i><b><i>B</i></b></p>
27637 <p><b><i>A</i></b><i><b>B</b></i></p>
27657 2. I/B quote minimization: wikitext and html tags should not be combined
27661 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
27662 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
27666 ''A''<nowiki/>'''<i>B</i>'''
27670 3. I/B quote minimization: templated content stops minimization
27674 <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>
27675 <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>
27677 ''A''{{echo|''B''}}
27679 ''A''{{echo|'''''B'''''}}
27683 4. I/B quote minimization: new content should be mimimized with adjacent old content
27687 <p><i>A</i><i>B</i></p>
27688 <p><b>A</b><b>B</b></p>
27689 <p><i>A</i><b><i>B</i></b></p>
27699 5a. Merge adjacent quote nodes if they've been edited
27702 "modes": ["wt2wt", "selser"],
27704 ["p", "contents", "remove", ":contains('b')"]
27714 5b. Merge adjacent quote nodes if they've been edited
27717 "modes": ["wt2wt", "selser"],
27723 ''a''<span id="x">b</span>''c''
27729 1. Merge adjacent link nodes as long as at least one element is new
27732 "modes": ["html2wt"],
27733 "scrubWikitext": true
27736 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
27737 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
27738 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
27742 [[Football|Foot]][[Football|ball]]
27746 2. Merge adjacent link nodes and enable additional normalizations
27749 "modes": ["html2wt"],
27750 "scrubWikitext": true
27753 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
27755 [[Football|''Football'']]
27759 3. Don't merge adjacent link nodes if scrubWikitext is false
27762 "modes": ["html2wt"],
27763 "scrubWikitext": false
27766 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
27768 [[Football|Foot]][[Football|ball]]
27771 #------------------------------
27772 # End of tag minimization tests
27773 #------------------------------
27776 T56262: New entities
27780 <span typeof="mw:Entity"> </span>
27785 ## Note that there is no wikitext output for 'unknownproperty' ##
27786 ## Unknown magic words are silently dropped ##
27793 <meta property='mw:PageProp/toc' />
27794 <meta property='mw:PageProp/notoc' />
27795 <meta property='mw:PageProp/forcetoc' />
27796 <meta property='mw:PageProp/index' />
27797 <meta property='mw:PageProp/noindex' />
27798 <meta property='mw:PageProp/nogallery' />
27799 <meta property='mw:PageProp/noeditsection' />
27800 <meta property='mw:PageProp/notitleconvert' />
27801 <meta property='mw:PageProp/nocontentconvert' />
27802 <meta property='mw:PageProp/unknownproperty' />
27812 __NOCONTENTCONVERT__
27816 Consecutive <pre>s should not get merged
27818 parsoid=html2wt,html2html
27820 <pre>a</pre><pre>b</pre>
27848 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
27852 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
27854 [[Special:BookSources/1234567890|ISBN 1234567895]]
27858 Edited RFC links not serializable as RFC links should serialize as extlinks
27862 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
27864 [//tools.ietf.org/html/rfc123 New RFC]
27868 Edited PMID links not serializable as PMID links should serialize as extlinks
27872 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
27874 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
27878 WTS of autolinks with trailing/surrounding context
27882 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
27883 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
27884 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
27885 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
27886 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
27887 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
27889 http://cscott.net'''foo'''
27891 http://cscott.net<b>foo</b>
27893 '''http://cscott.net'''
27895 '''http://cscott.net '''
27897 '''http://cscott.net<nowiki/>x'''
27899 http://cscott.net<nowiki/>x
27903 WTS of autolinks with nowikis (round-trip)
27905 x<nowiki/>http://cscott.net<nowiki/>x
27907 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
27910 # this is the "easy" test because it leaves in place all the
27911 # data-parsoid information indicating this is an autolink
27913 WTS of autolinks with escapes (editing)
27916 "modes": ["wt2wt"],
27918 [ "span", "remove" ]
27922 x<nowiki/>http://cscott.net<nowiki/>x
27924 x<nowiki/>http://cscott.net<nowiki/>x
27928 WTS of edited autolink-like text (T103364)
27931 "modes": ["wt2wt"],
27933 [ "span[typeof]", "removeAttr", "typeof" ]
27937 Not a link: <nowiki>http://example.com</nowiki>.
27939 Not a link: <span><nowiki>http://example.com</nowiki></span>.
27943 WTS of newly-authored autolink-like text (T103364)
27947 <p>http://example.com is not a link.</p>
27949 <nowiki>http://example.com</nowiki> is not a link.
27953 WTS of autolink-like text after an autolink (T108563)
27957 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
27959 http://example.com <nowiki>http://example.com</nowiki> is not a link.
27963 Magic links inside links (not autolinked)
27965 [[Foo|http://example.com]]
27968 [[Foo|ISBN 123456789x]]
27970 [http://foo.com http://example.com]
27971 [http://foo.com RFC 1234]
27972 [http://foo.com PMID 1234]
27973 [http://foo.com ISBN 123456789x]
27975 <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>
27976 <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>
27978 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
27979 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
27980 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
27981 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
27983 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
27984 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
27985 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
27986 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
27990 Magic links inside image captions (autolinked)
27992 [[File:Foobar.jpg|thumb|http://example.com]]
27993 [[File:Foobar.jpg|thumb|RFC 1234]]
27994 [[File:Foobar.jpg|thumb|PMID 1234]]
27995 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
27997 <div class="thumb tright">
27998 <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>
27999 <div class="thumbcaption">
28000 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28001 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
28004 <div class="thumb tright">
28005 <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>
28006 <div class="thumbcaption">
28007 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28008 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
28011 <div class="thumb tright">
28012 <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>
28013 <div class="thumbcaption">
28014 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28015 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
28018 <div class="thumb tright">
28019 <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>
28020 <div class="thumbcaption">
28021 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28022 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
28026 <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>
28027 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//tools.ietf.org/html/rfc1234" rel="mw:ExtLink">RFC 1234</a></figcaption></figure>
28028 <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>
28029 <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>
28033 WTS of magic word text (T109371)
28038 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28039 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28041 <nowiki>RFC 1234</nowiki>
28043 [http://foo.com RFC 1234]
28049 Edited Redirect link should emit a non-piped wikitext link
28053 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28059 T75121: Infer extension name from typeOf if data-mw is not present
28061 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28063 <div typeOf="mw:Extension/foo"></div>
28068 # Note that the <p> wrapping isn't present in PHP parser output
28069 # The important thing for this test is that P-wrapping doesn't
28070 # interfere with the <nowiki> protection for leading - in <td>
28071 # (which isn't necessary for <th>).
28073 T88318: p-wrapped dash in table.
28075 parsoid=html2wt,wt2wt
28078 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28079 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28080 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28087 |<nowiki>-</nowiki>
28088 |<nowiki>- </nowiki>
28107 <td><small>-</small></td>
28119 T149209: WTS: Handle newlines in table cells properly
28127 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
28129 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28135 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
28137 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
28159 T149209: Selser: Handle newlines in table cells properly
28162 "modes": ["selser"],
28164 [ "#h1", "html", "a\nb\n" ],
28165 [ "#h2", "html", "a\nb\n" ],
28166 [ "#c1", "html", "a\nb\n" ],
28167 [ "#c2", "html", "<p>a</p>" ],
28168 [ "#c3", "html", "<p>a</p>" ],
28169 [ "#c4", "html", "edit-me<p>a</p>" ]
28174 ! id="h1" |edit-me!!1
28176 ! id="h2" |edit-me||2
28178 | id="c1" |edit-me||3
28180 | id="c2" |edit-me||4
28182 | id="c3" |edit-me||p||q||r
28184 | id="c4" |edit-me||p||q||r
28213 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28218 <td id='mwAc'>foo</td>
28219 <td id='serialize-this'>bar</td>
28224 | id="serialize-this" |bar
28229 Parsoid-like element ids should not be serialized to wikitext unless shadowed
28233 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
28235 <div id="hello">ok</div>
28242 "modes": ["wt2wt"],
28244 [ "#xyz", "before", "<b>before</b> stuff " ],
28245 [ "#xyz", "after", " stuff <i>after</i>" ],
28246 [ "#xyz", "html", "x <b>y</b> z" ]
28250 <span id="xyz">hello</span>
28252 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
28256 Never serialize a-tag as html, regardless of what data-parsoid has to say
28258 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28260 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
28265 ## SSS FIXME: This is broken output nevertheless.
28266 ## What might be a reasonable non-broken output for this?
28267 ## This is an edge case unlikely to be seen in production
28268 ## that I am not wasting more time on this right now.
28270 Never serialize a-tag as html, no matter what attributes it has
28272 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28274 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
28276 [http://boo.org http://boohoo.org]
28279 # Misnested is an indication that selser can reuse the source but these have
28280 # shown to sneak through on occasion. See T101768.
28281 # The original wikitext here is: [http://test.com [[one]] two three]
28283 Strip span tags added to mark misnested links
28287 <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>
28289 [http://test.com][[one]] two three
28293 Catch regression when unpacking misnested links
28297 {{echo|hi}}[http://example.com [[ho]]]
28299 <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>
28303 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
28307 <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|}"]}'>
28319 ## This test verifies the presence and computation of this attribute indirectly
28320 ## by making an edit and ensuring that the serialization is correct (which it would be
28321 ## only if firstWikitextNode is properly set).
28323 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
28326 "modes": ["wt2wt"],
28328 [ "div#x", "remove" ],
28329 [ "div", "before", "<div>new</div>" ]
28333 <div id="x">foo</div>
28335 {{echo|<div>boo</div>
28343 {{echo|<div>boo</div>
28349 # --------------------------------------------
28350 # Tests spec'ing wikitext serialization norms |
28351 # --------------------------------------------
28354 Serialize multi-line indent-pre starting with wikitext syntax
28368 1. Categories should always be serialized on their own line
28372 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
28380 2. Categories that are part of templates should not introduce a line break
28382 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
28384 <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>
28387 # Careful while editing these next 2 tests. There are \u200f characters
28388 # before and after the <link> tags in the HTML and following some
28389 # of the categories in wikitext
28390 # Do not remove these characters in edits.
28392 # As part of the serialization, these bidi characters will get stripped.
28394 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
28397 "modes": ["html2wt"],
28398 "scrubWikitext": true
28401 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
28402 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
28405 [[קטגוריה: שיטות משפט]]
28409 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
28412 "modes": ["html2wt"],
28413 "scrubWikitext": true
28416 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
28423 Lists: Add space after bullets
28430 <li><span> baz</span></li>
28435 * <span> baz</span>
28439 1. Headings: Add space before/after == (T53744)
28446 <h2><span> baz</span></h2>
28454 == <span> baz</span> ==
28458 2. Headings: Add space before/after == even after hoisted content
28461 "modes": ["html2wt"],
28462 "scrubWikitext": true
28465 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
28473 1. Headings: suppress newly created empty headings
28476 "modes": ["html2wt"],
28477 "scrubWikitext": true
28485 2. Headings: don't suppress empty headings if scrubWikitext is false
28495 3. Headings: suppress empty headings on edits
28498 "modes": ["selser"],
28499 "scrubWikitext": true,
28505 ==<span id="x">foo</span>==
28510 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
28513 "modes": ["html2wt"],
28514 "scrubWikitext": true
28517 <h2>foo<br/>bar</h2>
28518 <h2>foo <span><br/>bar</span> baz</h2>
28522 == foo <span> bar</span> baz ==
28526 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
28529 "modes": ["html2wt"],
28530 "scrubWikitext": false
28533 <h2>foo<br/>bar</h2>
28539 1. WT Quote Tags: suppress newly created empty style tags
28542 "modes": ["html2wt"],
28543 "scrubWikitext": true
28551 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
28557 ''<nowiki/>'''''<nowiki/>'''
28561 3. WT Quote Tags: suppress empty style tags on edits
28564 "modes": ["selser"],
28565 "scrubWikitext": true,
28571 '''<span id="x">foo</span>'''
28576 1. Anchors: suppress newly created empty anchors
28579 "modes": ["html2wt"],
28580 "scrubWikitext": true
28583 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
28588 2. Anchors: don't suppress empty anchors if scrubWikitext is false
28591 "modes": ["html2wt"],
28592 "scrubWikitext": false
28595 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
28601 3. Anchors: suppress empty anchors on edits
28604 "modes": ["selser"],
28605 "scrubWikitext": true,
28611 [[Test|<span id="x">foo</span>]]
28616 3a. Anchors: do not suppress numbered extlinks
28619 "modes": ["wt2wt"],
28620 "scrubWikitext": true
28625 <a rel="mw:ExtLink" href="http://foo.com"></a>
28629 3b. Anchors: do not suppress numbered extlinks
28632 "modes": ["wt2wt"],
28633 "scrubWikitext": true,
28639 [http://foo.com <span id="x">foo</span>]
28645 Normalizations should be restricted to edited content
28648 "modes": ["selser"],
28649 "scrubWikitext": true,
28651 [ "h1", "before", "<i></i>"]
28665 1. Multiple normalizations (html2wt)
28668 "modes": ["html2wt"],
28669 "scrubWikitext": true
28673 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
28674 </a><b><i></i></b>x</p>
28683 2. Multiple normalizations (selser)
28686 "modes": ["selser"],
28687 "scrubWikitext": true,
28689 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
28693 <span id="x">foo</span>
28695 <span id="x">foo</span>
28701 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
28704 "modes": ["html2wt"],
28705 "scrubWikitext": true
28717 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
28724 <nowiki> </nowiki>hi
28726 <nowiki> </nowiki> hello
28730 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
28733 "modes": ["html2wt"],
28734 "scrubWikitext": true
28743 baz bang</td></tr></table>
28749 bar<span>boo</span></p>
28765 bar<span>boo</span>
28769 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
28772 "modes": ["selser"],
28773 "scrubWikitext": true,
28775 [ "p", "html", " a\n b" ]
28786 1. New links that end in spaces
28789 "modes": ["html2wt"],
28790 "scrubWikitext": false
28793 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
28794 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
28795 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
28797 [[Berlin ]]<nowiki/>is the capital of Germany.
28801 [[Boston ]] is a city.
28805 2. New links that end in spaces
28808 "modes": ["html2wt"],
28809 "scrubWikitext": true
28812 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
28813 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
28814 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
28816 [[Berlin]] is the capital of Germany.
28820 [[Boston]] is a city.
28824 1. Table cells with escapable prefixes
28827 "modes": ["html2wt"],
28828 "scrubWikitext": false
28832 <tr><td>a</td></tr>
28833 <tr><td>-</td></tr>
28834 <tr><td>+</td></tr>
28840 |<nowiki>-</nowiki>
28842 |<nowiki>+</nowiki>
28847 2. Table cells with escapable prefixes
28850 "modes": ["html2wt"],
28851 "scrubWikitext": true
28855 <tr><td>a</td></tr>
28856 <tr><td>-</td></tr>
28857 <tr><td>+</td></tr>
28870 3a. Table cells with escapable prefixes after edits
28873 "modes": ["selser"],
28874 "scrubWikitext": true,
28876 [ "table tbody tr:first-child td:first-child", "remove"]
28890 3b. Table cells with escapable prefixes after edits
28893 "modes": ["selser"],
28894 "scrubWikitext": true,
28896 [ "table tbody tr:first-child td:first-child", "html", "-" ],
28903 |<span id="x">foo</span>+
28912 # FIXME: This test will fail because
28913 # normalization doesn't realize that the id attribute
28914 # will eliminate the escapable scenario
28916 4a. Table cells without escapable prefixes after edits
28919 "modes": ["selser"],
28920 "scrubWikitext": true,
28922 [ "#x", "html", "-" ]
28935 ## This tests normalizer's ability to discriminate between
28936 ## cells having identical content.
28938 4b. Table cells without escapable prefixes after edits
28941 "modes": ["selser"],
28942 "scrubWikitext": true,
28944 [ "td", "html", "-" ]
28957 ## This tests normalizer's ability to not be tripped by
28958 ## comments (and whitespace)
28960 4c. Table cells without escapable prefixes after edits
28963 "modes": ["selser"],
28964 "scrubWikitext": true,
28966 [ "table tbody tr td:first-child", "remove" ]
28981 ## This tests normalizer's ability to handle HTML cells
28983 4d. Table cells without escapable prefixes after edits
28986 "modes": ["selser"],
28987 "scrubWikitext": true,
28989 [ "td", "html", "-" ]
28994 <tr><td>a</td></tr>
28998 <tr><td>-</td></tr>
29002 ## T111151 Remove font elements without attributes
29004 5a. font tags without attributes should be dropped in scrubWikitext mode
29007 "modes": ["html2wt"],
29008 "scrubWikitext": true
29012 <font><font>bar</font></font>
29013 <font class="x">boo</font>
29017 <font class="x">boo</font>
29021 5b. font tags should not be dropped without scrubWikitext being enabled
29024 "modes": ["html2wt"],
29025 "scrubWikitext": false
29034 Escape nowiki DOM elements
29038 <nowiki><i>foo</i></nowiki>
29040 <nowiki>''foo''</nowiki>
29043 # This is meant to be an interim fix while we go about figuring out
29044 # how to not introduce these trailing <nowiki/>s in the first place.
29046 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29050 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29052 <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>
29053 <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>
29066 # ---------------------------------------------------
29067 # End of tests spec'ing wikitext serialization norms |
29068 # ---------------------------------------------------
29072 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
29080 <td><b>c</b><p>d</p></td>
29099 Anchor without href scenarios
29101 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29104 <a class="no">dice</a>
29109 <span name="foo"></span>
29113 New transclusion added after a list should be serialized after the list
29117 <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>
29123 # -----------------------------------------------------------------
29124 # End of section for Parsoid-only html2wt tests for serialization
29126 # -----------------------------------------------------------------
29128 # -----------------------------------------------------------------
29129 # The following section of tests are primarily to spec behavior of
29130 # the selective serializer. All these tests have manual selser
29131 # changes. The automated selser changes for all tests handle the
29132 # wide variation of changes, but these tests here capture specs
29133 # deterministically.
29134 # ----------------------------------------------------------------
29138 Selser: New comments should not be lost
29141 "modes": ["selser"],
29143 [ "#a", "after", "<!--c1-->" ],
29144 [ "#b", "before", "<!--c2-->" ]
29148 <span id="a">a</span>
29150 <span id="b">b</span>
29152 <span id="a">a</span><!--c1-->
29154 <!--c2--><span id="b">b</span>
29159 Selser: Check for validity of DSR before using it
29162 "modes": ["selser"],
29164 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
29168 <span id="a">a</span>
29170 {{DISPLAYTITLE:foo}}
29171 <span id="a">a</span>
29175 1. DOMDiff: Changes to <ref> content should be looked up using id
29178 "modes": ["selser"],
29180 ["#X", "after", "bar"],
29181 ["#Y", "after", "baz"]
29185 X <ref><span id="X">foo</span></ref>
29188 <ref name="a"><span id="Y">foo</span></ref>
29191 X <ref><span id="X">foo</span>bar</ref>
29194 <ref name="a"><span id="Y">foo</span>baz</ref>
29199 2. DOMDiff: Changes to <ref> content should be looked up using id
29202 "modes": ["selser"],
29204 ["#Z", "after", "bar"]
29208 A <ref>foo bar for a</ref>
29209 B <ref group="X" name="b" />
29213 <references group="X">
29214 <ref name="b"><span id="Z">foo</span></ref>
29217 A <ref>foo bar for a</ref>
29218 B <ref group="X" name="b" />
29222 <references group="X">
29223 <ref name="b"><span id="Z">foo</span>bar</ref>
29228 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
29231 "modes": ["selser"],
29233 [ "div:first-child", "text", "bar" ]
29237 <div style="{{1x|color:red;}}%">foo</div>
29239 <div style="{{1x|color:red;}}%">bar</div>
29252 <li class="mw-empty-elt"></li>
29253 <li class="mw-empty-elt"></li>
29261 [[File:Thumb.png|thumb]]
29263 <div class="thumb tright">
29264 <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>
29265 <div class="thumbcaption">
29266 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
29273 unclosed internal link XSS (T137264)
29275 [[#%3Cscript%3Ealert(1)%3C/script%3E|
29277 <p>[[#<script>alert(1)</script>|
29280 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
29283 # Use $wgRawHtml to inject a <style> tag, since you normally can't in wikitext
29284 # (Parsoid doesn't support $wgRawHtml==true)
29286 Validating that <style> isn't eaten by tidy (T167349)
29291 <html><style>.foo::before { content: "<foo>"; }</style></html>
29292 <html><style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style></html>
29296 <style>.foo::before { content: "<foo>"; }</style>
29297 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29302 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
29304 == A&B&C&amp;D&amp;amp;E ==
29305 [[#A&B&C&amp;D&amp;amp;E]]
29307 <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>
29308 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
29313 Decoding of HTML entities in indicator names for IDs (T104196)
29317 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29319 1&2&3&4&amp;5=Indicator
29324 HTML5 ids: fallback to legacy
29326 wgFragmentMode=[ 'html5', 'legacy' ]
29338 == Hey < # " > % : ' ==
29339 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29341 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29343 <!-- These two links should produce identical HTML -->
29344 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29347 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
29349 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29350 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29351 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29352 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29353 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29354 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29358 <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>
29359 <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>
29360 <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>
29361 <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>
29362 <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>
29363 <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>
29364 <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>
29365 </p><p>💩 <span id="💩"></span>
29366 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
29371 HTML5 ids: legacy with a fallback to modern
29373 wgFragmentMode=[ 'legacy', 'html5' ]
29385 == Hey < # " > % : ' ==
29386 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29388 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29390 <!-- These two links should produce identical HTML -->
29391 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29394 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
29396 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29397 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29398 <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>
29399 <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>
29400 <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>
29401 <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>
29405 <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>
29406 <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>
29407 <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>
29408 <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>
29409 <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>
29410 <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>
29411 <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>
29412 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
29413 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
29418 HTML5 ids: no legacy
29420 wgFragmentMode=[ 'html5' ]
29432 == Hey < # " > % : ' ==
29433 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29435 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29437 <!-- These two links should produce identical HTML -->
29438 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29441 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
29443 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29444 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29445 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29446 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29447 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29448 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29452 <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>
29453 <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>
29454 <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>
29455 <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>
29456 <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>
29457 <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>
29458 <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>
29459 </p><p>💩 <span id="💩"></span>
29460 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>